style: whitespace fixes
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This commit is contained in:
parent
ce28f6ca90
commit
f7403ce6c6
8
cal.c
8
cal.c
|
@ -28,8 +28,8 @@ drawcal(int year, int month, int day, int ncols, int nmons, int fday)
|
||||||
int row = 0;
|
int row = 0;
|
||||||
char *days[] = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", };
|
char *days[] = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", };
|
||||||
|
|
||||||
if(!ncols)
|
if(!ncols)
|
||||||
ncols = nmons;
|
ncols = nmons;
|
||||||
while(nmons > 0) {
|
while(nmons > 0) {
|
||||||
last = MIN(nmons, ncols);
|
last = MIN(nmons, ncols);
|
||||||
for(i = 0; i < last; i++) {
|
for(i = 0; i < last; i++) {
|
||||||
|
@ -76,7 +76,6 @@ drawcal(int year, int month, int day, int ncols, int nmons, int fday)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dayofweek(int year, int month, int day, int fday)
|
dayofweek(int year, int month, int day, int fday)
|
||||||
{
|
{
|
||||||
|
@ -96,7 +95,7 @@ isleap(int year)
|
||||||
{
|
{
|
||||||
bool leap = false;
|
bool leap = false;
|
||||||
|
|
||||||
if(year % 4 == 0)
|
if(year % 4 == 0)
|
||||||
leap = true;
|
leap = true;
|
||||||
if(year % 100 == 0)
|
if(year % 100 == 0)
|
||||||
leap = false;
|
leap = false;
|
||||||
|
@ -105,7 +104,6 @@ isleap(int year)
|
||||||
return leap;
|
return leap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
|
|
1
paste.c
1
paste.c
|
@ -103,7 +103,6 @@ main(int argc, char *argv[])
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
unescape(wchar_t *delim)
|
unescape(wchar_t *delim)
|
||||||
{
|
{
|
||||||
|
|
4
split.c
4
split.c
|
@ -27,7 +27,7 @@ main(int argc, char **argv)
|
||||||
int always = 0;
|
int always = 0;
|
||||||
FILE *in=stdin, *out=NULL;
|
FILE *in=stdin, *out=NULL;
|
||||||
|
|
||||||
sizes['K'] = 1024;
|
sizes['K'] = 1024;
|
||||||
sizes['M'] = 1024L*1024L;
|
sizes['M'] = 1024L*1024L;
|
||||||
sizes['G'] = 1024L*1024L*1024L;
|
sizes['G'] = 1024L*1024L*1024L;
|
||||||
|
|
||||||
|
@ -96,7 +96,6 @@ Nextfile:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -105,7 +104,6 @@ usage(void)
|
||||||
eprintf("usage: split [-d] [-a len] [-b [bytes[k|m|g]]] [-l [lines]] [input [prefix]]\n");
|
eprintf("usage: split [-d] [-a len] [-b [bytes[k|m|g]]] [-l [lines]] [input [prefix]]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
itostr(char *str, int x, int n)
|
itostr(char *str, int x, int n)
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,10 +109,10 @@ parseheader(FILE *fp, const char *s, const char *header, mode_t *mode, char **fn
|
||||||
*q++ = '\0';
|
*q++ = '\0';
|
||||||
/* now mode should be null terminated, q points to fname */
|
/* now mode should be null terminated, q points to fname */
|
||||||
parsemode(p, mode);
|
parsemode(p, mode);
|
||||||
n = strlen(q);
|
n = strlen(q);
|
||||||
while (n > 0 && (q[n - 1] == '\n' || q[n - 1] == '\r'))
|
while (n > 0 && (q[n - 1] == '\n' || q[n - 1] == '\r'))
|
||||||
q[--n] = '\0';
|
q[--n] = '\0';
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
*fname = q;
|
*fname = q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user