summaryrefslogtreecommitdiff
path: root/atobm.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:47 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:47 +0000
commit3e9f89c7239ae0cf1599277cc879a03cdf33b7c8 (patch)
tree602d4a70b9731fe873a020e8adcdd0b7923a805c /atobm.c
parent0bd1f9d8ccaf46397745779f5964f3b843186896 (diff)
merge XFree86 4.3.0.1 to -CURRENT
Diffstat (limited to 'atobm.c')
-rw-r--r--atobm.c37
1 files changed, 20 insertions, 17 deletions
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 <stdio.h>
#include <ctype.h>
#include <X11/Xos.h>
-
-extern char *malloc(), *calloc();
+#include <stdlib.h>
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;