>What are you doing exactly?

I wanted to write a function to split the arguments given to a command line function, 
so if the argument is "abc def ghi" I wanted to return an array containing the 3 
strings.

getopt.c uses stdlib.h so i though i could use it too. guess getopt.c is only included 
in the command line tool "grub" isn't it?

I found another way of solving the above problem. But it's not completely flexible. I 
have to declare an array of fixed size (=maximum number of argument parts) of type 
char ** which contains pointers to the beginnings of the parts of the argument. I 
insert '\0' after each part, but this changes the argument directly and i wanted to 
avoid this.

Is there a way to use dynamic memory? There is code that uses malloc and free ...

Volker


_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to