]> granicus.if.org Git - graphviz/commitdiff
move agferror() to graphio.c where its needed
authorellson <devnull@localhost>
Mon, 2 Mar 2009 17:46:34 +0000 (17:46 +0000)
committerellson <devnull@localhost>
Mon, 2 Mar 2009 17:46:34 +0000 (17:46 +0000)
lib/graph/attribs.c
lib/graph/graphio.c

index 83973cf33d98c5fe6a629413ce2d1081a880a9f1..8e223376cf1eb0d55296c64880c06c15f11794e6 100644 (file)
@@ -324,14 +324,6 @@ Agsym_t *agprvattr(void *obj, Agsym_t *a)
        return (Agsym_t *)dtprev(dict->dict, a);
 }
 
-#if defined(__SUNPRO_C) || defined(__CYGWIN__) || defined(__MINGW32__)
-/* for systems where ferror is a macro */
-static int agferror(FILE *stream)
-{
-    return ferror(stream);
-}
-#endif
-
        /* this is normally called by the aginit() macro */
 void aginitlib(int gs, int ns, int es)
 {
@@ -340,13 +332,6 @@ void aginitlib(int gs, int ns, int es)
        AG.node_nbytes = ns;
        AG.edge_nbytes = es;
        AG.init_called = TRUE;
-       AG.fwrite = fwrite;   /* init to system version of fwrite() */
-#if defined(__SUNPRO_C) || defined(__CYGWIN__) || defined(__MINGW32__)
-#undef ferror
-       AG.ferror = agferror; /* init to ferror macro wrapper function */
-#else
-       AG.ferror = ferror;   /* init to system version of ferror() */
-#endif
        initproto();
     } else
        if ((AG.graph_nbytes != gs) || (AG.node_nbytes != ns)
index f9e255cf618fb1d1d7db1e849c2d8761c0fe2c59..6da3fe5de81a40b684141552d60787eccbb53b35 100644 (file)
@@ -581,6 +581,15 @@ static void free_printdict_t(printdict_t * dict)
     free(dict);
 }
 
+#if defined(__SUNPRO_C) || defined(__CYGWIN__) || defined(__MINGW32__)
+/* for systems where ferror is a macro */
+static int agferror(FILE *stream)
+{
+        return ferror(stream);
+}
+#endif
+
+
 int agwrite(Agraph_t * g, FILE * fp)
 {
     printdict_t *p;