Beispiel #1
0
int store_limits(
    STREAM *str,
    TEXT_RLD *tr)
{
    change_dot(tr, 4);
    list_word(str, DOT, 0, 2, "");
    list_word(str, DOT + 2, 0, 2, "");
    return text_limits(tr, &DOT);
}
print_line( char *before, char *word, char *after, char *tag)
{
	int i , x, y, z ;
/*
	printf("%s\t%s\t%s\t%s\n", before, word, after, tag) ;
*/
	if( list_word(word) )
		return ;
	x = strlen(before) ;
	y = strlen(word) ;
	z = strlen(after) ;
	// put in sortable field
	// strip out with awk after sorting
	printf("%s %s\t", word, after) ;
	// shorten before string to fit field
	for( ; x > 30 ; x-- )
		before++ ;
	printf("%30s", before) ;
	// print keyword, html tagged
	printf("  %s%s</a>  ", tag, word) ;
	// padding, outside tag
	for( ; y < 18 ; y++ )
		putchar(' ') ;
	if( z )
		printf("%s", after) ;
	printf("\n") ;
}
Beispiel #3
0
static int store_displaced_word(
    STREAM *str,
    TEXT_RLD *tr,
    int size,
    unsigned word)
{
    change_dot(tr, size);
    list_word(str, DOT, word, size, "'");
    return text_displaced_word(tr, &DOT, size, word);
}
Beispiel #4
0
static int store_global_displaced_offset_word(
    STREAM *str,
    TEXT_RLD *tr,
    int size,
    unsigned word,
    char *global)
{
    change_dot(tr, size);
    list_word(str, DOT, word, size, "G");
    return text_global_displaced_offset_word(tr, &DOT, size, word, global);
}
Beispiel #5
0
static int store_psect_offset_word(
    STREAM *str,
    TEXT_RLD *tr,
    int size,
    unsigned word,
    char *name)
{
    change_dot(tr, size);
    list_word(str, DOT, word, size, "'");
    return text_psect_offset_word(tr, &DOT, size, word, name);
}
Beispiel #6
0
static void store_complex_displaced(
    STREAM *refstr,
    TEXT_RLD *tr,
    int size,
    EX_TREE *value)
{
    TEXT_COMPLEX    tx;

    change_dot(tr, size);

    implicit_gbl(value);               /* Turn undefined symbols into globals */

    text_complex_begin(&tx);

    if (!complex_tree(&tx, value)) {
        report(refstr, "Invalid expression\n");
        store_word(refstr, tr, size, 0);
    } else {
        list_word(refstr, DOT, 0, size, "C");
        text_complex_commit_displaced(tr, &DOT, size, &tx, 0);
    }
}
Beispiel #7
0
static void store_complex(
    STREAM *refstr,
    TEXT_RLD *tr,
    int size,
    EX_TREE *value)
{
    TEXT_COMPLEX    tx;

    change_dot(tr, size);              /* About to store - update DOT */

    implicit_gbl(value);               /* Turn undefined symbols into globals */

    text_complex_begin(&tx);           /* Open complex expression */

    if (!complex_tree(&tx, value)) {   /* Translate */
        report(refstr, "Invalid expression\n");
        store_word(refstr, tr, size, 0);
    } else {
        list_word(refstr, DOT, 0, size, "C");
        text_complex_commit(tr, &DOT, size, &tx, 0);
    }
}