HDTenEightyP/NetNews huggingface dataset:
From: millerta@ucsu.Colorado.EDU (MILLER TIMOTHY A)
Subject: Survey on future of Object Oriented Programming
Organization: University of Colorado, Boulder
Date: Sat, 11 Apr 1992 17:44:11 GMT


Hi Guys:

I'm doing a Delphi survey on the future of the Object paradigm.
Please respond now, if you want to be included in this survey.
I will be sending out the same questions for a second round in two
days or when I have fifty responses. The second round consists of
the same questions, but it includes the average response and the
range of responses.

Please answer the following questions by responding with a specific
year (max 2050). You may answer these questions by editing this
message or appending the message with the question number
and response.

1) When will there be a  Object CASE tool that gains wide acceptance?

2) What year do you see OO Analysis techniques standardized?

3) What year do your see OO Design techniques standardized?

4) When will you be able to buy useful Objects "off the shelf" for custom
applications?

5A) When will Object Systems account for 30% of the applications being used?
5B) When will Object Systems account for 50% of the applications being used?
5C) When will Object Systems account for 80% of the applications being used?

6A) When do you expect that a background in Object Systems will be a
requirement for 30% of new hires for programming?
6B) When do you expect that a background in Object Systems will be a
requirement for 50% of new hires for programming?
6C) When do you expect that a background in Object Systems will be a
requirement for 80% of new hires for programming?

7) What OO language do you think will dominate by the end of this decade?


Sorry if this when out several times. There were several bugs some of
which are still not resolved.

Please reply to "timothy@eddie.rmnug.org".

Thanks

Tim


Xref: sparky comp.lang.c:7641 comp.unix.programmer:2392
From: guy@Auspex.COM (Guy Harris)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: How to write the ANSI C time functions
Date: 15 Apr 92 05:31:52 GMT
Followup-To: comp.unix.programmer
Organization: Auspex Systems, Santa Clara
Originator: news@auspex-gw.Auspex.COM

(He said "UNIX", so back to "comp.unix.programmer" it goes....)

>Unfortunately, (or fortunately)
>Unix was developed in the early 1970's so gmtime really returns the Local Time
>at the Grenwich meridian which is also called Zulu time.

Well, what "gmtime()" returns in a POSIX-compliant system is that which
is described in the POSIX 1003.1 spec; it does, in effect, not do any
leap-second correction, so it's off from UTC by the number of leap
seconds since January 1, 1970, given that:

>UTC is always an integral number of 
>seconds different from atomic time (TAI). Currently, UTC = TAI -26.

and will, at the end of June 1992, be 27 seconds off, because:

>This will change
>to UTC = TAI - 27 at the end of June 1992 when the first ever leap second will
>be inserted in a month other than December.

and given that:

> The question is, does time() return GMT or
>>UTC?  Hazarding a guess, I would say it is UTC, in which case
>
>Correct

Wrongo.  "time()" returns something that is best thought of as *atomic*
time - i.e., it is supposed to return a value that, at 12:00 UTC,
January 1, 1970, was 0, and that has gone up by one every time an atomic
clock would have advanced by one second.

(In practice, few if any UNIX systems have "time()" return anything
truly deserving of the term "atomic time", because few such systems have
a real live atomic clock attached to them....)
Newsgroups: comp.lang.c
From: tpaterso@cs.ubc.ca (Toby Paterson)
Subject: Re: C Structures
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Date: Fri, 17 Apr 92 18:05:09 GMT

In article <smclewin.703484920@ultrix.ramapo.edu> smclewin@ultrix.ramapo.edu  
(Scooter McLune) writes:
> aali@dcs.qmw.ac.uk (ALI) writes:
> 
> 
> >I have a structure thus:
> 
> >struct this { 	int x;
> >				int y;
> >			};
> >			
> >I want to declare an array called temp of type struct this ie:
> >struct this temp[10];
> 
> >However, I want to declare temp in my main() procedure. This is 
> >because the size of the array is figured out from a file which
> >contains z number of elements.The file is read by a procedure called in 
> >the main() procedure. So my final declaration in my main() procedure is 
> >supposed to be:
> 
> >struct this temp[z];
> 
> >where z is an int.
> >	However, it doesn`t work! Can anybody suggest how to do this
> >and if I can put my definition of my structure into a header
> >file?
> 
> >Thanks,
> 
> >Al.
> 
> You are right about this not working.  The space for a declaration
> such as
> 
> int temp[10] 
> 
> is set aside at compile time, not run time as you need to do it.  So
> far as I can see, you have two choices (three if you count giving up :) )
> 
> Use the realloc() to dynamically size your array of structures as you need
> 

This won't work.  realloc() only resizes blocks of memory which have been  
assigned by malloc().  The space for static declarations is assigned by the  
compiler from the data segment of the program's memory and it is fixed - it  
cannot be grown or shrunk.

> Declare an array of structures of a size beyond the max you ever think
> it will hit, and only use parts of it as you need to.
> 

Ugh! Hurt me!


> 
> Solution 1 is nicer, but more difficult to implement
> Solution 2 is quick, dirty and wasteful.  enjoy.
> 
> 
> SMM
> 

How about

static struct this *temp;

void main (void)
{
	...blah blah blah...

	temp = (struct this *) malloc(n * sizeof(struct this));
	/* temp can now be accessed as temp[0], temp[1], ..., temp[n-1]. */

	...blah blah blah...
}

X
From: volpe@bart.crd.ge.com (Christopher R Volpe)
Newsgroups: comp.lang.c
Subject: Re: passing structure to a function
Date: 13 Apr 92 18:47:53 GMT
Reply-To: volpe@bart.crd.ge.com (Christopher R Volpe)
Organization: GE Corporate R&D Center

In article <mcook.702998942@mrc.dev.cdx.mot.com>,
mcook@mrc.dev.cdx.mot.com (Michael Cook) writes:
|>volpe@bart.crd.ge.com (Christopher R Volpe) writes:
|>
|>>In article <mcook.702843388@mrc.dev.cdx.mot.com>,
|>>mcook@mrc.dev.cdx.mot.com (Michael Cook) writes:
|>>|>volpe@bart.crd.ge.com (Christopher R Volpe) writes:
|>>|>
|>>|>>C, whether it be ANSI or pre-ANSI, has always required that all
parameters,
|>>|>>structures or otherwise, be passed by value.
|>>|>
|>>|>Except arrays.  They're passed by reference.
|>
|>>Wrong. Arrays aren't passed at all. Pointers are passed. And they're passed
|>>by value.
|>
|>What's the difference between call-by-reference and passing a pointer?

If there were such a thing as passing an array in C, and if it were done
by reference, then the formal parameter would have array type and the sizeof
operator (in the called function) would indicate the size of the whole
array. Instead, the formal parameter has pointer type and sizeof yields
the size of a pointer to the base type.

-Chris

|>-- 
|> ==========================================================
|> Michael.Cook@merlin.dev.cdx.mot.com          (617)821-7590
|> Motorola/Codex, 20 Cabot Blvd, C2-135, Mansfield, MA 02048
|> ==========================================================
                    
==================
Chris Volpe
G.E. Corporate R&D
volpecr@crd.ge.com
From: lfd@cbnewsm.cb.att.com (Lee Derbenwick)
Newsgroups: comp.lang.c
Subject: Re: Is the address of a global a constant?
Summary: constant, yes,  but not *integral* constant
Date: 7 Apr 92 17:29:55 GMT
Article-I.D.: cbnewsm.1992Apr7.172955.4872
Organization: AT&T

In article <1992Apr6.201518.969@pencom.com>, eric@pencom.com writes:
> 
> Is the address of a global supposed to be considered a valid constant?

Yes, but it is not a valid "integral constant expression", which is
what a case label requires.  [ANSI 3.6.4.2]

You can't have arbitrary constants after case labels, just integer
ones.  Similar, the expression in the switch "shall have integral
type".  So both error messages are correct:

> gcc first complains that p is not an integer.
> It then complains that the switch labels are not constant.

VAXen to the contrary, pointers are not ints.  (Nor even longs!)

 -- Speaking strictly for myself,
 --   Lee Derbenwick, AT&T Bell Laboratories, Warren, NJ
 --   lfd@cbnewsm.ATT.COM  or  <wherever>!att!cbnewsm!lfd
Newsgroups: comp.lang.c
From: khatri@seas.gwu.edu (Anil Khatri)
Subject: C beautifier
Originator: khatri@seas.gwu.edu
Organization: George Washington University
Date: Tue, 7 Apr 1992 00:17:01 GMT

Hi! netters, here is one simple question for you all. Are any of you guys using
C Beautifier for your C programs. Do you find any other advantage of it apart from  easy readibility and debugging of code.


thanks in advance.......
Newsgroups: comp.lang.c
From: dmturne@ptsfa.PacBell.COM (Dave Turner)
Subject: Re: printf() questions
Reply-To: dmturne@PacBell.COM (Dave Turner)
Organization: Pacific * Bell, San Ramon, CA
Date: Wed, 8 Apr 1992 18:34:52 GMT

In article <22918.29da2dd0@amherst.edu> pfcouvares@amherst.edu writes:
>1) I have have a character array (for a string): name[NAME_SIZE].
>
>NAME_SIZE is #defined because I need to be able to change it easily, and
>it appears all over the program. I want to print this string out, and, so
>that things will line up nicely, I want it printed in a field of length
>NAME_SIZE. (i.e. printf("%-25s",name) ... except with NAME_SIZE where 25 is)
>Is this possible with printf or one of its relatives, or must I write the code
>out myself to do it? It seems like something that should be possible...
>
>2) If you indicate a field, and the string turns out to be longer, printf will
>print the entire string anyway. Is there any way to make printf truncate the
>string so that the field is absolute even if the string is longer?
>
You might try:

	printf("%-*.*s", NAME_SIZE, NAME_SIZE, name);

This sets both the field length and the precision to the size known to the
compiler.

You may want (or need) to increase the size of the name array:

		char	name[NAME_SIZE+1];

to allow for a string terminator.

The above works on SVR3.1 .


-- 
Dave Turner	(510) 823-2001	{att,bellcore,sun,ames,decwrl}!pacbell!dmturne
From: ps@cs.strath.ac.uk (Paul Shaw)
Newsgroups: comp.lang.c
Subject: Re: Initialisation code in ANSI C.
Date: 15 Apr 92 16:15:20 GMT
Organization: Comp. Sci. Dept., Strathclyde Univ., Glasgow, Scotland.

In article <aland.703275555@chaos.cs.brandeis.edu> aland@cs.brandeis.edu writes:
>bwc@waikato.ac.nz (Ug!) writes:
>
>>Is it possible to have automatic start-up code for a module in C?  Termination
>>code I can do by using atexit(), but what about where I have a module which
>>needs to set up before anything else is done?
>
> [stuff deleted]
>
>>What I am doing at the moment is explicitly calling the initialisation code
>>from the main program (i.e. main()), but I would like to have it done
>>automagically (this after forgetting to do it once and watching everything
>>go splat!).
>

Okay, here is an efficient way to do it:


RETURN_TYPE Initfoo();

static RETURN_TYPE (*foo)() = Initfoo;

RETURN_TYPE Dofoo(p1,p2,...)
......
{
   .... normal stuff ....
}

RETURN_TYPE Initfoo(p1,p2,...)
......
{
   .... initialization stuff...

   foo = Dofoo;
   return(foo(p1,p2....));
}


Just call the routine with foo(p1,p2,...).  The first time the routine
is called, the initialization will be done, and thereafter, the real
routine will be done.  You can obviously do arrays of these pointers
to functions etc.


Paul Shaw.
Strathclyde University.
Newsgroups: comp.lang.c,comp.programming
From: stephen@estragon.uchicago.edu (Stephen P Spackman)
Subject: Re: 1-800-SPELL-IT
Organization: University of Chicago CILS
Date: Tue, 7 Apr 1992 06:58:55 GMT

In article <ZEN.92Apr6225309@death.corp.sun.com> zen@death.corp.sun.com (d) writes:
|  Seems short enough to post... from some random source group
|(alt.sources?) awhile back.

What a gross programme! Why not map the characters in the input line
into digits and then compare THAT against the original? One 26-element
table and a one-line loop inside a two-line loop? (In fact, since All
The World's A VAX (tm), there's probably a system call for doing the
character set translation, one designed to make use of the dreaded
(though not so dreaded as POLYH) Move Translated Until Character
instruction ;-).
----------------------------------------------------------------------
stephen p spackman         Center for Information and Language Studies
stephen@estragon.uchicago.edu                    University of Chicago
----------------------------------------------------------------------
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.c
Subject: Re: passing structure to a function
Date: 11 Apr 1992 19:11:35 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <mcook.702998942@mrc.dev.cdx.mot.com> mcook@mrc.dev.cdx.mot.com (Michael Cook) writes:
>What's the difference between call-by-reference and passing a pointer?

Call by reference hides the use of the pointer.  In the caller, you don't
have to say &<object>, and in the callee you don't have to say
*<parameter>.

Array passing in C is sort of call by reference.  In the caller, an array
reference is converted to &array[0].  And normal array indexing performs
the indirection automatically.  But there are ways to see the underlying
pointer, so it isn't really call by reference.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.lang.c
Subject: Re: Printer on line?
From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin)
Date: 14 Apr 92 19:51:56 GMT
Distribution: world
Organization: Beckman Instruments, Inc.

In <1992Apr14.145749.9578@bradford.ac.uk> N.J.Watts@bradford.ac.uk (NJ WATTS) writes:


>Dear all,
>	Is it possible to determine whether or not a printer on the stdprn 
>stream is on-line or not before sending any information to it?  I cannot 
>get around the problem that the operating system cuts in whenever the printer 
>is off-line and leaves an unsightly message in the middle of my applications.

>		Any thoughts greatly appreciated...

I'm afraid this is the wrong newsgroup for that question.  Under MS-DOS
MicroSoft C, the answer is :
    if (_bios_printer((_PRINTER_STATUS,0,0) && 0xD9) == 0x80)) { _OK_ }
--
Arthur L. Rubin: a_rubin@dsg4.dse.beckman.com (work) Beckman Instruments/Brea
216-5888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal)
My opinions are my own, and do not represent those of my employer.
Ich bin ein Virus.  Mach' mit und kopiere mich in Deine .signature.
From: jos@and.nl (Jos Horsmeier)
Newsgroups: comp.lang.c
Subject: Re: 'Literal' initialization of unions, please ....
Date: 14 Apr 92 09:24:41 GMT
Organization: AND Software BV Rotterdam

In article <uh311ae.703172102@sunmanager> uh311ae@sunmanager.LRZ-Muenchen.DE (Henrik Klagges) writes:
|Example:

[ struct and union declarations deleted ... ]

|Now, it is possible to say:
|
|intT   I = {is_int, 1};
|floatT F = {is_float, 1.}
|
|BUT, how:
|
|anyT A = {{is_float, 1.}};     /* DOESN'T WORK, alway takes the first of the 
|                               union's types (i.e., intT) ! */
|
|How can I tell the compiler how to disambiguate between intT and floatT ?
|I had to switch to assembler on several occasions because I was unable to
|get the initializations right in this way.

Sorry, you can't tell the compiler to do that. At least, not if your
compiler is strictly ANSI conformant. ANSI-C 3.5.7 Initialization:

`A brace-enclosed initializer for a union object initializes the member
that appears first in the declaration list of the union type.'
[ ... ] `the initializer for an object that has union type shall have  
a brace-enclosed initializer for the first member of the union.

kind regards,

Jos aka jos@and.nl
Xref: sparky comp.lang.c:7643 comp.std.c:1821
From: doughera@lafcol.lafayette.edu (Andy Dougherty)
Newsgroups: comp.lang.c,comp.std.c
Subject: Re: PLEASE don't use "long long" for 64 bits + answer to letter
Date: 8 Apr 92 16:02:08 GMT
Followup-To: comp.lang.c
Organization: Lafayette College, Easton PA

In article <ABRAHAM.92Mar29185558@loke.iesd.auc.dk> abraham@iesd.auc.dk (Per Abrahamsen) writes:
>
>>>>>> On 27 Mar 92 21:26:26 GMT, mcdonald@aries.scs.uiuc.edu (Doug
>Will the C purists really accept a 32 bit int on a machine with a 64
>bit natural word size?


I'll be that C vendors will.  I used to work on a 68000-based machine
for which 16-bit operations were much faster than 32-bit operations.
Yet the vendor still used 32-bit integers.  Presumably this was
because it made using some important code easier.  I wouldn't be
at all suprised if vendors are still using much of the same code and
will be tempted to stick to 32-bit integers even if 64 bits is the
natural word size.

-- 
Andy Dougherty
INTERNET:  doughera@lafcol.lafayette.edu
BITNET:    doughera@lafayett
From: erik@archimedes.nwc.navy.mil (Erik van bronkhorst)
Newsgroups: comp.lang.c
Subject: Re: impossible in C ? -macro
Keywords: free beer
Date: 10 Apr 92 14:36:13 GMT
Organization: Naval Weapons Center, China Lake, CA

>From: Heinz_Ozwirk@spam.fido.de (Heinz Ozwirk)
>Newsgroups: comp.lang.c
>Subject: Re: impossible in C ? -macro
>Message-ID: <e3552c00@p8.f6.n249.z2.fidonet.org>
>Date: 8 Apr 92 19:05:52 GMT
>References: <173ff816@xilinx.com>
>Organization: Madness takes its toll
>Lines: 13
>X-Comment-To: Victor_A._Holen@f1.n6000.z2.fidonet.org (Victor A. Holen)
>
>
> VA> Is it possible to have a macro that declares local variables
> VA> and returns a value.
>
>I would say this is impossible. You can only define variables at the beginning 
>of compound statement or block ( {...} ). However, only expressions have a 
>(non-void) value. But compound statements are no expressions. So at least a 
>macro which declares local variables cannot return a value based on local 
>variables. I doubt that there is any way to put a compund statement anywhere in 
>an expression, and i would even bet a beer or two on that, but i am not really 
>certain, but almost.
>
>   -heinz-
>

#define macro1 { int i
#define macro2 (0 == 1 ? 666 : 123436)
#define macro3 macro1; i=macro2

main()
macro3;
printf("%d\n",i);
}

	You choose the brand of beer :-)

-- 
Erik van Bronkhorst KC6UUT erik@rftech.nwc.navy.mil
DoD#4342585443 AMA#438054 "3.412 squid" "2.5 geezer"
From: holen@xilinx.com (Victor A. Holen )
Newsgroups: comp.lang.c
Subject: Re: impossible in C ? -macro
Keywords: macro declaration return
Date: 7 Apr 92 16:38:59 GMT
Article-I.D.: xilinx.1992Apr7.163859.11481
Organization: Xilinx Inc.

In article <> I write:
>Is it possible to have a macro that declares local variables
                      I ment LOCAL TO MACRO (SCOPE WITHIN MACRO ONLY)
>and returns a value. Basically, so it can be called/used as
>a function.
>Something like
># define macfunc(v) \
>     int a  \
>     /*use a to compute some function of v (e.g.  a=v; ) */ \
>     /* return a */
>I tried some combinations of (,,){} but not the right ones...
>Supposedly one can do anyting in C, but of course I'd be interested only
>if its legal ANSI C, which may be harder to determine than to find solution...



-- 
 victor ....  ___  ._..  .  _.     holen@xilinx.com
From: karunaka@enuxha.eas.asu.edu (Roy Karunakaran)
Newsgroups: comp.lang.c
Subject: VAX C function for char input
Keywords: getc, getchar??????
Date: 10 Apr 92 23:50:59 GMT
Organization: Arizona State University


	I am posting this for a friend of mine. He is trying to 
	read a character from stdin without waiting for the CR using VAX C.  
	VAX C functions getc and getchar wait for the return key.
	Is there any function that will allow him to read a char without
	waiting for the return key.  

	I'm sorry if this is a FAQ, but he has spent a lot of time
	looking for this function.  Any hints would be welcome.  
	
	Please e-mail responses to ssathyan@enuxha.eas.asu.edu

	Thanks.

	Roy.
--
Roy Karunakaran
karunaka@enuxha.eas.asu.edu
Newsgroups: comp.lang.c
From: peter@ferranti.com (Peter da Silva)
Subject: Re: "long long" for 64 bits
Organization: Xenix Support, FICC
Date: Mon, 13 Apr 1992 19:53:34 GMT

In article <45114@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
> Unfortunately, these are not enough.  On the CYBER 205, the addition
> and multiplication types are 48 bits.

Then you'll have an int48, and on the UNISYS 1100 you'll have int36 and
int32 will generate a diagnostic if you use it explicitly.
-- 
/F{findfont exch scalefont setfont}def /S{moveto show}def /T{/Times-Roman F}def
8 T(Ferranti International Controls Corporation)24 28 S(+1 713 274 5180)24 12 S
(Sugar Land, TX  77487-5012)24 20 S 12 /Courier F(`-_-')320 32 S( 'U` )320 16 S
12 T(Peter da Silva)24 36 S 16 T(Have you hugged your wolf today?)358 24 S
From: aali@dcs.qmw.ac.uk (ALI)
Newsgroups: comp.lang.c
Subject: C Structures
Date: 16 Apr 92 21:08:31 GMT
Organization: Computer Science Dept, QMW, University of London


I have a structure thus:

struct this { 	int x;
				int y;
			};
			
I want to declare an array called temp of type struct this ie:
struct this temp[10];

However, I want to declare temp in my main() procedure. This is 
because the size of the array is figured out from a file which
contains z number of elements.The file is read by a procedure called in 
the main() procedure. So my final declaration in my main() procedure is 
supposed to be:

struct this temp[z];

where z is an int.
	However, it doesn`t work! Can anybody suggest how to do this
and if I can put my definition of my structure into a header
file?

Thanks,

Al.
Newsgroups: comp.lang.c
From: mcook@mrc.dev.cdx.mot.com (Michael Cook)
Subject: Re: passing structure to a function
Organization: Motorola Codex, Canton, Massachusetts
Date: Thu, 9 Apr 1992 18:16:28 GMT

volpe@bart.crd.ge.com (Christopher R Volpe) writes:

>C, whether it be ANSI or pre-ANSI, has always required that all parameters,
>structures or otherwise, be passed by value.

Except arrays.  They're passed by reference.
-- 
 ==========================================================
 Michael.Cook@merlin.dev.cdx.mot.com          (617)821-7590
 Motorola/Codex, 20 Cabot Blvd, C2-135, Mansfield, MA 02048
 ==========================================================
Newsgroups: comp.lang.c
From: karl@ima.isc.com (Karl Heuer)
Subject: Re: 'Literal' initialization of unions, please ....
Organization: Interactive Systems, Cambridge, MA 02138-5302
Date: Tue, 14 Apr 1992 19:20:57 GMT

In article <uh311ae.703172102@sunmanager> uh311ae@sunmanager.LRZ-Muenchen.DE (Henrik Klagges) writes:
>[How can I initialize a union via a member other than the first one?]

In Standard C, you can't.  I proposed a syntax which I'm told is now available
in gcc, so you could use that.  (I presume you don't mind using non-Standard
features, since you said you've been using assembly as necessary.)  If this
feature turns out to be "clean", its existence in gcc is prior art that will
be a big push for getting it into the next revision of ANSI C.

Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint
From: aland@chaos.cs.brandeis.edu (Alan D.)
Newsgroups: comp.lang.c
Subject: Re: Initialisation code in ANSI C.
Date: 14 Apr 92 18:19:15 GMT
Reply-To: aland@cs.brandeis.edu
Organization: As little as possible

bwc@waikato.ac.nz (Ug!) writes:

>Is it possible to have automatic start-up code for a module in C?  Termination
>code I can do by using atexit(), but what about where I have a module which
>needs to set up before anything else is done?

There's one possible way, I'll explain how in a moment. :)

>What I am doing at the moment is explicitly calling the initialisation code
>from the main program (i.e. main()), but I would like to have it done
>automagically (this after forgetting to do it once and watching everything
>go splat!).

Well, you could use a static 'boolean' (char) initialized to 0; set it
to 1 after initialization, and check it each time you enter the
function.

void am_i_inited(void)
{
  static char inited=0;
  /* Rest of my variables */

  /* Check for prior initialization, initialize if not yet done */
  if (!inited) {
    inited = 1;
    /* Rest of my init code */
  }

  /* rest of my code
   .
   .
   .
   */
}
Newsgroups: comp.lang.c