Skip to content

Commit cd0c955

Browse files
committed
snapshot of project "pgf-vile", label v3_31
1 parent e903cf8 commit cd0c955

34 files changed

+3043
-1558
lines changed

CHANGES.R3

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,144 @@
1+
Changes in 3.31: (Tom Dickey)
2+
3+
* corrected test in 'find_alt()', which caused the %/# toggle to work
4+
incorrectly in noautobuffer mode.
5+
6+
* updatelistbuffers after 'cd' command
7+
8+
* added 'chg_buff()' & 'unchg_buff()' to encapsulate logic to update
9+
buffer-list after buffers are modified. The function 'lchange()'
10+
is replaced by 'chg_buff()'.
11+
12+
* modified 'histbuffer' to toggle according to 'find_alt()'
13+
14+
* make the filename/buffer/number change for 'killbuffer' apply to
15+
'usebuffer()'
16+
17+
* corrected handling of repeat-count in 'C' command.
18+
19+
* updated vile.hlp
20+
21+
* revised 'mktbls.c':
22+
23+
* filter out redundant ifdef's
24+
* tab-align data items for readability
25+
* modify 'nefunc.h' to use prototypes rather than K&R style
26+
definition, also split the extern-definitions from the
27+
data items for readability.
28+
* make procedures static, linted
29+
* modified so that 'evar.h' definitions are automatically
30+
generated, so that "show-variables" can show a sorted
31+
list of variables. The new filename is "nevars.h".
32+
33+
* corrected window refresh flag for 'U' (lineundo) command.
34+
35+
* added an apollo-specific code in 'imdying()' to generate a walkback
36+
for debugging.
37+
38+
* corrected an error in 'zotwp()': reference to data that had been
39+
deleted.
40+
41+
* corrected an error in 'onlywind()': it did not delink window-pointer
42+
after freeing it.
43+
44+
* noticed that references to 'dfoutfn' weren't reentrant: I did a
45+
":show-var" from the buffer-list and got only part of the heading.
46+
Reorganized display.c to ensure that it is reentrant by using a
47+
local copy of 'dfoutfn'. Note that I didn't add 'dfoutfn' as an
48+
argument to 'dofmt()' to avoid complications with varargs.
49+
50+
* corrected 'dfputli()': it didn't do hexadecimal.
51+
52+
* corrected 'updateline()': it sometimes failed to highlight the ends
53+
of the mode-line.
54+
55+
* corrected (my last change) to 'vtset()' so that "^J" is shown in
56+
list-mode.
57+
58+
* moved 'writeall()' from main.c to buffer.c; it belonged there, and
59+
I used local macros for simplifying it.
60+
61+
* remove SIGHUP handler before normal call on 'exit()' to avoid
62+
vile-died messages when running it in an xterm.
63+
64+
* corrected VMS definition of exit codes; added def of BAD-macro.
65+
modified main.c, display.c, window.c accordingly.
66+
67+
Changes in 3.30, mostly from Tom Dickey:
68+
69+
This is lots of changes, mostly in buffer.c:
70+
71+
* lint-clean: buffer.c
72+
73+
* linted also: file.c, modes.c (though I left size_t alone for now).
74+
75+
* added "list-vars" & "show-vars" to show the current variables
76+
77+
* modified 'killbuffer' so I could add binding ^X-k to point to
78+
a buffer-name in the buffer-list and kill it.
79+
80+
* also modified 'killbuffer' to recognize filename if buffer-name is
81+
not found, also buffer-number.
82+
83+
* modify buffer.c so that the number shown by '_' and '*' is consistent
84+
85+
* fixed ^X-o and ^X-O so they update buffer-list, as well as some
86+
other places I missed before.
87+
88+
* make some functions static (where they are really private), because
89+
my per-module lint library got too large. (I believe there are
90+
too many externals). In modes.c, this involved reordering, since
91+
my practice is not to have forward-refs on static functions, to
92+
make this work with some awful compilers. This meant that I
93+
deleted lines from 'proto.h'.
94+
95+
* introduced new macro 'isreturn()', used this in correction in
96+
'histbuff()'. I used it in one bug fix & also where I could find
97+
explicit compare for \r, \n.
98+
99+
* added mode 'autobuffer':
100+
101+
* the default is 'autobuffer' (the vile lru buffering)
102+
* curbp no longer is necessarily equal to bheadp
103+
* added members b_created, b_last_used, b_relink to support
104+
the autobuffer/noautobuffer mode.
105+
* if "noautobuffer" is set, ":rewind" and ":n" apply only
106+
to the original command-line files.
107+
108+
* added macros SCRTCH_LEFT, SCRTCH_RIGHT, ScratchName, IsInternalName
109+
to encapsulate use of '[' in names.
110+
111+
* added macros SHPIPE_LEFT, isShellOrPipe to encapsulate use of '!' in
112+
names.
113+
114+
* added function is_pathname to encapsulate tests for pathnames
115+
beginning with '.'. This fixes the display of ".vilerc" from the current
116+
directory as "./.vilerc".
117+
118+
* added new char-types _scrtch and _shpipe to support killbuffer from
119+
screen. Use these types in new macro 'screen_to_bname()' which uses
120+
modification of 'screen_string()'. Used 'screen_to_bname()' to
121+
make ^X-e and ^X-k "correctly" parse the bname, fname columns from
122+
buffer-list.
123+
124+
* fixed the error you mentioned in modeline (the position of col-80 mark
125+
taking into account sideways and number modes).
126+
127+
* supplied a missing TTflush in input.c
128+
129+
* modified 'makebufflist()' to show only the flags actually used in the
130+
footnote.
131+
132+
* modified 'makebufflist()' to show '%' and '#' by the corresponding
133+
buffer/filename.
134+
135+
* added macros 'for_each_buffer()' and 'for_each_window()' to simplify
136+
code as well as to keep visible references to bheadp & wheadp
137+
confined to buffer.c and window.c respectively.
138+
139+
* added/used macro SIZEOF
140+
141+
-------------------------------------------------------------------------------
1142

2143
Changes in 3.29:
3144
-----------------
@@ -343,3 +484,4 @@ IMPLEMENTORS NOTES:
343484
mlforce() for messages that _must_ be seen, and mlprompt() for
344485
messages that need a response from the user unless they're in a
345486
command file.
487+

bind.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
* written 11-feb-86 by Daniel Lawrence
55
*
66
* $Log: bind.c,v $
7-
* Revision 1.25 1992/12/04 09:08:45 foxharp
7+
* Revision 1.26 1993/01/16 10:21:17 foxharp
8+
* use new ScratchName, isShellOrPipe, and isreturn macros
9+
*
10+
* Revision 1.25 1992/12/04 09:08:45 foxharp
811
* deleted unused assigns
912
*
1013
* Revision 1.24 1992/08/20 23:40:48 foxharp
@@ -112,7 +115,7 @@ int f,n;
112115
char *fname; /* ptr to file returned by flook() */
113116

114117
/* first check if we are already here */
115-
bp = bfind("[Help]", OK_CREAT, BFSCRTCH);
118+
bp = bfind(ScratchName(Help), OK_CREAT, BFSCRTCH);
116119
if (bp == NULL)
117120
return FALSE;
118121

@@ -129,7 +132,7 @@ int f,n;
129132
zotbuf(bp);
130133
return(FALSE);
131134
}
132-
strcpy(bp->b_bname,"[Help]");
135+
strcpy(bp->b_bname, ScratchName(Help));
133136
{
134137
char buf[80];
135138
lsprintf(buf, " %s %s",prognam,version);
@@ -370,7 +373,7 @@ int
370373
desbind(f, n)
371374
int f,n;
372375
{
373-
return liststuff("[Binding List]",makebindlist,1,NULL);
376+
return liststuff(ScratchName(Binding List),makebindlist,1,NULL);
374377
}
375378

376379
#if APROP
@@ -387,7 +390,7 @@ int f,n;
387390
if (s != TRUE)
388391
return(s);
389392

390-
return liststuff("[Binding List]",makebindlist,1,mstring);
393+
return liststuff(ScratchName(Binding List),makebindlist,1,mstring);
391394
}
392395
#endif
393396

@@ -577,7 +580,7 @@ int hflag; /* Look in the HOME environment variable first? */
577580
/* tak care of special cases */
578581
if (!fname || !fname[0] || isspace(fname[0]))
579582
return NULL;
580-
else if (fname[0] == '!')
583+
else if (isShellOrPipe(fname))
581584
return fname;
582585

583586
/* always try the current directory first */
@@ -928,15 +931,14 @@ char **bufp;
928931
if (isbackspace(c) ||
929932
c == kcod2key(abortc) ||
930933
c == kcod2key(killc) ||
931-
c == '\r' ||
932-
c == '\n' ||
934+
isreturn(c) ||
933935
islinespecchar(c) ) {
934936
tungetc(c);
935937
return SORTOFTRUE;
936938
}
937939
}
938940

939-
if (c == '\r' || c == '\n') {
941+
if (isreturn(c)) {
940942
buf[cpos] = 0;
941943
lineinput = FALSE;
942944
*bufp = buf;

0 commit comments

Comments
 (0)