Shared Lib Question (ISC)

John F Haugh II jfh at rpp386.cactus.org
Fri May 10 22:37:05 AEST 1991


In article <174 at titccy.cc.titech.ac.jp> mohta at necom830.cc.titech.ac.jp (Masataka Ohta) writes:
>Thus, it is natural that a library call have its own state, like a stdio
>library.

There is a difference between `state' and `global variables'.  For example,
the stdio library you mention, could keep its state in the (FILE *) object
you pass as its argument in the `no global variables' version of our
stdio library.  Functions which implement the `no (FILE *) argument'
version of the library routines would be simple wrappers ala

	printf (args ...)
	{
		return fprintf (stdio, args ...);
	}

where what you do to make "args ..." work is left to the reader ...
-- 
John F. Haugh II        | Distribution to  | UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 255-8251 | GEnie PROHIBITED :-) |  Domain: jfh at rpp386.cactus.org
"If liberals interpreted the 2nd Amendment the same way they interpret the
 rest of the Constitution, gun ownership would be mandatory."



More information about the Comp.unix.internals mailing list