diff options
author | Mark Whitley <markw@lineo.com> | 2000-12-07 19:56:48 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2000-12-07 19:56:48 +0000 |
commit | f57c944e09417edcbcd69f2b01b937cadef39db2 (patch) | |
tree | a55822621d54bd82c54e272fa986e45698fea0f1 /console-tools/loadfont.c | |
parent | 7b5c16ebe5f1b057603cf1c0b0187be418725c42 (diff) | |
download | busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.gz busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.bz2 busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.zip |
Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
Diffstat (limited to 'console-tools/loadfont.c')
-rw-r--r-- | console-tools/loadfont.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index f69f52fd8..13a196fb0 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c | |||
@@ -48,7 +48,7 @@ extern int loadfont_main(int argc, char **argv) | |||
48 | 48 | ||
49 | fd = open("/dev/tty0", O_RDWR); | 49 | fd = open("/dev/tty0", O_RDWR); |
50 | if (fd < 0) | 50 | if (fd < 0) |
51 | fatalPerror("Error opening /dev/tty0"); | 51 | perror_msg_and_die("Error opening /dev/tty0"); |
52 | loadnewfont(fd); | 52 | loadnewfont(fd); |
53 | 53 | ||
54 | return EXIT_SUCCESS; | 54 | return EXIT_SUCCESS; |
@@ -62,7 +62,7 @@ static void do_loadfont(int fd, char *inbuf, int unit, int fontsize) | |||
62 | memset(buf, 0, sizeof(buf)); | 62 | memset(buf, 0, sizeof(buf)); |
63 | 63 | ||
64 | if (unit < 1 || unit > 32) | 64 | if (unit < 1 || unit > 32) |
65 | fatalError("Bad character size %d\n", unit); | 65 | error_msg_and_die("Bad character size %d\n", unit); |
66 | 66 | ||
67 | for (i = 0; i < fontsize; i++) | 67 | for (i = 0; i < fontsize; i++) |
68 | memcpy(buf + (32 * i), inbuf + (unit * i), unit); | 68 | memcpy(buf + (32 * i), inbuf + (unit * i), unit); |
@@ -77,11 +77,11 @@ static void do_loadfont(int fd, char *inbuf, int unit, int fontsize) | |||
77 | 77 | ||
78 | if (ioctl(fd, PIO_FONTX, &cfd) == 0) | 78 | if (ioctl(fd, PIO_FONTX, &cfd) == 0) |
79 | return; /* success */ | 79 | return; /* success */ |
80 | perrorMsg("PIO_FONTX ioctl error (trying PIO_FONT)"); | 80 | perror_msg("PIO_FONTX ioctl error (trying PIO_FONT)"); |
81 | } | 81 | } |
82 | #endif | 82 | #endif |
83 | if (ioctl(fd, PIO_FONT, buf)) | 83 | if (ioctl(fd, PIO_FONT, buf)) |
84 | fatalPerror("PIO_FONT ioctl error"); | 84 | perror_msg_and_die("PIO_FONT ioctl error"); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void | 87 | static void |
@@ -119,11 +119,11 @@ do_loadtable(int fd, unsigned char *inbuf, int tailsz, int fontsize) | |||
119 | if (ioctl(fd, PIO_UNIMAPCLR, &advice)) { | 119 | if (ioctl(fd, PIO_UNIMAPCLR, &advice)) { |
120 | #ifdef ENOIOCTLCMD | 120 | #ifdef ENOIOCTLCMD |
121 | if (errno == ENOIOCTLCMD) { | 121 | if (errno == ENOIOCTLCMD) { |
122 | errorMsg("It seems this kernel is older than 1.1.92\n"); | 122 | error_msg("It seems this kernel is older than 1.1.92\n"); |
123 | fatalError("No Unicode mapping table loaded.\n"); | 123 | error_msg_and_die("No Unicode mapping table loaded.\n"); |
124 | } else | 124 | } else |
125 | #endif | 125 | #endif |
126 | fatalPerror("PIO_UNIMAPCLR"); | 126 | perror_msg_and_die("PIO_UNIMAPCLR"); |
127 | } | 127 | } |
128 | ud.entry_ct = ct; | 128 | ud.entry_ct = ct; |
129 | ud.entries = up; | 129 | ud.entries = up; |
@@ -133,7 +133,7 @@ do_loadtable(int fd, unsigned char *inbuf, int tailsz, int fontsize) | |||
133 | /* change advice parameters */ | 133 | /* change advice parameters */ |
134 | } | 134 | } |
135 | #endif | 135 | #endif |
136 | fatalPerror("PIO_UNIMAP"); | 136 | perror_msg_and_die("PIO_UNIMAP"); |
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
@@ -150,13 +150,13 @@ static void loadnewfont(int fd) | |||
150 | */ | 150 | */ |
151 | inputlth = fread(inbuf, 1, sizeof(inbuf), stdin); | 151 | inputlth = fread(inbuf, 1, sizeof(inbuf), stdin); |
152 | if (ferror(stdin)) | 152 | if (ferror(stdin)) |
153 | fatalPerror("Error reading input font"); | 153 | perror_msg_and_die("Error reading input font"); |
154 | /* use malloc/realloc in case of giant files; | 154 | /* use malloc/realloc in case of giant files; |
155 | maybe these do not occur: 16kB for the font, | 155 | maybe these do not occur: 16kB for the font, |
156 | and 16kB for the map leaves 32 unicode values | 156 | and 16kB for the map leaves 32 unicode values |
157 | for each font position */ | 157 | for each font position */ |
158 | if (!feof(stdin)) | 158 | if (!feof(stdin)) |
159 | fatalPerror("Font too large"); | 159 | perror_msg_and_die("Font too large"); |
160 | 160 | ||
161 | /* test for psf first */ | 161 | /* test for psf first */ |
162 | { | 162 | { |
@@ -174,11 +174,11 @@ static void loadnewfont(int fd) | |||
174 | goto no_psf; | 174 | goto no_psf; |
175 | 175 | ||
176 | if (psfhdr.mode > PSF_MAXMODE) | 176 | if (psfhdr.mode > PSF_MAXMODE) |
177 | fatalError("Unsupported psf file mode\n"); | 177 | error_msg_and_die("Unsupported psf file mode\n"); |
178 | fontsize = ((psfhdr.mode & PSF_MODE512) ? 512 : 256); | 178 | fontsize = ((psfhdr.mode & PSF_MODE512) ? 512 : 256); |
179 | #if !defined( PIO_FONTX ) || defined( __sparc__ ) | 179 | #if !defined( PIO_FONTX ) || defined( __sparc__ ) |
180 | if (fontsize != 256) | 180 | if (fontsize != 256) |
181 | fatalError("Only fontsize 256 supported\n"); | 181 | error_msg_and_die("Only fontsize 256 supported\n"); |
182 | #endif | 182 | #endif |
183 | hastable = (psfhdr.mode & PSF_MODEHASTAB); | 183 | hastable = (psfhdr.mode & PSF_MODEHASTAB); |
184 | unit = psfhdr.charsize; | 184 | unit = psfhdr.charsize; |
@@ -186,7 +186,7 @@ static void loadnewfont(int fd) | |||
186 | 186 | ||
187 | head = head0 + fontsize * unit; | 187 | head = head0 + fontsize * unit; |
188 | if (head > inputlth || (!hastable && head != inputlth)) | 188 | if (head > inputlth || (!hastable && head != inputlth)) |
189 | fatalError("Input file: bad length\n"); | 189 | error_msg_and_die("Input file: bad length\n"); |
190 | do_loadfont(fd, inbuf + head0, unit, fontsize); | 190 | do_loadfont(fd, inbuf + head0, unit, fontsize); |
191 | if (hastable) | 191 | if (hastable) |
192 | do_loadtable(fd, inbuf + head, inputlth - head, fontsize); | 192 | do_loadtable(fd, inbuf + head, inputlth - head, fontsize); |
@@ -201,7 +201,7 @@ static void loadnewfont(int fd) | |||
201 | } else { | 201 | } else { |
202 | /* bare font */ | 202 | /* bare font */ |
203 | if (inputlth & 0377) | 203 | if (inputlth & 0377) |
204 | fatalError("Bad input file size\n"); | 204 | error_msg_and_die("Bad input file size\n"); |
205 | offset = 0; | 205 | offset = 0; |
206 | unit = inputlth / 256; | 206 | unit = inputlth / 256; |
207 | } | 207 | } |