Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions readshpfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void shp_jump(BOUNDS *bb, int mode) {
// printf("jump\n");
}

int strtonum(char *str) {
int str2num(char *str) {
int i;
int sign=1.0;
int val;
Expand Down Expand Up @@ -657,7 +657,7 @@ int shp_loadfont(char *path, int position)
break;
case 1: // get glyph num
if (token == VAL) {
glyphnum = strtonum(tp);
glyphnum = str2num(tp);
} else if (token == WORD) {
glyphnum = 0;
} else {
Expand All @@ -672,7 +672,7 @@ int shp_loadfont(char *path, int position)
fprintf(stderr, "parse error in state %d\n", state);
exit(1);
}
numbytes = strtonum(tp);
numbytes = str2num(tp);
if (debug) printf("got numbytes %d\n", numbytes);
state = 3;
break;
Expand All @@ -699,7 +699,7 @@ int shp_loadfont(char *path, int position)
break;
case 5:
if (token == VAL) {
bytecode[count]=strtonum(tp);
bytecode[count]=str2num(tp);
if (debug) printf(" %d %d %d\n", count, numbytes, bytecode[count]);
count++;
} else if (token == EOL) {
Expand Down
8 changes: 4 additions & 4 deletions shpfonts/parse2.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ char *estrdup(const char *s);
void eatwhite();
int token_unget(TOKEN token, char *word);

int strtonum(char *str) {
int str2num(char *str) {
int i;
int sign=1.0;
int val;
Expand Down Expand Up @@ -541,7 +541,7 @@ int main()
break;
case 1: // get glyph num
if (token == NUM) {
glyphnum = strtonum(tp);
glyphnum = str2num(tp);
} else if (token == WORD) {
glyphnum = 0;
} else {
Expand All @@ -556,7 +556,7 @@ int main()
fprintf(stderr, "parse error in state %d\n", state);
exit(1);
}
numbytes = strtonum(tp);
numbytes = str2num(tp);
if (debug) printf("got numbytes %d\n", numbytes);
state = 3;
break;
Expand All @@ -579,7 +579,7 @@ int main()
break;
case 5:
if (token == NUM) {
bytecode[count]=strtonum(tp);
bytecode[count]=str2num(tp);
if (debug) printf(" %d %d %d\n", count, numbytes, bytecode[count]);
count++;
} else if (token == EOL) {
Expand Down
8 changes: 4 additions & 4 deletions shpfonts/readshp.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void shpjump(int mode) {
printf("jump\n");
}

int strtonum(char *str) {
int str2num(char *str) {
int i;
int sign=1.0;
int val;
Expand Down Expand Up @@ -624,7 +624,7 @@ int shp_loadfont(char *path)
break;
case 1: // get glyph num
if (token == NUM) {
glyphnum = strtonum(tp);
glyphnum = str2num(tp);
} else if (token == WORD) {
glyphnum = 0;
} else {
Expand All @@ -639,7 +639,7 @@ int shp_loadfont(char *path)
fprintf(stderr, "parse error in state %d\n", state);
exit(1);
}
numbytes = strtonum(tp);
numbytes = str2num(tp);
if (debug) printf("got numbytes %d\n", numbytes);
state = 3;
break;
Expand All @@ -666,7 +666,7 @@ int shp_loadfont(char *path)
break;
case 5:
if (token == NUM) {
bytecode[count]=strtonum(tp);
bytecode[count]=str2num(tp);
if (debug) printf(" %d %d %d\n", count, numbytes, bytecode[count]);
count++;
} else if (token == EOL) {
Expand Down