style(9): don't initialise variables in their declaration, remove space
after function name, use __unused on unused parameters instead of initialising them to bogus values.
This commit is contained in:
parent
edf0752ebe
commit
93738f50e5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98012
@ -58,12 +58,12 @@ int dflag;
|
|||||||
int fflag;
|
int fflag;
|
||||||
int sflag;
|
int sflag;
|
||||||
|
|
||||||
void c_cut (FILE *, const char *);
|
void c_cut(FILE *, const char *);
|
||||||
void f_cut (FILE *, const char *);
|
void f_cut(FILE *, const char *);
|
||||||
void get_list (char *);
|
void get_list(char *);
|
||||||
int main (int, char **);
|
int main(int, char **);
|
||||||
void needpos(size_t);
|
void needpos(size_t);
|
||||||
static void usage (void);
|
static void usage(void);
|
||||||
|
|
||||||
int
|
int
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
@ -71,12 +71,12 @@ main(argc, argv)
|
|||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
void (*fcn) (FILE *, const char *) = NULL;
|
void (*fcn)(FILE *, const char *);
|
||||||
int ch, rval;
|
int ch, rval;
|
||||||
|
|
||||||
fcn = NULL;
|
setlocale(LC_ALL, "");
|
||||||
setlocale (LC_ALL, "");
|
|
||||||
|
|
||||||
|
fcn = NULL;
|
||||||
dchar = '\t'; /* default delimiter is \t */
|
dchar = '\t'; /* default delimiter is \t */
|
||||||
|
|
||||||
/* Since we don't support multi-byte characters, the -c and -b
|
/* Since we don't support multi-byte characters, the -c and -b
|
||||||
@ -217,15 +217,13 @@ needpos(size_t n)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ARGSUSED */
|
|
||||||
void
|
void
|
||||||
c_cut(fp, fname)
|
c_cut(fp, fname)
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
const char *fname;
|
const char *fname __unused;
|
||||||
{
|
{
|
||||||
int ch, col;
|
int ch, col;
|
||||||
char *pos;
|
char *pos;
|
||||||
fname = NULL;
|
|
||||||
|
|
||||||
ch = 0;
|
ch = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -257,9 +255,10 @@ f_cut(fp, fname)
|
|||||||
int ch, field, isdelim;
|
int ch, field, isdelim;
|
||||||
char *pos, *p, sep;
|
char *pos, *p, sep;
|
||||||
int output;
|
int output;
|
||||||
char *lbuf, *mlbuf = NULL;
|
char *lbuf, *mlbuf;
|
||||||
size_t lbuflen;
|
size_t lbuflen;
|
||||||
|
|
||||||
|
mlbuf = NULL;
|
||||||
for (sep = dchar; (lbuf = fgetln(fp, &lbuflen)) != NULL;) {
|
for (sep = dchar; (lbuf = fgetln(fp, &lbuflen)) != NULL;) {
|
||||||
/* Assert EOL has a newline. */
|
/* Assert EOL has a newline. */
|
||||||
if (*(lbuf + lbuflen - 1) != '\n') {
|
if (*(lbuf + lbuflen - 1) != '\n') {
|
||||||
|
Loading…
Reference in New Issue
Block a user