Closed GoogleCodeExporter closed 8 years ago
or when pococ read a file, if first line begins with #! then simply skip this
line.
so we can use #!/usr/bin/pococ
Original comment by xsof...@gmail.com
on 31 May 2012 at 3:55
patch platform/platform_unix.c, in function PlatformReadFile
insert codes below
// code begin
if ((ReadText[0] == '#') && (ReadText[1] == '!'))
{
for (char *p = ReadText; (*p != '\r') && (*p != '\n'); ++p)
{
*p = ' ';
}
}
// code end
before function return,
so we can put
#!/usr/bin/pico
into first line of a source code and chmod 755 then execute it
Original comment by xsof...@gmail.com
on 31 May 2012 at 4:25
Thanks, I've added that in r573
Original comment by zik.sale...@gmail.com
on 31 May 2012 at 6:00
Original issue reported on code.google.com by
xsof...@gmail.com
on 31 May 2012 at 3:54