summaryrefslogtreecommitdiff
path: root/usr.bin/file2c/file2c.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-26 21:41:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-26 21:41:38 +0000
commitf56f161dd9d2216636d914c259221b757894a5ec (patch)
tree33f4d1bdd9d22848a92e5320cb214117f788f1c9 /usr.bin/file2c/file2c.c
parentb61c91f7c8732b64fc79e49a3ea1763cc74b982d (diff)
ansi and knf and protos
Diffstat (limited to 'usr.bin/file2c/file2c.c')
-rw-r--r--usr.bin/file2c/file2c.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/usr.bin/file2c/file2c.c b/usr.bin/file2c/file2c.c
index 21c9c63cac3..9f2b4e04c30 100644
--- a/usr.bin/file2c/file2c.c
+++ b/usr.bin/file2c/file2c.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file2c.c,v 1.2 2001/07/12 05:17:03 deraadt Exp $ */
+/* $OpenBSD: file2c.c,v 1.3 2003/06/26 21:41:37 deraadt Exp $ */
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
@@ -14,35 +14,35 @@
#include <stdio.h>
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
- int i,j,k;
+ int i, j, k;
- if (argc > 1)
- printf("%s\n",argv[1]);
- k = 0;
- j = 0;
- while((i = getchar()) != EOF) {
- if(k++) {
- putchar(',');
- j++;
- }
- if (j > 70) {
- putchar('\n');
- j = 0;
+ if (argc > 1)
+ printf("%s\n",argv[1]);
+ k = 0;
+ j = 0;
+ while((i = getchar()) != EOF) {
+ if(k++) {
+ putchar(',');
+ j++;
+ }
+ if (j > 70) {
+ putchar('\n');
+ j = 0;
+ }
+
+ printf("%d", i);
+
+ if (i > 99)
+ j += 3;
+ else if (i > 9)
+ j += 2;
+ else
+ j++;
}
- printf("%d",i);
- if (i > 99)
- j += 3;
- else if (i > 9)
- j += 2;
- else
- j++;
- }
- putchar('\n');
- if (argc > 2)
- printf("%s\n",argv[2]);
- return 0;
+ putchar('\n');
+ if (argc > 2)
+ printf("%s\n", argv[2]);
+ return 0;
}