Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C problem

Name: stallman 2011-11-06 9:12

Sup prog
i'm using C
i have a problem

i have a dvi file where each line is a command and its parameters
i have to output a file and write what the commands do

i have been able to parse the lines into strings and get the first string which is the command itself

my goal is to compare that first string (the command) with strings contained in a string array (which are all the commands that exist in a dvi file)

that way i can return the corresponding function which will do the calculation using the parameters from the line

problem is that there is a command named set_char_i where i can go from 0 to 127

my command string array looks like that:
char *commandes[40]={"pre", "xxx1", "set", "set_char_i", "set_rule", "put", "put_rule", "down", "fnt_num", "w0", "w", "x0", "x", "y0", "y", "z0", "z", "fnt_def", "post", "post_post", "eop", "bop", "push", "pop"};

how can i make it so that "set_char_i" has i between 0 and 127?

Name: Anonymous 2011-11-06 19:42

>>32
ever considered why noone uses relativity theory on those basic Problems like:
...how much time will it take lolcat A to cross the road at velocity V...
None should ever be encouraged to use this rocket science math just to compare 2 strings lol,(and btw the compiler can prolly optimize it)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List