home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!gatech!concert!sas!mozart.unx.sas.com!walker
- From: walker@twix.unx.sas.com (Doug Walker)
- Subject: Re: SAS/C 6.0 Details (LONG!)
- Originator: walker@twix.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <BtLEyn.2I8@unx.sas.com>
- Date: Wed, 26 Aug 1992 13:32:47 GMT
- References: <BsxCu2.5A7@unx.sas.com> <1992Aug18.203629.22286@fcom.cc.utah.edu> <Bt8H7F.BL8@unx.sas.com> <hemmer.01sx@hemmer.adsp.sub.org> <1992Aug26.124301.22998@email.tuwien.ac.at>
- Nntp-Posting-Host: twix.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 50
-
-
- In article <1992Aug26.124301.22998@email.tuwien.ac.at>, mjl@newton.auto.tuwien.ac.at (Martin J. Laubach) writes:
- |> |> So, when I switch to V6.0 I'll have to set all my library pointers to NULL
- |> |> after CloseLibrary(), in order to avoid autoterm() to close it again ?
- |>
- |> No. You'd only need to do this if your code opens and closes the libraries
- |> yet does not define the library base -- quite unlikely, I'd say.
- |>
- |> mjl
-
- No, his code would still work even if he doesn't define the library
- base. It would just open the library redundantly.
-
- I'll quote myself here (this was a posting from a couple of days ago):
- |>
- |> The autoinit code does this:
- |>
- |> static struct Library *libbase;
- |> tmpbase = IntuitionBase = OpenLibrary("intuition.library",__oslibversion);
- |> ...
- |>
- |> The autoterm code does this:
- |>
- |> CloseLibrary(libbase);
- |>
- |> This means that, no matter what your code does with IntuitionBase, the library
- |> is still closed the same number of times that it is opened. Many people do
- |> this when they close the library:
- |>
- |> CloseLibrary(IntuitionBase);
- |> IntuitionBase = NULL;
- |>
- |> The reason we use the static variable 'libbase' is so we can still close the
- |> library the correct number of times if you set the library base to NULL in
- |> your own code.
-
- Hmm, looks like there is an error there - that "tmpbase = " should
- be "libbase = ". That's what comes of typing in code on the fly.
-
- In any event, no existing code will break.
-
- --
- *****
- =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
- *|. o.| || 1200/2400/9600 Dual
- | o |// For all you do, this bug's for you!
- ======
- usenet: walker@unx.sas.com bix: djwalker
- Any opinions expressed are mine, not those of SAS Institute, Inc.
-
-