Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.lang.c Subject: Re: CTRL(x) macro (was: Re: What is a constant expression) Message-ID: <3802@solo7.cs.vu.nl> Date: 24 Oct 89 20:55:25 GMT References: <1219@crdos1.crd.ge.COM> <8891@goofy.megatest.UUCP> <3786@solo6.cs.vu.nl> <1422@crdos1.crd.ge.COM> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 23 davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes: \In article <3786@solo6.cs.vu.nl>, maart@cs.vu.nl (Maarten Litmaath) writes: \| \| #define CTRL(x) ((x) ^ 0100) \| \| ...so you can say \| \| CTRL('?') \| \| to get DEL. \ \ You should use another name, perhaps, since many people assume that \CTRL returns control characters. They are defined as the values from \00-37 octal, from the action of the Control key on the original Teletype \terminals. In BSD the new tty driver as well as vi, cat -v, ... use ^? to denote DEL. Seems pretty normal to me. According to iscntrl(3) DEL is a control character too. Too bad it isn't a normal control character; it would have simplified things. -- A symbolic link is a POINTER to a file, | Maarten Litmaath @ VU Amsterdam: a hard link is the file system's GOTO. | maart@cs.vu.nl, mcsun!botter!maart