Author: petdance
Date: Fri Jun 15 21:15:37 2007
New Revision: 19032

Modified:
   trunk/config/gen/makefiles/root.in
   trunk/src/trace.c
   trunk/src/trace.h

Log:
headerized trace.c

Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in  (original)
+++ trunk/config/gen/makefiles/root.in  Fri Jun 15 21:15:37 2007
@@ -1868,6 +1868,7 @@
     src/stacks.o \
     src/string.o \
     src/string_primitives.o \
+    src/trace.o \
     src/tsq.o \
     src/utils.o \
     src/vtables.o \

Modified: trunk/src/trace.c
==============================================================================
--- trunk/src/trace.c   (original)
+++ trunk/src/trace.c   Fri Jun 15 21:15:37 2007
@@ -14,31 +14,25 @@
 
 src/test_main.c
 
-
 =head2 Functions
 
-=over 4
-
-=cut
-
 */
 
 #include "trace.h"
 #include "parrot/oplib/ops.h"
 
+/* HEADER: src/trace.h */
+
 /*
 
-=item C<void
-trace_pmc_dump(Interp *interp, PMC* pmc)>
+FUNCDOC: trace_pmc_dump
 
 Prints a PMC to C<stderr>.
 
-=cut
-
 */
 
 static STRING*
-trace_class_name(Interp *interp, PMC* pmc)
+trace_class_name(Interp *interp, PMC* pmc /*NN*/)
 {
     STRING *class_name;
     if (PObj_is_class_TEST(pmc)) {
@@ -53,7 +47,7 @@
 }
 
 void
-trace_pmc_dump(Interp *interp, PMC* pmc)
+trace_pmc_dump(Interp *interp /*NN*/, PMC* pmc /*NN*/)
 {
     Interp * const debugger = interp->debugger;
 
@@ -133,17 +127,14 @@
 
 /*
 
-=item C<int
-trace_key_dump(Interp *interp, PMC *key)>
+FUNCDOC: trace_key_dump
 
 Prints a key to C<stderr>, returns the length of the output.
 
-=cut
-
 */
 
 int
-trace_key_dump(Interp *interp /*NN*/, const PMC *key)
+trace_key_dump(Interp *interp /*NN*/, const PMC *key /*NN*/)
 {
     Interp * const debugger = interp->debugger;
 
@@ -212,19 +203,16 @@
 
 /*
 
-=item C<void
-trace_op_dump(Interp *interp, const opcode_t *code_start, const opcode_t *pc)>
+FUNCDOC: trace_op_dump
 
 TODO: This isn't really part of the API, but here's its documentation.
 
 Prints the PC, OP and ARGS. Used by C<trace_op()>.
 
-=cut
-
 */
 
 void
-trace_op_dump(Interp *interp, const opcode_t *code_start, const opcode_t *pc)
+trace_op_dump(Interp *interp /*NN*/, const opcode_t *code_start, const 
opcode_t *pc /*NN*/)
 {
     INTVAL s, n;
     int more = 0, var_args;
@@ -412,45 +400,35 @@
 
 /*
 
-=item C<void
-trace_op(Interp *interp, const opcode_t *code_start,
-         const opcode_t *code_end, const opcode_t *pc)>
+FUNCDOC: trace_op
 
 TODO: This isn't really part of the API, but here's its documentation.
 
 Prints the PC, OP and ARGS. Used by C<runops_trace()>. With bounds
 checking.
 
-=cut
-
 */
 
 void
 trace_op(Interp *interp, const opcode_t *code_start,
-         const opcode_t *code_end, const opcode_t *pc)
+         const opcode_t *code_end, const opcode_t *pc /*NULLOK*/)
 {
     if (!pc) {
         return;
     }
 
-    if (pc >= code_start && pc < code_end) {
+    if (pc >= code_start && pc < code_end)
         trace_op_dump(interp, code_start, pc);
-    }
-    else if (pc) {
+    else
         PIO_eprintf(interp, "PC=%ld; OP=<err>\n", (long)(pc - code_start));
-    }
 }
 
 /*
 
-=back
-
 =head1 SEE ALSO
 
 F<src/trace.h>
 
-=cut
-
 */
 
 

Modified: trunk/src/trace.h
==============================================================================
--- trunk/src/trace.h   (original)
+++ trunk/src/trace.h   Fri Jun 15 21:15:37 2007
@@ -15,12 +15,29 @@
 
 #include "parrot/parrot.h"
 
-void
-trace_pmc_dump(Interp *interp, PMC* pmc);
+/* HEADERIZER BEGIN: src/trace.c */
 
-int trace_key_dump(Interp *interp, const PMC *key);
+int trace_key_dump( Interp *interp /*NN*/, const PMC *key /*NN*/ )
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void trace_op( Interp *interp,
+    const opcode_t *code_start,
+    const opcode_t *code_end,
+    const opcode_t *pc /*NULLOK*/ );
+
+void trace_op_dump( Interp *interp /*NN*/,
+    const opcode_t *code_start,
+    const opcode_t *pc /*NN*/ )
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(3);
+
+void trace_pmc_dump( Interp *interp /*NN*/, PMC* pmc /*NN*/ )
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+/* HEADERIZER END: src/trace.c */
 
-void trace_op_dump(Interp *interp, const opcode_t * code_start, const opcode_t 
* pc);
 
 void trace_op(Interp *interp, const opcode_t * code_start,
               const opcode_t * code_end, const opcode_t * pc);

Reply via email to