This commit is contained in:
Johns 2009-01-26 13:34:30 +01:00
parent 962a0170f8
commit d28eb799b7

14
bdf2c.c
View File

@ -17,7 +17,7 @@
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/// GNU Affero General Public License for more details.
///
/// $Id: $
/// $Id$
//////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
@ -52,16 +52,16 @@ void CreateFontHeaderFile(FILE * out)
//
// Read BDF font file.
//
void ReadBdf(FILE* bdf)
void ReadBdf(FILE * bdf)
{
char linebuf[1024];
char *s;
for (;;) {
if ( !fgets(linebuf, sizeof(linebuf), bdf) ) { // EOF
if (!fgets(linebuf, sizeof(linebuf), bdf)) { // EOF
break;
}
if ( !(s = strtok(linebuf, " \t\n\r")) ) { // empty line
if (!(s = strtok(linebuf, " \t\n\r"))) { // empty line
break;
}
printf("token:%s\n", s);
@ -85,10 +85,8 @@ void PrintVersion(void)
//
void PrintUsage(void)
{
printf("Usage: bdf2c [OPTIONs]\n"
"\t-c\tCreate font header on stdout\n"
"\t-C file\tCreate font header file\n"
);
printf("Usage: bdf2c [OPTIONs]\n" "\t-c\tCreate font header on stdout\n"
"\t-C file\tCreate font header file\n");
printf("\tOnly idiots print usage on stderr\n");
}