home *** CD-ROM | disk | FTP | other *** search
- /*
- * file operands
- * March 1989, Miles Bader (orig from cc.c by fred fish)
- */
-
- /*
- * Command line arguments that represent files to be compiled, assembled,
- * or linked, are kept track of as "ops". If, for example,
- * the file name is "df0:mydir/junk.c", then the rootname is
- * "df0:mydir/junk", the basename is "junk", and the suffix is "c".
- * String suffixes are used, rather than single character suffixes, to
- * allow use of names with multicharacter suffixes.
- */
-
- struct op{ /* Info about each operand (non option) */
- char *rootname; /* Name minus any suffix */
- char *basename; /* Name minus any prefix or suffix */
- char *suffix; /* suffix of operand */
- };
-
- /*
- * macros to determine the suffix type of a file given a pointer to
- * its operand structure.
- */
- #define op_IsC(op) (strcmp(op->suffix,"c")==0)
- #define op_IsS(op) (strcmp(op->suffix,"s")==0)
- #define op_IsO(op) (strcmp(op->suffix,"o")==0)
-
- struct op *op_Create(char *name);
- void op_Free(struct op *op);
-