home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!mcsun!sunic!seunet!swbull!proxxi.uf.se!elias
- From: elias@proxxi.uf.se (Elias M}rtensson (proxxi))
- Subject: Re: Few simple questions
- Message-ID: <1993Jan22.143725.334@proxxi.uf.se>
- Organization: proxxi
- References: <1993Jan21.001022.46578@kuhub.cc.ukans.edu>
- Date: Fri, 22 Jan 1993 14:37:25 GMT
- Lines: 59
-
- kugold@kuhub.cc.ukans.edu writes:
-
- >1. In unix, the backspace key does not work properly. I already
- > found out that this can be changed by typing stty erase ^?, where '^?'
- > means ctrl-?. I tried to include this in my .login file, but emacs does
- > not accept ^?. How do I put this line in my .login file?
-
- Backspace? Surely you must mean that the "delete" key does not work
- properly. Emacs uses it's own key bindnings, and usually delete is
- the rubout character. You can change both the delete and the backspace
- characters to whatever you want by putting something like the
- following in your .emacs file:
-
- ; This will set backspace to be the rubout character
- (global-set-key "\C-h" 'backward-delete-char)
- ; This will do the following to delete
- (global-set-key "\C-?" 'backward-delete-char)
-
- >2. In C I need an input function like INKEY$ in BASIC, that is a function that
- > does _not_ wait for input, but just an empty string or so returns if no
- > character is entered. (I am trying to measure the time between two key-
- > presses). Does this function exist, and if not, is there any way to do
- > what I want?
-
- If the time to be measured is short (like tenths of seconds and you really
- need this detail) there is no portable way to do it since UNIX is not a
- realtime operating system. But you can try to check the number of
- characters is the queue by using an ioctl() call.
-
- >3. In C again, I want to initialize and array of integers, like
- >
- > main()
- > {
- > int ttime[6]={0,0,0,0,0,0}
- > /* rest of program */
- > }
-
- [error messages removed]
-
- > I really don't see what is wrong, the more because in my c-book,
- > "C by discovery" by L.S. Foster on page 213, almost exactly the
- > same thing is done.
-
- This one is easy, your compiler is not an ANSI-C compiler. Try gcc or
- some other ANSI-compiant compiler instead.
-
- >Thanks a lot in advance for any answer and I am sorry if the UNIX question
- >doesn't belong in this newsgroup.
-
- >Regards,
-
- >Wimjan
-
- >kugold@kuhub.cc.ukans.edu
-
- ######################
- # Elias Martenson #
- # elias@proxxi.uf.se #
- ######################
-