bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stdlib.h not found?


From: Volker Augustin
Subject: Re: stdlib.h not found?
Date: Fri, 27 Oct 2000 12:58:52 +0200

>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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]