]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Indentation
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index 00f84110e07e6bbe53d27e53d6bb4e4630f5bef6..754a165791d3b62d97e2824e00e5ca78e5b2a080 100644 (file)
--- a/main.c
+++ b/main.c
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#      include <stdlib.h>
-       #include <string.h>
-#              include <limits.h>
-  #      include       "gmqcc.h"
-
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include  "gmqcc.h"
 int main(int argc, char **argv) {
        argc--;
        argv++;
@@ -37,11 +36,13 @@ int main(int argc, char **argv) {
                return error(ERROR_COMPILER, "Source file: %s not found\n", ifile);
        } else {
                struct lex_file *lex = lex_open(fp);
+               lex->name = util_strdup(ifile);
                if (!lex) {
                        fclose(fp);
                        return 0;
                }
                parse_tree(lex);
+               mem_d(lex->name);
                lex_close (lex);
        }