Author: rafl
Date: Wed Nov 16 13:13:33 2005
New Revision: 10044
Modified:
/ (props changed)
trunk/src/disassemble.c
trunk/src/pbc_info.c
trunk/src/pbc_merge.c
trunk/src/pdb.c
trunk/src/pdump.c
Log:
[EMAIL PROTECTED]: rafl | 2005-11-16 17:35:07 +0100
* Adjusted POD docs for the parrot_utils to look more like a manpage.
Modified: trunk/src/disassemble.c
==============================================================================
--- trunk/src/disassemble.c (original)
+++ trunk/src/disassemble.c Wed Nov 16 13:13:33 2005
@@ -4,13 +4,11 @@ $Id$
=head1 NAME
-src/disassemble.c - Parrot disassembler
+disassemble - Parrot disassembler
=head1 SYNOPSIS
- % make disassemble
-
- % ./disassemble file.pbc
+ disassemble file.pbc
=head1 DESCRIPTION
@@ -18,10 +16,6 @@ This uses the C<Parrot_disassemble()> fu
which in turn uses the C<PDB_disassemble()> function from
F<src/debug.c>.
-=head2 Functions
-
-=over 4
-
=cut
*/
@@ -36,13 +30,11 @@ static void do_dis(Parrot_Interp);
/*
-=item C<int main(int argc, char *argv[])>
+int main(int argc, char *argv[])
The run-loop. Starts up an interpreter, loads the bytecode from the
command-line and disassembles it.
-=cut
-
*/
int
@@ -85,12 +77,10 @@ main(int argc, char *argv[])
/*
-=item C<static void do_dis(Parrot_Interp interpreter)>
+static void do_dis(Parrot_Interp interpreter)
Do the disassembling.
-=cut
-
*/
static void
@@ -101,8 +91,6 @@ do_dis(Parrot_Interp interpreter)
/*
-=back
-
=head1 SEE ALSO
F<src/embed.c> and F<src/debug.c>.
@@ -111,6 +99,9 @@ F<src/embed.c> and F<src/debug.c>.
Initial version by Daniel Grunblatt on 2002.5.26.
+Florian Ragwitz: Moved POD documentation that's not necessary to know how to
+actually run the disassembler to normal C comments (Wed, 16 Nov 2005).
+
=cut
*/
Modified: trunk/src/pbc_info.c
==============================================================================
--- trunk/src/pbc_info.c (original)
+++ trunk/src/pbc_info.c Wed Nov 16 13:13:33 2005
@@ -4,22 +4,17 @@ $Id$
=head1 NAME
-src/pbc_info.c - PacFile demo
+pbc_info - PacFile demo
=head1 SYNOPSIS
- % make pbc_info
- % ./pbc_info file.pbc
+ pbc_info file.pbc
=head1 DESCRIPTION
Sample program for dumping PackFile segment names by iterating
over the main directory.
-=head2 Functions
-
-=over 4
-
=cut
*/
@@ -29,10 +24,10 @@ over the main directory.
/*
-=item C<static INTVAL iter(Interp*, struct PackFile_Segment *seg, void
*user_data)>
+static INTVAL iter(Interp*, struct PackFile_Segment *seg, void *user_data)
-This function is passed the callback to C<PackFile_map_segments()> to
-print out the name of each segment in the directory.
+This function is passed the callback to PackFile_map_segments() to print out
+the name of each segment in the directory.
=cut
@@ -52,12 +47,11 @@ iter(Interp* interpreter,
/*
-=item C<int
-main(int argc, char **argv)>
+int
+main(int argc, char **argv)
-Reads the PBC from C<argv[1]>, adds a few extra sections, and then
-iterates over the directory using C<PackFile_map_segments()> and
-C<iter()>.
+Reads the PBC from argv[1], adds a few extra sections, and then iterates over
+the directory using PackFile_map_segments() and iter().
=cut
@@ -97,8 +91,6 @@ main(int argc, char **argv)
/*
-=back
-
=head1 SEE ALSO
F<src/pbc.c>, F<include/parrot/pbc.h>.
Modified: trunk/src/pbc_merge.c
==============================================================================
--- trunk/src/pbc_merge.c (original)
+++ trunk/src/pbc_merge.c Wed Nov 16 13:13:33 2005
@@ -4,14 +4,12 @@ $Id: $
=head1 NAME
-src/pbc_merge.c - Merge multiple Parrot bytecode (PBC) files into
+pbc_merge - Merge multiple Parrot bytecode (PBC) files into
a single PBC file.
=head1 SYNOPSIS
- % make pbc_merge
-
- % ./pbc_merge -o out.pbc input1.pbc input2.pbc ...
+ pbc_merge -o out.pbc input1.pbc input2.pbc ...
=head1 DESCRIPTION
@@ -30,10 +28,6 @@ segments from the input PBC files.
=back
-=head2 Functions
-
-=over 4
-
=cut
*/
@@ -58,12 +52,10 @@ struct pbc_merge_input
/*
-=item C<static void help(void)>
+static void help(void)
Print out the user help info.
-=cut
-
*/
static void
help(void)
@@ -77,15 +69,13 @@ help(void)
/*
-=item C<static struct PackFile*
-pbc_merge_loadpbc(Interp *interpreter, char *filename)>
+static struct PackFile*
+pbc_merge_loadpbc(Interp *interpreter, char *filename)
This function loads a PBC file and unpacks it. We can't
use Parrot_readbc because that is specified to also
fixup the segments, which we don't want.
-=cut
-
*/
static struct PackFile*
pbc_merge_loadpbc(Interp *interpreter, char *fullname)
@@ -166,15 +156,13 @@ pbc_merge_loadpbc(Interp *interpreter, c
/*
-=item C<static struct PackFile_ByteCode*
+static struct PackFile_ByteCode*
pbc_merge_bytecode(Interp *interpreter, struct pbc_merge_input **inputs,
- int num_inputs, struct PackFile *pf)>
+ int num_inputs, struct PackFile *pf)
This function merges the bytecode from the input packfiles, storing the
offsets that each bit of bytecode now exists at.
-=cut
-
*/
static struct PackFile_ByteCode*
pbc_merge_bytecode(Interp *interpreter, struct pbc_merge_input **inputs,
@@ -235,15 +223,13 @@ pbc_merge_bytecode(Interp *interpreter,
/*
-=item C<static struct PackFile_ConstTable*
+static struct PackFile_ConstTable*
pbc_merge_constants(Interp *interpreter, struct pbc_merge_input **inputs,
int num_inputs, struct PackFile *pf,
- struct PackFile_ByteCode *bc)>
+ struct PackFile_ByteCode *bc)
This function merges the constants tables from the input PBC files.
-=cut
-
*/
static struct PackFile_ConstTable*
pbc_merge_constants(Interp *interpreter, struct pbc_merge_input **inputs,
@@ -341,15 +327,13 @@ pbc_merge_constants(Interp *interpreter,
/*
-=item C<static void
+static void
pbc_merge_fixups(Interp *interpreter, struct pbc_merge_input **inputs,
int num_inputs, struct PackFile *pf,
- struct PackFile_ByteCode *bc)>
+ struct PackFile_ByteCode *bc)
This function merges the fixups tables from the input PBC files.
-=cut
-
*/
static void
pbc_merge_fixups(Interp *interpreter, struct pbc_merge_input **inputs,
@@ -446,15 +430,13 @@ pbc_merge_fixups(Interp *interpreter, st
/*
-=item C<static void
+static void
pbc_merge_debugs(Interp *interpreter, struct pbc_merge_input **inputs,
int num_inputs, struct PackFile *pf,
- struct PackFile_ByteCode *bc)>
+ struct PackFile_ByteCode *bc)
This function merges the debug segments from the input PBC files.
-=cut
-
*/
static void
pbc_merge_debugs(Interp *interpreter, struct pbc_merge_input **inputs,
@@ -523,17 +505,15 @@ pbc_merge_debugs(Interp *interpreter, st
/*
-=item C<static void
+static void
pbc_merge_ctpointers(Interp *interpreter, struct pbc_merge_input **inputs,
int num_inputs, struct PackFile *pf,
struct PackFile_ByteCode *bc,
- struct PackFile_ConstTable *ct)>
+ struct PackFile_ConstTable *ct)
This function corrects the pointers into the constants table found in the
bytecode.
-=cut
-
*/
static void
pbc_merge_ctpointers(Interp *interpreter, struct pbc_merge_input **inputs,
@@ -589,14 +569,12 @@ pbc_merge_ctpointers(Interp *interpreter
/*
-=item C<static struct PackFile*
+static struct PackFile*
pbc_merge_begin(Interp *interpreter, struct pbc_merge_input **inputs,
- int num_inputs)>
+ int num_inputs)
This is the function that drives PBC merging process.
-=cut
-
*/
static struct PackFile*
pbc_merge_begin(Interp *interpreter, struct pbc_merge_input **inputs,
@@ -630,13 +608,11 @@ pbc_merge_begin(Interp *interpreter, str
/*
-=item C<static void
-pbc_merge_write(Interp *interpreter, struct PackFile *pf, char *filename)>
+static void
+pbc_merge_write(Interp *interpreter, struct PackFile *pf, char *filename)
This functions writes out the merged packfile.
-=cut
-
*/
static void
pbc_merge_write(Interp *interpreter, struct PackFile *pf, char *filename)
@@ -672,15 +648,13 @@ pbc_merge_write(Interp *interpreter, str
/*
-=item C<int
-main(int argc, char **argv)>
+int
+main(int argc, char **argv)
The main function that grabs console input, reads in the packfiles
provided they exist, hands them to another function that runs the
merge process and finally writes out the produce packfile.
-=cut
-
*/
static struct longopt_opt_decl options[] = {
@@ -775,11 +749,3 @@ main(int argc, char **argv)
return 0;
}
-/*
-
-=back
-
-=cut
-
-*/
-
Modified: trunk/src/pdb.c
==============================================================================
--- trunk/src/pdb.c (original)
+++ trunk/src/pdb.c Wed Nov 16 13:13:33 2005
@@ -4,12 +4,11 @@ $Id$
=head1 NAME
-src/pdb.c - The Parrot debugger
+pdb - The Parrot debugger
=head1 SYNOPSIS
- % make pdb
- % ./pdb programfile
+ pdb programfile
=head1 DESCRIPTION
@@ -98,10 +97,6 @@ Print the help.
You can also debug Parrot code by using the C<debug_init>, C<debug_load>
and C<debug_break> ops in F<ops/debug.ops>.
-=head2 Functions
-
-=over 4
-
=cut
*/
@@ -115,13 +110,11 @@ void PDB_printwelcome(void);
/*
-=item C<int
-main(int argc, char *argv[])>
-
-Reads the PASM or PBC file from C<argv[1]>, loads it, and then calls
-C<Parrot_debug()>.
+int
+main(int argc, char *argv[])
-=cut
+Reads the PASM or PBC file from argv[1], loads it, and then calls
+Parrot_debug().
*/
@@ -163,13 +156,11 @@ main(int argc, char *argv[])
/*
-=item C<void
-PDB_printwelcome()>
+void
+PDB_printwelcome()
Prints out the welcome string.
-=cut
-
*/
void
Modified: trunk/src/pdump.c
==============================================================================
--- trunk/src/pdump.c (original)
+++ trunk/src/pdump.c Wed Nov 16 13:13:33 2005
@@ -4,15 +4,13 @@ $Id$
=head1 NAME
-src/pdump.c - Dump or convert Parrot bytecode (PBC) files
+pdump - Dump or convert Parrot bytecode (PBC) files
=head1 SYNOPSIS
- % make pdump
+ pdump [-tdh] [--terse|--disassemble|--header-only] file.pbc
- % ./pdump [-tdh] [--terse|--disassemble|--header-only] file.pbc
-
- % ./pdump -o converted.pbc file.pbc
+ pdump -o converted.pbc file.pbc
=head1 DESCRIPTION
@@ -41,9 +39,9 @@ efficiency on reading non native PBCs.
=back
-=head2 Functions
+=head1 SEE ALSO
-=over 4
+F<src/packdump.c>.
=cut
@@ -54,13 +52,11 @@ efficiency on reading non native PBCs.
/*
-=item C<static void
-const_dump(Interp *interpreter, struct PackFile_Segment *segp)>
+static void
+const_dump(Interp *interpreter, struct PackFile_Segment *segp)
Dump the constant table.
-=cut
-
*/
static void
@@ -74,13 +70,11 @@ const_dump (Interp *interpreter, struct
/*
-=item C<static void
-fixup_dump(Interp *interpreter, struct PackFile_Segment *segp)>
+static void
+fixup_dump(Interp *interpreter, struct PackFile_Segment *segp)
Dump the fix-up table.
-=cut
-
*/
static void
@@ -94,13 +88,11 @@ fixup_dump (Interp *interpreter, struct
/*
-=item C<static void
-disas_dump(Interp *interpreter, struct PackFile_Segment *self)>
+static void
+disas_dump(Interp *interpreter, struct PackFile_Segment *self)
Disassemble and dump.
-=cut
-
*/
static void
@@ -128,13 +120,11 @@ disas_dump (Interp *interpreter, struct
/*
-=item C<static void
-PackFile_header_dump(Interp *interpreter, struct PackFile *pf)>
+static void
+PackFile_header_dump(Interp *interpreter, struct PackFile *pf)
Dump the header.
-=cut
-
*/
static void
@@ -162,12 +152,10 @@ PackFile_header_dump(Interp *interpreter
/*
-=item C<static void help(void)>
+static void help(void)
Print out the user help info.
-=cut
-
*/
static void help(void)
@@ -195,13 +183,11 @@ static struct longopt_opt_decl options[]
/*
-=item C<int
-main(int argc, char **argv)>
+int
+main(int argc, char **argv)
The run loop. Process the command-line arguments and dumps accordingly.
-=cut
-
*/
int
@@ -305,18 +291,6 @@ main(int argc, char **argv)
}
/*
-
-=back
-
-=head1 SEE ALSO
-
-F<src/packdump.c>.
-
-=cut
-
-*/
-
-/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4