]> git.draconx.ca Git - gob-dx.git/blobdiff - src/out.c
Replace gnulib patch with new common helper macro.
[gob-dx.git] / src / out.c
index b6371f6ad1c63e936ad10d1e0135d122708e9326..effa4d3a6757b19fc9a4ebb9cb177540c8d01099 100644 (file)
--- a/src/out.c
+++ b/src/out.c
@@ -1,3 +1,28 @@
+/*
+ * GOB C Preprocessor
+ * Copyright (C) 1999,2000 the Free Software Foundation.
+ * Copyright (C) 2000 Eazel, Inc.
+ * Copyright (C) 2001-2011 George (Jiri) Lebl
+ *
+ * Author: George (Jiri) Lebl
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the  Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ */
+
+#include <config.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <glib.h>
@@ -92,9 +117,12 @@ out_addline_outfile(FILE *fp)
                fprintf(fp,"#line %d \"%s.h\"\n",outhline,filebase);
                in_outh = TRUE;
        } else if(fp == outph) {
+               char sep[2] = {0,0};
                if(in_outph) return;
                outphline++;
-               fprintf(fp,"#line %d \"%s%cprivate.h\"\n",outphline,filebase,file_sep);
+               if (file_sep != 0)
+                       sep[0] = file_sep;
+               fprintf(fp,"#line %d \"%s%sprivate.h\"\n",outphline,filebase,sep);
                in_outph = TRUE;
        } else
                g_assert_not_reached();