home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!wirzeniu
- From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
- Newsgroups: comp.lang.c
- Subject: Re: How to use 'return' in c?
- Message-ID: <1992Nov19.182158.8554@klaava.Helsinki.FI>
- Date: 19 Nov 92 18:21:58 GMT
- References: <1992Oct29.025437.9289@nuscc.nus.sg> <1992Oct29.053625.24495@u.washington.edu> <RQ282FK@math.fu-berlin.de>
- Organization: University of Helsinki
- Lines: 21
-
- rene@hamel.uucp (Rene Mueller) writes:
- >There are a lot of compilers where [EXIT_SUCCESS and EXIT_FAILURE
- >don't] exist...
-
- So then you add
-
- #ifndef EXIT_SUCCESS
- #define EXIT_SUCCESS 0
- #endif
-
- #ifndef EXIT_FAILURE
- #define EXIT_FAILURE 1
- #endif
-
- to port.h or whatever. This way you can make your code more close to
- the standard without hurting portability. Using explicit exit(1)'s
- hurts portability as well.
-
- --
- Lars.Wirzenius@helsinki.fi (finger wirzeniu@klaava.helsinki.fi)
- MS-DOS, you can't live with it, you can live without it.
-