Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1998:
[Freeciv-Dev] change includes
Home

[Freeciv-Dev] change includes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv-dev mailing list <freeciv-dev@xxxxxxxxxxxx>
Subject: [Freeciv-Dev] change includes
From: Trent Piepho <xyzzy@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Nov 1998 17:04:47 -0800 (PST)

Currently all the freeciv include files are included with <>, rather than "".

I purpose to change this.  This way multiple -I lines won't be needed to
compile the program, and autodependencies can exclude system header files like
they are supposed to.  Does anyone see anything wrong with this?  This is
an example of what I would change the headers too.

Currently:
#include <stdio.h>
#include <stdlib.h>
#include <packets.h>
#include <climisc.h>
#include <game.h>
#include <mapview.h>
#include <mapctrl.h>
#include <map.h>
#include <dialogs.h>
#include <citydlg.h>
#include <repodlgs.h>
#include <xmain.h>
#include <log.h>
#include <meswindlg.h>
#include <chatline.h>
#include <plrdlg.h>
#include <civclient.h>
#include <graphics.h>
#include <menu.h>

Becomes:

#include <stdio.h>
#include <stdlib.h>
#include "common/packets.h"
#include "client/climisc.h"
#include "common/game.h"
#include "client/mapview.h"
#include "client/mapctrl.h"
#include "common/map.h"
#include "client/dialogs.h"
#include "client/citydlg.h"
#include "client/repodlgs.h"
#include "client/xmain.h"
#include "common/log.h"
#include "client/meswindlg.h"
#include "client/chatline.h"
#include "client/plrdlg.h"
#include "client/civclient.h"
#include "client/graphics.h"
#include "client/menu.h"

And to compile either use

gcc <stuff> -I.. -c packhand.c -o packhand.o

or

gcc <stuff> -c client/packhand.c -o client/packhand.o

instead of

gcc <stuff> -I. -I../common packhand.c -o packhand.o

|Gazing up to the breeze of the heavens \ on a quest, meaning, reason  |
|came to be, how it begun \ all alone in the family of the sun         |
|curiosity teasing everyone \ on our home, third stone from the sun.   |
|Trent Piepho (xyzzy@xxxxxxxxxxxxxxxx)                   -- Metallica  |


[Prev in Thread] Current Thread [Next in Thread]