stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/stratagus ccl.c


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/stratagus ccl.c
Date: 14 Jan 2004 10:38:36 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/14 10:38:36

Modified files:
        src/stratagus  : ccl.c 

Log message:
        Show error if Load fails

Patches:
Index: stratagus/src/stratagus/ccl.c
diff -u stratagus/src/stratagus/ccl.c:1.153 stratagus/src/stratagus/ccl.c:1.154
--- stratagus/src/stratagus/ccl.c:1.153 Sat Jan 10 17:04:22 2004
+++ stratagus/src/stratagus/ccl.c       Wed Jan 14 10:38:35 2004
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden ccl.c          -       The craft configuration language. */
+/address@hidden ccl.c - The craft configuration language. */
 //
-//     (c) Copyright 1998-2003 by Lutz Sammer and Jimmy Salmon
+//      (c) Copyright 1998-2004 by Lutz Sammer and Jimmy Salmon
 //
 //      This program is free software; you can redistribute it and/or modify
 //      it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl.c,v 1.153 2004/01/10 06:04:22 wizzard Exp $
+//      $Id: ccl.c,v 1.154 2004/01/13 23:38:35 jsalmon3 Exp $
 
 //@{
 
@@ -228,7 +228,10 @@
                lua_error(l);
        }
        LibraryFileName(LuaToString(l, 1), buf);
-       LuaLoadFile(buf);
+       if (LuaLoadFile(buf) == -1) {
+               lua_pushfstring(l, "Load failed: %s", LuaToString(l, 1));
+               lua_error(l);
+       }
        return 0;
 }
 
@@ -1088,7 +1091,7 @@
        }
 
        fprintf(fd, "--- -----------------------------------------\n");
-       fprintf(fd, "--- $Id: ccl.c,v 1.153 2004/01/10 06:04:22 wizzard Exp 
$\n");
+       fprintf(fd, "--- $Id: ccl.c,v 1.154 2004/01/13 23:38:35 jsalmon3 Exp 
$\n");
 
        fprintf(fd, "SetVideoResolution(%d, %d)\n", VideoWidth, VideoHeight);
        fprintf(fd, "SetGroupKeys(\"");
@@ -1124,7 +1127,7 @@
        }
 
        fprintf(fd, "--- -----------------------------------------\n");
-       fprintf(fd, "--- $Id: ccl.c,v 1.153 2004/01/10 06:04:22 wizzard Exp 
$\n");
+       fprintf(fd, "--- $Id: ccl.c,v 1.154 2004/01/13 23:38:35 jsalmon3 Exp 
$\n");
 
        // Global options
        if (OriginalFogOfWar) {
@@ -1233,7 +1236,7 @@
        extern SCM oblistvar;
 
        CLprintf(file, "\n;;; -----------------------------------------\n");
-       CLprintf(file, ";;; MODULE: CCL $Id: ccl.c,v 1.153 2004/01/10 06:04:22 
wizzard Exp $\n\n");
+       CLprintf(file, ";;; MODULE: CCL $Id: ccl.c,v 1.154 2004/01/13 23:38:35 
jsalmon3 Exp $\n\n");
 
        for (list = oblistvar; gh_list_p(list); list = gh_cdr(list)) {
                SCM sym;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]