On 09/08/14 12:43, J. E. wrote:
> The readme.txt file doesn't really contain the information I am after.
Please don't top-post.
> My app is in MdeModulePkg\Application\, not in AppPkg\Application, so I
> cannot access the standard C Library. I get a file not found error if I
> include stdlib.h
>
> I can see the standard c functions in here:
>
> StdLib\LibC\String\string.h
> Std C: strcpy, strlen, strcmp, strcat, strtok, etc..
>
> I can see some EFI String functions in here:
>
> MdePkg\Library\BaseLib\string.c
> EFI: StrCpy, StrLen, StrCmp, StrCat, ____, etc..
>
>
> But StrTok() is missing.
>
> I can't find an EFI equivalent function.
> StrTok() has not been implemented yet?
>
>
> Or should I be placing my app in AppPkg\Application instead?
You stated
From my understanding, the standard c library isn't available to
apps,
which is factually incorrect *in general*. Which is why I answered with
the link, to disprove that.
It is your call to write a pure UEFI app, or an StdLib app. If you opt
the former, then you may not have a canned strtok() at your disposal. If
you opt for an StdLib app, then you'll have one.
The distinction between pure UEFI apps and StdLib apps is briefly
mentioned in the file that I linked:
>> https://github.com/tianocore/edk2/blob/master/StdLib/ReadMe.txt
where it speaks about "Hello" vs. "Main":
It goes into more details under USAGE.
As far as I understand, the StdLib module(s) exist (in part) exactly for
helping with porting C applications. So if you're porting one, you
should probably use StdLib.
Laszlo
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel