Re: Ideas to organize informix's programs
Posted in 1998
In article <34b6f3d2.4313441@166.66.1.61>, =?iso- 8859-1?q?Manel_Falc=F3?= <manel@semic.es> writes >Hi all, >How do you organize yours informix's programs ? Varies, in my first job we had one large executable, we have >200 small executables. I prefer one large one, this tends to make people used library functions more often. Also the Informix libraries only get linked in once saved disk space and memory. >Do you have lots of little executables (I use RDS) or some huge ones ? >Do you usually use the command "run" to call the programs ? if so, is >it not a charge to the system (many proces, memory .. .) Yes and it does take more memory and disk space. I'd go with the one large executable. >Do you have any useful tool to structure your options' programs ? > >I want to make an utility to structure my programs. The options would >be organized by tables of menus. Users would be able to organize their >own menus themselves. So I need to an informix function on execution >time !!. We have menus where the menu hold the name of a program to run. >Is there a way to call informix's functions by a pointer ? in C ? Look into shared libraryes and the dlopen(),dlsym() and dlclose() functions. Basically each menu option should bave one shared library assocaited with it. Each shared library should have one 'main' function called FN_main() which takes no parameters and returns nothing. Then use dlopen() to open the shared library, dlsym(...,"FN_main") to get a pointer to the function and dlclose() to close the shared library when you return to the menu. > >Thanks in advance. > >Ciao, > > Manel > >----------------------------------------------------- >SEMIC, S.A. >Lleida (Catalunya) >Spain >----------------------------------------------------- >Informix version: Informix SE 5.07 / RDS 4.x >Operating system: Unix SCO V 5.04 > -- David Williams Maintainer of the Informix FAQ Primary site (Beta Version) http://www.smooth1.demon.co.uk Official site http://www.iiug.org/techinfo/faq/faq_top.html I see you standin', Standin' on your own, It's such a lonely place for you, For you to be If you need a shoulder, Or if you need a friend, I'll be here standing, Until the bitter end... So don't chastise me Or think I, I mean you harm... All I ever wanted Was for you To know that I care