Van writes:
> Greetings:
>
> With the following code, I have 3 problems:
> 1. ./client -psecret works, but, ./client --password=secret does not;
> 2. After calling load_defaults, the argument vector is getting parsed,
> but, it's not making it into the switch processing. The values
> from my global char *password = NULL values are being used;
> 3. Compiler warnings related to the struct variables. I've also tried:
> {"password", optional_argument, 0, "p"},
> with the same result. I didn't see anything in getopt.h that would
> explain this. Using the one from sampdb/capi used in Paul's book.
>
> main.c:38: warning: initialization makes integer from pointer without a cast
>
> Can anyone see where the error(s) is/are?
> Full source is at http://az.dedserius.com/main.c/
> Regards,
> Van
Hi!
What you have described works just fine with mysql client program.
Just copy the relevant parts from it and your program will work in the
same fashion.
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php