| version 1.3 | | version 1.4 |
|---|
| | |
| * Functions for accessing arguments. | | * Functions for accessing arguments. |
| * | | * |
| * $Log$ | | * $Log$ |
| | | * Revision 1.4 2002/04/01 01:21:57 donut |
| | | * allow arbitrary resolutions to be specified on command line |
| | | * |
| * Revision 1.3 1999/08/05 22:53:41 sekmu | | * Revision 1.3 1999/08/05 22:53:41 sekmu |
| * | | * |
| * D3D patch(es) from ADB | | * D3D patch(es) from ADB |
| | |
| return i; | | return i; |
| | | |
| return 0; | | return 0; |
| | | } |
| | | |
| | | int FindResArg( char *prefix, int *sw, int *sh ) { |
| | | int i; |
| | | int w,h; |
| | | char *endptr; |
| | | int prefixlen=strlen(prefix); |
| | | |
| | | for (i=0; i<Num_args; ++i) |
| | | if (Args[i][0]=='-' && !strncasecmp(Args[i]+1, prefix, prefixlen)){ |
| | | w=strtol(Args[i]+1+prefixlen, &endptr, 10); |
| | | if (w>0 && endptr && endptr[0]=='x'){ |
| | | h=strtol(endptr+1, &endptr, 10); |
| | | if (h>0 && endptr[0]=='\0') { |
| | | *sw=w; |
| | | *sh=h; |
| | | return i; |
| | | } |
| | | } |
| | | } |
| | | return 0; |
| | | |
| } | | } |
| | | |
| //added 7/11/99 by adb to free arguments (prevent memleak msg) | | //added 7/11/99 by adb to free arguments (prevent memleak msg) |