[net.sources.bugs] Problems with cxref program: stpchr

wirch@puff.UUCP (11/06/85)

Even though the source said that the sort-of-C-cross-reference-symbol
generator should be compiled under Lattice C on a micro (that's sort of
a small mainframe, or a smaller VAX, for those of you in academia.)

Here are descriptions of the Lattice supplied functions that have
been generating errors for some of you:

char *p;
char *s;
char c;

p = stpchr(s,c)

searches for first occurence of c in s; NULL returned if not found.

iscsymf(c) is a macro, returns non-zero if c is a valid first character
for a C identifier, 0 if not.

iscsym(c) is a macro, returns non-zero if c is a valid character for
a C identifier, 0 if not.

Rick

jpn@teddy.UUCP (11/07/85)

>Here are descriptions of the Lattice supplied functions:
>
>char *s;
>char c;
>
>p = stpchr(s,c)

    Replace with index(s,c) with V7 derived libraries.   Replace with
    strchr(s,c) on System III/V derived libraries.  "#define stpchr strchr"
    works great.  By the way, Lattice 2.15 has strchr in the library.

>iscsymf(c) is a macro

    #define iscsymf(_c) (isalpha(_c) || _c == '_')

>iscsym(c) is a macro

    #define iscsymf(_c) (isalnum(_c) || _c == '_')

Don't forget to #include <ctype.h>