Changeset 1122 for Whitix

Show
Ignore:
Timestamp:
10/14/08 18:42:00 (1 month ago)
Author:
mwhitworth
Message:

Add outline for getopt. Need to write soon (to get binutils to work).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/keobject/user/posix/opt/opt.c

    r910 r1122  
    44 
    55char* optarg; 
     6 
     7#define OPT_PERMUTE                     0x01 
     8 
     9int getopt_internal(int argc, char* const argv[], const char* optstring, 
     10        const struct option* longopts, int* longindex, int flags) 
     11{ 
     12        printf("getopt_internal(%d)", argc); 
     13        exit(0); 
     14} 
    615 
    716int getopt(int argc, char* const argv[], const char* optstring) 
     
    1120} 
    1221 
    13 int getopt_long(int argc, char* const argv[], const char* optstring, const struct option* longopts, int* longindex) 
     22int getopt_long(int argc, char* const argv[], const char* optstring, 
     23        const struct option* longopts, int* longindex) 
    1424{ 
    15         printf("getopt_long\n"); 
    16         return -1; 
     25        return getopt_internal(argc, argv, optstring, longopts, longindex, OPT_PERMUTE); 
    1726} 
    1827