develooper Front page | perl.perl6.internals | Postings from September 2001

Re: Name lengths in C code

Thread Previous | Thread Next
From:
Gregor N. Purdy
Date:
September 21, 2001 06:37
Subject:
Re: Name lengths in C code
Message ID:
1001079431.21966.93.camel@sarek.oh.focusresearch.com
Dan --

> Just a reminder--function names shouldn't exceed 31 characters. The C 
> standard doesn't guarantee anything past that...

Using this simplistic program I found two names greater than 31 chars.
I don't know if there are names not fitting the little regexp used here,
but of those that do, these:

    $ perl namecheck.pl *.c
    [35] PackFile_ConstTable_get_const_count
    [33] PackFile_ConstTable_push_constant

are too long.


So, who's the windbag that wrote such long names? Hey, waitaminute,
I wrote those!

The names are unique in the first 31 chars. Are we OK, or do I need
to mangle the names? I could mangle them by doing one of the following:

  * PackFile_{SomeWords}_*   ----> PackFile_SW_*

  * PackFile_{SomeWords}_*   ----> PF_SW_*

I'd rather mangle all the names in the library a standard way than have
all but two written out fully and two not.

Your thoughts?


Regards,

-- Gregor
 _____________________________________________________________________ 
/     perl -e 'srand(-2091643526); print chr rand 90 for (0..4)'      \

   Gregor N. Purdy                          gregor@focusresearch.com
   Focus Research, Inc.                http://www.focusresearch.com/
   8080 Beckett Center Drive #203                   513-860-3570 vox
   West Chester, OH 45069                           513-860-3579 fax
\_____________________________________________________________________/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About