[CSOUND-DEV:3564] cs.h change proposition
Date | 2003-11-27 22:01 |
From | stevenyi |
Subject | [CSOUND-DEV:3564] cs.h change proposition |
Hi all, Would anyone mind if I move everything but the define macros in cs.h out to another file and have cs.h include that one? The macros are *really* screwing me up on trying to get csound.c up to date with the batch of changes jpff checked in and plus they generally screw me up anyways as I never know if I'm *really* calling what I think I'm calling or not. This might be a good way to transition from using macros to not using macros over time, by using the macro's with cs.h as-is(what's going on now), moving most of the stuff to another header ("core_cs.h" or something more appropriately self-descriptive), and gradually moving over files from using cs.h to the non-macro header. Thanks, steven |
Date | 2003-11-28 04:19 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:3567] Re: cs.h change proposition |
stevenyi |
Date | 2003-11-28 06:36 |
From | John ffitch |
Subject | [CSOUND-DEV:3570] Re: cs.h change proposition |
Do it (move macros out of cs.h). It was extremely useful to have it in teh same place while I was identifying the data items that needed to be in the structure. I am hoping that they have all been identified now. About ENVIRON I am happier with shorter words as it allows readable layout. I did not like GLOBALS as they are not -- they were originally as it was a repository of all the non-local variables I could find. I believe that the plugijns are now all re-entrant. Next stage is to do the same to the stuff in OOps (which incidentally shoudl be called OLD_OPCODES_WITH_HAVE_NOT_BEEN_RE_WRITTEN_AS_PLUGINS, but that seems a little long. And of course to look at the same in Engine, which could be fun. Really I would much prefer to get back to the parser. ==John ff |
Date | 2003-11-28 18:21 |
From | stevenyi |
Subject | [CSOUND-DEV:3575] Re: cs.h change proposition |
On Thu, 2003-11-27 at 22:36, John ffitch wrote: > Do it (move macros out of cs.h). It was extremely useful to have it in > teh same place while I was identifying the data items that needed to be in > the structure. I am hoping that they have all been identified now. I was actually going to move everything *but* the macros out of cs.h, so that everything continues to function without problem. I can also remove using macros altogether (find/replace to swap what the macros are doing). Which were you implying? (I'm going for the first option now, as this won't break anything anyone else is doing) > > About ENVIRON I am happier with shorter words as it allows readable > layout. I did not like GLOBALS as they are not -- they were originally as > it was a repository of all the non-local variables I could find. I > believe that the plugijns are now all re-entrant. Next stage is to do the > same to the stuff in OOps (which incidentally shoudl be called > OLD_OPCODES_WITH_HAVE_NOT_BEEN_RE_WRITTEN_AS_PLUGINS, but that seems a > little long. And of course to look at the same in Engine, which could be > fun. Well, there's got to be some balance between geography of code on the screen and how much to shorten the naming of variable names, as they both contribute to legible code. I'm all for as short and simple a name as possible, but no shorter. I am of the opinion that ENVIRON was a little *too* short a name. ENVIRON also will be public to opcode plugin developers and will inevitably be found all over the source code tree, so if any variable name should have a clear, identifiable name, it'd have to be this one. BTW: It's funny you should use OOps as an example as I had *NO* idea what OOps meant when I first came across it in the Csound5 cvs. Also took quite some time to figure out csdl.h was meant for opcode plugins. More commenting of the code can help alleviate these kinds of confusions, but self-descriptive naming is better I think. Thanks, steven |
Date | 2003-11-29 13:07 |
From | jpff@codemist.co.uk |
Subject | [CSOUND-DEV:3580] Re: cs.h change proposition |
If you move everything out of cs.h how am I supposed to compile my code? ==John ffitch |
Date | 2003-11-29 14:15 |
From | stevenyi |
Subject | [CSOUND-DEV:3582] Re: cs.h change proposition |
Your code should compile without problem because cs.h #includes the newly extracted header file. steven On Sat, 2003-11-29 at 05:07, jpff@codemist.co.uk wrote: > If you move everything out of cs.h how am I supposed to compile my code? > ==John ffitch > > |