🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189723

folding C sources in respect to #ifdef's

#189723
From: Michael Schmidt
Date: Thu, 06 Dec 1990 08:54
30 lines
1316 bytes
I vaguely remember, that some time ago, a discussion took place,
whether it is possible to fold a C source, so that only the relevant
lines are visible and the parts in #ifdef's, that are not defined are
hidden. Example:

#ifdef USG
uname(...);
#else
hostname(...);
#endif

should show only

uname(...);

resp.

hostname(...);

depending, whether I tell the function USG is defined or not.

Has there been any conclusion? Or even an emacs lisp function for
that?

	Michael Schmidt
--
      Michael Schmidt, FB 17, Uni-GH Paderborn, Warburgerstr. 100,
                     D-4790 Paderborn, West Germany
Mail:   michael@pbinfo.UUCP         or          michael@uni-paderborn.de
Technical Details
Message-ID: <MICHAEL.90Dec6095415@athene.uni-paderborn.de>
Path: arc1-ca.pugleaf.net!gmdzi!unido!pbinfo!michael

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,6efa649af85accfa,start
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1990-12-06 04:46:05 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!pbinfo!michael
From: michael@uni-paderborn.de (Michael Schmidt)
Newsgroups: gnu.emacs.help
Subject: folding C sources in respect to #ifdef's
Message-ID: <MICHAEL.90Dec6095415@athene.uni-paderborn.de>
Date: 6 Dec 90 08:54:15 GMT
Sender: news@uni-paderborn.de (News Uni-Paderborn)
Distribution: gnu
Organization: Uni Paderborn, Germany
Lines: 30
Posted: Thu Dec  6 09:54:15 1990
Nntp-Posting-Host: athene