From j.krinke at gmx.de Wed Jan 7 10:11:42 2004 From: j.krinke at gmx.de (Jens Krinke) Date: Wed Mar 22 17:10:22 2006 Subject: [splint-discuss] (sp)lint book chapter Message-ID: <3FFC21AE.8070904@gmx.de> Hi, the 2nd edition of the german book "open source programming tools" has a new chapter about splint. The book is now being translated and for that reason we are looking for a native speaker who would be interested to read (and comment) the splint chapter before publication. Please contact me if you are interested. Regards, Jens Krinke From roland.illig at gmx.de Wed Jan 7 15:44:14 2004 From: roland.illig at gmx.de (Roland Illig) Date: Wed Mar 22 17:10:23 2006 Subject: [splint-discuss] (sp)lint book chapter In-Reply-To: <3FFC21AE.8070904@gmx.de> References: <3FFC21AE.8070904@gmx.de> Message-ID: <20040107204414.GA1224@roland-illig.de> On Wed, Jan 07, 2004 at 04:11:42PM +0100, Jens Krinke wrote: > Hi, > > the 2nd edition of the german book "open source programming tools" has a > new chapter about splint. The book is now being translated and for that > reason we are looking for a native speaker who would be interested to > read (and comment) the splint chapter before publication. Please > contact me if you are interested. I'd like to. But you should be aware that I will read it in +strict mode. :) Roland From shenj at neusoft.com Wed Jan 7 19:13:10 2004 From: shenj at neusoft.com (shenj) Date: Wed Mar 22 17:10:23 2006 Subject: [splint-discuss] =?gb2312?B?tPC4tDogW3NwbGludC1kaXNjdXNzXSAoc3ApbGludCBib29rIGNoYXB0ZXI=?= In-Reply-To: <3FFC21AE.8070904@gmx.de> Message-ID: <012c01c3d57c$330b37a0$3002010a@sj> I'd like to, please send to me about it, thanks. shenjian -----邮件原件----- 发件人: splint-discuss-admin@cs.virginia.edu [mailto:splint-discuss-admin@cs.virginia.edu] 代表 Jens Krinke 发送时间: 2004年1月7日 23:12 收件人: splint-discuss@cs.virginia.edu 主题: [splint-discuss] (sp)lint book chapter Hi, the 2nd edition of the german book "open source programming tools" has a new chapter about splint. The book is now being translated and for that reason we are looking for a native speaker who would be interested to read (and comment) the splint chapter before publication. Please contact me if you are interested. Regards, Jens Krinke _______________________________________________ splint-discuss mailing list splint-discuss@cs.virginia.edu http://www.splint.org/mailman/listinfo/splint-discuss From mne at mosaic-ag.com Thu Jan 8 02:17:54 2004 From: mne at mosaic-ag.com (Miroslaw Dobrzanski-Neumann) Date: Wed Mar 22 17:10:23 2006 Subject: [splint-discuss] (sp)lint book chapter In-Reply-To: <3FFC21AE.8070904@gmx.de> References: <3FFC21AE.8070904@gmx.de> Message-ID: <20040108071754.GA1549@mailsrv.mosaic-ag.com> I'd like to. Regards Miros?aw On Wed, Jan 07, 2004 at 04:11:42PM +0100, Jens Krinke wrote: > Hi, > > the 2nd edition of the german book "open source programming tools" has a > new chapter about splint. The book is now being translated and for that > reason we are looking for a native speaker who would be interested to > read (and comment) the splint chapter before publication. Please > contact me if you are interested. > > Regards, > Jens Krinke > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > -- Miros?aw Dobrza?ski-Neumann E-mail: mne@mosaic-ag.com This message is utf-8 encoded From zhou.jun_xj at zte.com.cn Thu Jan 8 19:24:58 2004 From: zhou.jun_xj at zte.com.cn (zhou.jun_xj@zte.com.cn) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] I'd like to. Message-ID: splint-discuss-request@cs.virginia.edu 发件人: splint-discuss-admin@cs.virginia.edu 2004-01-09 01:00 请答复 给 splint-discuss 收件人: splint-discuss@cs.virginia.edu 抄送: 主题: splint-discuss digest, Vol 1 #131 - 4 msgs Send splint-discuss mailing list submissions to splint-discuss@cs.virginia.edu To subscribe or unsubscribe via the World Wide Web, visit http://www.splint.org/mailman/listinfo/splint-discuss or, via email, send a message with subject or body 'help' to splint-discuss-request@cs.virginia.edu You can reach the person managing the list at splint-discuss-admin@cs.virginia.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of splint-discuss digest..." Today's Topics: 1. (sp)lint book chapter (Jens Krinke) 2. Re: (sp)lint book chapter (Roland Illig) 3. =?gb2312?B?tPC4tDogW3NwbGludC1kaXNjdXNzXSAoc3ApbGludCBib29rIGNoYXB0ZXI=?= (shenj) 4. Re: (sp)lint book chapter (Miroslaw Dobrzanski-Neumann) --__--__-- Message: 1 Date: Wed, 07 Jan 2004 16:11:42 +0100 From: Jens Krinke To: splint-discuss@cs.virginia.edu Subject: [splint-discuss] (sp)lint book chapter Reply-To: splint-discuss@cs.virginia.edu Hi, the 2nd edition of the german book "open source programming tools" has a new chapter about splint. The book is now being translated and for that reason we are looking for a native speaker who would be interested to read (and comment) the splint chapter before publication. Please contact me if you are interested. Regards, Jens Krinke --__--__-- Message: 2 Date: Wed, 7 Jan 2004 21:44:14 +0100 From: Roland Illig To: splint-discuss@cs.virginia.edu Subject: Re: [splint-discuss] (sp)lint book chapter Reply-To: splint-discuss@cs.virginia.edu On Wed, Jan 07, 2004 at 04:11:42PM +0100, Jens Krinke wrote: > Hi, > > the 2nd edition of the german book "open source programming tools" has a > new chapter about splint. The book is now being translated and for that > reason we are looking for a native speaker who would be interested to > read (and comment) the splint chapter before publication. Please > contact me if you are interested. I'd like to. But you should be aware that I will read it in +strict mode. :) Roland --__--__-- Message: 3 Date: Thu, 08 Jan 2004 08:13:10 +0800 From: shenj To: splint-discuss@cs.virginia.edu Subject: [splint-discuss] =?gb2312?B?tPC4tDogW3NwbGludC1kaXNjdXNzXSAoc3ApbGludCBib29rIGNoYXB0ZXI=?= Reply-To: splint-discuss@cs.virginia.edu I'd like to, please send to me about it, thanks. shenjian -----邮件原件----- 发件人: splint-discuss-admin@cs.virginia.edu [mailto:splint-discuss-admin@cs.virginia.edu] 代表 Jens Krinke 发送时间: 2004年1月7日 23:12 收件人: splint-discuss@cs.virginia.edu 主题: [splint-discuss] (sp)lint book chapter Hi, the 2nd edition of the german book "open source programming tools" has a new chapter about splint. The book is now being translated and for that reason we are looking for a native speaker who would be interested to read (and comment) the splint chapter before publication. Please contact me if you are interested. Regards, Jens Krinke _______________________________________________ splint-discuss mailing list splint-discuss@cs.virginia.edu http://www.splint.org/mailman/listinfo/splint-discuss --__--__-- Message: 4 Date: Thu, 8 Jan 2004 08:17:54 +0100 From: Miroslaw Dobrzanski-Neumann To: splint-discuss@cs.virginia.edu Subject: Re: [splint-discuss] (sp)lint book chapter Reply-To: splint-discuss@cs.virginia.edu I'd like to. Regards Miros艂aw On Wed, Jan 07, 2004 at 04:11:42PM +0100, Jens Krinke wrote: > Hi, > > the 2nd edition of the german book "open source programming tools" has a > new chapter about splint. The book is now being translated and for that > reason we are looking for a native speaker who would be interested to > read (and comment) the splint chapter before publication. Please > contact me if you are interested. > > Regards, > Jens Krinke > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > -- Miros艂aw Dobrza艅ski-Neumann E-mail: mne@mosaic-ag.com This message is utf-8 encoded --__--__-- _______________________________________________ splint-discuss mailing list splint-discuss@cs.virginia.edu http://www.splint.org/mailman/listinfo/splint-discuss End of splint-discuss Digest -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.Virginia.EDU/pipermail/splint-discuss/attachments/20040109/a87ce647/attachment.htm From roland.illig at gmx.de Fri Jan 9 05:36:07 2004 From: roland.illig at gmx.de (Roland Illig) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] (sp)lint book chapter In-Reply-To: <20040107204414.GA1224@roland-illig.de> References: <3FFC21AE.8070904@gmx.de> <20040107204414.GA1224@roland-illig.de> Message-ID: <20040109103606.GA1400@roland-illig.de> On Wed, Jan 07, 2004 at 09:44:14PM +0100, Roland Illig wrote: > On Wed, Jan 07, 2004 at 04:11:42PM +0100, Jens Krinke wrote: > > Hi, > > > > the 2nd edition of the german book "open source programming tools" has a > > new chapter about splint. The book is now being translated and for that > > reason we are looking for a native speaker who would be interested to > > read (and comment) the splint chapter before publication. Please > > contact me if you are interested. > > I'd like to. But you should be aware that I will read it in +strict > mode. :) Oops, I did not read the question exactly. I thought the book should be translated to german. As I am not a native English speaker, I will not translate it solidly. Roland From winged__wolf at hotmail.com Mon Jan 12 15:43:59 2004 From: winged__wolf at hotmail.com (Kyle Hamilton) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] Why require specific versions of automake and aclocal? Message-ID: <001901c3d94c$ce210c00$0401a8c0@aerowolf.isageek.net> Why does splint require specific versions of automake and aclocal (specifically, 1.6 for each)? I have 1.7 of each installed, and configure didn't give me any warning of specific requirement not being met -- I had to wait until make started running to find out what the requirements were. Can you please change it (whereever it is) so that it looks for automake and aclocal >= 1.6, not == 1.6? Thank you. -Kyle Hamilton From Simon.Hosie at connexionz.co.nz Mon Jan 12 16:46:26 2004 From: Simon.Hosie at connexionz.co.nz (Simon Hosie) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] Why require specific versions of automake and aclocal? Message-ID: Kyle Hamilton: > Why does splint require specific versions of automake and aclocal > (specifically, 1.6 for each)? I'd go a step further and ask why splint requires auto* at all. Why does splint require auto* at all? -- My text ends here. Anything further has been added without my consent. _______________________________________ Connexionz Ltd Simon Hosie Simon.Hosie@connexionz.co.nz __________________________________________________ New Zealand Office Building 2,Level 1,1 Show Place Christchurch Office: +64 33394536 Fax: +64 33394537 http://www.connexionz.co.nz United Kingdom Office Regus House, Fairbourne Drive, Atterbury -Milton Keyes MK10 9RG Phone : 02890 577 774 The information in this email (including attachments) is confidential and may be legally privileged. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email and destroy the message. If you are not the intended recipient, any use, disclosure, copying or distribution is prohibited and may be unlawful From cbfalconer at yahoo.com Tue Jan 13 05:20:45 2004 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] (sp)lint book chapter References: <3FFC21AE.8070904@gmx.de> Message-ID: <4003C67D.46419689@yahoo.com> Jens Krinke wrote: > > the 2nd edition of the german book "open source programming tools" > has a new chapter about splint. The book is now being translated > and for that reason we are looking for a native speaker who would > be interested to read (and comment) the splint chapter before > publication. Please contact me if you are interested. I sent you an e-mail direct, but have had no response. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From evans at cs.virginia.edu Tue Jan 13 09:04:09 2004 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] Why require specific versions of automake and aclocal? (fwd) Message-ID: I asked Tim Van Holder, who contributed the autoconf and automake build files for splint, to answer these questions. His explanation is below. If anyone can contribute further improvements to the build process, they are appreciated. > ---------- Forwarded message ---------- > Date: Tue, 13 Jan 2004 10:46:26 +1300 > From: Simon Hosie > Reply-To: splint-discuss@cs.virginia.edu > To: splint-discuss@cs.virginia.edu > Subject: RE: [splint-discuss] Why require specific versions > of automake and > aclocal? > > Kyle Hamilton: > > Why does splint require specific versions of automake and aclocal > > (specifically, 1.6 for each)? > > I'd go a step further and ask why splint requires auto* at all. > > Why does splint require auto* at all? Hmm - I'm not sure - I don't remember requiring 1.6 specifically. In any case, if there is such a test, then it probably requires 1.6 *or higher*. Given that I was using 1.6 at the time it seems plausible I added the 'at least 1.6 needed' requirement to avoid issues if a feature I used did not exist in earlier versions. Also, automake is up to 1.7.x now (possibly even 1.8), so I don't think there's a big problem here. Of course, if the requirement is lowered to 1.5 or 1.4 and everything still works, then that's fine. Actually, scratch all that - I just checked the CVS repository at splint.sf.net. Neither configure, nor Makefile.am, requires automake 1.6. configure simply requires automake (any version) and the Makefile.am files specify that automake 1.5 or higher is required (and everyone should have automake 1.5 or higher). However, the CVS repository also contains automake output, and automake 1.6 and up have the understandable but annoying habit to hardcode their own version into the makefiles (so that you can have automake 1.6, 1.7 and 1.8 installed on the same machine without version conflicts with its runtime, and the package will keep using the same automake version until you rerun configure). Whether or not automake and autoconf output should be included in CVS is a (mostly) a matter of taste - my opinion is that if someone gets a product out of CVS they can be reasonably expected to have some minimal development environment set up. In fact, that's what the bootstrap script is for - after a CVS checkout, you run it to have autoconf & co run and prepare the tree for compilation. In source tarballs, you can safely include the autoconf & automake output - a non-developer will never modify configure.ac or Makefile.am and so is never faced with having to run any version of autoconf or automake. So I would suggest removing configure, aclocal.m4 and all automake generated Makefile.in files from the CVS repository. Alternatively, add a note to README that running the bootstrap script is recommended after a CVS checkout. In case this message came from someone building from a source tarball without having modified any of the autoconf or automake input, there may be some flaw in the splint release procedure - but a make dist (which I assume is used) normally ensures everything builds, so that seems unlikely. If there are any further questions, feel free to ask. From winged__wolf at hotmail.com Tue Jan 13 16:57:09 2004 From: winged__wolf at hotmail.com (Kyle Hamilton) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] Why require specific versions of automake and aclocal? (fwd) In-Reply-To: Message-ID: <001201c3da20$31014000$0401a8c0@aerowolf.isageek.net> The problem, of course, is that it requires == 1.6 on both of them. I have 1.7 installed. I had to symlink $HOME/bin/automake-1.6 to /usr/bin/automake-1.7, and same with aclocal, to get it to work. (This is from CVS on sourceforge.) I ended up having to abort the install because I don't have yacc or bison installed (I'm using a shared box that I'm not the admin of, and have a rather restrictive quota on). I'm getting one (or both) of them installed in the near future; once that happens I'll probably be able to build it. But I can't for the life of me figure out why it required == 1.6. -Kyle -----Original Message----- From: splint-discuss-admin@cs.virginia.edu [mailto:splint-discuss-admin@cs.virginia.edu] On Behalf Of David Evans Sent: Tuesday, January 13, 2004 8:04 AM To: splint-discuss@cs.virginia.edu Subject: Re: [splint-discuss] Why require specific versions of automake and aclocal? (fwd) I asked Tim Van Holder, who contributed the autoconf and automake build files for splint, to answer these questions. His explanation is below. If anyone can contribute further improvements to the build process, they are appreciated. > ---------- Forwarded message ---------- > Date: Tue, 13 Jan 2004 10:46:26 +1300 > From: Simon Hosie > Reply-To: splint-discuss@cs.virginia.edu > To: splint-discuss@cs.virginia.edu > Subject: RE: [splint-discuss] Why require specific versions of > automake and > aclocal? > > Kyle Hamilton: > > Why does splint require specific versions of automake and aclocal > > (specifically, 1.6 for each)? > > I'd go a step further and ask why splint requires auto* at all. > > Why does splint require auto* at all? Hmm - I'm not sure - I don't remember requiring 1.6 specifically. In any case, if there is such a test, then it probably requires 1.6 *or higher*. Given that I was using 1.6 at the time it seems plausible I added the 'at least 1.6 needed' requirement to avoid issues if a feature I used did not exist in earlier versions. Also, automake is up to 1.7.x now (possibly even 1.8), so I don't think there's a big problem here. Of course, if the requirement is lowered to 1.5 or 1.4 and everything still works, then that's fine. Actually, scratch all that - I just checked the CVS repository at splint.sf.net. Neither configure, nor Makefile.am, requires automake 1.6. configure simply requires automake (any version) and the Makefile.am files specify that automake 1.5 or higher is required (and everyone should have automake 1.5 or higher). However, the CVS repository also contains automake output, and automake 1.6 and up have the understandable but annoying habit to hardcode their own version into the makefiles (so that you can have automake 1.6, 1.7 and 1.8 installed on the same machine without version conflicts with its runtime, and the package will keep using the same automake version until you rerun configure). Whether or not automake and autoconf output should be included in CVS is a (mostly) a matter of taste - my opinion is that if someone gets a product out of CVS they can be reasonably expected to have some minimal development environment set up. In fact, that's what the bootstrap script is for - after a CVS checkout, you run it to have autoconf & co run and prepare the tree for compilation. In source tarballs, you can safely include the autoconf & automake output - a non-developer will never modify configure.ac or Makefile.am and so is never faced with having to run any version of autoconf or automake. So I would suggest removing configure, aclocal.m4 and all automake generated Makefile.in files from the CVS repository. Alternatively, add a note to README that running the bootstrap script is recommended after a CVS checkout. In case this message came from someone building from a source tarball without having modified any of the autoconf or automake input, there may be some flaw in the splint release procedure - but a make dist (which I assume is used) normally ensures everything builds, so that seems unlikely. If there are any further questions, feel free to ask. _______________________________________________ splint-discuss mailing list splint-discuss@cs.virginia.edu http://www.splint.org/mailman/listinfo/splint-discuss From Simon.Hosie at connexionz.co.nz Tue Jan 13 18:01:11 2004 From: Simon.Hosie at connexionz.co.nz (Simon Hosie) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] Why require specific versions of automake and aclocal? (fwd) Message-ID: Tim Van Holder: > [...] However, the CVSrepository also contains automake output, and > automake 1.6 and up have the understandable but annoying habit to > hardcode their own version into the makefiles [...] > So I would suggest removing configure, aclocal.m4 and all automake > generated Makefile.in files from the CVS repository. Alternatively, > add a note to README that running the bootstrap script is recommended > after a CVS checkout. Kyle Hamilton: > The problem, of course, is that it requires == 1.6 on both of them. I > have 1.7 installed. I had to symlink $HOME/bin/automake-1.6 to > /usr/bin/automake-1.7, and same with aclocal, to get it to work. > (This is from CVS on sourceforge.) Did you consider/try what I've quoted above? That is, did you try manually removing the files that shouldn't be there, or try running the bootstrap script (whatever that is)? Sometimes I try 'make distclean' right after a configure, and then another configure. -- My text ends here. Anything further has been added without my consent. _______________________________________ Connexionz Ltd Simon Hosie Simon.Hosie@connexionz.co.nz __________________________________________________ New Zealand Office Building 2,Level 1,1 Show Place Christchurch Office: +64 33394536 Fax: +64 33394537 http://www.connexionz.co.nz United Kingdom Office Regus House, Fairbourne Drive, Atterbury -Milton Keyes MK10 9RG Phone : 02890 577 774 The information in this email (including attachments) is confidential and may be legally privileged. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email and destroy the message. If you are not the intended recipient, any use, disclosure, copying or distribution is prohibited and may be unlawful From peteran at ludd.luth.se Tue Jan 13 18:28:18 2004 From: peteran at ludd.luth.se (peteran@ludd.luth.se) Date: Wed Mar 22 17:10:24 2006 Subject: [splint-discuss] Why require specific versions of automake and aclocal? (fwd) In-Reply-To: References: Message-ID: <1074036498.40047f122c582@webmail.ludd.luth.se> I had a bit of a similar problem. It had to do with mandrakes "clever" support for having both 1.4 and 1.7 versions of automake provided by a "not so clever" wrapper script. result was that ./configure failed, try with ./bootstrap failed, get paranoid and run all by hand, fail. Accidentally tab-complete and find out that there are several versions of the tools available. Hand type "aclocal-1.7 && autoheader && autoconf && automake-1.7 -a -c" smile. Get angry at mandrake and rpm -e old automake. /Peter Anttu Quoting Simon Hosie : > Tim Van Holder: > > [...] However, the CVSrepository also contains automake output, and > > automake 1.6 and up have the understandable but annoying habit to > > hardcode their own version into the makefiles [...] > > So I would suggest removing configure, aclocal.m4 and all automake > > generated Makefile.in files from the CVS repository. Alternatively, > > add a note to README that running the bootstrap script is recommended > > after a CVS checkout. > > Kyle Hamilton: > > The problem, of course, is that it requires == 1.6 on both of them. > I > > have 1.7 installed. I had to symlink $HOME/bin/automake-1.6 to > > /usr/bin/automake-1.7, and same with aclocal, to get it to work. > > (This is from CVS on sourceforge.) > > Did you consider/try what I've quoted above? That is, did you try > manually removing the files that shouldn't be there, or try running the > bootstrap script (whatever that is)? > > Sometimes I try 'make distclean' right after a configure, and then > another configure. > > > -- > My text ends here. Anything further has been added without my consent. > > > > > _______________________________________ > Connexionz Ltd > Simon Hosie > Simon.Hosie@connexionz.co.nz > __________________________________________________ > > New Zealand Office > Building 2,Level 1,1 Show Place > Christchurch > Office: +64 33394536 > Fax: +64 33394537 > http://www.connexionz.co.nz > > United Kingdom Office > Regus House, Fairbourne Drive, Atterbury -Milton Keyes MK10 9RG > Phone : 02890 577 774 > > The information in this email (including attachments) is confidential > and may be legally privileged. If an addressing or transmission error > has misdirected this email, please notify the author by replying to this > email and destroy the message. If you are not the intended recipient, > any use, disclosure, copying or distribution is prohibited and may be > unlawful > > > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > ----------------------------------------------------------------------- This mail was sent through Ludd's webmail https://webmail.ludd.luth.se/ From cbfalconer at yahoo.com Thu Jan 15 04:19:09 2004 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:25 2006 Subject: [splint-discuss] Source ties up splint indefinitely Message-ID: <40065B0D.D13C2EEE@yahoo.com> The following compiles under gcc -W -Wall -ansi - pedantic, yet appears to cause some form of infinite loop in splint 1.0.6. Tried it with "splint -weak" and with plain "splint" The overall command used, via an alias, is: set larch_path=.;c:\prgs\splint\splint-3.0.1.6\lib set include=c:\djgpp\include c:\prgs\splint\splint-3.0.1.6\bin\splint.exe ____________ Trouble begins here ____________ /* Subject: Re: AVL tree (What am I missing?) From: "Lyn Powell" "CBFalconer" wrote > TAOCP doesn't have C code, so you mean you translated it. At any > rate, for things like this post complete compilable programs, with > everything defined. What in the devil is a struct tree, or a > struct node, etcetera. You must have tried it with some data, > include that. Here is a complete program (not written to be pretty or "good" C by any means). The data I have been using has been 5, 4, 3, where it breaks on 3. */ #include #include struct node { struct node *left, *right; int balance, data; }; struct tree { struct node *header; }; int insert(struct tree *HEAD, struct node *n, int K) { struct node **T, *S, *P, *Q, *R; int a; if (HEAD->header == NULL) { HEAD->header = n; return 1; } T = &HEAD->header; S = P = HEAD->header; while (1) { if (K < P->data) { Q = P->left; if (Q == NULL) { P->left = n; break; } T = &Q; S = P = Q; } else if (K > P->data) { Q = P->right; if (Q == NULL) { P->right = n; break; } T = &Q; S = P = Q; } else return 0; } if (K < S->data) a = -1; else a = +1; R = P = (a == -1) ? S->left : S->right; while (K < P->data) { if (K < P->data) { P->balance = -1; P = P->left; } else { P->balance = +1; P = P->right; } } if (S->balance == 0) S->balance = a; else if (S->balance == -a) S->balance = 0; else if (S->balance == a) { if (R->balance == a) { P = R; *T = R; if (a == -1) { S->left = R->right; R->right = S; } else { S->right = R->left; R->left = S; } S->balance = R->balance = 0; } else if (R->balance == -a) { if (a == -1) { *T = P = R->right; R->right = P->left; P->left = R; S->left = P->right; P->right = S; } else { *T = P = R->left; R->left = P->right; P->right = R; S->right = P->left; P->left = S; } if (P->balance == a) { S->balance = -a; R->balance = 0; } else if (P->balance == 0) { S->balance = 0; R->balance = 0; } else if (P->balance == -a) { S->balance = 0; R->balance = a; } P->balance = 0; } } if (S == (*T)->left) (*T)->right = P; else (*T)->left = P; return 1; } void print_tree_structure(struct node *node, int level) { int i; if (node == NULL) { for (i = 0; i < level; i++) printf("\t"); printf("*\n"); } else { print_tree_structure(node->right, level + 1); for (i = 0; i < level; i++) printf("\t"); printf("%d\n", node->data); print_tree_structure(node->left, level + 1); } } int main(void) { struct tree tree = { 0 }; while (1) { struct node *node = malloc(sizeof *node); node->data = getchar() - '0'; getchar(); if (node->data == EOF) break; node->balance = 0; node->left = node->right = NULL; insert(&tree, node, node->data); print_tree_structure(tree.header, 0); } return 0; } /* > Don't assume everyone has TAOCP handy. Many never even heard of > it. Mine is hiding away in some corner or stack, and hasn't been > sighted for years. I was citing my reference. To my knowledge, the AVL algorithm is pretty well known. > BTW the usual C convention reserves CAPITALS for #defined > constants. My choice of variable names coincides with Knuth's so that I can more easily check the consistency of my algorithm compared to his. The reason I didn't post this in comp.lang.c is because I was trying to avoid stylistic comments like that and get help on the real problem. */ -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From peteran at ludd.luth.se Mon Jan 19 05:55:01 2004 From: peteran at ludd.luth.se (peteran@ludd.luth.se) Date: Wed Mar 22 17:10:25 2006 Subject: [splint-discuss] tinkering... Message-ID: <1074509701.400bb78545a7c@webmail.ludd.luth.se> Hi, I've been tinkering with the source for a while and started to wonder. What are other people working on? I myself made a test of killing basic.h and all forwardTypes to see what that would do for dependencies. There is still a lot of circular inclusion happening and most often when you alter something in a header file you still get to have the fun of seeing recompiling everything, beginning with cgrammar.c. At least something good came from that experiment as the time to compile everything went from 3:49 to 2:59, so some files seem to be happier. Also the .deps directory shrunk to roughly half it's size. (I can comment on that doing the experiment proved to be a much larger undertaking than I had imagined. Quite many sources just #include "basic.h" and were happy with that.) Having played with that I started to think on writing list handling macros instead of duplicating large amounts of code and that's when it struck me. If there's someone else doing the same thing, then it would be a waste for me to do it also (could take a look at various AC_ macros and see if they could be used). /Peter Anttu ----------------------------------------------------------------------- This mail was sent through Ludd's webmail https://webmail.ludd.luth.se/ From john.carter at tait.co.nz Tue Jan 20 22:47:34 2004 From: john.carter at tait.co.nz (John Carter) Date: Wed Mar 22 17:10:25 2006 Subject: [splint-discuss] False positive on infinite loop detection with structs. Message-ID: We're getting a false positive on infinite loop detection. The infinite loop detection seems to work OK if the data type is simple (like an int) but fails to cope with a struct like the following... ===foo.h============================================================== #ifndef BAH_H #define BAH_H typedef struct { int a; int b; } t; int foo( t const * j); void bah( t * j) /*@modifies *j@*/; #endif ===foo.c============================================================== #include "foo.h" int main( int /*@unused@*/ argc, /*@unused@*/ char * argv[]) { t i = {1,2}; while( 0==foo(&i)) { bah(&i); } return 0; } ====================================================================== splint +checks -decl-undef foo.c Splint 3.1.1 --- 17 Sep 2003 foo.c: (in function main) foo.c:7:11: Suspected infinite loop. No condition values modified. Modification possible through unconstrained calls: foo This appears to be an infinite loop. Nothing in the body of the loop or the loop test modifies the value of the loop test. There may be a modification through a call to an unconstrained function, or an unconstrained function in the loop test may use a global variable modified by the loop body. (Use -infloopsuncon to inhibit warning) Finished checking --- 1 code warning ====================================================================== Any suggestions? John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand A Million Monkeys can inflict worse things than just Shakespeare on your system. From griever at t2n.org Wed Jan 21 09:11:06 2004 From: griever at t2n.org (Robert F Merrill) Date: Wed Mar 22 17:10:25 2006 Subject: [splint-discuss] False positive on infinite loop detection with structs. In-Reply-To: References: Message-ID: <400E887A.1040608@t2n.org> John Carter wrote: >We're getting a false positive on infinite loop detection. > >The infinite loop detection seems to work OK if the data type is >simple (like an int) but fails to cope with a struct like the >following... > > >===foo.h============================================================== >#ifndef BAH_H >#define BAH_H > >typedef struct { > int a; > int b; >} t; > >int foo( t const * j); > >void bah( t * j) /*@modifies *j@*/; >#endif >===foo.c============================================================== >#include "foo.h" > >int main( int /*@unused@*/ argc, /*@unused@*/ char * argv[]) >{ > t i = {1,2}; > > while( 0==foo(&i)) { > bah(&i); > } > > return 0; >} > >====================================================================== >splint +checks -decl-undef foo.c >Splint 3.1.1 --- 17 Sep 2003 > >foo.c: (in function main) >foo.c:7:11: Suspected infinite loop. No condition values modified. > Modification possible through unconstrained calls: foo > This appears to be an infinite loop. Nothing in the body of the loop or the > loop test modifies the value of the loop test. There may be a modification > through a call to an unconstrained function, or an unconstrained function in > the loop test may use a global variable modified by the loop body. (Use > -infloopsuncon to inhibit warning) > >Finished checking --- 1 code warning >====================================================================== > > >Any suggestions? > > > This does look like a bug, see if it still happens if foo has @modifies *j@ and/or bah doesn't From john.carter at tait.co.nz Wed Jan 21 23:44:44 2004 From: john.carter at tait.co.nz (John Carter) Date: Wed Mar 22 17:10:25 2006 Subject: [splint-discuss] False positive on infinite loop detection with structs. In-Reply-To: <400E887A.1040608@t2n.org> References: <400E887A.1040608@t2n.org> Message-ID: I have now tried all combinations of {modifies,uses,blank}x{*j,j->a}x{foo,bah} I can think of and get the same result with all. On Wed, 21 Jan 2004, Robert F Merrill wrote: > John Carter wrote: > > >We're getting a false positive on infinite loop detection. > > > >The infinite loop detection seems to work OK if the data type is > >simple (like an int) but fails to cope with a struct like the > >following... > > > > > >===foo.h============================================================== > >#ifndef BAH_H > >#define BAH_H > > > >typedef struct { > > int a; > > int b; > >} t; > > > >int foo( t const * j); > > > >void bah( t * j) /*@modifies *j@*/; > >#endif > >===foo.c============================================================== > >#include "foo.h" > > > >int main( int /*@unused@*/ argc, /*@unused@*/ char * argv[]) > >{ > > t i = {1,2}; > > > > while( 0==foo(&i)) { > > bah(&i); > > } > > > > return 0; > >} > > > >====================================================================== > >splint +checks -decl-undef foo.c > >Splint 3.1.1 --- 17 Sep 2003 > > > >foo.c: (in function main) > >foo.c:7:11: Suspected infinite loop. No condition values modified. > > Modification possible through unconstrained calls: foo > > This appears to be an infinite loop. Nothing in the body of the loop or the > > loop test modifies the value of the loop test. There may be a modification > > through a call to an unconstrained function, or an unconstrained function in > > the loop test may use a global variable modified by the loop body. (Use > > -infloopsuncon to inhibit warning) > > > >Finished checking --- 1 code warning > >====================================================================== > > > > > >Any suggestions? > > > > > > > This does look like a bug, see if it still happens if foo has @modifies > *j@ and/or bah doesn't > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand A Million Monkeys can inflict worse things than just Shakespeare on your system. From john.carter at tait.co.nz Wed Jan 21 23:58:56 2004 From: john.carter at tait.co.nz (John Carter) Date: Wed Mar 22 17:10:25 2006 Subject: [splint-discuss] New flex breaks splint. Building splint from CVS Message-ID: The new version of flex breaks splint. The macro "unput" is not defined in the last %% section of cscanner.l The cscanner_unput function has to be moved to the rules section and enclosed in %{ }% John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand A Million Monkeys can inflict worse things than just Shakespeare on your system. From john.carter at tait.co.nz Thu Jan 22 00:04:48 2004 From: john.carter at tait.co.nz (John Carter) Date: Wed Mar 22 17:10:25 2006 Subject: [splint-discuss] Re: New flex breaks splint. Building splint from CVS In-Reply-To: References: Message-ID: > The cscanner_unput function has to be moved to the rules section and > enclosed in %{ }% Sorry, not rules section, the first section. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand A Million Monkeys can inflict worse things than just Shakespeare on your system.