Rev 3519 | Rev 4672 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3519 | Rev 3689 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | * No warrenty whatoever * |
7 | * No warrenty whatoever * |
8 | ********************************************************************************* |
8 | ********************************************************************************* |
9 | */ |
9 | */ |
10 | #include <stdio.h> |
10 | #include <stdio.h> |
11 | #include <stdlib.h> |
11 | #include <stdlib.h> |
12 | #include <errno.h> |
- | |
13 | #include <math.h> |
12 | #include <math.h> |
14 | #include <string.h> |
13 | #include <string.h> |
15 | 14 | ||
16 | main( int argc , char *argv[]){ |
15 | int main( int argc , char *argv[]){ |
17 | /* test for correct argument */ |
16 | /* test for correct argument */ |
18 | if( argc != 2){ |
17 | if( argc != 2){ |
19 | fprintf(stdout,"error !\nusage:\n!exec moneyprint $your_wims_item_list\nexample:\nmoney=!exec moneyprint 1.2,30.1,.4,-.23123456\nThe result is a comma separated list: 1.20,30.10,0.40,-0.23\nNote: no calculations are done.\nNote: all numbers will be rounded to 2 decimals.\n" |
18 | fprintf(stdout,"error !\nusage:\n!exec moneyprint $your_wims_item_list\nexample:\nmoney=!exec moneyprint 1.2,30.1,.4,-.23123456\nThe result is a comma separated list: 1.20,30.10,0.40,-0.23\nNote: no calculations are done.\nNote: all numbers will be rounded to 2 decimals.\n"); |
20 | exit(0); |
19 | exit(0); |
21 | } |
20 | } |
22 | /* test for illegal characters */ |
21 | /* test for illegal characters */ |
23 | const char *invalid_characters = "\n\"\'!+=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@#$%^*&()[]{}:;~><?/\\|"; |
22 | const char *invalid_characters = "\n\"\'!+=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@#$%^*&()[]{}:;~><?/\\|"; |
24 | char *inp; |
23 | char *inp; |