Ticket #324: revised.c_function_docs.47551.diff

File revised.c_function_docs.47551.diff, 29.2 KB (added by jkeenan, 4 years ago)

diff between cfunctionsdocs branch and trunk, with revisions suggested by Util++

  • src/string/charset/iso-8859-1.c

     
    541541=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src, 
    542542UINTVAL offset)> 
    543543 
     544Returns Boolean. 
     545 
    544546=cut 
    545547 
    546548*/ 
     
    591593=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING 
    592594*src, UINTVAL offset, UINTVAL count)> 
    593595 
     596Returns C<INTVAL>. 
     597 
    594598=cut 
    595599 
    596600*/ 
  • src/string/charset/binary.c

     
    407407=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src, 
    408408UINTVAL offset)> 
    409409 
     410Returns Boolean. 
     411 
    410412=cut 
    411413 
    412414*/ 
     
    423425=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, const STRING 
    424426*src, UINTVAL offset, UINTVAL count)> 
    425427 
     428Find a character in the given character class. 
     429 
    426430=cut 
    427431 
    428432*/ 
     
    440444=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING 
    441445*src, UINTVAL offset, UINTVAL count)> 
    442446 
     447Returns C<INTVAL>. 
     448 
    443449=cut 
    444450 
    445451*/ 
     
    456462 
    457463=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)> 
    458464 
     465Creates a new STRING object from a single codepoint C<codepoint>. Returns 
     466the new STRING. 
     467 
    459468=cut 
    460469 
    461470*/ 
  • src/string/charset/unicode.c

     
    738738 
    739739=item C<static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)> 
    740740 
     741Returns Boolean. 
     742 
    741743=cut 
    742744 
    743745*/ 
     
    834836=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src, 
    835837UINTVAL offset)> 
    836838 
     839Returns Boolean. 
     840 
    837841=cut 
    838842 
    839843*/ 
     
    861865=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, const STRING 
    862866*src, UINTVAL offset, UINTVAL count)> 
    863867 
     868Find a character in the given character class. 
     869 
    864870=cut 
    865871 
    866872*/ 
     
    901907=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING 
    902908*src, UINTVAL offset, UINTVAL count)> 
    903909 
     910Returns C<INTVAL>. 
     911 
    904912=cut 
    905913 
    906914*/ 
  • src/string/charset/ascii.c

     
    678678=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src, 
    679679UINTVAL offset)> 
    680680 
     681Returns Boolean. 
     682 
    681683=cut 
    682684 
    683685*/ 
     
    729731=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING 
    730732*src, UINTVAL offset, UINTVAL count)> 
    731733 
     734Returns C<INTVAL>. 
     735 
    732736=cut 
    733737 
    734738*/ 
     
    883887} 
    884888 
    885889/* 
     890 
     891=back 
     892 
     893=cut 
     894 
     895*/ 
     896 
     897/* 
    886898 * Local variables: 
    887899 *   c-file-style: "parrot" 
    888900 * End: 
  • src/io/api.c

     
    2020is used in Parrot ops. 
    2121 
    2222TODO: Where possible, extract some of the filehandle-related details into 
    23 src/io/filehandle.c, and extract the stringhandle details into 
    24 src/io/io_string.c. 
     23F<src/io/filehandle.c>, and extract the stringhandle details into 
     24a new F<src/io/io_string.c>. 
    2525 
    2626=cut 
    2727 
  • MANIFEST

     
    11# ex: set ro: 
    22# $Id$ 
    33# 
    4 # generated by tools/dev/mk_manifest_and_skip.pl Wed Jun  9 14:23:50 2010 UT 
     4# generated by tools/dev/mk_manifest_and_skip.pl Sat Jun 26 13:30:18 2010 UT 
    55# 
    66# See below for documentation on the format of this file. 
    77# 
     
    278278config/gen/platform/cygwin/math.c                           [] 
    279279config/gen/platform/darwin/begin.c                          [] 
    280280config/gen/platform/darwin/hires_timer.c                    [] 
    281 config/gen/platform/darwin/memalign.c                       [] 
    282281config/gen/platform/generic/dl.c                            [] 
    283282config/gen/platform/generic/dl.h                            [] 
    284283config/gen/platform/generic/env.c                           [] 
     
    288287config/gen/platform/generic/itimer.c                        [] 
    289288config/gen/platform/generic/math.c                          [] 
    290289config/gen/platform/generic/math.h                          [] 
    291 config/gen/platform/generic/memalign.c                      [] 
    292290config/gen/platform/generic/memexec.c                       [] 
    293291config/gen/platform/generic/platform_limits.h               [] 
    294292config/gen/platform/generic/signal.c                        [] 
  • compilers/pirc/src/pircapi.c

     
    1717/* HEADERIZER BEGIN: static */ 
    1818/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */ 
    1919 
     20/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */ 
     21/* HEADERIZER END: static */ 
    2022 
     23 
    2124/* 
    2225 
    2326=head1 DESCRIPTION 
     
    7275=item C<void parse_file(PARROT_INTERP, int flexdebug, FILE *infile, char * const 
    7376filename, int flags, int thr_id, unsigned macro_size, char * const outputfile)> 
    7477 
    75 =cut 
    76  
    7778This will be the proper declaration after testing for thread-safety: 
    7879 
    7980void parse_file(int flexdebug, FILE *infile, char * const filename, int flags, 
    8081                char * const outputfile) 
    8182 
     83=cut 
     84 
    8285*/ 
    8386 
    84  
    85  
    8687void 
    8788parse_file(PARROT_INTERP, int flexdebug, ARGIN(FILE *infile), 
    8889           ARGIN(char * const filename), int flags, 
     
    260261=item C<PackFile_ByteCode * pirc_compile_file(PARROT_INTERP, const char 
    261262*filename, STRING **error_message)> 
    262263 
     264Returns NULL. 
     265 
    263266=cut 
    264267 
    265268*/ 
     
    274277} 
    275278 
    276279 
    277 /* HEADERIZER END: static */ 
    278280 
    279  
    280281/* 
    281282 
    282283=back 
  • t/codingstd/c_function_docs.t

     
    9191} 
    9292 
    9393__DATA__ 
    94 compilers/pirc/src/pircapi.c 
    95 config/gen/platform/ansi/dl.c 
    96 config/gen/platform/ansi/exec.c 
    97 config/gen/platform/ansi/time.c 
    98 config/gen/platform/darwin/memalign.c 
    99 config/gen/platform/generic/dl.c 
    100 config/gen/platform/generic/exec.c 
    101 config/gen/platform/generic/math.c 
    102 config/gen/platform/generic/memalign.c 
    103 config/gen/platform/generic/stat.c 
    104 config/gen/platform/generic/time.c 
    105 config/gen/platform/netbsd/math.c 
    106 config/gen/platform/openbsd/math.c 
    107 config/gen/platform/solaris/math.c 
    108 config/gen/platform/solaris/time.c 
    109 examples/compilers/japhc.c 
    110 src/gc/generational_ms.c 
    111 src/io/io_string.c 
    112 src/string/charset/ascii.c 
    113 src/string/charset/binary.c 
    114 src/string/charset/iso-8859-1.c 
    115 src/string/charset/unicode.c 
    11694 
    11795# Local Variables: 
    11896#   mode: cperl 
  • config/gen/platform.pm

     
    191191        dl.c 
    192192        stat.c 
    193193        math.c 
    194         memalign.c 
    195194        signal.c 
    196195        itimer.c 
    197196        memexec.c 
  • config/gen/makefiles/root.in

     
    17981798manifest_tests : 
    17991799        $(PERL) t/harness $(MANIFEST_TEST_FILES) 
    18001800 
    1801 examples_tests : 
     1801examples_tests : test_prep 
    18021802        $(PERL) t/harness $(EXAMPLES_TEST_FILES) 
    18031803 
    18041804# benchmark tests 
  • config/gen/platform/netbsd/math.c

     
    11/* $Id$ */ 
    22 
    33/* 
    4  * Copyright (C) 2006-2007, Parrot Foundation. 
     4 * Copyright (C) 2006-2010, Parrot Foundation. 
    55 */ 
    66 
    77/* 
     
    1212 
    1313=head1 DESCRIPTION 
    1414 
    15 math stuff 
     15Mathematical functions. 
    1616 
    1717=head2 Functions 
    1818 
     
    2929 
    3030=item C<extern int Parrot_signbit(double x)> 
    3131 
    32 return true if the Numval has a negative sign. 
     32Return true if the Numval has a negative sign. 
    3333This is mostly for handling the -0.0 case. 
    3434 
    3535=cut 
     
    5757 
    5858=item C<int Parrot_signbit_l(long double x)> 
    5959 
     60Like C<Parrot_signbit()>, only taking long double instead of double. 
     61 
    6062=cut 
    6163 
    6264*/ 
  • config/gen/platform/darwin/memalign.c

     
    1 /* 
    2  * $Id$ 
    3  * Copyright (C) 2007-2008, Parrot Foundation. 
    4  */ 
    5  
    6 /* 
    7  
    8 =head1 NAME 
    9  
    10 memalign.c 
    11  
    12 =head1 DESCRIPTION 
    13  
    14 memalign related stuff 
    15  
    16 =head2 Functions 
    17  
    18 =over 4 
    19  
    20 =cut 
    21  
    22 */ 
    23  
    24 #include <mach/vm_map.h> 
    25 #include <mach/mach_init.h> 
    26  
    27 /* 
    28  
    29 =item C<static unsigned long log2int(unsigned long x)> 
    30  
    31 =cut 
    32  
    33 */ 
    34  
    35 static unsigned long log2int(unsigned long x) { 
    36     return (x < 2) ? 0 : log2int(x >> 1) + 1; 
    37 } 
    38  
    39 /* 
    40  
    41 =item C<static unsigned long roundDownPowerOf2(unsigned long x)> 
    42  
    43 =cut 
    44  
    45 */ 
    46  
    47 static unsigned long roundDownPowerOf2(unsigned long x) { 
    48     return (1 << log2int(x)); 
    49 } 
    50  
    51 /* 
    52  
    53 =item C<static unsigned long roundUpPowerOf2(unsigned long x)> 
    54  
    55 =cut 
    56  
    57 */ 
    58  
    59 static unsigned long roundUpPowerOf2(unsigned long x) 
    60 { 
    61     static unsigned long one     = 1; 
    62     unsigned long        log2Int = log2int(x); 
    63  
    64     return ((one << log2Int) == x) ? x : (one << (log2Int + 1)); 
    65 } 
    66  
    67 /* 
    68  
    69 =item C<static unsigned long roundUpToPageBoundary(unsigned long x)> 
    70  
    71 =cut 
    72  
    73 */ 
    74  
    75 static unsigned long roundUpToPageBoundary(unsigned long x) 
    76 { 
    77     unsigned long roundedDown = trunc_page(x); 
    78  
    79     return (roundedDown == x) ? x : (roundedDown + vm_page_size); 
    80 } 
    81  
    82 typedef struct _memalign_marker_t { 
    83     vm_address_t start; 
    84     vm_size_t size; 
    85 } memalign_marker_t; 
    86  
    87 /* 
    88  
    89 =item C<void * Parrot_memalign(size_t align, size_t size)> 
    90  
    91 =cut 
    92  
    93 */ 
    94  
    95 void * 
    96 Parrot_memalign(size_t align, size_t size) 
    97 { 
    98     size_t effectiveAlign   = align; 
    99     size_t padding          = 0; 
    100     size_t amountToAllocate = 0; 
    101  
    102     if (effectiveAlign < sizeof (void *)) 
    103         effectiveAlign = roundUpPowerOf2(sizeof (void *)); 
    104     else 
    105         effectiveAlign = roundUpPowerOf2(effectiveAlign); 
    106  
    107     if (effectiveAlign < sizeof (memalign_marker_t)) 
    108         padding = sizeof (memalign_marker_t); 
    109     else 
    110         padding = effectiveAlign; 
    111  
    112     amountToAllocate = roundUpToPageBoundary(size + padding); 
    113  
    114     { 
    115         vm_address_t  p      = (vm_address_t)NULL; 
    116         kern_return_t status = vm_allocate(mach_task_self(), &p, 
    117                                                 amountToAllocate, 1); 
    118  
    119         if (status != KERN_SUCCESS) 
    120             return NULL; 
    121         else { 
    122             vm_size_t    logEffectiveAlign      = log2int(effectiveAlign); 
    123             vm_address_t lowestAvaliableAddress = 
    124                                 p + sizeof (memalign_marker_t); 
    125             vm_address_t roundedDownAddress     = 
    126                             ((lowestAvaliableAddress >> logEffectiveAlign) 
    127                                                      << logEffectiveAlign); 
    128             vm_address_t returnAddress          = 
    129                             (roundedDownAddress == lowestAvaliableAddress) 
    130                             ?  lowestAvaliableAddress 
    131                             : (roundedDownAddress + effectiveAlign); 
    132             vm_address_t firstUnneededPage = 0; 
    133  
    134             memalign_marker_t *marker = 
    135                                 (memalign_marker_t *)returnAddress - 1; 
    136  
    137             /* lowest address used, then round down to vm_page boundary */ 
    138             vm_address_t usedPageBase = trunc_page((vm_address_t)marker); 
    139             marker->start             = usedPageBase; 
    140             marker->size              = returnAddress + size - usedPageBase; 
    141  
    142             if (usedPageBase > p) { 
    143                 status = vm_deallocate(mach_task_self(), p, usedPageBase - p); 
    144  
    145                 if (status != KERN_SUCCESS) 
    146                     fprintf(stderr, "Parrot_memalign(%zx, %zx) failed " 
    147                                     "to deallocate extra header space.\n", 
    148                                     align, size); 
    149             } 
    150  
    151             firstUnneededPage = roundUpToPageBoundary(returnAddress + size); 
    152  
    153             if (firstUnneededPage < p + amountToAllocate) { 
    154                 status = vm_deallocate(mach_task_self(), firstUnneededPage, 
    155                                     p + amountToAllocate - firstUnneededPage); 
    156  
    157                 if (status != KERN_SUCCESS) { 
    158                     fprintf(stderr, "Parrot_memalign(%zx, %zx) failed " 
    159                                     "to deallocate extra footer space.\n", 
    160                                     align, size); 
    161                 } 
    162             } 
    163  
    164             return (void *)returnAddress; 
    165         } 
    166     } 
    167 } 
    168  
    169 /* 
    170  
    171 =item C<void Parrot_free_memalign(void *p)> 
    172  
    173 =cut 
    174  
    175 */ 
    176  
    177 void 
    178 Parrot_free_memalign(void *p) 
    179 { 
    180     memalign_marker_t *marker = (memalign_marker_t *)p - 1; 
    181     kern_return_t      status = vm_deallocate(mach_task_self(), 
    182                                             marker->start, marker->size); 
    183  
    184     if (status != KERN_SUCCESS) 
    185         fprintf(stderr, "Parrot_free_memalign(%p) failed!\n", p); 
    186 } 
    187  
    188 /* 
    189  
    190 =back 
    191  
    192 =cut 
    193  
    194 */ 
    195  
    196 /* 
    197  * Local variables: 
    198  *   c-file-style: "parrot" 
    199  * End: 
    200  * vim: expandtab shiftwidth=4: 
    201  */ 
  • config/gen/platform/ansi/time.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2007, Parrot Foundation. 
     3 * Copyright (C) 2007-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    2727 
    2828=item C<INTVAL Parrot_intval_time(void)> 
    2929 
     30Parrot wrapper around standard library C<time()> function, returning an INTVAL. 
     31 
    3032=cut 
    3133 
    3234*/ 
     
    4244 
    4345=item C<FLOATVAL Parrot_floatval_time(void)> 
    4446 
     47Note:  We are unable to provide this level of precision under ANSI-C, so we 
     48just fall back to intval time for this. 
     49 
    4550=cut 
    4651 
    4752*/ 
     
    4954FLOATVAL 
    5055Parrot_floatval_time(void) 
    5156{ 
    52     /* unable to provide this level of precision under ANSI-C, so just fall 
    53        back to intval time for this. */ 
    5457    Parrot_warn(NULL, PARROT_WARNINGS_PLATFORM_FLAG, "Parrot_floatval_time not accurate"); 
    5558    return (FLOATVAL)Parrot_intval_time(); 
    5659} 
  • config/gen/platform/ansi/dl.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2007, Parrot Foundation. 
     3 * Copyright (C) 2007-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    1111 
    1212=head1 DESCRIPTION 
    1313 
    14 Dynlib stuff.  (Currently, just placeholders.) 
     14Parrot functions -- B<none yet implemented> -- which wrap around standard 
     15library functions for handling dynamic libraries. 
    1516 
    1617=head2 Functions 
    1718 
    1819=over 4 
    1920 
    20 =cut 
     21=item C<void * Parrot_dlopen(const char *filename, Parrot_dlopen_flags flags)> 
    2122 
    22 */ 
     23Parrot wrapper around C<dlopen>.  B<Not yet implemented.> 
    2324 
    24 /* 
    25  
    26 =item C<void * Parrot_dlopen(const char *filename, SHIM(Parrot_dlopen_flags 
    27 flags)> 
    28  
    2925=cut 
    3026 
    3127*/ 
     
    4238 
    4339=item C<const char * Parrot_dlerror(void)> 
    4440 
     41Parrot wrapper around C<dlerror>.  B<Not yet implemented.> 
     42 
    4543=cut 
    4644 
    4745*/ 
     
    5755 
    5856=item C<void * Parrot_dlsym(void *handle, const char *symbol)> 
    5957 
     58Parrot wrapper around C<dlsym>.  B<Not yet implemented.> 
     59 
    6060=cut 
    6161 
    6262*/ 
     
    7373 
    7474=item C<int Parrot_dlclose(void *handle)> 
    7575 
     76Parrot wrapper around C<dlclose>.  B<Not yet implemented.> 
     77 
    7678=cut 
    7779 
    7880*/ 
  • config/gen/platform/ansi/exec.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2004-2008, Parrot Foundation. 
     3 * Copyright (C) 2004-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    2525 
    2626=item C<INTVAL Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)> 
    2727 
    28 Spawn a subprocess 
     28B<Not yet implemented on this platform.> Spawn a subprocess. 
    2929 
    3030=cut 
    3131 
     
    4343 
    4444=item C<INTVAL Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)> 
    4545 
     46B<Not yet implemented on this platform.> 
     47 
    4648=cut 
    4749 
    4850*/ 
  • config/gen/platform/openbsd/math.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2006-2007, Parrot Foundation. 
     3 * Copyright (C) 2006-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    1111 
    1212=head1 DESCRIPTION 
    1313 
    14 math stuff 
     14Mathematical functions. 
    1515 
    1616=head2 Functions 
    1717 
     
    3737 
    3838=item C<extern int Parrot_signbit(double x)> 
    3939 
    40 return true if the Numval has a negative sign. 
     40Return true if the Numval has a negative sign. 
    4141This is mostly for handling the -0.0 case. 
    4242 
    4343=cut 
     
    6565 
    6666=item C<int Parrot_signbit_l(long double x)> 
    6767 
     68Like C<Parrot_signbit()>, only taking long double instead of double. 
     69 
    6870=cut 
    6971 
    7072*/ 
  • config/gen/platform/generic/memalign.c

     
    1 /* 
    2  * $Id$ 
    3  * Copyright (C) 2004-2006, Parrot Foundation. 
    4  */ 
    5  
    6 /* 
    7  
    8 =head1 NAME 
    9  
    10 config/gen/platform/generic/memalign.c 
    11  
    12 =head1 DESCRIPTION 
    13  
    14 memalign related stuff 
    15  
    16 =head2 Functions 
    17  
    18 =over 4 
    19  
    20 =cut 
    21  
    22 */ 
    23  
    24 #if defined(PARROT_HAS_POSIX_MEMALIGN) 
    25 #  include <stdlib.h> 
    26  
    27 /* 
    28  
    29 =item C<void * Parrot_memalign(size_t align, size_t size)> 
    30  
    31 =cut 
    32  
    33 */ 
    34  
    35 void * 
    36 Parrot_memalign(size_t align, size_t size) 
    37 { 
    38     void *p; 
    39     int i = posix_memalign(&p, align, size); 
    40     return i == 0 ? p : NULL; 
    41 } 
    42  
    43 #elif defined(PARROT_HAS_MEMALIGN) 
    44  
    45 #  if defined(PARROT_HAS_HEADER_MALLOC) 
    46 #    include <malloc.h> 
    47 #  else 
    48 #    include <stdlib.h> 
    49 #  endif 
    50  
    51 /* 
    52  
    53 =item C<void * Parrot_memalign(size_t align, size_t size)> 
    54  
    55 =cut 
    56  
    57 */ 
    58  
    59 void * 
    60 Parrot_memalign(size_t align, size_t size) 
    61 { 
    62     return memalign(align, size); 
    63 } 
    64  
    65 #endif 
    66  
    67 /* 
    68  
    69 =item C<void Parrot_free_memalign(void *p)> 
    70  
    71 =cut 
    72  
    73 */ 
    74  
    75 void 
    76 Parrot_free_memalign(void *p) 
    77 { 
    78     free(p); 
    79 } 
    80  
    81 /* 
    82  
    83 =back 
    84  
    85 =cut 
    86  
    87 */ 
    88  
    89 /* 
    90  * Local variables: 
    91  *   c-file-style: "parrot" 
    92  * End: 
    93  * vim: expandtab shiftwidth=4: 
    94  */ 
  • config/gen/platform/generic/time.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2004-2006, Parrot Foundation. 
     3 * Copyright (C) 2004-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    1111 
    1212=head1 DESCRIPTION 
    1313 
    14 Time stuff 
     14Parrot time-related functions. 
    1515 
    1616=head2 Functions 
    1717 
     
    2828 
    2929=item C<INTVAL Parrot_intval_time(void)> 
    3030 
     31Parrot wrapper around standard library C<time()> function, returning an INTVAL. 
     32 
    3133=cut 
    3234 
    3335*/ 
     
    4345 
    4446=item C<FLOATVAL Parrot_floatval_time(void)> 
    4547 
     48Parrot wrapper around standard library C<time()> function, returning a FLOATVAL. 
     49 
    4650=cut 
    4751 
    4852*/ 
     
    5963 
    6064=item C<void Parrot_sleep(unsigned int seconds)> 
    6165 
     66Parrot wrapper around standard library C<sleep()> function. 
     67 
    6268=cut 
    6369 
    6470*/ 
     
    9096 
    9197=item C<struct tm * Parrot_gmtime_r(const time_t *t, struct tm *tm)> 
    9298 
     99Parrot wrapper around standard library C<gmtime_r()> function. 
     100 
    93101=cut 
    94102 
    95103*/ 
     
    105113 
    106114=item C<struct tm * Parrot_localtime_r(const time_t *t, struct tm *tm)> 
    107115 
     116Parrot wrapper around standard library C<localtime_r()> function. 
     117 
    108118=cut 
    109119 
    110120*/ 
     
    120130 
    121131=item C<char* Parrot_asctime_r(const struct tm *tm, char *buffer)> 
    122132 
     133Parrot wrapper around standard library C<asctime_r()> function. 
     134 
    123135=cut 
    124136 
    125137*/ 
  • config/gen/platform/generic/dl.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2004-2006, Parrot Foundation. 
     3 * Copyright (C) 2004-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    1111 
    1212=head1 DESCRIPTION 
    1313 
    14 Dynlib stuff 
     14Parrot functions which wrap around standard library functions for handling dynamic libraries. 
    1515 
    1616=head2 Functions 
    1717 
     
    3131 
    3232=item C<void * Parrot_dlopen(const char *filename, Parrot_dlopen_flags flags)> 
    3333 
     34Parrot wrapper around C<dlopen>.  Loads dynamic library file named by first 
     35argument and returns a handle to it. 
     36 
    3437=cut 
    3538 
    3639*/ 
     
    5053 
    5154=item C<const char * Parrot_dlerror(void)> 
    5255 
     56Wrapper around C<dlerror>.  System-dependent string that indicates most recent 
     57failure in use of C<Parrot_dlopen>, C<Parrot_dlclose> or C<Parrot_dlsym>. 
     58 
    5359=cut 
    5460 
    5561*/ 
     
    6874 
    6975=item C<void * Parrot_dlsym(void *handle, const char *symbol)> 
    7076 
     77Wrapper around C<dlysm>.  Takes a handle returned by C<Parrot_dlopen> and 
     78returns address where symbol is located. 
     79 
    7180=cut 
    7281 
    7382*/ 
     
    8695 
    8796=item C<int Parrot_dlclose(void *handle)> 
    8897 
     98Wrapper around C<dlclose>.  Releases reference to dynamic library specified 
     99by argument.  Returns C<0> on success and C<-1> on failure. 
     100 
    89101=cut 
    90102 
    91103*/ 
  • config/gen/platform/generic/stat.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2007-2008, Parrot Foundation. 
     3 * Copyright (C) 2007-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    2626 
    2727=item C<PMC * Parrot_stat_file(PARROT_INTERP, STRING *filename)> 
    2828 
     29B<Not implemented.>  Returns C<NULL>. 
     30 
    2931=cut 
    3032 
    3133*/ 
     
    4143=item C<PMC * Parrot_stat_info_pmc(PARROT_INTERP, STRING *filename, INTVAL 
    4244thing)> 
    4345 
     46B<Not implemented.>  Returns C<NULL>. 
     47 
    4448=cut 
    4549 
    4650*/ 
     
    5660=item C<static INTVAL stat_common(PARROT_INTERP, struct stat *statbuf, INTVAL 
    5761thing, int status)> 
    5862 
     63Stats the file, and returns the information specified by C<thing>. C<thing> can 
     64be one of: 
     65 
     66=over 4 
     67 
     68=item * C<STAT_EXISTS> 
     69 
     70=item * C<STAT_FILESIZE> 
     71 
     72=item * C<STAT_ISDIR> 
     73 
     74=item * C<STAT_ISREG> 
     75 
     76=item * C<STAT_ISDEV> 
     77 
     78=item * C<STAT_ACCESSTIME> 
     79 
     80=item * C<STAT_MODIFYTIME> 
     81 
     82=item * C<STAT_CHANGETIME> 
     83 
     84=item * C<STAT_UID> 
     85 
     86=item * C<STAT_GID> 
     87 
     88=item * C<STAT_PLATFORM_DEV> 
     89 
     90=item * C<STAT_PLATFORM_INODE> 
     91 
     92=item * C<STAT_PLATFORM_MODE> 
     93 
     94=item * C<STAT_PLATFORM_NLINKS> 
     95 
     96=item * C<STAT_PLATFORM_DEVTYPE> 
     97 
     98=item * C<STAT_PLATFORM_MODE> 
     99 
     100=item * C<STAT_PLATFORM_NLINKS> 
     101 
     102=item * C<STAT_PLATFORM_DEVTYPE> 
     103 
     104=item * C<STAT_PLATFORM_BLOCKSIZE> 
     105 
     106=item * C<STAT_PLATFORM_BLOCKS> 
     107 
     108=back 
     109 
     110C<STAT_CREATETIME> and C<STAT_BACKUPTIME> are not supported and will return C<-1>. 
     111 
    59112=cut 
    60113 
    61114*/ 
     
    141194=item C<INTVAL Parrot_stat_info_intval(PARROT_INTERP, STRING *file, INTVAL 
    142195thing)> 
    143196 
     197Returns the stat field given by C<thing> of file C<file>. 
     198 
    144199=cut 
    145200 
    146201*/ 
     
    164219=item C<INTVAL Parrot_fstat_info_intval(PARROT_INTERP, INTVAL file, INTVAL 
    165220thing)> 
    166221 
     222Returns the fstat field given by C<thing> from file identifier C<file>. 
     223 
    167224=cut 
    168225 
    169226*/ 
     
    184241=item C<FLOATVAL Parrot_stat_info_floatval(PARROT_INTERP, STRING *filename, 
    185242INTVAL thing)> 
    186243 
     244Currently returns C<-1.0> and has no side effects. 
     245 
    187246=cut 
    188247 
    189248*/ 
     
    199258=item C<STRING * Parrot_stat_info_string(PARROT_INTERP, STRING *filename, INTVAL 
    200259thing)> 
    201260 
     261B<Not implemented.> Returns C<NULL>. 
     262 
    202263=cut 
    203264 
    204265*/ 
  • config/gen/platform/generic/exec.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2004-2009, Parrot Foundation. 
     3 * Copyright (C) 2004-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    1111 
    1212=head1 DESCRIPTION 
    1313 
    14 system() stuff 
     14Parrot functions to run operating system commands. 
    1515 
    1616=head2 Functions 
    1717 
     
    2828 
    2929=item C<INTVAL Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)> 
    3030 
    31 Spawn off a subprocess and wait for the damn thing to complete, 
    32 returning the return value of the process 
     31Spawn off a subprocess provided in a string.  Wait for it to complete, 
     32returning the return value of the process. 
    3333 
    3434=cut 
    3535 
     
    7272 
    7373=item C<INTVAL Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)> 
    7474 
     75Spawn off a subprocess provided in command-line arguments.  Wait for it to 
     76complete, returning the return value of the process. 
     77 
    7578=cut 
    7679 
    7780*/ 
     
    125128} 
    126129 
    127130/* 
     131 
     132=back 
     133 
     134=cut 
     135 
     136*/ 
     137 
     138/* 
    128139 * Local variables: 
    129140 *   c-file-style: "parrot" 
    130141 * End: 
  • config/gen/platform/generic/math.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2004-2007, Parrot Foundation. 
     3 * Copyright (C) 2004-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    1111 
    1212=head1 DESCRIPTION 
    1313 
    14 math stuff 
     14Mathematical functions. 
    1515 
    1616=head2 Functions 
    1717 
    1818=over 4 
    1919 
    20 =cut 
    21  
    22 */ 
    23  
    24 /* 
    25  
    2620=item C<extern int Parrot_signbit(double x)> 
    2721 
    28 return true if the Numval has a negative sign. 
     22Return true if the Numval has a negative sign. 
    2923This is mostly for handling the -0.0 case. 
    3024 
    3125=cut 
    3226 
    3327*/ 
    3428 
    35 /* 
    36  */ 
    3729#if DOUBLE_SIZE == 2 * INT_SIZE 
    3830extern int 
    3931Parrot_signbit(double x) 
     
    5547 
    5648=item C<int Parrot_signbit_l(long double x)> 
    5749 
     50Like C<Parrot_signbit()>, only taking long double instead of double. 
     51 
    5852=cut 
    5953 
    6054*/ 
  • config/gen/platform/solaris/time.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2004-2006, Parrot Foundation. 
     3 * Copyright (C) 2004-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    1111 
    1212=head1 DESCRIPTION 
    1313 
    14 Time stuff 
     14Parrot time-related functions. 
    1515 
    1616=head2 Functions 
    1717 
     
    2828 
    2929=item C<INTVAL Parrot_intval_time(void)> 
    3030 
     31Parrot wrapper around standard library C<time()> function, returning an INTVAL. 
     32 
    3133=cut 
    3234 
    3335*/ 
     
    4345 
    4446=item C<FLOATVAL Parrot_floatval_time(void)> 
    4547 
     48Parrot wrapper around standard library C<time()> function, returning a FLOATVAL. 
     49 
    4650=cut 
    4751 
    4852*/ 
     
    5963 
    6064=item C<void Parrot_sleep(unsigned int seconds)> 
    6165 
     66Parrot wrapper around standard library C<sleep()> function. 
     67 
    6268=cut 
    6369 
    6470*/ 
     
    9096 
    9197=item C<struct tm * Parrot_gmtime_r(const time_t *t, struct tm *tm)> 
    9298 
     99Parrot wrapper around standard library C<gmtime_r()> function. 
     100 
    93101=cut 
    94102 
    95103*/ 
     
    105113 
    106114=item C<struct tm * Parrot_localtime_r(const time_t *t, struct tm *tm)> 
    107115 
     116Parrot wrapper around standard library C<localtime_r()> function. 
     117 
    108118=cut 
    109119 
    110120*/ 
     
    120130 
    121131=item C<char* Parrot_asctime_r(const struct tm *tm, char *buffer)> 
    122132 
     133Parrot wrapper around standard library C<asctime_r()> function. 
     134 
    123135=cut 
    124136 
    125137*/ 
  • config/gen/platform/solaris/math.c

     
    11/* 
    22 * $Id$ 
    3  * Copyright (C) 2006-2007, Parrot Foundation. 
     3 * Copyright (C) 2006-2010, Parrot Foundation. 
    44 */ 
    55 
    66/* 
     
    1111 
    1212=head1 DESCRIPTION 
    1313 
    14 math stuff 
     14Mathematical functions. 
    1515 
    1616=head2 Functions 
    1717 
     
    3535 
    3636=item C<extern int Parrot_signbit(double x)> 
    3737 
    38 return true if the Numval has a negative sign. 
     38Return true if the Numval has a negative sign. 
    3939This is mostly for handling the -0.0 case. 
    4040 
    4141=cut 
     
    6363 
    6464=item C<int Parrot_signbit_l(long double x)> 
    6565 
     66Like C<Parrot_signbit()>, only taking long double instead of double. 
     67 
    6668=cut 
    6769 
    6870*/ 
  • examples/compilers/japhc.c

     
    6969 
    7070=item C<static int unescape(char *string)> 
    7171 
     72Unescape a string. 
     73 
    7274=cut 
    7375 
    7476*/