[svn:parrot] r47555 - in branches/cfunctionsdocs: config/gen/platform/ansi config/gen/platform/generic config/gen/platform/netbsd config/gen/platform/openbsd config/gen/platform/solaris t/codingstd

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Fri Jun 11 02:20:29 UTC 2010


Author: jkeenan
Date: Fri Jun 11 02:20:29 2010
New Revision: 47555
URL: https://trac.parrot.org/parrot/changeset/47555

Log:
[codingstd] Provide documentation for C functions.

Modified:
   branches/cfunctionsdocs/config/gen/platform/ansi/dl.c
   branches/cfunctionsdocs/config/gen/platform/generic/dl.c
   branches/cfunctionsdocs/config/gen/platform/generic/exec.c
   branches/cfunctionsdocs/config/gen/platform/generic/math.c
   branches/cfunctionsdocs/config/gen/platform/generic/time.c
   branches/cfunctionsdocs/config/gen/platform/netbsd/math.c
   branches/cfunctionsdocs/config/gen/platform/openbsd/math.c
   branches/cfunctionsdocs/config/gen/platform/solaris/math.c
   branches/cfunctionsdocs/config/gen/platform/solaris/time.c
   branches/cfunctionsdocs/t/codingstd/c_function_docs.t

Modified: branches/cfunctionsdocs/config/gen/platform/ansi/dl.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/ansi/dl.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/ansi/dl.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2007, Parrot Foundation.
+ * Copyright (C) 2007-2010, Parrot Foundation.
  */
 
 /*

Modified: branches/cfunctionsdocs/config/gen/platform/generic/dl.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/generic/dl.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/generic/dl.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
  */
 
 /*

Modified: branches/cfunctionsdocs/config/gen/platform/generic/exec.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/generic/exec.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/generic/exec.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2004-2009, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
  */
 
 /*
@@ -11,7 +11,7 @@
 
 =head1 DESCRIPTION
 
-system() stuff
+Parrot functions to run operating system commands.
 
 =head2 Functions
 
@@ -28,8 +28,8 @@
 
 =item C<INTVAL Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)>
 
-Spawn off a subprocess and wait for the damn thing to complete,
-returning the return value of the process
+Spawn off a subprocess provided in a string.  Wait for it to complete,
+returning the return value of the process.
 
 =cut
 
@@ -72,6 +72,9 @@
 
 =item C<INTVAL Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)>
 
+Spawn off a subprocess provided in command-line arguments.  Wait for it to
+complete, returning the return value of the process.
+
 =cut
 
 */
@@ -125,6 +128,14 @@
 }
 
 /*
+
+=back
+
+=cut
+
+*/
+
+/*
  * Local variables:
  *   c-file-style: "parrot"
  * End:

Modified: branches/cfunctionsdocs/config/gen/platform/generic/math.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/generic/math.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/generic/math.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2004-2007, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
  */
 
 /*
@@ -11,29 +11,21 @@
 
 =head1 DESCRIPTION
 
-math stuff
+Mathematical functions.
 
 =head2 Functions
 
 =over 4
 
-=cut
-
-*/
-
-/*
-
 =item C<extern int Parrot_signbit(double x)>
 
-return true if the Numval has a negative sign.
+Return true if the Numval has a negative sign.
 This is mostly for handling the -0.0 case.
 
 =cut
 
 */
 
-/*
- */
 #if DOUBLE_SIZE == 2 * INT_SIZE
 extern int
 Parrot_signbit(double x)
@@ -55,6 +47,8 @@
 
 =item C<int Parrot_signbit_l(long double x)>
 
+Like C<Parrot_signbit()>, only taking long double instead of double.
+
 =cut
 
 */

Modified: branches/cfunctionsdocs/config/gen/platform/generic/time.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/generic/time.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/generic/time.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
  */
 
 /*
@@ -11,7 +11,7 @@
 
 =head1 DESCRIPTION
 
-Time stuff
+Parrot time-related functions.
 
 =head2 Functions
 
@@ -28,6 +28,8 @@
 
 =item C<INTVAL Parrot_intval_time(void)>
 
+Parrot wrapper around standard library C<time()> function, returning an INTVAL.
+
 =cut
 
 */
@@ -43,6 +45,8 @@
 
 =item C<FLOATVAL Parrot_floatval_time(void)>
 
+Parrot wrapper around standard library function, returning a FLOATVAL.
+
 =cut
 
 */
@@ -59,6 +63,8 @@
 
 =item C<void Parrot_sleep(unsigned int seconds)>
 
+Parrot wrapper around standard library C<sleep()> function.
+
 =cut
 
 */
@@ -90,6 +96,8 @@
 
 =item C<struct tm * Parrot_gmtime_r(const time_t *t, struct tm *tm)>
 
+Parrot wrapper around standard library C<gmtime_r()> function.
+
 =cut
 
 */
@@ -105,6 +113,8 @@
 
 =item C<struct tm * Parrot_localtime_r(const time_t *t, struct tm *tm)>
 
+Parrot wrapper around standard library C<localtime_r()> function.
+
 =cut
 
 */
@@ -120,6 +130,8 @@
 
 =item C<char* Parrot_asctime_r(const struct tm *tm, char *buffer)>
 
+Parrot wrapper around standard library C<asctime_r()> function.
+
 =cut
 
 */

Modified: branches/cfunctionsdocs/config/gen/platform/netbsd/math.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/netbsd/math.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/netbsd/math.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,7 +1,7 @@
 /* $Id$ */
 
 /*
- * Copyright (C) 2006-2007, Parrot Foundation.
+ * Copyright (C) 2006-2010, Parrot Foundation.
  */
 
 /*
@@ -12,7 +12,7 @@
 
 =head1 DESCRIPTION
 
-math stuff
+Mathematical functions.
 
 =head2 Functions
 
@@ -29,7 +29,7 @@
 
 =item C<extern int Parrot_signbit(double x)>
 
-return true if the Numval has a negative sign.
+Return true if the Numval has a negative sign.
 This is mostly for handling the -0.0 case.
 
 =cut
@@ -57,6 +57,8 @@
 
 =item C<int Parrot_signbit_l(long double x)>
 
+Like C<Parrot_signbit()>, only taking long double instead of double.
+
 =cut
 
 */

Modified: branches/cfunctionsdocs/config/gen/platform/openbsd/math.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/openbsd/math.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/openbsd/math.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2006-2007, Parrot Foundation.
+ * Copyright (C) 2006-2010, Parrot Foundation.
  */
 
 /*
@@ -11,7 +11,7 @@
 
 =head1 DESCRIPTION
 
-math stuff
+Mathematical functions.
 
 =head2 Functions
 
@@ -37,7 +37,7 @@
 
 =item C<extern int Parrot_signbit(double x)>
 
-return true if the Numval has a negative sign.
+Return true if the Numval has a negative sign.
 This is mostly for handling the -0.0 case.
 
 =cut
@@ -65,6 +65,8 @@
 
 =item C<int Parrot_signbit_l(long double x)>
 
+Like C<Parrot_signbit()>, only taking long double instead of double.
+
 =cut
 
 */

Modified: branches/cfunctionsdocs/config/gen/platform/solaris/math.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/solaris/math.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/solaris/math.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2006-2007, Parrot Foundation.
+ * Copyright (C) 2006-2010, Parrot Foundation.
  */
 
 /*
@@ -11,7 +11,7 @@
 
 =head1 DESCRIPTION
 
-math stuff
+Mathematical functions.
 
 =head2 Functions
 
@@ -35,7 +35,7 @@
 
 =item C<extern int Parrot_signbit(double x)>
 
-return true if the Numval has a negative sign.
+Return true if the Numval has a negative sign.
 This is mostly for handling the -0.0 case.
 
 =cut
@@ -63,6 +63,8 @@
 
 =item C<int Parrot_signbit_l(long double x)>
 
+Like C<Parrot_signbit()>, only taking long double instead of double.
+
 =cut
 
 */

Modified: branches/cfunctionsdocs/config/gen/platform/solaris/time.c
==============================================================================
--- branches/cfunctionsdocs/config/gen/platform/solaris/time.c	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/config/gen/platform/solaris/time.c	Fri Jun 11 02:20:29 2010	(r47555)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
  */
 
 /*
@@ -11,7 +11,7 @@
 
 =head1 DESCRIPTION
 
-Time stuff
+Parrot time-related functions.
 
 =head2 Functions
 
@@ -28,6 +28,8 @@
 
 =item C<INTVAL Parrot_intval_time(void)>
 
+Parrot wrapper around standard library C<time()> function, returning an INTVAL.
+
 =cut
 
 */
@@ -43,6 +45,8 @@
 
 =item C<FLOATVAL Parrot_floatval_time(void)>
 
+Parrot wrapper around standard library function, returning a FLOATVAL.
+
 =cut
 
 */
@@ -59,6 +63,8 @@
 
 =item C<void Parrot_sleep(unsigned int seconds)>
 
+Parrot wrapper around standard library C<sleep()> function.
+
 =cut
 
 */
@@ -90,6 +96,8 @@
 
 =item C<struct tm * Parrot_gmtime_r(const time_t *t, struct tm *tm)>
 
+Parrot wrapper around standard library C<gmtime_r()> function.
+
 =cut
 
 */
@@ -105,6 +113,8 @@
 
 =item C<struct tm * Parrot_localtime_r(const time_t *t, struct tm *tm)>
 
+Parrot wrapper around standard library C<localtime_r()> function.
+
 =cut
 
 */
@@ -120,6 +130,8 @@
 
 =item C<char* Parrot_asctime_r(const struct tm *tm, char *buffer)>
 
+Parrot wrapper around standard library C<asctime_r()> function.
+
 =cut
 
 */

Modified: branches/cfunctionsdocs/t/codingstd/c_function_docs.t
==============================================================================
--- branches/cfunctionsdocs/t/codingstd/c_function_docs.t	Fri Jun 11 01:48:45 2010	(r47554)
+++ branches/cfunctionsdocs/t/codingstd/c_function_docs.t	Fri Jun 11 02:20:29 2010	(r47555)
@@ -95,15 +95,8 @@
 config/gen/platform/ansi/exec.c
 config/gen/platform/ansi/time.c
 config/gen/platform/darwin/memalign.c
-config/gen/platform/generic/exec.c
-config/gen/platform/generic/math.c
 config/gen/platform/generic/memalign.c
 config/gen/platform/generic/stat.c
-config/gen/platform/generic/time.c
-config/gen/platform/netbsd/math.c
-config/gen/platform/openbsd/math.c
-config/gen/platform/solaris/math.c
-config/gen/platform/solaris/time.c
 examples/compilers/japhc.c
 src/gc/generational_ms.c
 src/io/io_string.c


More information about the parrot-commits mailing list