Linux-Development-Apps Digest #326, Volume #7 Tue, 10 Apr 01 20:13:08 EDT Contents: Re: How to detect memory leaks ? ("Hubert") Re: Call To Action: Help me help others. (Jan Atle Ramsli) Re: gcc -ansi option and signals (Raymond Toy) Re: "Linux" Float Point Verification (Raymond Toy) Re: gcc -ansi option and signals (Erik Max Francis) Re: Small Text-based UI Lib for Linux (Dave Blake) Re: Urgent!!! gdm killed mysteriously? (Dave Blake) Installing Linux applications.... !! ("Karim A") Copy-paste operations in X ("Philip Van Hoof") Re: Small Text-based UI Lib for Linux (Grant Edwards) Re: alternatives to 'xfig'? (Scott Johnston) Re: alternatives to 'xfig'? (Grant Edwards) UML (Charles Herman) Re: Installing Linux applications.... !! Re: alternatives to 'xfig'? (Dave Blake) Re: Win Modems ("Alex Collins") Re: Copy-paste operations in X ("Philip Van Hoof") ---------------------------------------------------------------------------- From: "Hubert" <[EMAIL PROTECTED]> Subject: Re: How to detect memory leaks ? Date: Tue, 10 Apr 2001 17:09:32 +0200 "Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Hubert wrote: > > > > I am looking for a tool that helps me detecting memory problems like memory > > leaks. > > Can anybody recommand a tool or library for Linux and C++? > > Others will point you at various ways to do this, I > expect, but there is a simple C++ approach using macros > and placement new: (note that this code is not very > tested ;) ) > Chris, That's a good idea, thank you! I will try this out. Regards Hubert ------------------------------ Date: Tue, 10 Apr 2001 18:28:29 +0200 From: Jan Atle Ramsli <[EMAIL PROTECTED]> Subject: Re: Call To Action: Help me help others. Chris Falch wrote: > I see your point. I'll keep it in mind in the future, but the goal was for > this post to reach as many sets of eyeballs as possible. Well, I am one who sees yours! There is a need for improvement for programmers who are used to pressing [F1] on whatever the cursor is on and instantly get to know everything there is to know about whatever the cursor was on. I wanted to join an XML-related project, but realized it was not about improving the man-pages. I guess the man pages date back to when 'libc' was the entire lib, or just about, and whatever else was 'commands'. My first Unix-like system was Xenix-286, that one ran on 1Mb Ram (@Mb recommended) and 30Mb harddisk, so it was about the size as DOS would have been, had it been ported to the 286 or 386. I guess the whole thing needs to be studied first: It is obvious what 'help' means in such a small system, but what about now? Help must become context sensitive in a new way - it must know what 'kind' of help you are most likely to want. If you are editing a C-file and press [F1] - the biggest chance is that you want help as mentioned above. If you are editing a HTML-file, you want to know about HTML, and so on. Each library should have a companion help file, so when you include the library in your project (or should the Makefile or autoconf-files be parsed?) - hitting [F1] will include that help file in the top level hierarchy. ... is this somewhere along the lines you were thinking? Atle ------------------------------ From: Raymond Toy <[EMAIL PROTECTED]> Subject: Re: gcc -ansi option and signals Date: 10 Apr 2001 11:45:57 -0400 >>>>> "Erik" == Erik Max Francis <[EMAIL PROTECTED]> writes: Erik> Neoklis wrote: >> When I use the -ansi option with gcc, I get error messages relating to >> variables and functions I use for signal handling, e.g. with: Erik> ... >> struct sigaction sa_new, etc; Erik> ... >> I get messages like ..storage size of sa_new not known.. and >> ..implicit declaration of function sigaction.. >> >> Without the -ansi option the source compiles and runs with no >> problems. >> Am I to presume that this type of signal handling is not compatible >> with ansi C or perhaps there is a problem with header files? Erik> The former. sigaction is POSIX, but not ANSI C. What makes it not compilable in ANSI C? Ray ------------------------------ From: Raymond Toy <[EMAIL PROTECTED]> Subject: Re: "Linux" Float Point Verification Date: 10 Apr 2001 11:46:58 -0400 >>>>> "Albert" == Albert Herman <[EMAIL PROTECTED]> writes: Albert> My companies management is more than a bit nervous about using Linux for Albert> floating point computational purposes. I'm working to mitigate their Albert> concerns. I plan to port to Solaris/Sparc (know about SparcIII problems) to What Sparc III problems are you talking about here? I'm curious. Ray ------------------------------ From: Erik Max Francis <[EMAIL PROTECTED]> Subject: Re: gcc -ansi option and signals Date: Tue, 10 Apr 2001 09:08:43 -0700 Raymond Toy wrote: > Erik> The former. sigaction is POSIX, but not ANSI C. > > What makes it not compilable in ANSI C? Because sigaction is not defined by ANSI C. The ANSI C signal mechanism is the old POSIX signal. -- Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/ __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE / \ The public is a fool. \__/ Alexander Pope Erik Max Francis' bookmarks / http://www.alcyone.com/max/links/ A highly categorized list of Web links. ------------------------------ From: [EMAIL PROTECTED] (Dave Blake) Subject: Re: Small Text-based UI Lib for Linux Date: 10 Apr 2001 17:33:14 GMT Reply-To: [EMAIL PROTECTED] Grant Edwards <[EMAIL PROTECTED]> wrote: > Dave Blake wrote: > >Termcap is the smallest. Some older vi versions use it, and > >microemacs uses it (see > >http://www.kernel.org/pub/linux/kernel/uemacs/) > > I don't think I'd consider termcap a "user interface" library > comprable to slang/newt or curses/cdk. The former only > provide very low level API to move the cursor around and > suchlike. The latter provide high-level widgets like menus, > radio-buttons, trees, text-entry, etc. Termcap (for example) > would be the layer below curses, not an alternative to curses > -- and certainly not an alternative to the next layer up such > as cdk. Of course. -rwxr-xr-x 1 root root 15129 Aug 16 1999 /lib/libtermcap.so.2.0.8 -rwxr-xr-x 1 root root 269580 Apr 6 1999 /usr/lib/libncurses.so.4.2 -rw-r--r-- 1 root root 402490 Aug 21 2000 /usr/lib/libslang.so.1.4.2 -rwxr-xr-x 1 root root 53447 Apr 9 1999 /usr/lib/libnewt.so.0.40 ldd /usr/lib/libnewt.so.0.40 libslang.so.1 => /usr/lib/libslang.so.1 (0x40017000) libm.so.6 => /lib/libm.so.6 (0x40077000) libc.so.6 => /lib/libc.so.6 (0x40094000) libdl.so.2 => /lib/libdl.so.2 (0x40189000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000) ====================================================== Termcap provides a reasonable user inferface for simple things of the sort one would expect from a very stripped down distribution. It is 15k, compared with ncurses: 269k slang: 402k newt: 402k + 53k = 455k I gave as an example microemacs, which can do nearly all the text editing functions of emacs, but is under 100k in size, plus the dynamic link to termcap. If I recall correctly, the original post queried about a console user interface library suitable for a tiny distribution like a root/boot disk. Termcap is the only thing that fits the bill. I also question your assertion that termcap is a layer underneath ncurses or slang. Both slang and ncurses are enlightened enough to use the terminfo interface for terminal info. Termcap parses the text file /etc/termcap, and is much less robust. The original post also asked about C++ libs. If I had to choose one to program, I have experience with termcap and ncurses, and I find ncurses to be quite nice for programming. Slang is supposed to be similarly nice. However, if size was VERY important, I would choose termcap. -- Dave Blake [EMAIL PROTECTED] ------------------------------ From: [EMAIL PROTECTED] (Dave Blake) Subject: Re: Urgent!!! gdm killed mysteriously? Date: 10 Apr 2001 17:36:02 GMT Reply-To: [EMAIL PROTECTED] Crystal Luo <[EMAIL PROTECTED]> wrote: > Dear Eric, > > Forgive my ignorance, I am a beginner. How to boot into single > user mode and disable gdm? Thank you so much. To disable gdm on a redhat system, do the following. 1. Edit /etc/inittab Delete the last line, x:5:respawn:/etc/X11/prefdm -nodaemon 2. cd /etc/rc.d/ ls -l rc[23456].d/S*gdm rm rc[23456].d/S*gdm Then fix X manually, and re-enable gdm once finished. -- Dave Blake [EMAIL PROTECTED] ------------------------------ From: "Karim A" <[EMAIL PROTECTED]> Subject: Installing Linux applications.... !! Date: Tue, 10 Apr 2001 21:38:16 +0200 Hi all, I've developped an application for Linux under Gnome env. Now I'd like to provide users a script to install it. But I'm not "very" experienced with scripting. I've always developped under Windwos and I don't know if it exist install tools for Linux such like InstallShield. In fact, I'd like to know how to set permanently env variables in .xxxRC files. I alwas get permissions errors etc. So, does anyone knows where I can find tutorials about writing install scripts, setting up env variables etc... Thanks a lot. Regards, Karim ------------------------------ From: "Philip Van Hoof" <[EMAIL PROTECTED]> Subject: Copy-paste operations in X Reply-To: [EMAIL PROTECTED] Date: Tue, 10 Apr 2001 20:03:14 GMT Hi there, I am trying to make an application that needs the information that is in the copypaste buffer of X (the selection). Using the examples of this little document I can already do all this but only using pure X apps. So not when the app uses gtk or KDE libraries.. Also browsers like netscape and mozilla dont work with these examples.. --> http://www.enfin.com/getweb/X-copy+paste.txt So, These examples will printf() the selected text.. but only when it's a pure X application like xterm. My question.. Is there a general way.. a solution that can works with all Windowmanagers.. Or what are the solutions for Gtk clients? What for KDE ? This is all so confusing.. why isn't there a standard defined for this? If this is where Linux/unix/posix development is heading to.. then we are all doomed since not ONE single desktop programmer wants to learn specifications for ALL managers and librabries.. However.. I belive that there is a solution for this since all gtk and kde applications/objects can get the selection (copypaste buffer) from other applications. Only..it seems to be that the code to do this is hidden somewhere in the gtk and qt libs .. and noway that I am planning to dig out 100 000 rules of code in gtk+ just to know how to do this manually :-( My primary target is to 'get' the selected text. Once that works I also want to 'set' the buffer.. I think this can't be hard because you can 'select' text in objects like the gtk_entry and gtk_text... Well I think you can.. again "hidden" and hard to find documentation about this... :( -- Philip van Hoof aka freax (http://www.freax.eu.org) irc: irc.openprojects.net mailto:freax @ pandora.be ------------------------------ From: [EMAIL PROTECTED] (Grant Edwards) Subject: Re: Small Text-based UI Lib for Linux Date: Tue, 10 Apr 2001 20:23:02 GMT In article <[EMAIL PROTECTED]>, Dave Blake wrote: >> >Termcap is the smallest. Some older vi versions use it, and >> >microemacs uses it (see >> >http://www.kernel.org/pub/linux/kernel/uemacs/) >> >> I don't think I'd consider termcap a "user interface" library >> comprable to slang/newt or curses/cdk. The former only provide >> very low level API to move the cursor around and suchlike. The >> latter provide high-level widgets like menus, radio-buttons, >> trees, text-entry, etc. Termcap (for example) would be the >> layer below curses, not an alternative to curses -- and >> certainly not an alternative to the next layer up such as cdk. > >Of course. >Termcap provides a reasonable user inferface for simple things >of the sort one would expect from a very stripped down >distribution. > >It is 15k, compared with >ncurses: 269k I still don't think comparing ncurses with termcap is a meaningful thing to do. ncurses provides a complete windowing environment. Termcap just lets you manipulate the terminal at the lowest level. The OP asked for a user-interface library. Providing a function to move the cursor and clear the screen doesn't really compare with providing windows and widgets. If all you have room for is termcap, then that's what you have to use, but you'll have to write your widgets from scratch. -- Grant Edwards grante Yow! HUMAN REPLICAS are at inserted into VATS of visi.com NUTRITIONAL YEAST... ------------------------------ From: Scott Johnston <[EMAIL PROTECTED]> Subject: Re: alternatives to 'xfig'? Date: Wed, 11 Apr 2001 03:53:29 -0700 [EMAIL PROTECTED] wrote: > hi > > i was wondering if there are any > alternatives to 'xfig' under linux > that will let me draw stuff? > > thanks. Check out the vector graphic editors at http://sourceforge.net/foundry/vectorgraphics Scott Johnston ------------------------------ From: [EMAIL PROTECTED] (Grant Edwards) Subject: Re: alternatives to 'xfig'? Date: Tue, 10 Apr 2001 20:54:34 GMT In article <99dhvn$jql$[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: >i was wondering if there are any >alternatives to 'xfig' under linux >that will let me draw stuff? I switched from xfig to sketch: http://sketch.sourceforge.net/ -- Grant Edwards grante Yow! Are we live or at on tape? visi.com ------------------------------ From: Charles Herman <[EMAIL PROTECTED]> Subject: UML Date: 10 Apr 2001 21:12:07 GMT What are the UML tools available for Linux. Along with a list of the tools, I am looking for a description of the pros and cons of each tool. All information will be mightily appreciated. -charles ------------------------------ From: [EMAIL PROTECTED] () Crossposted-To: comp.os.linux.development.system Subject: Re: Installing Linux applications.... !! Date: Tue, 10 Apr 2001 22:05:30 -0000 In article <9avnma$1qq$[EMAIL PROTECTED]>, Karim A <[EMAIL PROTECTED]> wrote: >I've developped an application for Linux under Gnome env. >Now I'd like to provide users a script to install it. >But I'm not "very" experienced with scripting. >I've always developped under Windwos and I don't know if it exist install >tools for Linux such like InstallShield. > >In fact, I'd like to know how to set permanently env variables in .xxxRC >files. I alwas get permissions errors etc. > >So, does anyone knows where I can find tutorials about writing install >scripts, setting up env variables etc... A good place to start would be the rpm howto document. -- http://www.spinics.net/linux/ ------------------------------ From: [EMAIL PROTECTED] (Dave Blake) Subject: Re: alternatives to 'xfig'? Date: 10 Apr 2001 21:52:25 GMT Reply-To: [EMAIL PROTECTED] Scott Johnston <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > hi > > > > i was wondering if there are any > > alternatives to 'xfig' under linux > > that will let me draw stuff? > > > > thanks. > > Check out the vector graphic editors at > http://sourceforge.net/foundry/vectorgraphics Postscript is a VERY easy language in which to program graphics. I am always STUNNED that people would rather use a primitive inflexible interface for drawing instead of completely specifying the graphics in postscript. But, to each his own, I guess. -- Dave Blake [EMAIL PROTECTED] ------------------------------ From: "Alex Collins" <[EMAIL PROTECTED]> Subject: Re: Win Modems Date: Wed, 11 Apr 2001 00:24:48 +0100 I dont know why you seem to have such problems with lucent based win-modems... mine works just dandy on a P75 and has a connection up without probs for the entire 2hrs allowed by my isp... and i d/l over 800M / mo on it... and all this whilst acting as a proxy, and router... "Michael Meissner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Johan Kullstam <[EMAIL PROTECTED]> writes: > > > "LittleFish" <littlefish_au[SPAM ME AT YOUR OWN RISK]@yahoo.com> writes: > > > > > It seems as if more and more people using Windows > > > are very dissapointed over the performance of there Lucent Winmodems. In the > > > last week I have met 3 people that have taken back there Lucent Winmodem > > > because it drops out regularly. If your machine is slower 300Mhz or is > > > running a CPU intensive task in the background you can bet that it will drop > > > out. Give me a real modem anyday!! By the way real internal modems are > > > getting hard to source. Does anyone have suggestions for a Internal Fax > > > Voice Data modem? > > > > one word _EXTERNAL_. yes, i know you said internal but why not expand > > your possibilities? since most mice these days are ps/2 or usb, you > > probably have nothing on your rs232 ports. why not use it? > > Some machines don't have serial ports. Some of us already have too many other > things on our serial ports (on my system, I have a ups, an X-10 controller, a > Palm hot-sync cradle, and the embedded board I'm currently testing). > > -- > Michael Meissner, Red Hat, Inc. (GCC group) > PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA > Work: [EMAIL PROTECTED] phone: +1 978-486-9304 > Non-work: [EMAIL PROTECTED] fax: +1 978-692-4482 ------------------------------ From: "Philip Van Hoof" <[EMAIL PROTECTED]> Subject: Re: Copy-paste operations in X Reply-To: [EMAIL PROTECTED] Date: Tue, 10 Apr 2001 23:51:36 GMT This is some information that I've found myself so far I havn't got it working.. http://developer.gnome.org/doc/API/gtk/gtk-selections.html http://developer.gnome.org/doc/API/2.0/gtk/gtk-clipboards.html Using this .... GtkClipboard *clipb; clipb = gtk_clipboard_get(GDK_NONE); /* GDK_SELECTION_PRIMARY */ g_warning("text %s", gtk_clipboard_wait_for_text(clipb)); .... I get [root@freax src]# make gcc -DDEBUG -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I/usr/lib/glib/include -I/usr/X11R6/include -g -O2 -Wall -c callbacks.c In file included from callbacks.c:11: netcode.c: In function `get_string': netcode.c:29: warning: function returns address of local variable callbacks.c: In function `on_button_set_clicked': callbacks.c:21: `GtkClipboard' undeclared (first use in this function) callbacks.c:21: (Each undeclared identifier is reported only once callbacks.c:21: for each function it appears in.) callbacks.c:21: `clip' undeclared (first use in this function) callbacks.c:21: warning: statement with no effect callbacks.c:42: `clipb' undeclared (first use in this function) callbacks.c:42: warning: implicit declaration of function `gtk_clipboard_get' callbacks.c:43: warning: implicit declaration of function `gtk_clipboard_wait_for_text' callbacks.c:43: warning: format argument is not a pointer (arg 4) callbacks.c:20: warning: unused variable `selection' make: *** [callbacks.o] Error 1 [root@freax src]# btw .. I am indeed using glade.. and I am calling this code in a file which contains #include <gtk/gtk.h> in a function called void on_button_set_clicked (GtkButton *button, gpointer user_data) { ... } The application compiled (without this code of course) and it's a working gtk application. So yes :) I did not forget includes and etc etc.. -- Philip van Hoof aka freax (http://www.freax.eu.org) irc: irc.openprojects.net mailto:freax @ pandora.be ------------------------------ ** FOR YOUR REFERENCE ** The service address, to which questions about the list itself and requests to be added to or deleted from it should be directed, is: Internet: [EMAIL PROTECTED] You can send mail to the entire list by posting to the comp.os.linux.development.apps newsgroup. Linux may be obtained via one of these FTP sites: ftp.funet.fi pub/Linux tsx-11.mit.edu pub/linux sunsite.unc.edu pub/Linux End of Linux-Development-Apps Digest ******************************