added print routines so that %I is obsolete.
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Wed, 11 Sep 2002 16:40:15 +0000 (16:40 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Wed, 11 Sep 2002 16:40:15 +0000 (16:40 +0000)
[r473]

ir/ident/ident.c
ir/ident/ident.h

index 17ba8ac..2ca2933 100644 (file)
@@ -134,3 +134,11 @@ int id_is_suffix (ident *suffix, ident *id) {
     return 1;
   return 0;
 }
+
+int print_id (ident *id) {
+  xprintf("%I", id);
+}
+
+int fprint_id (FILE *F, ident *id) {
+  xfprintf(F, "%I", id);
+}
index 9f4efee..751481d 100644 (file)
@@ -12,6 +12,7 @@
 # ifndef _IDENT_H_
 # define _IDENT_H_
 
+# include <stdio.h>
 # include "assert.h"
 # include "common.h"
 
@@ -128,5 +129,39 @@ int id_is_prefix (ident *prefix, ident *id);
 /*  */
 int id_is_suffix (ident *suffix, ident *id);
 
+/****f* ident/print_id
+ *
+ * NAME
+ *
+ * SYNOPSIS
+ *  int print_id (ident *id);
+ * FUNCTION
+ *  Prints the ident to stdout.
+ * INPUTS
+ *  The ident to print.
+ * SEE ALSO
+ *  id_from_str, id_to_str, id_is_prefix, fprint_id
+ ***
+ */
+/*  */
+int print_id (ident *id);
+
+/****f* ident/fprint_id
+ *
+ * NAME
+ *
+ * SYNOPSIS
+ *  int fprint_id (FILE *f, ident *id);
+ * FUNCTION
+ *  Prints the ident to the file passed.
+ * INPUTS
+ *  The ident to print and the file.
+ * SEE ALSO
+ *  id_from_str, id_to_str, id_is_prefix, print_id
+ ***
+ */
+/*  */
+int fprint_id (FILE *F, ident *id);
+
 
 # endif /* _IDENT_H_ */