summaryrefslogtreecommitdiff
path: root/src/builtins
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-06-07 14:20:27 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-06-07 14:20:27 -0400
commit9739e750a7ca4b86ddb89674b104e9b9a8b61014 (patch)
treee068b1a4bbf8abc57ceb87a6a243ac9977187cbc /src/builtins
parent87db45f5eb7880395735f7bf3a8ee2d89b7e0122 (diff)
Warning cleanup.
Diffstat (limited to 'src/builtins')
-rw-r--r--src/builtins/builtin.h8
-rw-r--r--src/builtins/dir.c4
-rw-r--r--src/builtins/file.c19
-rw-r--r--src/builtins/fonts.c14
-rw-r--r--src/builtins/fpe.c21
-rw-r--r--src/builtins/render.c35
6 files changed, 43 insertions, 58 deletions
diff --git a/src/builtins/builtin.h b/src/builtins/builtin.h
index ea98407..f12f9b0 100644
--- a/src/builtins/builtin.h
+++ b/src/builtins/builtin.h
@@ -56,5 +56,9 @@ extern const int builtin_dir_count;
extern const BuiltinAliasRec builtin_alias[];
extern const int builtin_alias_count;
-extern FontFilePtr BuiltinFileOpen ();
-extern int BuiltinFileClose ();
+extern FontFilePtr BuiltinFileOpen (char *);
+extern int BuiltinFileClose (BufFilePtr, int);
+extern int BuiltinReadDirectory (char *, FontDirectoryPtr *);
+extern void BuiltinRegisterFontFileFunctions (void);
+
+extern void BuiltinRegisterFpeFunctions (void);
diff --git a/src/builtins/dir.c b/src/builtins/dir.c
index fb2f82c..c272449 100644
--- a/src/builtins/dir.c
+++ b/src/builtins/dir.c
@@ -30,9 +30,7 @@
#include "builtin.h"
int
-BuiltinReadDirectory (directory, pdir)
- char *directory;
- FontDirectoryPtr *pdir;
+BuiltinReadDirectory (char *directory, FontDirectoryPtr *pdir)
{
FontDirectoryPtr dir;
int i;
diff --git a/src/builtins/file.c b/src/builtins/file.c
index 1f73134..863ecee 100644
--- a/src/builtins/file.c
+++ b/src/builtins/file.c
@@ -35,8 +35,7 @@ typedef struct _BuiltinIO {
} BuiltinIORec, *BuiltinIOPtr;
static int
-BuiltinFill (f)
- BufFilePtr f;
+BuiltinFill (BufFilePtr f)
{
int left, len;
BuiltinIOPtr io = ((BuiltinIOPtr) f->private);
@@ -58,15 +57,12 @@ BuiltinFill (f)
}
static int
-BuiltinSkip (f, count)
- BufFilePtr f;
- int count;
+BuiltinSkip (BufFilePtr f, int count)
{
BuiltinIOPtr io = ((BuiltinIOPtr) f->private);
int curoff;
int fileoff;
int todo;
- int left;
curoff = f->bufp - f->buffer;
fileoff = curoff + f->left;
@@ -86,8 +82,7 @@ BuiltinSkip (f, count)
}
static int
-BuiltinClose (f, doClose)
- BufFilePtr f;
+BuiltinClose (BufFilePtr f, int unused)
{
BuiltinIOPtr io = ((BuiltinIOPtr) f->private);
@@ -97,8 +92,7 @@ BuiltinClose (f, doClose)
FontFilePtr
-BuiltinFileOpen (name)
- char *name;
+BuiltinFileOpen (char *name)
{
int i;
BuiltinIOPtr io;
@@ -121,7 +115,7 @@ BuiltinFileOpen (name)
xfree (io);
return NULL;
}
- if (cooked = BufFilePushZIP (raw))
+ if ((cooked = BufFilePushZIP (raw)))
raw = cooked;
else
{
@@ -132,8 +126,7 @@ BuiltinFileOpen (name)
}
int
-BuiltinFileClose (f)
- FontFilePtr f;
+BuiltinFileClose (FontFilePtr f, int unused)
{
return BufFileClose ((BufFilePtr) f, TRUE);
}
diff --git a/src/builtins/fonts.c b/src/builtins/fonts.c
index 24f42e2..ef5f5ef 100644
--- a/src/builtins/fonts.c
+++ b/src/builtins/fonts.c
@@ -1229,15 +1229,15 @@ static char name_6x13[] = "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60
static char name_cursor[] = "cursor";
const BuiltinFileRec builtin_files[] = {
-"6x13.builtin", sizeof file_6x13, file_6x13,
-"cursor.builtin", sizeof file_cursor, file_cursor,
+ { "6x13.builtin", sizeof file_6x13, file_6x13, },
+ { "cursor.builtin", sizeof file_cursor, file_cursor, }
};
const int builtin_files_count = sizeof (builtin_files) / sizeof (builtin_files[0]);
const BuiltinDirRec builtin_dir[] = {
-"6x13.builtin", name_6x13,
-"cursor.builtin", name_cursor,
+ { "6x13.builtin", name_6x13, },
+ { "cursor.builtin", name_cursor, }
};
const int builtin_dir_count = sizeof (builtin_dir) / sizeof (builtin_dir[0]);
@@ -1247,9 +1247,9 @@ static char alias_6x13[] = "6x13";
static char alias_6x13_100[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1";
const BuiltinAliasRec builtin_alias[] = {
-alias_fixed, name_6x13,
-alias_6x13, name_6x13,
-alias_6x13_100, name_6x13,
+ { alias_fixed, name_6x13, },
+ { alias_6x13, name_6x13, },
+ { alias_6x13_100, name_6x13, }
};
const int builtin_alias_count = sizeof (builtin_alias) / sizeof (builtin_alias[0]);
diff --git a/src/builtins/fpe.c b/src/builtins/fpe.c
index f4ee93a..8432382 100644
--- a/src/builtins/fpe.c
+++ b/src/builtins/fpe.c
@@ -29,21 +29,20 @@
#include <config.h>
#endif
#include <X11/fonts/fntfilst.h>
+#include "builtin.h"
static int font_file_type;
const char builtin_fonts[] = "built-ins";
-int
-BuiltinNameCheck (name)
- char *name;
+static int
+BuiltinNameCheck (char *name)
{
return (strcmp (name, builtin_fonts) == 0);
}
-int
-BuiltinInitFPE (fpe)
- FontPathElementPtr fpe;
+static int
+BuiltinInitFPE (FontPathElementPtr fpe)
{
int status;
FontDirectoryPtr dir;
@@ -56,9 +55,8 @@ BuiltinInitFPE (fpe)
}
/* ARGSUSED */
-int
-BuiltinResetFPE (fpe)
- FontPathElementPtr fpe;
+static int
+BuiltinResetFPE (FontPathElementPtr fpe)
{
FontDirectoryPtr dir;
@@ -67,9 +65,8 @@ BuiltinResetFPE (fpe)
return Successful;
}
-int
-BuiltinFreeFPE (fpe)
- FontPathElementPtr fpe;
+static int
+BuiltinFreeFPE (FontPathElementPtr fpe)
{
FontFileFreeDir ((FontDirectoryPtr) fpe->private);
return Successful;
diff --git a/src/builtins/render.c b/src/builtins/render.c
index 18389b4..871665f 100644
--- a/src/builtins/render.c
+++ b/src/builtins/render.c
@@ -29,20 +29,17 @@
#include <config.h>
#endif
#include <X11/fonts/fntfilst.h>
+#include <X11/fonts/fontutil.h>
+#include <X11/fonts/pcf.h>
#include "builtin.h"
-BuiltinOpenBitmap (fpe, ppFont, flags, entry, fileName, format, fmask)
- FontPathElementPtr fpe;
- FontPtr *ppFont;
- int flags;
- FontEntryPtr entry;
- char *fileName;
- fsBitmapFormat format;
- fsBitmapFormatMask fmask;
+static int
+BuiltinOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
+ FontEntryPtr entry, char *fileName, fsBitmapFormat format,
+ fsBitmapFormatMask fmask, FontPtr unused)
{
FontFilePtr file;
FontPtr pFont;
- int i;
int ret;
int bit,
byte,
@@ -55,7 +52,7 @@ BuiltinOpenBitmap (fpe, ppFont, flags, entry, fileName, format, fmask)
return BadFontName;
pFont = (FontPtr) xalloc(sizeof(FontRec));
if (!pFont) {
- BuiltinFileClose (file);
+ BuiltinFileClose (file, 0);
return AllocError;
}
/* set up default values */
@@ -70,7 +67,7 @@ BuiltinOpenBitmap (fpe, ppFont, flags, entry, fileName, format, fmask)
ret = pcfReadFont (pFont, file, bit, byte, glyph, scan);
- BuiltinFileClose (file);
+ BuiltinFileClose (file, 0);
if (ret != Successful)
xfree(pFont);
else
@@ -78,22 +75,18 @@ BuiltinOpenBitmap (fpe, ppFont, flags, entry, fileName, format, fmask)
return ret;
}
-BuiltinGetInfoBitmap (fpe, pFontInfo, entry, fileName)
- FontPathElementPtr fpe;
- FontInfoPtr pFontInfo;
- FontEntryPtr entry;
- char *fileName;
+static int
+BuiltinGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
+ FontEntryPtr entry, char *fileName)
{
FontFilePtr file;
- int i;
int ret;
- FontRendererPtr renderer;
file = BuiltinFileOpen (fileName);
if (!file)
return BadFontName;
ret = pcfReadFontInfo (pFontInfo, file);
- BuiltinFileClose (file);
+ BuiltinFileClose (file, 0);
return ret;
}
@@ -123,12 +116,12 @@ BuiltinGetInfoScalable (FontPathElementPtr fpe,
}
static FontRendererRec renderers[] = {
- ".builtin", 8,
+ { ".builtin", 8,
BuiltinOpenBitmap,
BuiltinOpenScalable,
BuiltinGetInfoBitmap,
BuiltinGetInfoScalable,
- 0
+ 0 }
};
#define numRenderers (sizeof renderers / sizeof renderers[0])