char outputSMode[2] = "w";
-static void Usage (void) {
-
+static void Usage (void)
+{
printf ("Usage: %s [options] file\n"
"Short options:\n"
" -V\t\t\tPrint the version number\n"
}
-
static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
/* Set the target system */
{
}
-
static void OptVersion (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Print the assembler version */
-static void printCHeader (void) {
-
+static void printCHeader (void)
+{
fprintf (outputCFile,
"//\n"
"//\tThis file was generated by the GEOS Resource Compiler\n"
}
-static void printSHeader (void) {
-
+static void printSHeader (void)
+{
fprintf (outputSFile,
";\n"
";\tThis file was generated by the GEOS Resource Compiler\n"
}
-static void openCFile (void) {
-
+static void openCFile (void)
+{
if ((outputCFile = fopen (outputCName,outputCMode)) == 0) {
AbEnd ("Can't open file %s for writing: %s", outputCName, strerror (errno));
}
}
-static void openSFile (void) {
-
+static void openSFile (void)
+{
if ((outputSFile = fopen (outputSName, outputSMode)) == 0) {
AbEnd ("Can't open file %s for writing: %s", outputSName, strerror (errno));
}
}
-static int findToken (const char **tokenTbl, const char *token) {
-
+static int findToken (const char **tokenTbl, const char *token)
+{
/* takes as input table of tokens and token, returns position in table or -1 if not found */
int a = 0;
}
-static char *nextPhrase (void) {
+static char *nextPhrase (void)
+{
return strtok (NULL, "\"");
}
-static char *nextWord (void) {
+static char *nextWord (void)
+{
return strtok (NULL, " ");
}
-static void setLen (char *name, unsigned len) {
+static void setLen (char *name, unsigned len)
+{
if (strlen (name) > len)
name[len] = '\0';
}
-static void fillOut (char *name, int len, char *filler) {
-
+static void fillOut (char *name, int len, char *filler)
+{
int a;
setLen(name, len);
}
-static char *bintos (unsigned char a, char out[7]) {
-
+static char *bintos (unsigned char a, char out[7])
+{
int i=0;
for (; i < 8; i++) {
}
-static int getNameSize (const char *word) {
-
+static int getNameSize (const char *word)
+{
/* count length of a word using BSW 9 font table */
int a = 0, i = 0;
}
-static void DoMenu (void) {
-
+static void DoMenu (void)
+{
int a, size, tmpsize, item = 0;
char *token;
char namebuff[255] = "";
strcat (namebuff, " ");
strcat (namebuff, token);
} while (token[strlen(token) - 1] != '"');
- token = xmalloc (strlen(namebuff));
+ token = xmalloc (strlen (namebuff));
strcpy (token, namebuff);
}
curItem->name = token;
"};\n\n");
if (fclose (outputCFile) != 0)
- AbEnd ("Error closing %s: %s", outputCName, strerror(errno));
+ AbEnd ("Error closing %s: %s", outputCName, strerror (errno));
}
-static void DoHeader (void) {
-
+static void DoHeader (void)
+{
time_t t;
struct tm *my_tm;
myHead.info);
if (fclose (outputSFile) != 0)
- AbEnd ("Error closing %s: %s", outputSName, strerror(errno));
+ AbEnd ("Error closing %s: %s", outputSName, strerror (errno));
}
-static void DoVLIR (void) {
-
+static void DoVLIR (void)
+{
char *token;
int record, lastrecord;
int vlirsize, vlirtable[127];
"\n");
if (fclose (outputSFile) != 0)
- AbEnd ("Error closing %s: %s", outputSName, strerror(errno));
+ AbEnd ("Error closing %s: %s", outputSName, strerror (errno));
openCFile ();
"#define OVERLAY_SIZE (unsigned)&_OVERLAYSIZE__\n\n");
if (fclose (outputCFile) != 0)
- AbEnd ("Error closing %s: %s", outputCName, strerror(errno));
+ AbEnd ("Error closing %s: %s", outputCName, strerror (errno));
}
-static char *filterInput (FILE *F, char *tbl) {
-
+static char *filterInput (FILE *F, char *tbl)
+{
/* loads file into buffer filtering it out */
int a, prevchar = -1, i = 0, bracket = 0, quote = 1;
}
-static void processFile (const char *filename) {
-
+static void processFile (const char *filename)
+{
FILE *F;
char *str;
}
-int main (int argc, char *argv[]) {
-
+int main (int argc, char *argv[])
+{
/* Program long options */
static const LongOpt OptTab[] = {
{ "--help", 0, OptHelp},
unsigned ffile = 0;
unsigned I;
-
/* Initialize the cmdline module */
InitCmdLine (&argc, &argv, "grc65");