#include <stdio.h>
#include <string.h>
#include <fcntl.h>
-#include <memory.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <endian.h>
#include "busybox.h"
-static const int PSF_MAGIC1 = 0x36;
-static const int PSF_MAGIC2 = 0x04;
+enum{
+ PSF_MAGIC1 = 0x36,
+ PSF_MAGIC2 = 0x04,
-static const int PSF_MODE512 = 0x01;
-static const int PSF_MODEHASTAB = 0x02;
-static const int PSF_MAXMODE = 0x03;
-static const int PSF_SEPARATOR = 0xFFFF;
+ PSF_MODE512 = 0x01,
+ PSF_MODEHASTAB = 0x02,
+ PSF_MAXMODE = 0x03,
+ PSF_SEPARATOR = 0xFFFF
+};
struct psf_header {
unsigned char magic1, magic2; /* Magic number */
static void loadnewfont(int fd);
-extern int loadfont_main(int argc, char **argv)
+int loadfont_main(int argc, char **argv)
{
int fd;
return EXIT_SUCCESS;
}
-static void do_loadfont(int fd, char *inbuf, int unit, int fontsize)
+static void do_loadfont(int fd, unsigned char *inbuf, int unit, int fontsize)
{
char buf[16384];
int i;
ud.entry_ct = ct;
ud.entries = up;
if (ioctl(fd, PIO_UNIMAP, &ud)) {
-#if 0
- if (errno == ENOMEM) {
- /* change advice parameters */
- }
-#endif
bb_perror_msg_and_die("PIO_UNIMAP");
}
}
static void loadnewfont(int fd)
{
int unit;
- char inbuf[32768]; /* primitive */
+ unsigned char inbuf[32768]; /* primitive */
unsigned int inputlth, offset;
/*