代码拉取完成,页面将自动刷新
/* picoc main program - this varies depending on your operating system and
* how you're using picoc */
/* platform-dependent code for running programs is in this file */
#if defined(UNIX_HOST) || defined(WIN32)
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#endif
/* include only picoc.h here - should be able to use it with only the
external interfaces, no internals from interpreter.h */
#include "picoc.h"
#if defined(UNIX_HOST) || defined(WIN32)
#include "LICENSE.h"
/* Override via STACKSIZE environment variable */
#define PICOC_STACK_SIZE (128000*4)
int main(int argc, char **argv)
{
int ParamCount = 1;
int DontRunMain = false;
int StackSize = getenv("STACKSIZE") ? atoi(getenv("STACKSIZE")) : PICOC_STACK_SIZE;
Picoc pc;
if (argc < 2 || strcmp(argv[ParamCount], "-h") == 0) {
printf(PICOC_VERSION " \n"
"Format:\n\n"
"> picoc <file1.c>... [- <arg1>...] : run a program, calls main() as the entry point\n"
"> picoc -s <file1.c>... [- <arg1>...] : run a script, runs the program without calling main()\n"
"> picoc -i : interactive mode, Ctrl+d to exit\n"
"> picoc -c : copyright info\n"
"> picoc -h : this help message\n");
return 0;
}
if (strcmp(argv[ParamCount], "-c") == 0) {
printf("%s\n", (char*)&__LICENSE);
return 0;
}
PicocInitialize(&pc, StackSize);
if (strcmp(argv[ParamCount], "-s") == 0) {
DontRunMain = true;
PicocIncludeAllSystemHeaders(&pc);
ParamCount++;
}
if (argc > ParamCount && strcmp(argv[ParamCount], "-i") == 0) {
PicocIncludeAllSystemHeaders(&pc);
PicocParseInteractive(&pc);
} else {
if (PicocPlatformSetExitPoint(&pc)) {
PicocCleanup(&pc);
return pc.PicocExitValue;
}
for (; ParamCount < argc && strcmp(argv[ParamCount], "-") != 0; ParamCount++)
PicocPlatformScanFile(&pc, argv[ParamCount]);
if (!DontRunMain)
PicocCallMain(&pc, argc - ParamCount, &argv[ParamCount]);
}
PicocCleanup(&pc);
return pc.PicocExitValue;
}
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。