Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068)
Home

[Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx, Freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068)
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Tue, 4 Dec 2001 19:50:06 +0100

Dear diary, on Tue, Dec 04, 2001 at 07:37:25PM CET, I got a letter,
where Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> told me, that...
> > Separation between parts of the code. Each part (AI, server, gotohand
> > in this example) have a clean interface which is exposed. And a global
> > warmap variable isn't a clean interface as may already known.
> 
> agreed
agreed

> > > No I want runtime info.  You see warmap is generated once and then used
> > > all over and then once again generated and many times used...  I want to
> > > know which access corresponds to which generation.
> > 
> > You can do a search-and-replace and replace "warmap\.(sea)?cost[.*?][.*?]"
> > with "get_warmap(\1,\2,\3)".
> 
> suppose I write a get_warmap_cost function what I don't know how to do is to
> print the file:line info of the code that called get_warmap_cost
#define get_warmap_cost(x,y) do { freelog(..,__FILE__,__LINE__); 
get_warmap_cost(x,y); } while (0);
?

-- 

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC, FreeCiv hacking
.
  "A common mistake that people make, when trying to design
   something completely foolproof is to underestimate the
   ingenuity of complete fools."
     -- Douglas Adams in Mostly Harmless
.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/


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