[comp.lang.c] 8char function names from hell

erict@flatline.UUCP (eric townsend) (02/07/88)

Just tried to compile some stuff I got from a friend.  Low and
behold, the unix-pc C compiler doesn't go past 8 characters in
either a function or a varible name!

What's da dang deal?  For some strange reason I thought that maybe,
just maybe, C compilers within USG and/or sysV would be a little
more compatible than this.

An 8 character limit?  What is this, a step back towards 2 character
varible names like in BASIC?

Ranting over.. Seriously, though.. Is there any way to get around this?
Any kludges, or preprocessors, or anything?
-- 
"Occult symbols include ... the 'peace' symbol and the Jewish 'Star of David'"
   -- From the Back In Control Handbook
Girls play with toys. Real women skate. -- Powell Peralta ad
J. Eric Townsend ->uunet!nuchat!flatline!erict smail:511Parker#2,Hstn,Tx,77007

-- 
"Occult symbols include ... the 'peace' symbol and the Jewish 'Star of David'"
   -- From the Back In Control Handbook
Girls play with toys. Real women skate. -- Powell Peralta ad
J. Eric Townsend ->uunet!nuchat!flatline!erict smail:511Parker#2,Hstn,Tx,77007

daveb@llama.rtech.UUCP (Dave Brower) (02/09/88)

In article <380@flatline.UUCP> erict@flatline.UUCP (eric townsend) writes:
>
>Just tried to compile some stuff I got from a friend.  Low and
>behold, the unix-pc C compiler doesn't go past 8 characters in
>either a function or a varible name!
>
>What's da dang deal?  For some strange reason I thought that maybe,
>just maybe, C compilers within USG and/or sysV would be a little
>more compatible than this.
>
>An 8 character limit?  What is this, a step back towards 2 character
>varible names like in BASIC?

You are running the 2.0 or 3.0 compiler.  It supports long names in 3.5
and 3.51.  Basically, you are SOL unless you want to go through
contortions redefining shorter names.

-dB
"People will do anything for a potato."
{amdahl, cpsc6a, mtxinu, ptsfa, sun, hoptoad}!rtech!daveb daveb@rtech.uucp

pjc@pcbox.UUCP (Paul J. Condie) (02/09/88)

In article <380@flatline.UUCP> erict@flatline.UUCP (eric townsend) writes:
>behold, the unix-pc C compiler doesn't go past 8 characters in
>either a function or a varible name!
>An 8 character limit?  What is this, a step back towards 2 character
>varible names like in BASIC?
>Ranting over.. Seriously, though.. Is there any way to get around this?
>Any kludges, or preprocessors, or anything?


The unix-pc compiler does by default support longer function/variable
names, unless you use the -T option to truncate.

crash@tsc3b21.UUCP (Frank (crash) Edwards) (02/09/88)

in article <380@flatline.UUCP>, erict@flatline.UUCP (eric townsend) says:
> 
> Just tried to compile some stuff I got from a friend.  Low and
> behold, the unix-pc C compiler doesn't go past 8 characters in
> either a function or a varible name!
>
>  [some deleted]
>
> Ranting over.. Seriously, though.. Is there any way to get around this?
> Any kludges, or preprocessors, or anything?

Yes.  There's a PD replacement for cpp that is *any* length on defines.  But
if the assembler/loader won't handle more than 8 characters, you're stuck
anyway (just like I am ;-).

The choices are to obtain cpp from an archive-site, or get shortc, which
just generates defines that will make the names unique within 'x' number
of characters (run-time option).


"Use the Source, Luke.  Feel it flow through your fingertips..."
-----
Frank (crash) Edwards		...!codas!usfvax2!{pdn,jc3b21}!tsc3b21!crash
TSC in Palm Harbor, FL		Phone:  (813) 785-0583  (voice)
The Sweat Shop
/-------------------------------------------------------------------------\
|  These opinions are not those of my employer, his wife, either of their |
|  children, or their parakeet.  In fact, he probably doesn't even know   |
|  that I've said this!  And I prefer it that way!			  |
\-------------------------------------------------------------------------/

chute@chutepc.UUCP (Chris Chute MD) (02/10/88)

In article <385@pcbox.UUCP>, pjc@pcbox.UUCP (Paul J. Condie) writes:
> In article <380@flatline.UUCP> erict@flatline.UUCP (eric townsend) writes:
> >behold, the unix-pc C compiler doesn't go past 8 characters in
> >either a function or a varible name! [etc]
> 
> The unix-pc compiler does by default support longer function/variable
> names, unless you use the -T option to truncate.

Now for those of us who suffered through version 2.0 and 3.0 of the
UNIXpc System V, Eric's comments ring true.  It was only with the advent of
release 3.5 that full flex name support was available with the compiler (many
of us had used a pre-preprocessor to get around it anyhow).
  How quickly we forget history. :->

Cheers,
Chris Chute M.D.			IntN: chute@hscfvax.harvard.edu
Harvard School of Public Health		UUCP: chute@chutepc.uucp
Department of Epidemiology		BitN: chute@harvspha.bitnet
677 Huntington Ave			Voice:   (617)732-1480
Boston, MA 02115			Data:    (617)732-1843

dhesi@bsu-cs.UUCP (Rahul Dhesi) (02/10/88)

A program "police" was posted to the net some months ago.  It will
create new unique identifiers of any desired size.
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi

erict@flatline.UUCP (eric townsend) (02/11/88)

In article <385@pcbox.UUCP>, pjc@pcbox.UUCP (Paul J. Condie) writes:
> In article <380@flatline.UUCP> erict@flatline.UUCP (eric townsend) writes:
> >behold, the unix-pc C compiler doesn't go past 8 characters in
> >either a function or a varible name!
> >An 8 character limit?  What is this, a step back towards 2 character
> >varible names like in BASIC?
> >Ranting over.. Seriously, though.. Is there any way to get around this?
> >Any kludges, or preprocessors, or anything?
> 
> The unix-pc compiler does by default support longer function/variable
> names, unless you use the -T option to truncate.


I think it by default supports on 3.51.. but not on 3.0 (which I may
not have specified...)
T
h
e
s
e
a
r
e
w
a
s
t
e
-- 
Ratings stickers on music releases: Just Say "No". | Another journalist with
If I wish really hard, will IBM go away forever?   | too much computing power.
Girls play with toys. Real women skate. -- Powell Peralta ad
J. Eric Townsend ->uunet!nuchat!flatline!erict smail:511Parker#2,Hstn,Tx,77007

dhesi@bsu-cs.UUCP (Rahul Dhesi) (02/11/88)

The program "police.c" was posted some months ago to comp.sources.misc
by Bob Kelly <bobk@mntgfx.MENTOR.COM>.  It pre-processes C code and
shortens all identifiers to unique ones of a user-specified size.
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi

ark@alice.UUCP (02/16/88)

Version 3.5 of the UNIX PC system supports long identifiers,
both in the compiler and in the linker.