[9fans] Include guards and multiple includes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm trying to convince some non-believers that include files should  
not include other include files, and that instead they should state  
their dependencies; they want hard data before they commit to such a  
scheme.

Is there some study kicking around that I could point them at rather  
than re-factor our code base and time the resulting builds?  I know  
the plan9 headers largely follow this pattern.

Paul

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFORlRpJeHo/Fbu1wRAlExAKCsTZtCcW9FlqvUwllBye9EgRGqGwCgnYZn
0QcMNw3eC6a/3/XINvcD/Qw=
=H755
-----END PGP SIGNATURE-----
0
plalonde (269)
10/20/2006 6:48:58 PM
comp.os.plan9 9256 articles. 0 followers. quanstro (3876) is leader. Post Follow

3 Replies
208 Views

Similar Articles

[PageSpeed] 36
> Is there some study kicking around that I could point them at rather
> than re-factor our code base and time the resulting builds?  I know
> the plan9 headers largely follow this pattern.

I'm fairly certain it's a stylistic/maintainability issue on Plan 9,
not an efficiency one.

--Joel
0
joelcsalomon (309)
10/20/2006 7:28:17 PM
I think that one of the best arguments for organising header files as
Plan 9 does is the mess that /usr/include has become on (l)unix.  It's
almost 20MB on Suse 9.1.

Here's an interesting exercise for people who don't see a problem with
how (l)unix organises /usr/include:

Ask someone (ideally a manager, the higher the rank, the better) to
find out where under /usr/include on Linux the type time_t is defined
and the signal SIGINT is declared without using grep or any
equivalent; they should trace through the include files visually.  If
they return with the correct answers and aren't disgusted with the
mess under /usr/include, slap some pointy hair on them.

0
geoff755 (337)
10/20/2006 11:21:29 PM
On 10/21/06, Paul Lalonde <plalonde@telus.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I'm trying to convince some non-believers that include files should
> not include other include files, and that instead they should state
> their dependencies; they want hard data before they commit to such a
> scheme.
>
> Is there some study kicking around that I could point them at rather
> than re-factor our code base and time the resulting builds?  I know
> the plan9 headers largely follow this pattern.
>
> Paul

I think this has more to do with minimising the preprocessor logic. I
like the plan 9 include tree more than the traditional unix include
mess. In my programs I dont use macros anywhere. none. nada. zero.

If one could only get rid of the preprocessor...

-- 
the thing i like with my linux pc is that i can sum up my complaints in 5 items
0
10/23/2006 12:40:25 PM
Reply:
Similar Artilces:

Include Problem ?
Why does this not work ? $fileDir = '../folder2/'; $content is an array of php files, file1.php file2.php file3.php etc... $c = count($content); for( $x=0; $x<$c; $x++ ){ include( $fileDir.$content[$x] ); } any ideas would be appreciated, thanks. Xav this seems to work, .... for( $x=0; $x<$c; $x++ ){ include( $fileDir.'file'.($x+1).'.php' ); } .... I don't understand why the other won't ! ??? Xav Xav schrieb: > Why does this not work ? > $fileDir = '../folder2/'; > $content is an array of php files, file1.php file2.php fi...

[9fans] plan9
------=_Part_71178_8096018.1229931834335 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline hi all, my paying job kept me busy for quite sometime. so far i couldnt spend as much time on inferno/plan9 as i wanted to. but i have taken 2 weeks off and i am happy that i will be using part of the free time to keep up with the technology (so i will be posting more!). specifically, i am trying to do this: - bring up plan9 on my Mac Mini using Parallels for Mac (4 or at least 3). - get plan9/inferno run on soekris net5501 board - miscellaneous t...

[News] KDE 4 Gets Very Pretty with SVG Rendering (Screenshots Included)
The Road to KDE 4: SVG Rendering in Applications ,----[ Quote ] | Since KDE 4 development is in full swing with plans for a KDE 4.0 | release sometime later this year, I thought I'd put together a | weekly piece entitled The Road to KDE 4. The idea is to have a | short overview of one or two of the features that show progress | in KDE 4. For my first issue, the goal is to show off some of | the great SVG work that has taken place so far. `---- http://dot.kde.org/1167723426/ Watch the before&after-type examples. Roy Schestowitz wrote: > The Road to KDE 4: SVG Rendering in Applica...

[9fans] virus filtering
As BWK once said, "Let someone else do the hard part." I just called my ISP. For a mere $2 a month, *they* will filter out the viruses etc. I deduct those expenses, and the time I don't have to spend putting a filter in place is worth the cost. So, thought I'd pass that idea along. Arnold This is a multi-part message in MIME format. --upas-doaosfolnuqfjyeprcurlywynt Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit A very good point. --upas-doaosfolnuqfjyeprcurlywynt Content-Type: message/rfc822 Content-Di...

[wxMac 2.5.4] #include <math.h> in wx/math.h
In my CodeWarrior project, the Mach-O build has trouble with the symbol M_PI_2 being undefined. It is defined in the system's version of the math.h file but the system's version does not get compiled into wx/math.h, probably because it is the same file name. I've tried using "#pragma notonce" and "#pragma once off" in various places, including in the wx/math.h file, and they don't solve the problem. I can't just #include <math.h> in my .cpp files because the wx precompiled header already includes a math.h (that doesn't have...

[9fans] Some 9fans at FrOScon
Good day. Some 9fans will be at FrOScon[0] in Sankt Augustin/Germany next week. Everyone is invited to join us and watch the presentation of Uriel[1]. Sincerely, Christoph [0] http://www.froscon.org [1] http://programm.froscon.org/events/14.en.html ...

[9fans] TLSServer?
I need to write a Unix application that uses TLS/SSL. I looked at using OpenSSL, but lordy mama -- what an interface. Since I only need to do the server side of the communication, I thought perhaps the Plan 9 tls stuff could be used. Comments? How much work would it be to get the current code working in a Unix environ? Cheers, Sam This is a multi-part message in MIME format. --upas-kndgyfeeqgigfjqnpqacwxjwhr Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit You'ld have to take our devtls stuff out of the kernel. You...

[9fans] apm
The warning makes it sound like your line in plan9.ini says apm0=ax=f000 ... when it should just say apm0= Could you double check that? Also, the kernel config line should be apm apmjump not apm apmjunk though the latter is probably a better description. Russ ...

[9fans] Poll
If you use tabstop of 4, let me know as well. So, far the only people who have responded use tabstop=4. Brantley ...

How to plot a graph with multiple Y axes?
Hi I have to plot a graph with multiple Y parameters. Using plotyy() method one can plot only 2 Y axes. But I need to plot more than 2 parameters versus x axis. Is there a way to achieve this feature? Thanks in advance. Praveen <praveen.kumar.jayaram@gmail.com> wrote in message <277cd4c5-46e9-4aa7-8003-79d00abcdbd5@u16g2000pru.googlegroups.com>... > Hi > > I have to plot a graph with multiple Y parameters. Using plotyy() > method one can plot only 2 Y axes. But I need to plot more than 2 > parameters versus x axis. Is there a way to achieve this feature? > &g...

[9fans] spam on 9fans
There has been a lot of spam passing through 9fans, enough that, for example, my own subscription tends to auto-disable every few months due to the many bounced spam messages that the list server could not deliver. I have shuffled things around a bit, and it should reduce the amount of spam getting through. If you see any problems or suspicious behavior, please feel free to mail me directly (rsc@swtch.com). Thanks. Russ ...

[9fans] dsa keys.
is there a reason that auth/dsagen (and friends) do not exist (other than nobody wanted to write them)? - erik They do exist, only in Plan 9 from User Space. They don't exist in Plan 9 only because we don't have anything that actually uses dsa keys. Russ ...

[9fans] Strange rc bug for the 9fans bug-squashing squad
At first I thought very big rc variables seem to become strangely corrupted. % for(i in `{seq 1000}) { echo 0123456789 >> f } % ifs='' {x=`{cat f}} % echo -n $x > f2 % diff f f2 745c745 < 0123456789 --- > 01234567 9 But the bug seems to be in `{ } because replacing the use of the x var with simply: % ifs='' { echo -n `{cat f} > f2} Produces the same results. Longer strings get more random(?) characters 'blanked'. The results are identical in p9p and native plan9. I looked a bit around the rc source that seemed relevant, but didn't see any ob...

Multiple "a href" classes
I'm trying to implement a navigation bar with multiple a href classes. The following example works exactly as I want it to, but for Internet Explorer only. Firefox does not indent each link. http://jonathanwayne.com/test/test.html Here's the relevant snippet: <div class="nav"> <a href="#">link 0</a> <a class="1" href="#">link 1 indentation - in IE but not FF</a> <a class="2" href="#">link 2 indentation - in IE but not FF</a> <a class="3&q...

Re: SPSS to SAS including the Value Labels please. #5
> From: Minya Pu > Hi, Sue. > Your suggestion seems to work very well for small data sets, > but not very well for the big data sets...SPSS complained > about disk spaces. > > Minya I suggest you treat this as two tasks: 1. get the variable names and labels -and- the sas format statements from a small subset sas code: options obs=1; then, with the desired proc format code and the variable labels in hand 2. convert the data, ignoring the 'generate sas code' option. Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov "Nothi...

[9fans] Ethernet drivers
Is a D-Link DL10038D supported by the RTL8139 drivers? Are they essentially the same thing? Has anyone tried it? Thanks, ak DL10038D is a success by RTL 8139 drivers on Plan 9. Took it off of a dying computer -- a good hardware investment (though a poor replacement for my Broadcom). yay! ak On Fri, Feb 6, 2009 at 12:01 PM, Akshat Kumar <akumar@mail.nanosouffle.net> wrote: > Is a D-Link DL10038D supported by the RTL8139 drivers? > Are they essentially the same thing? > Has anyone tried it? > do you have one or are you preparing to buy one? ron ...

Is there a way to acquire a set number of points from multiple channels?
I had set up a VI to use AI ONE POINT.VI for multiple channels. Getting one data point for me is useless. I need, say, 100 data points from multiple channels at once. Is there a way to do that? Is there an example program I'm not seeing that already does that? Thanks! p.s. I have Labview 6.1 There's a bunch of analog in examples. Go to Help>Find Examples and in the Browse tab, select Hardware Input and Output>DAQ>General>Analog Input. Try one like Cont Acq&Graph or Cont Acq&Chart. In the channel control, type in your channel list for multiple channels. Hello, Th...

Re: [9fans] killing processes #2 #3
Well, we use a separate CPU server to provide web,mail,dhcp, etc., and try to keep the file server undisturbed. I wouldn't call this `obsolete', we no longer have file server blockouts when spammers find a way to really overload our smtpd/httpd. : Until now, I : had considered the Fossil host as strictly out of bounds for : computation. But _that_ is obsolete thinking, my approach ought to be : to enhance its resources as far as possible. I don't see any point in computing on a file server. CPUs are so cheap. Just throw as many of them as you need at a problem until the pr...

include Push-Pin on prop. manager page API
Can someone give me an example of how to include the push-pin in a property manager page. The help file gives me this information. I have downloaded a sample property manager page from the Solidworks website but I am not sure where to insert the code. I defined Pinned as Boolean and set it to True, but I get the error that PropertyManagerPage2 is not a defined variable. The solidworks help file shows the following syntax, but does not include an example. Syntax (OLE Automation) Pinned = PropertyManagerPage2.Pinned (VB Get property) PropertyManagerPage2.Pinned = Pinned (VB Set property) ...

Copy multiples files to a single file in seperate pages..
Hi, Trying to understand if we have a mechanism to copy multiple files ( txt files ) to a single file (say abc.txt) with each file residing in single page. Each input file is large enough to fit into a single page. I have tried using perl format's like $- and other mechanism in vain. Is there a way to insert a page character after reading each file or seperate each file into different pages? Any suggestions other than adding "\n" is greatly appreciated.. The goal of this exercise is to convert the single file (abc.txt) to postscript file and then to pdf using ps2pdf utility.. ...

UPDATE FROM problem, multiple updates of same row don't seem to work
Here is an example: CREATE TABLE tablea( id int PRIMARY KEY, flag int ); CREATE TABLE tableb( aid int REFERENCES tablea(id), flag int ); INSERT INTO tablea VALUES(1,0); INSERT INTO tablea VALUES(2,0); -- Flags for 1st row of tablea - When ORed, should be 7 INSERT INTO tableb VALUES(1,1); INSERT INTO tableb VALUES(1,2); INSERT INTO tableb VALUES(1,4); -- Flags for 2nd row of tablea - When ORed, should be 5 INSERT INTO tableb VALUES(2,1); INSERT INTO tableb VALUES(2,4); UPDATE tablea SET flag = tablea.flag | tableb.flag FROM tableb WHERE tablea.id = tableb....

[9fans] 6c bug?
for p = uchar*, Nbus==256, if((uint)p[1] >= Nbus){ generates warning: ./mp.c:212 useless or misleading comparison: UCHAR >= 0x100 i'm pretty sure that 6c is incorrectly issuing the diagnostic before applying the cast. (the cast is there to shut the compiler up.) - erik what values of p[1] do you expect the test to be of use? On 28 February 2012 15:40, erik quanstrom <quanstro@quanstro.net> wrote: > for p =3D uchar*, Nbus=3D=3D256, > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((uint)p[1] >=3D= Nbus){ > > generates > > =C2=A0 =...

[9fans] of interest to Seattle 9fans
is there any interest in getting together this afternoon/evening? p.s. i mailed seattle 9fans directly about this on monday, but no replies. ------=_Part_2803_28653563.1189191297765 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm actually pretty busy today/tonight.... On 9/7/07, Skip Tavakkolian <9nut@9netics.com> wrote: > > is there any interest in getting together this afternoon/evening? > > p.s. > i mailed seattle 9fans directly about this on monday, but no replies. > > ------=_Part_2803_286535...

Find common years of data in multiple text files
I have multiple text files that each contain monthly temperature data, spanning several years, for a different US city. I would only like to work with the years of data that are found within all the text files, and eliminate those years that were not documented for all the cities. The first column in each table contains the years, then the next twelve columns contain the monthly temperatures. How could I create a program that finds the years of data that all the cities have in common? I would like to do this so that the code will process the files, regardless of how many files of city temp...

[9fans] too many system calls.
Glibc /bin/date on Linux runs around 140 system calls. A quick pass with ratrace shows that plan 9 /bin/date has 10. The conclusion is clear: plan 9 date has way too much overhead. It's 1/14 the number of system calls of Glibc; why's it so big? A quick pass on getpid() fixes the problem: #include <u.h> #include <libc.h> #include <tos.h> int getpid(void) { return _tos->pid; } Now we're down to seven system calls. 1/20 of glibc. Much better! :-) ron Is ratrace usable on native Plan 9 (I understand it's in use on 9vx thus far)? I...