char *outputCName = NULL, *outputSName = NULL;
FILE *outputCFile, *outputSFile;
int CFnum = 0, SFnum = 0;
char *outputCName = NULL, *outputSName = NULL;
FILE *outputCFile, *outputSFile;
int CFnum = 0, SFnum = 0;
char outputCMode[2] = "w";
char outputSMode[2] = "w";
char outputCMode[2] = "w";
char outputSMode[2] = "w";
printf("Usage: %s [options] file\n"
"Options:\n"
"\t-h, -?\t\tthis help\n"
printf("Usage: %s [options] file\n"
"Options:\n"
"\t-h, -?\t\tthis help\n"
- "\t-f\t\tforce writing files\n"
"\t-o name\t\tname C output file\n"
"\t-s name\t\tname asm output file\n",
ProgName);
"\t-o name\t\tname C output file\n"
"\t-s name\t\tname asm output file\n",
ProgName);
- if ((CFnum == 0) && (forceFlag == 0)) {
- /* test if file exists already and no forcing*/
- if ((outputCFile = fopen(outputCName,"r")) != 0)
- AbEnd("file %s already exists, aborting\n", outputCName);
- }
-
if ((outputCFile = fopen(outputCName,outputCMode)) == 0) {
AbEnd("can't open file %s for writing: %s\n", outputCName, strerror(errno));
}
if ((outputCFile = fopen(outputCName,outputCMode)) == 0) {
AbEnd("can't open file %s for writing: %s\n", outputCName, strerror(errno));
}
- if ((SFnum == 0) && (forceFlag == 0)) {
- /* test if file exists already and no forcing*/
- if ((outputSFile = fopen(outputSName,"r")) != 0)
- AbEnd("file %s already exists, aborting\n", outputSName);
- }
-
if ((outputSFile = fopen(outputSName, outputSMode)) == 0) {
AbEnd("can't open file %s for writing: %s\n", outputSName, strerror(errno));
}
if ((outputSFile = fopen(outputSName, outputSMode)) == 0) {
AbEnd("can't open file %s for writing: %s\n", outputSName, strerror(errno));
}
if (arg[0] == '-') {
switch (arg[1]) {
if (arg[0] == '-') {
switch (arg[1]) {
- case 'f':
- forceFlag = 1;
- break;
case 'o':
outputCName = argv[++i];
break;
case 'o':
outputCName = argv[++i];
break;