Lines Matching refs:text
31 * AsciiSrc.c - AsciiSrc object. (For use with the text widget).
226 * pos - position of the text to retreive.
227 * RETURNED text - text block that will contain returned text.
233 ReadText(w, pos, text, length)
236 XawTextBlock *text;
243 text->firstPos = pos;
244 text->ptr = piece->text + (pos - start);
246 text->length = (length > count) ? count : length;
247 return(pos + text->length);
251 * Description: Replaces a block of text with new text.
253 * startPos, endPos - ends of text that will be removed.
254 * text - new text to be inserted into buffer at startPos.
260 ReplaceText (w, startPos, endPos, text)
263 XawTextBlock *text;
305 MyStrncpy(end_piece->text, (end_piece->text + endPos - end_first),
314 MyStrncpy(start_piece->text + (startPos - start_first),
315 start_piece->text + (endPos - start_first),
320 start_piece->text[src->ascii_src.length - (endPos - startPos)] = '\0';
324 src->ascii_src.length += -(endPos - startPos) + text->length;
326 if ( text->length != 0) {
334 length = text->length;
335 firstPos = text->firstPos;
349 start_piece->text[src->ascii_src.length] = '\0';
362 ptr = start_piece->text + (startPos - start_first);
365 strncpy(ptr, text->ptr + firstPos, fill);
375 start_piece->text[start_piece->used] = '\0';
381 * Description: Scans the text source for the number and type
445 ptr = (position - first) + piece->text;
485 if ( ptr < piece->text ) {
487 if (piece == NULL) /* Begining of text. */
489 ptr = piece->text + piece->used - 1;
491 else if ( ptr >= (piece->text + piece->used) ) {
493 if (piece == NULL) /* End of text. */
495 ptr = piece->text;
523 * Description: Searchs the text source for the text block passed
527 * text - the text block to search for.
532 Search(w, position, dir, text)
536 XawTextBlock * text;
554 buf = XtMalloc(sizeof(unsigned char) * text->length);
555 strncpy(buf, (text->ptr + text->firstPos), text->length);
557 ptr = (position - first) + piece->text;
561 : *(buf + text->length - count - 1)) ) {
562 if (count == (text->length - 1))
578 while ( ptr < piece->text ) {
580 if (piece == NULL) { /* Begining of text. */
584 ptr = piece->text + piece->used - 1;
587 while ( ptr >= (piece->text + piece->used) ) {
589 if (piece == NULL) { /* End of text. */
593 ptr = piece->text;
600 return(position - (text->length - 1));
645 XawTextSetSource( XtParent(new), new, 0); /* Tell text widget
885 strncpy(string + first, piece->text, piece->used);
1030 piece->text = src->ascii_src.string;
1040 piece->text = XtMalloc(src->ascii_src.piece_size * sizeof(unsigned char));
1043 strncpy(piece->text, ptr, piece->used);
1125 XtFree(piece->text);
1193 new->text = XtMalloc(src->ascii_src.piece_size * sizeof(unsigned char));
1194 strncpy(new->text, piece->text + HALF_PIECE,
1247 * Returns: a pointer to the new text source.
1293 * Returns: a pointer to the new text source.