This makes it pass podchecker and look more aesthetically pleasing.
Index: core.ops =================================================================== RCS file: /home/perlcvs/parrot/core.ops,v retrieving revision 1.53 diff -u -r1.53 core.ops --- core.ops 20 Dec 2001 01:53:14 -0000 1.53 +++ core.ops 20 Dec 2001 06:16:40 -0000 @@ -70,7 +70,7 @@ ######################################## -=item close(i|ic) +=item B<close>(i|ic) Close file opened on file descriptor $1. @@ -83,11 +83,11 @@ ######################################## -=item err(i) +=item B<err>(i) Store the system error code in $1. -=item err(s) +=item B<err>(s) Store the system error message in $1. @@ -209,15 +209,15 @@ ######################################## -=item read(i, i|ic) +=item B<read>(i, i|ic) Read an INTVAL from file descriptor $2 into $1. -=item read(n, i|ic) +=item B<read>(n, i|ic) Read a FLOATVAL from file descriptor $2 into $1. -=item read(s, i|ic, i|ic) +=item B<read>(s, i|ic, i|ic) Read $3 bytes from file descriptor $2 into string $1. @@ -275,11 +275,11 @@ ######################################## -=item write(i|ic, i|ic) +=item B<write>(i|ic, i|ic) -=item write(i|ic, n|nc) +=item B<write>(i|ic, n|nc) -=item write(i|ic, s|sc) +=item B<write>(i|ic, s|sc) Write $2 to file descriptor $1. @@ -932,6 +932,7 @@ =over 4 =cut + ######################################## =item B<abs>(i|n, i|ic|n|nc) @@ -993,22 +994,23 @@ NOTE: This "uncorrected mod" algorithm uses the C language's built-in mod operator (x % y), which is - ... the remainder when x is divided by y, and thus is zero when y - divides x exactly. + ... the remainder when x is divided by y, and thus is zero + when y divides x exactly. ... - The direction of truncation for / and the sign of the result for % - are machine-dependent for negative operands, as is the action taken - on overflow or underflow. - -- [1], page 41 + The direction of truncation for / and the sign of the result + for % are machine-dependent for negative operands, as is the + action taken on overflow or underflow. + -- [1], page 41 Also: - ... if the second operand is 0, the result is undefined. Otherwise, it - is always true that (a/b)*b + a%b is equal to z. If both operands are - non-negative, then the remainder is non-negative and smaller than the - divisor; if not, it is guaranteed only that the absolute value of the - remainder is smaller than the absolute value of the divisor. - -- [1], page 205 + ... if the second operand is 0, the result is undefined. + Otherwise, it is always true that (a/b)*b + a%b is equal to z. If + both operands are non-negative, then the remainder is non- + negative and smaller than the divisor; if not, it is guaranteed + only that the absolute value of the remainder is smaller than + the absolute value of the divisor. + -- [1], page 205 This op is provided for those who need it (such as speed-sensitive applications with heavy use of mod, but using it only with positive @@ -1038,15 +1040,15 @@ NOTE: This "uncorrected mod" algorithm uses the built-in C math library's fmod() function, which computes - ... the remainder of dividing x by y. The return value is x - n * y, - where n is the quotient of x / y, rounded towards zero to an - integer. - -- fmod() manpage on RedHat Linux 7.0 + ... the remainder of dividing x by y. The return value is + x - n * y, where n is the quotient of x / y, rounded towards + zero to an integer. + -- fmod() manpage on RedHat Linux 7.0 In addition, fmod() returns - the remainder, unless y is zero, when the function fails and errno - is set. + the remainder, unless y is zero, when the function fails and + errno is set. According to page 251 of [1], the result when y is zero is implementation- defined. @@ -1343,6 +1345,8 @@ These operations operate on STRINGs. +=over 4 + =cut @@ -2134,6 +2138,21 @@ pop_generic_entry(interpreter, &interpreter->user_stack_top, &($1), STACK_ENTRY_STRING); } +######################################## + +=item B<rotate_up>(i) + +=item B<rotate_up>(ic) + +Rotate the top $1 entries in the user stack so that the top entry +becomes the bottom entry in that range. + +=cut + +AUTO_OP rotate_up(i|ic) { + rotate_entries(interpreter, interpreter->user_stack_base, +interpreter->user_stack_top, $1); +} + =back @@ -2148,6 +2167,7 @@ =over 4 +=cut ######################################## @@ -2203,6 +2223,20 @@ RETREL($1); } +=back + +=cut + +############################################################################### + +=head2 Miscellaneous + +Opcodes which need to be sorted into better categories. + +=over 4 + +=cut + ######################################## =item B<newinterp>(p, i|ic) @@ -2272,26 +2306,6 @@ ######################################## -=item B<rotate_up>(i) - -=item B<rotate_up>(ic) - -Rotate the top $1 entries in the user stack so that the top entry -becomes the bottom entry in that range. - -=cut - -AUTO_OP rotate_up(i|ic) { - rotate_entries(interpreter, interpreter->user_stack_base, interpreter->user_stack_top, $1); -} - - -=back - -=cut - -######################################## - =item B<sleep>(i) =item B<sleep>(ic) @@ -2368,6 +2382,10 @@ AUTO_OP getpackage(s) { $1 = interpreter->current_package; } + +=back + +=cut ###############################################################################