/* * Cflow2VCG * Copyright (C) 2001-2003 Guilhem BONNEFILLE * * 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 #include #include "cflow2vcg.h" #define ARC_INT 1 #define ARC_EXT 2 #define FMT_NOEUD "node_%d [ label=\"%s\\n%s\\n%s:%d\" ]\n" #define FMT_ARC "\tnode_%d -> node_%d ;\n" #define FMT_HEAD "digraph sarien {\n" \ "node [shape=box];" \ "edge [color=black style=solid];\n" #define FMT_FOOT "}\n" void afficher_entete () { fputs(FMT_HEAD, stdout); } void afficher_pied () { fputs(FMT_FOOT, stdout); } void afficher_noeud (const char *label, int numlig, const char *type, const char *fichier_source, int numlig_source) { (void) fprintf (stdout, FMT_NOEUD, numlig, label, type, fichier_source, numlig_source); } void afficher_arc (int src, int dst) { (void) fprintf (stdout, FMT_ARC, src, dst); }