summaryrefslogtreecommitdiff
path: root/src/chill.cc
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-09-23 10:59:54 -0600
committerTuowen Zhao <ztuowen@gmail.com>2016-09-23 10:59:54 -0600
commit699861922d5349ffa98b518f34016b2be2ca368d (patch)
treeb1172a41c89b382487772ef05c8a5ce70c068fa0 /src/chill.cc
parent16f097d5548e9b31ab4b0dc343afeb680b361e28 (diff)
downloadchill-699861922d5349ffa98b518f34016b2be2ca368d.tar.gz
chill-699861922d5349ffa98b518f34016b2be2ca368d.tar.bz2
chill-699861922d5349ffa98b518f34016b2be2ca368d.zip
more changes
Diffstat (limited to 'src/chill.cc')
-rw-r--r--src/chill.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/chill.cc b/src/chill.cc
index a3ad57f..f69f3bf 100644
--- a/src/chill.cc
+++ b/src/chill.cc
@@ -26,27 +26,26 @@ std::vector<int> loops;
// CHiLL program main
// Initialize state and run script or interactive mode
//---
-int main( int argc, char* argv[] )
-{
+int main(int argc, char *argv[]) {
CHILL_DEBUG_PRINT("%s main()\n", argv[0]);
if (argc > 2) {
fprintf(stderr, "Usage: %s [script_file]\n", argv[0]);
exit(-1);
}
-
+
// Create PYTHON interpreter
/* Pass argv[0] to the Python interpreter */
Py_SetProgramName(argv[0]);
-
+
/* Initialize the Python interpreter. Required. */
Py_Initialize();
-
+
/* Add a static module */
initchill();
-
+
if (argc == 2) {
- FILE* f = fopen(argv[1], "r");
- if(!f){
+ FILE *f = fopen(argv[1], "r");
+ if (!f) {
printf("can't open script file \"%s\"\n", argv[1]);
exit(-1);
}
@@ -61,8 +60,8 @@ int main( int argc, char* argv[] )
printf("Copyright (C) 2008 University of Southern California\n");
printf("Copyright (C) 2009-2012 University of Utah\n");
fflush(stdout);
- is_interactive=true;
- PyRun_InteractiveLoop(stdin,"-");
+ is_interactive = true;
+ PyRun_InteractiveLoop(stdin, "-");
printf("CHiLL ending...\n");
fflush(stdout);
}