AsM0DeUz
Messages postés19Date d'inscriptionjeudi 17 août 2006StatutMembreDernière intervention 4 février 2009
-
4 févr. 2009 à 15:26
SAKingdom
Messages postés3212Date d'inscriptionlundi 7 novembre 2005StatutMembreDernière intervention16 février 2009
-
5 févr. 2009 à 01:55
Bonjour,
Je suis en train d'essayer de comprendre un code mais je coince sur ceci :
Dans le code ci-dessous, que fait le #define PROFILE(x) ? un define doit avoir 2 arguments non ?
D'apres ce que je comprend, les lignes où apparaissent le PROFILE vont tout simplement disparaitre => quel est leur utilité ?
Merci d'avance
179 #define PROFILE(x)
180
181
182 /* Init sockets, run game, and cleanup sockets */
183 int run_the_game(int port)
184 {
185 int s;
186 PROFILE(extern etext();)
187
188 void signal_setup(void);
189 int load(void);
190 void coma(void);
191
192 PROFILE(monstartup((int) 2, etext);)
193
194 descriptor_list = NULL;
195
196 log("Signal trapping.");
197 signal_setup();
198
199 log("Opening mother connection.");
200 s = init_socket(port);
201
202 if (lawful && load() >= 6)
203 {
204 log("System load too high at startup.");
205 coma();
206 }
207
208 boot_db();
209
210 log("Entering game loop.");
211
212 game_loop(s);
213
214 close_sockets(s);
215
216 PROFILE(monitor(0);)
217
218 if (reboot)
219 {
220 log("Rebooting.");
221 exit(52); /* what's so great about HHGTTG, anyhow? */
222 }
223
224 log("Normal termination of game.");
225 }