home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_07
/
9n07116a
< prev
next >
Wrap
Text File
|
1991-05-09
|
498b
|
29 lines
/*
* xr.cpp - a cross-reference generator
*/
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include "xrt.h"
int getword(char *word, size_t lim);
#define MAXWORD 100
int main()
{
char word[MAXWORD];
unsigned lineno = 1;
while (getword(word, MAXWORD) != EOF)
if (isalpha(word[0]))
xrt_add(word, lineno);
else if (word[0] == '\n')
++lineno;
xrt_print();
xrt_destroy();
return 0;
}