[pure-lang-svn] SF.net SVN: pure-lang:[523] pure/trunk/examples/poor.c
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-08-17 20:50:46
|
Revision: 523 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=523&view=rev Author: agraef Date: 2008-08-17 20:50:56 +0000 (Sun, 17 Aug 2008) Log Message: ----------- Bugfix: handle the case that the interpreter wasn't created successfully. Modified Paths: -------------- pure/trunk/examples/poor.c Modified: pure/trunk/examples/poor.c =================================================================== --- pure/trunk/examples/poor.c 2008-08-17 18:20:28 UTC (rev 522) +++ pure/trunk/examples/poor.c 2008-08-17 20:50:56 UTC (rev 523) @@ -29,6 +29,7 @@ { pure_interp *interp = pure_create_interp(argc, argv); char buf[10000]; + if (!interp) return 1; fputs("? ", stdout); fflush(stdout); while (fgets(buf, sizeof(buf), stdin)) { pure_expr *x = eval(buf); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |