Article View: comp.editors
Article #108Re: Editor mined (Unix, VMS, MSDOS) - easy, solid, non-8-bit-obstructing (1/4)
From: Thomas Wolff
Date: Tue, 04 Aug 1992 17:53
Date: Tue, 04 Aug 1992 17:53
80 lines
3895 bytes
3895 bytes
Wolfgang Denk replied to my discussion of the following problem within mined: > >Mined runs fine on SunOS, Micro-Vax Ultrix, Iris IRIX, VMS, and MSDOS including the > >following assignment you feel disturbed by and its later uses: > >char * (* fnamv) []; > > ... > > char * argv []; > > fnamv = argv; /* Why does this produce a warning? C is such a stupid language! */ > >I really don't think it's my fault that compilers produce warnings like > >"illegal pointer combination" on this. > > But this _IS_ an illegal pointer combination, and a C compiler > _is_ expected to complain about it. I was actually not complaining about C compilers, but the C language. Since I am dealing with a pointer to an array (of pointers), the solution you and others proposed and which works, where the declaration is char * * fnamv , does not look very logical, does it? Nor does the fact that every attempt to include [] in the declaration yielded an error or warning. > >On the one hand, type inconsistencies are quite common in C, aren't they?, and the > > Bad argument - never follow bad examples! That was not meant to be an argument, of course, but sarcasm. Thank you for your further proposals, I comment on some of them below. Thomas Wolff wolff@inf.fu-berlin.de ----------------------------------------------------------------------------- > ! #if (defined(vms) || defined(msdos) || defined(USG)) I don't think defined(xx) would work with every C compiler. Can you tell exactly what USG stands for? Is it a symbol that will always be predefined on the appropriate systems or will it have to be configured? > BTW - ANSI C does not allow text other than comments following an > #endif. After "#ifndef msdos" a "ifdef msdos" will always be > evaluate to false (I hope, at least :-). At several places, I just left some (not too) old code in the source in case it might be necessary to reactivate it. > getwd is usually only > available in BSD-like environments, not all flavour of System V > provide it. Etc. - the code has really lots of (mostly minor and > easy to fix) problems. Whereever there is interest to adapt the editor, I would like to hear of all such problems. > I don't call that a Makefile. Well, it works for a single compilation. I don't use it for development. > *** minedmp.c! Wed Jul 29 08:53:17 1992 > --- minedmp.c Wed Jul 29 12:54:15 1992 > *************** > *** 98,104 **** > case 'P' : return '^'; > case 'p' : return '~'; > case '|' : return '&'; > ! case '&' : return '''; > case '\\' : return ','; > case '_' : return '/'; > case '-' : return '-'; > --- 98,104 ---- > case 'P' : return '^'; > case 'p' : return '~'; > case '|' : return '&'; > ! case '&' : return '\''; > case '\\' : return ','; > case '_' : return '/'; > case '-' : return '-'; etc. These are problems with the Internet news system. At some sites, the files will come with bit 8 stripped off (or even only be saved without it, e.g. nn has a switch for that). All the characters transformed by code similar to the above in minedmp.c have their 8th bit set. Unfortunately, some characters get stripped so that a syntax error results. Maybe I should post a uuencoded version.
Technical Details
Message-ID:
<UYQ5HVE@math.fu-berlin.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!wolffReferences:
<42I54HD@math.fu-berlin.de> <id.SWWR.HZI@ferranti.com> <86K51ZK@math.fu-berlin.de> <wd.712563342@tukan>Show Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!wolff From: wolff@inf.fu-berlin.de (Thomas Wolff) Subject: Re: Editor mined (Unix, VMS, MSDOS) - easy, solid, non-8-bit-obstructing (1/4) Message-ID: <UYQ5HVE@math.fu-berlin.de> Sender: news@math.fu-berlin.de (Math Department) Organization: Free University of Berlin, Germany References: <42I54HD@math.fu-berlin.de> <id.SWWR.HZI@ferranti.com> <86K51ZK@math.fu-berlin.de> <wd.712563342@tukan> Date: Tue, 4 Aug 1992 17:53:29 GMT Lines: 82