Re: multi stack question/grumble

2003-06-30 Thread Benjamin Goldberg
Dave Whipp wrote: > Matt Fowles >> Were this C++ I would say that we could write a single general >> purpose stack and use template meta-programming to avoid the >> overhead. Is there a similar solution available in C? >> >> My instincts tell me that this solution will be dirty to the tune of >> m

Re: multi stack question/grumble

2003-06-27 Thread Leopold Toetsch
Dave Whipp <[EMAIL PROTECTED]> wrote: > C does do templates, sort-of: > #define STACK_TYPE int > #define STACK_MAX_SIZE 1024 > #include stack_template_decl.h > #include stack_template_impl.h > #undef STACK_TYPE > #undef STACK_MAX_SIZE > There can be some issues debugging this stuff though: And

Re: multi stack question/grumble

2003-06-27 Thread Dave Whipp
"Matt Fowles" <[EMAIL PROTECTED]> > Were this C++ I would say that we could write a single general purpose > stack and use template meta-programming to avoid the overhead. Is there > a similar solution available in C? > > My instincts tell me that this solution will be dirty to the tune of > massi

multi stack question/grumble

2003-06-26 Thread Matt Fowles
Leopold Toetsch wrote: ( /me again mumbling why we have 6 different stack implementations with a lot of duplicate code. One general stack with different sized data items would do it too - with some overhead ;-) Were this C++ I would say that we could write a single general purpose stack and use te