static int xutail(FILE *, struct castr *);
/*
- * Does the code hardcode indexes for table TYPE?
+ * Does the code hardcode indexes for table @type?
*/
static int
have_hardcoded_indexes(int type)
}
/*
- * Okay to truncate table TYPE?
+ * Okay to truncate table @type?
*/
static int
may_truncate(int type)
}
/*
- * Is TYPE's 0-th selector a usable ID?
+ * Is @type's 0-th selector a usable ID?
*/
static int
ca0_is_id(int type)
}
/*
- * Can we fill in gaps in table TYPE?
+ * Can we fill in gaps in table @type?
*/
static int
can_fill_gaps(int type)
}
/*
- * Is table TYPE's ID-th record OBJ redundant for xundump()
+ * Is table @type's @id-th record @obj redundant for xundump()
*/
int
xundump_redundant(int type, int id, void *obj)
}
/*
- * Seek to current table's ID-th object.
+ * Seek to current table's @id-th object.
* Extend the table if necessary.
- * Save ID in cur_id.
+ * Save @id in cur_id.
* Return the object on success, NULL on failure.
*/
static void *
}
/*
- * Omit ID1..ID2-1.
+ * Omit @id1..@id2-1.
* Reset the omitted objects to default state.
*/
static void
}
/*
- * Return the smallest non-omitted ID in ID1..ID2-1 if any, else -1.
+ * Return the smallest non-omitted ID in @id1..@id2-1 if any, else -1.
*/
static int
expected_id(int id1, int id2)
}
/*
- * Get selector for field FLDNO.
- * Assign the field's selector index to *IDX, unless it is null.
+ * Get selector for field @fldno.
+ * Assign the field's selector index to *@idx, unless it is null.
* Return the selector on success, null pointer on error.
*/
static struct castr *
}
/*
- * Find the field for selector CA with index IDX.
+ * Find the field for selector @ca with index @idx.
* Return the field number if it exists, else -1.
*/
static int
}
/*
- * Find the field NAME with index IDX and value representable as long.
+ * Find the field @name with index @idx and value representable as long.
* Return the field number if it exists, else -1.
*/
static int
}
/*
- * Is a new value for field FLDNO required to match the old one?
+ * Is a new value for field @fldno required to match the old one?
*/
static int
fldval_must_match(int fldno)
}
/*
- * Set OBJ's field FLDNO to DBL.
+ * Set @obj's field @fldno to @dbl.
* Return 0 on success, -1 on error.
*/
static int
}
/*
- * Set obj's field FLDNO to STR.
+ * Set obj's field @fldno to @str.
* Return 0 on success, -1 on error.
*/
static int
}
/*
- * Read and ignore field separators from FP.
+ * Read and ignore field separators from @fp.
* Return first character that is not a field separator.
*/
static int
}
/*
- * Decode escape sequences in BUF.
- * Return BUF on success, null pointer on failure.
+ * Decode escape sequences in @buf.
+ * Return @buf on success, null pointer on failure.
*/
static char *
xuesc(char *buf)
}
/*
- * Read an identifier from FP into BUF.
- * BUF must have space for 1024 characters.
+ * Read an identifier from @fp into @buf.
+ * @buf must have space for 1024 characters.
* Return number of characters read on success, -1 on failure.
*/
static int
}
/*
- * Try to read a field name from FP.
- * I is the field number, counting from zero.
- * If a name is read, set fldca[I] and fldidx[I] for it, and update
+ * Try to read a field name from @fp.
+ * @i is the field number, counting from zero.
+ * If a name is read, set fldca[@i] and fldidx[@i] for it, and update
* caflds[].
* Return 1 if a name or ... was read, 0 on end of line, -1 on error.
*/
}
/*
- * Try to read a field value from FP.
- * I is the field number, counting from zero.
+ * Try to read a field value from @fp.
+ * @i is the field number, counting from zero.
* Return 1 if a value was read, 0 on end of line, -1 on error.
*/
static int
}
/*
- * Read fields from FP.
- * Use PARSE() to read each field.
+ * Read fields from @fp.
+ * Use @parse() to read each field.
* Return number of fields read on success, -1 on error.
*/
static int
}
/*
- * Define the FLDNO-th field.
- * If IDX is negative, define as selector NAME, else as NAME(IDX).
- * Set fldca[FLDNO] and fldidx[FLDNO] accordingly.
+ * Define the @fldno-th field.
+ * If @idx is negative, define as selector @name, else as @name(@idx).
+ * Set fldca[@fldno] and fldidx[@fldno] accordingly.
* Update caflds[].
* Return 1 on success, -1 on error.
*/
}
/*
- * Set value of field FLDNO in current row to DBL.
+ * Set value of field @fldno in current row to @dbl.
* Return 1 on success, -1 on error.
*/
static int
}
/*
- * Set value of field FLDNO in current row to STR.
+ * Set value of field @fldno in current row to @str.
* Return 1 on success, -1 on error.
*/
static int
}
/*
- * Resolve symbol name ID in table referred to by CA.
- * Use field number N for error messages.
+ * Resolve symbol name @id in table referred to by @ca.
+ * Use field number @n for error messages.
* Return index in referred table on success, -1 on failure.
*/
static int
/*
* Map symbol index to symbol value.
- * CA is the table, and I is the index in it.
+ * @ca is the table, and @i is the index in it.
*/
static int
symval(struct castr *ca, int i)
}
/*
- * Set value of field FLDNO in current object to value of symbol SYM.
+ * Set value of field @fldno in current object to value of symbol @sym.
* Return 1 on success, -1 on error.
*/
static int
}
/*
- * Create an empty symbol set for field FLDNO in *SET.
+ * Create an empty symbol set for field @fldno in *@set.
* Return 1 on success, -1 on error.
*/
static int
}
/*
- * Add a symbol to a symbol set for field FLDNO in *SET.
- * SYM is the name of the symbol to add.
+ * Add a symbol to a symbol set for field @fldno in *@set.
+ * @sym is the name of the symbol to add.
* Return 1 on success, -1 on error.
*/
static int
}
/*
- * Read an xdump table header line from FP.
- * Expect header for EXPECTED_TABLE, unless it is EF_BAD.
+ * Read an xdump table header line from @fp.
+ * Expect header for @expected_table, unless it is EF_BAD.
* Recognize header for machine- and human-readable syntax, and set
* human accordingly.
* Return table type on success, -2 on EOF before header, -1 on failure.
/*
* Find fields in this xdump.
- * If reading human-readable syntax, read a field header line from FP.
- * Else take fields from the table's selectors in CA[].
+ * If reading human-readable syntax, read a field header line from @fp.
+ * Else take fields from the table's selectors in @ca[].
* Set ellipsis, nflds, fldca[], fldidx[] and caflds[] accordingly.
* Return 0 on success, -1 on failure.
*/
}
/*
- * Read xdump footer from FP.
- * CA[] contains the table's selectors.
- * The body had RECS records.
+ * Read xdump footer from @fp.
+ * @ca[] contains the table's selectors.
+ * The body had @recs records.
* Update cafldspp[] from caflds[].
* Return 0 on success, -1 on failure.
*/
}
/*
- * Read an xdump table from FP.
+ * Read an xdump table from @fp.
* Both machine- and human-readable xdump syntax are recognized.
- * Expect table EXPECTED_TABLE, unless it is EF_BAD.
+ * Expect table @expected_table, unless it is EF_BAD.
* Report errors to stderr.
- * Messages assume FP starts in the file FILE at line *PLNO.
- * Update *PLNO to reflect lines read from FP.
+ * Messages assume @fp starts in the file @file at line *@plno.
+ * Update *@plno to reflect lines read from @fp.
* Return table type on success, -2 on EOF before header, -1 on failure.
*/
int
}
/*
- * Read the remainder of an xdump after the table header line from FP.
- * CA[] contains the table's selectors.
+ * Read the remainder of an xdump after the table header line from @fp.
+ * @ca[] contains the table's selectors.
* Return 0 on success, -1 on failure.
*/
static int
}
/*
- * Read the body of an xdump table from FP.
+ * Read the body of an xdump table from @fp.
* Return number of rows read on success, -1 on failure.
*/
static int