more headers
[libfirm] / testprograms / three_cfpred_example.c
index 51ec8ad..2c283a1 100644 (file)
@@ -1,10 +1,15 @@
-/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-* All rights reserved.
-*
-* Authors: Christian Schaefer, Goetz Lindenmaier
-*
-* testprogram.
-*/
+/*
+ * Project:     libFIRM
+ * File name:   testprograms/three_cfpred_example.c
+ * Purpose:     Construct a block with more than two predecessors.
+ * Author:      Christian Schaefer, Goetz Lindenmaier
+ * Modified by:
+ * Created:
+ * CVS-ID:      $Id$
+ * Copyright:   (c) 1999-2003 Universität Karlsruhe
+ * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ */
+
 
 # include <stdio.h>
 # include <string.h>
 # include "irdump.h"
 # include "firm.h"
 
-/*
- *   a dead block / unreachable code.
- */
-
 /**
-*  This file constructs a control flow of following shape:
-*
-*
-*       firstCondBlock
-*          /     \
-*         /       \
-*       |/_       _\|
-*     Block1    scnCondBlock
-*        |       |        |
-        |       |        |
-*         |      \ /      \ /
-*        |     Block2   Block3
-*         \      |       /
-*      \     |      /
-*      _\|  \ /   |/_
-*            nextBlock
-*
-*
-*   This is a program as, e.g.,
-*
-*   if () then
-*     { Jmp label1; } // happens anyways
-*   else
-*     { Jmp label1; } // happens anyways
-* label1:
-*   return();
-*   Jmp label1;
-*
-**/
+ *  This file constructs a control flow of following shape:
+ *
+ *
+ *       firstCondBlock
+ *          /     \
+ *         /       \
+ *       |/_       _\|
+ *     Block1    scnCondBlock
+ *        |       |        |
+ *        |       |        |
+ *    |      \ /      \ /
+ *        |     Block2   Block3
+ *         \      |       /
+ *          \     |      /
+ *          _\|  \ /   |/_
+ *            nextBlock
+ *
+ *
+ *   This is a program as, e.g.,
+ *
+ *   if () then
+ *     { Jmp label1; } //  happens anyways
+ *   else
+ *     { Jmp label1; } //  happens anyways
+ * label1:
+ *   return();
+ *   Jmp label1;
+ *
+ **/
 
 int main(int argc, char **argv)
 {
@@ -74,11 +75,11 @@ int main(int argc, char **argv)
 #define METHODNAME "THREE_CFPRED_EXAMPLE_main"
 #define NRARGS 1
 #define NRES 1
-  printf("\nCreating an IR graph: ...\n");
+  printf("\nCreating an IR graph: THREE_CFPRED_EXAMPLE ...\n");
 
   owner = get_glob_type();
   proc_main = new_type_method(id_from_str(METHODNAME, strlen(METHODNAME)),
-                             NRARGS, NRES);
+                  NRARGS, NRES);
   set_method_param_type(proc_main, 0, prim_t_int);
   set_method_res_type(proc_main, 0, prim_t_int);