Added Nikolaus Klepp's shebang patch
git-svn-id: http://picoc.googlecode.com/svn/trunk@574 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
f37ea8c96d
commit
0789a4c719
|
@ -119,6 +119,13 @@ void PicocPlatformScanFile(const char *FileName)
|
|||
{
|
||||
char *SourceStr = PlatformReadFile(FileName);
|
||||
|
||||
/* ignore "#!/path/to/picoc" .. by replacing the "#!" with "//" */
|
||||
if (SourceStr != NULL && SourceStr[0] == '#' && SourceStr[1] == '!')
|
||||
{
|
||||
SourceStr[0] = '/';
|
||||
SourceStr[1] = '/';
|
||||
}
|
||||
|
||||
PicocParse(FileName, SourceStr, strlen(SourceStr), TRUE, FALSE, TRUE, TRUE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue