From 5b64274abaf585d108e65cb1dae497e74cad856e Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Fri, 14 Nov 2003 16:48:57 +0000 Subject: XFree86 4.3.0.1 --- atobm.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'atobm.c') diff --git a/atobm.c b/atobm.c index f4ba20a..b28dd73 100644 --- a/atobm.c +++ b/atobm.c @@ -26,6 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/programs/bitmap/atobm.c,v 3.5 2001/12/14 20:00:41 dawes Exp $ */ /* * atobm - ascii to bitmap filter @@ -35,12 +36,15 @@ from The Open Group. #include #include #include - -extern char *malloc(), *calloc(); +#include char *ProgramName; -static void usage () +static void doit(FILE *fp, char *filename, char *chars, + int xhot, int yhot, char *name); + +static void +usage (void) { fprintf (stderr, "usage: %s [-options ...] [filename]\n\n", ProgramName); @@ -59,8 +63,8 @@ static void usage () } -char *cify_name (name) - char *name; +static char * +cify_name (char *name) { int length = name ? strlen (name) : 0; int i; @@ -72,8 +76,8 @@ char *cify_name (name) return name; } -char *StripName(name) - char *name; +static char * +StripName(char *name) { char *begin = strrchr(name, '/'); char *end, *result; @@ -88,9 +92,8 @@ char *StripName(name) return (result); } -main (argc, argv) - int argc; - char **argv; +int +main (int argc, char *argv[]) { int i; int xhot = -1, yhot = -1; @@ -160,12 +163,12 @@ main (argc, argv) } -doit (fp, filename, chars, xhot, yhot, name) - FILE *fp; - char *filename; - char *chars; - int xhot, yhot; - char *name; +static void +doit (FILE *fp, + char *filename, + char *chars, + int xhot, int yhot, + char *name) { int i, j; int last_character; @@ -182,7 +185,7 @@ doit (fp, filename, chars, xhot, yhot, name) int used; unsigned char *scanlines; struct _scan_list *next; - } *head = NULL, *slist; + } *head = NULL, *slist = NULL; static unsigned char masktable[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; int padded = 0; -- cgit v1.2.3