MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / PicocPlatformScanFile

Function PicocPlatformScanFile

common/script/platform_checkpoint.c:110–121  ·  view source on GitHub ↗

read and scan a file for definitions */

Source from the content-addressed store, hash-verified

108
109/* read and scan a file for definitions */
110void PicocPlatformScanFile(Picoc* pc, const char* FileName)
111{
112 char* SourceStr = PlatformReadFile(pc, FileName);
113
114 /* ignore "#!/path/to/picoc" .. by replacing the "#!" with "//" */
115 if (SourceStr != NULL && SourceStr[0] == '#' && SourceStr[1] == '!') {
116 SourceStr[0] = '/';
117 SourceStr[1] = '/';
118 }
119
120 PicocParse(pc, FileName, SourceStr, strlen(SourceStr), true, false, true, gEnableDebugger);
121}
122
123/* exit the program */
124void PlatformExit(Picoc* pc, int RetVal)

Callers 1

runMethod · 0.85

Calls 1

PlatformReadFileFunction · 0.85

Tested by

no test coverage detected