Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!purdue!decwrl!ucbvax!ucsfcgl!cca.ucsf.edu!rk9005 From: rk9005@cca.ucsf.edu (Roland McGrath) Newsgroups: comp.bugs.4bsd Subject: Re: csh history bug Message-ID: <1246@ucsfcca.ucsf.edu> Date: 23 Apr 88 20:10:12 GMT References: <1245@ucsfcca.ucsf.edu> <11192@mimsy.UUCP> Reply-To: roland@rtsg.lbl.gov (Roland McGrath) Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome) Lines: 23 ["csh history bug"] - chris@mimsy.UUCP (Chris Torek): ) The history number `-1000' should give a large hint. If you look ) in /usr/src/bin/csh/sh.lex.c you will find where csh enters substitution ) events as number -1000. The idea is that since ) ) -most people don't set history to a big number, ) ) the negative event will be discarded from the history list since ) it occurred over 1000 commands ago. Sorry, I don't have source access. This should, of course, be fixed to set the event number to INT_MIN so that even with history=INT_MAX, it will work correctly. ) -Aside: Can anyone with source access tell me what type is used for the ) -value of `history', so I can make it 32767 or (2^31) - 1, or whatever? ) `int', of course. The variable itself is a string, but it is converted ) to an integer whenever needed (once per command!). Ack! I should have expected should stupidity from Unix! Oh well. Maybe I'll fix it when Berkeley declares csh free. ) In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) ) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris