diff options
author | H. Peter Anvin <hpa@zytor.com> | 2005-01-15 22:15:51 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2005-01-15 22:15:51 +0000 |
commit | e2c80181b6a6338f0381fc9c44fae32d8b8a20fc (patch) | |
tree | f9919ba3c0489d886c9a79e73257ef6a4584aafc /outform.c | |
parent | 5180bc8a598aa5bff7bfb3726771e5bf348e61a2 (diff) | |
download | nasm-e2c80181b6a6338f0381fc9c44fae32d8b8a20fc.tar.gz nasm-e2c80181b6a6338f0381fc9c44fae32d8b8a20fc.tar.bz2 nasm-e2c80181b6a6338f0381fc9c44fae32d8b8a20fc.zip |
Apply Nindent to all .c and .h files
Diffstat (limited to 'outform.c')
-rw-r--r-- | outform.c | 54 |
1 files changed, 26 insertions, 28 deletions
@@ -17,54 +17,52 @@ static int ndrivers = 0; -struct ofmt *ofmt_find(char *name) /* find driver */ -{ +struct ofmt *ofmt_find(char *name) +{ /* find driver */ int i; - for (i=0; i<ndrivers; i++) - if (!strcmp(name,drivers[i]->shortname)) - return drivers[i]; + for (i = 0; i < ndrivers; i++) + if (!strcmp(name, drivers[i]->shortname)) + return drivers[i]; return NULL; } -struct dfmt *dfmt_find(struct ofmt *ofmt, char *name) /* find driver */ -{ +struct dfmt *dfmt_find(struct ofmt *ofmt, char *name) +{ /* find driver */ struct dfmt **dfmt = ofmt->debug_formats; while (*dfmt) { - if (!strcmp(name, (*dfmt)->shortname)) - return (*dfmt); - dfmt++; + if (!strcmp(name, (*dfmt)->shortname)) + return (*dfmt); + dfmt++; } return NULL; } -void ofmt_list(struct ofmt *deffmt, FILE *fp) +void ofmt_list(struct ofmt *deffmt, FILE * fp) { int i; - for (i=0; i<ndrivers; i++) - fprintf(fp, " %c %-10s%s\n", - drivers[i] == deffmt ? '*' : ' ', - drivers[i]->shortname, - drivers[i]->fullname); + for (i = 0; i < ndrivers; i++) + fprintf(fp, " %c %-10s%s\n", + drivers[i] == deffmt ? '*' : ' ', + drivers[i]->shortname, drivers[i]->fullname); } -void dfmt_list(struct ofmt *ofmt, FILE *fp) +void dfmt_list(struct ofmt *ofmt, FILE * fp) { - struct dfmt ** drivers = ofmt->debug_formats; + struct dfmt **drivers = ofmt->debug_formats; while (*drivers) { - fprintf(fp, " %c %-10s%s\n", - drivers[0] == ofmt->current_dfmt ? '*' : ' ', - drivers[0]->shortname, - drivers[0]->fullname); - drivers++; + fprintf(fp, " %c %-10s%s\n", + drivers[0] == ofmt->current_dfmt ? '*' : ' ', + drivers[0]->shortname, drivers[0]->fullname); + drivers++; } } -struct ofmt *ofmt_register (efunc error) { - for (ndrivers=0; drivers[ndrivers] != NULL; ndrivers++); +struct ofmt *ofmt_register(efunc error) +{ + for (ndrivers = 0; drivers[ndrivers] != NULL; ndrivers++) ; - if (ndrivers==0) - { + if (ndrivers == 0) { error(ERR_PANIC | ERR_NOFILE, - "No output drivers given at compile time"); + "No output drivers given at compile time"); } return (&OF_DEFAULT); |