IRC logs for #opendune on OFTC at 2009-12-06
⏴ go to previous day
02:23:25 *** kimico has joined #openDune
02:24:39 *** kimico_ has joined #openDune
07:42:36 *** planetmaker has joined #openDune
07:42:36 *** blathijs has joined #openDune
07:42:36 *** joule.oftc.net sets mode: +vvvv SmatZ tneo planetmaker blathijs
07:42:36 *** boekabart has joined #openDune
07:42:36 *** TrueBrain has joined #openDune
07:42:36 *** Xaroth has joined #openDune
07:42:36 *** joule.oftc.net sets mode: +voov boekabart TrueBrain Xaroth Xaroth
07:42:36 *** TinoDidriksen has joined #openDune
07:42:36 *** proyvind has joined #openDune
07:42:36 *** joule.oftc.net sets mode: +vvv nsz TinoDidriksen proyvind
17:26:53 <glx> hmm I think I'll try to convert emu_Config functions, but I don't know if I should use new files for that
20:49:08 <TrueBrain> when in doubt, you should not be in doubt
22:34:28 <DorpsGek> SVN: glx (r680) -Fix: missing $Id$ in os headers
23:01:47 <glx> I decided to use new files :)
23:02:18 <glx> because options can go in it too
23:13:30 <Xaroth> name = (char*)alloca(strlen(filename) + 6);
23:13:45 <Xaroth> or is that for a terminator char?
23:14:13 * Xaroth is spoiled with .net :P
23:17:18 <Xaroth> that whole freading right into a struct will take some getting used to i think..
23:24:10 <Xaroth> I am quite glad tho, that I can just google a function (like alloca ) and actually get sane results from multiple sites :)
23:25:33 <Xaroth> google has 'codesearch' ?
23:35:43 <TrueBrain> glx: 'char *', not 'char*'
23:35:59 <TrueBrain> can you make "data/" a #define?
23:36:07 <TrueBrain> so we can find them back later ;)
23:36:29 <TrueBrain> the space error in * usage happens often
23:36:36 <TrueBrain> char* is wrong. 'char *' is correct
23:36:45 <TrueBrain> 'uint8*' is wrong. 'uint8 *' is correct
23:37:04 <Xaroth> seeing i got tomorrow off from work anyhow
23:37:13 <TrueBrain> return sum == config->checksum; <- please add () around it :)
23:37:19 <Xaroth> time to work on random functions
23:37:20 <glx> so all my casts are "wrong"
23:37:33 <TrueBrain> well, the coding style specifies the need for a space, so I guess :)
23:38:00 <glx> hmm where to put the define
23:38:06 <TrueBrain> can you make the DuneCfg struct doxygen comment something more clear? It no longer is important it is part of the GlobalData :p
23:38:12 <TrueBrain> which was in fact just a placeholder for me :)
23:38:18 <TrueBrain> glx: no idea .. in config.h? :p
23:38:27 <TrueBrain> I guess we have to find a nice place for it some day ..
23:39:18 <TrueBrain> the rest looks fine by me
23:39:36 <TrueBrain> clear, simple, to the point ..
23:39:56 <TrueBrain> hmm .. how does it 'decode' the config? It only checksums it, right?
23:40:40 <glx> can you check if os/alloc.h works for you ?
23:40:51 <TrueBrain> 'language' is not CRC checked? :)
23:41:15 <TrueBrain> patched failed against HEAD
23:43:00 <TrueBrain> src/config.c:26: warning: implicit declaration of function 'alloca'
23:43:09 <TrueBrain> and worse: /prog/opendune/trunk/src/config.c:26: undefined reference to `alloca'
23:43:41 <TrueBrain> it is a GNU, BSD or MISC extension
23:44:07 <glx> man alloca says it's in stdlib.h (but that's all I checked)
23:44:18 <TrueBrain> man alloca here says it is in alloca.h
23:44:40 <TrueBrain> starting the app fails btw
23:44:52 <Xaroth> man alloca sais I don't have a manual for it here :/
23:45:00 <TrueBrain> glx: don't forget to lowercase filenames!
23:45:17 <glx> oh silly filename case :)
23:46:27 <TrueBrain> with that correction, it doesn't start a gfx :s (no error)
23:47:47 <TrueBrain> tcc doesn't know alloca
23:47:51 <TrueBrain> can you solve it differently?
23:48:05 <TrueBrain> given the 8.3 nature, I guess 6 + 8 + 3 + 1 should be sufficient
23:48:14 <glx> I can use a fixed size array yes
23:49:24 <TrueBrain> k. something in your patch breaks my gfx display
23:50:08 <TrueBrain> glx: alloca is not C89, so yes, static arrays would be better :)
23:50:32 <glx> grr strlwr is not known by mingw
23:51:41 <TrueBrain> glx: maybe we need a fopen wrapper, which adds 'data/' to it and makes it lowercase
23:51:45 <TrueBrain> for future extension
23:52:03 <TrueBrain> strlwr doesn't exist here
23:52:19 <glx> yes MSVC specific it seems
23:52:33 <glx> though dune2 use it internally :)
23:52:45 <Xaroth> right, i'm not going to mess with file crap before i break stuff :P
23:53:18 <Xaroth> it's like 'ooh how hard can truncate be' at start
23:53:26 <Xaroth> then it's like 'holy fuck there's 300 ways to do this'
23:53:40 <TrueBrain> glx: yes, we really do need a file.c or fileio.c or fios.c or what ever :p But that can be add after your patch I guess :)
23:54:06 <TrueBrain> later on we want to add search paths, for sure we don't want to keep on doing 'tolower' shit (but just use lowercase names in the first place), ..
23:54:34 <TrueBrain> well .. talking about that ... you can do the strtolower in the emu layer I guess ;)
23:54:52 <TrueBrain> then I guess it is okay to use fopen .. later on we can generalize that ..
23:55:11 <TrueBrain> doesn't remove the problem of adding 'data/' in front of it ..
23:55:22 <TrueBrain> maybe also something for the emu_ layer for now ...
23:55:57 <TrueBrain> maybe a small function for now: 'make-this-filename-compatible-with-current-shit' :p
23:56:17 <Xaroth> i vote yes for that function name
23:56:20 <TrueBrain> although I guess the need for 'data/' will always stay there
23:56:29 <TrueBrain> I like that in OpenTTD .. :)
23:56:51 <TrueBrain> although one can debate if a config file should be there :p
23:57:02 <TrueBrain> blabla .. thinking too far ahead :p
23:57:23 <TrueBrain> glx: I suggest to put the tolower in the emu_ layer, and adding 'data/' in the non-emu
23:57:35 <TrueBrain> (or one of you need to have a much better idea, which shouldn't be too hard :p)
23:58:19 <Xaroth> don't look at me, i'm still plowing through all the f<stuff> functions and their use/purpose
23:59:15 <TrueBrain> Xaroth: you know that all non-named functions start with a f, right? :p Haha :)
23:59:52 <Xaroth> you know what I mean :P
continue to next day ⏵