Lines Matching refs:text
31 * AsciiSrc.c - AsciiSrc object. (For use with the text widget).
237 * pos - position of the text to retreive.
238 * RETURNED text - text block that will contain returned text.
244 ReadText(w, pos, text, length)
247 XawTextBlock *text;
254 text->firstPos = pos;
255 text->ptr = piece->text + (pos - start);
257 text->length = (length > (int)count) ? count : length;
258 return(pos + text->length);
262 * Description: Replaces a block of text with new text.
264 * startPos, endPos - ends of text that will be removed.
265 * text - new text to be inserted into buffer at startPos.
271 ReplaceText (w, startPos, endPos, text)
274 XawTextBlock *text;
314 MyStrncpy(end_piece->text, (end_piece->text + endPos - end_first),
323 MyStrncpy(start_piece->text + (startPos - start_first),
324 start_piece->text + (endPos - start_first),
329 start_piece->text[src->ascii_src.length - (endPos - startPos)] = '\0';
333 src->ascii_src.length += -(endPos - startPos) + text->length;
335 if ( text->length != 0) {
343 length = text->length;
344 firstPos = text->firstPos;
358 start_piece->text[src->ascii_src.length] = '\0';
371 ptr = start_piece->text + (startPos - start_first);
374 strncpy(ptr, text->ptr + firstPos, fill);
384 start_piece->text[start_piece->used] = '\0';
393 * Description: Scans the text source for the number and type
457 ptr = (position - first) + piece->text;
498 if ( ptr < piece->text ) {
500 if (piece == NULL) /* Begining of text. */
502 ptr = piece->text + piece->used - 1;
504 else if ( ptr >= (piece->text + piece->used) ) {
506 if (piece == NULL) /* End of text. */
508 ptr = piece->text;
536 * Description: Searchs the text source for the text block passed
540 * text - the text block to search for.
545 Search(w, position, dir, text)
549 XawTextBlock * text;
567 buf = XtMalloc((unsigned)sizeof(unsigned char) * text->length);
568 strncpy(buf, (text->ptr + text->firstPos), text->length);
570 ptr = (position - first) + piece->text;
575 : *(buf + text->length - count - 1)) ) {
576 if (count == (text->length - 1))
592 while ( ptr < piece->text ) {
594 if (piece == NULL) { /* Begining of text. */
598 ptr = piece->text + piece->used - 1;
601 while ( ptr >= (piece->text + piece->used) ) {
603 if (piece == NULL) { /* End of text. */
607 ptr = piece->text;
614 return(position - (text->length - 1));
657 XawTextSetSource( XtParent(new), new, 0); /* Tell text widget
698 *((char **) args[i].value) = src->ascii_src.first_piece->text;
952 strncpy(string + first, piece->text, piece->used);
1102 piece->text = src->ascii_src.string;
1112 piece->text = XtMalloc((unsigned)src->ascii_src.piece_size
1116 strncpy(piece->text, ptr, piece->used);
1198 XtFree(piece->text);
1272 new->text = XtMalloc(src->ascii_src.piece_size * sizeof(unsigned char));
1273 strncpy(new->text, piece->text + HALF_PIECE,
1332 * Returns: a pointer to the new text source.
1378 * Returns: a pointer to the new text source.