Updated header
[libfirm] / ir / ana2 / pto.c
index 88184fa..ce05df5 100644 (file)
@@ -1,17 +1,31 @@
 /* -*- c -*- */
 
 /*
-   Project:     libFIRM
-   File name:   ir/ana/pto.c
-   Purpose:     Entry to PTO
-   Author:      Florian
-   Modified by:
-   Created:     Tue Nov 23 18:37:09 CET 2004
-   CVS-ID:      $Id$
-   Copyright:   (c) 1999-2004 Universität Karlsruhe
-   Licence:     This file is protected by the GPL -  GNU GENERAL PUBLIC LICENSE.
-*/
-
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/**
+ * @file
+ * @brief   Entry to PTO
+ * @author  Florian
+ * @date    Tue Nov 23 18:37:09 CET 2004
+ * @version $Id$
+ */
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -80,7 +94,7 @@ void pto_init (int lvl)
   ecg_iterate_graphs (pto_init_graph_wrapper, NULL);
 
   /* debugging only */
-  spaces = (char*) xmalloc (512 * sizeof (char));
+  spaces = xmalloc (512 * sizeof (char));
   memset (spaces, ' ', 512);
   spaces += 511;
   *spaces = '\0';
@@ -89,8 +103,9 @@ void pto_init (int lvl)
   set_curr_ctx (get_main_ctx ());
 }
 
-void pto_run ()
+void pto_run (void)
 {
+  ir_graph *save;
   ir_graph *graph = get_irp_main_irg ();
 
   pto_reset_graph_pto (graph, 0);
@@ -103,7 +118,7 @@ void pto_run ()
                 get_entity_name (get_irg_entity (graph))));
 
   /* we need some kind of environment here: NULL */
-  ir_graph *save = get_current_ir_graph ();
+  save = get_current_ir_graph ();
   pto_graph (graph, 0, NULL);
   set_current_ir_graph (save);
 
@@ -111,12 +126,12 @@ void pto_run ()
 }
 
 /* Dump all interesting stuff to a bunch of files */
-void pto_dump ()
+void pto_dump (void)
 {
   pto_dump_names ("names.dot");
 }
 
-void pto_cleanup ()
+void pto_cleanup (void)
 {
   /* todo: clean up our own mess */
   spaces -= 511;                /* hope that all changes to spaces are
@@ -136,6 +151,15 @@ void pto_cleanup ()
 \f
 /*
   $Log$
+  Revision 1.17  2005/01/10 17:26:34  liekweg
+  fixup printfs, don't put environments on the stack
+
+  Revision 1.16  2004/12/22 14:43:14  beck
+  made allocations C-like
+
+  Revision 1.15  2004/12/21 14:26:53  beck
+  removed C99 constructs
+
   Revision 1.14  2004/12/20 17:41:14  liekweg
   __unused -> _unused