From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: AIX .export files
Date: Fri, 5 Nov 1999 10:09:03 +0100 (MET) [thread overview]
Message-ID: <199911050909.KAA02664@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Oliver Kiddle's message of Thu, 04 Nov 1999 19:12:23 +0000
Oliver Kiddle wrote:
> I've also attached a patch to the .export files for compiling on AIX.
I've looked through them and moved some of symbols around and removed
some duplicates. The patch also moves `printfmt()' to `zle_tricky.c',
it's still used there, sorry for this.
> I'm not sure that all the symbols are in the right file as some shared
> objects link against more than one shared object so I didn't know where
> the unresolved symbols came from. I had a brief look at how perl handles
> the AIX export files. It seems to generate them automatically from .h
> files. Can we do something like this with our .h and .pro files?
I wished we could... dunno if I find the time to see how. And of
course I wouldn't be able to test it.
> Anyway, the new zsh seg faulted every time I pressed tab to complete. I
> recompiled it with -g to try to find out why but compiled with -g it
> didn't seg fault. Maybe the problem was my piece-by-piece build as I
> constructed the .export files from the ld error messages.
Hm, I sometimes got segfaults when I had forgotten to remove `static',
maybe under AIX a wrong `.xport' file can do the same.
Please, could you try it with the patch below?
Bye
Sven
diff -u -r oldsrc/Zle/complete.export Src/Zle/complete.export
--- oldsrc/Zle/complete.export Fri Nov 5 09:00:48 1999
+++ Src/Zle/complete.export Fri Nov 5 10:03:42 1999
@@ -1,29 +1,16 @@
#!
accept_last
addexpl
-addzlefunction
add_bmatchers
add_match_data
allccs
amatches
asklist
-autoq
begcmgroup
-bindkey
bmatchers
-brbeg
-brend
calclist
check_param
-clearflag
-clearlist
-clearscreen
-clwnum
-clwords
-clwpos
-clwsize
cmatcher
-cmdstr
compcurrent
compheap
compisuffix
@@ -40,87 +27,46 @@
cpcmatcher
ctokenize
curexpl
-deletezlefunction
do_menucmp
do_single
-dupbrinfo
-dupstrspace
endcmgroup
-fixsuffix
-foredel
-freebrinfo
freecmatcher
freematches
-getkeycmd
get_user_var
hasmatched
hasoldlist
haspattern
+hasperm
ignore_prefix
ignore_suffix
-inbackt
-incompctlfunc
-incompfunc
-instring
-insubscr
invalidate_list
ipre
ispar
ispattern
isuf
keypm
-lastambig
-lastbrbeg
-lastbrend
lastlmatches
lastmatches
linkkeymap
-linredir
linwhat
listdat
-listshown
+lmatches
matchers
matches
menuacc
-menucmp
-menucomplete
mflags
minfo
mnum
mstack
-nbrbeg
-nbrend
-newkeymap
-nlnct
nmatches
-offs
onlyexpl
parse_cmatcher
-pfxlen
pmatches
-printfmt
printlist
-qipre
-qisuf
-redisplay
-refthingy
rembslash
restrict_range
-reversemenucomplete
ripre
-selectlocalmap
set_gmatcher
set_list_array
-showinglist
-spaceinline
-thingies
-thingytab
-ungetkeycmd
-unlinkkeymap
update_bmatchers
-usemenu
-validlist
-wb
-we
-zlenoargs
-zrefresh
+ztat
diff -u -r oldsrc/Zle/compresult.c Src/Zle/compresult.c
--- oldsrc/Zle/compresult.c Fri Nov 5 09:01:22 1999
+++ Src/Zle/compresult.c Fri Nov 5 09:54:07 1999
@@ -1124,116 +1124,6 @@
onlyexpl = (v && strstr(v, "expl"));
}
-/* This is used to print the explanation string. *
- * It returns the number of lines printed. */
-
-/**/
-int
-printfmt(char *fmt, int n, int dopr, int doesc)
-{
- char *p = fmt, nc[DIGBUFSIZE];
- int l = 0, cc = 0, b = 0, s = 0, u = 0, m;
-
- for (; *p; p++) {
- /* Handle the `%' stuff (%% == %, %n == <number of matches>). */
- if (doesc && *p == '%') {
- if (*++p) {
- m = 0;
- switch (*p) {
- case '%':
- if (dopr)
- putc('%', shout);
- cc++;
- break;
- case 'n':
- sprintf(nc, "%d", n);
- if (dopr)
- fprintf(shout, nc);
- cc += strlen(nc);
- break;
- case 'B':
- b = 1;
- if (dopr)
- tcout(TCBOLDFACEBEG);
- break;
- case 'b':
- b = 0; m = 1;
- if (dopr)
- tcout(TCALLATTRSOFF);
- break;
- case 'S':
- s = 1;
- if (dopr)
- tcout(TCSTANDOUTBEG);
- break;
- case 's':
- s = 0; m = 1;
- if (dopr)
- tcout(TCSTANDOUTEND);
- break;
- case 'U':
- u = 1;
- if (dopr)
- tcout(TCUNDERLINEBEG);
- break;
- case 'u':
- u = 0; m = 1;
- if (dopr)
- tcout(TCUNDERLINEEND);
- break;
- case '{':
- for (p++; *p && (*p != '%' || p[1] != '}'); p++, cc++)
- if (dopr)
- putc(*p, shout);
- if (*p)
- p++;
- else
- p--;
- break;
- }
- if (dopr && m) {
- if (b)
- tcout(TCBOLDFACEBEG);
- if (s)
- tcout(TCSTANDOUTBEG);
- if (u)
- tcout(TCUNDERLINEBEG);
- }
- } else
- break;
- } else {
- cc++;
- if (*p == '\n') {
- if (dopr) {
- if (tccan(TCCLEAREOL))
- tcout(TCCLEAREOL);
- else {
- int s = columns - 1 - (cc % columns);
-
- while (s-- > 0)
- putc(' ', shout);
- }
- }
- l += 1 + (cc / columns);
- cc = 0;
- }
- if (dopr)
- putc(*p, shout);
- }
- }
- if (dopr) {
- if (tccan(TCCLEAREOL))
- tcout(TCCLEAREOL);
- else {
- int s = columns - 1 - (cc % columns);
-
- while (s-- > 0)
- putc(' ', shout);
- }
- }
- return l + (cc / columns);
-}
-
/* This skips over matches that are not to be listed. */
/**/
diff -u -r oldsrc/Zle/zle.export Src/Zle/zle.export
--- oldsrc/Zle/zle.export Fri Nov 5 09:00:48 1999
+++ Src/Zle/zle.export Fri Nov 5 10:03:43 1999
@@ -1,8 +1,6 @@
#!
acceptlast
addzlefunction
-amatches
-asklist
autoq
backdel
backkill
@@ -10,7 +8,6 @@
bindkey
brbeg
brend
-calclist
cfargs
cfret
clearflag
@@ -23,32 +20,29 @@
compfunc
compwidget
deletezlefunction
-do_menucmp
-do_single
+dupbrinfo
dupstrspace
fixsuffix
foredel
forekill
-freematches
+freebrinfo
getkey
getkeycmd
getzlequery
hascompmod
-hasoldlist
-hasperm
inbackt
+incompctlfunc
incompfunc
instring
inststrlen
insubscr
invalidatelist
iremovesuffix
+keymapnamtab
lastambig
lastbrbeg
lastbrend
lastcmd
-lastlmatches
-lastmatches
lastpostbr
lastprebr
lbindk
@@ -56,32 +50,24 @@
lincmd
linkkeymap
linredir
-listdat
listshown
-lmatches
makeparamsuffix
makesuffix
makesuffixstr
makezleparams
-menuacc
menucmp
menucomplete
metafy_line
-minfo
nbrbeg
nbrend
newkeymap
nlnct
-nmatches
offs
-onlyexpl
origcs
origline
origll
pfxlen
-pmatches
printfmt
-printlist
qipre
qisuf
rdstr
@@ -91,10 +77,8 @@
selectlocalmap
showagain
showinglist
-skipnolist
spaceinline
strbpcmp
-strbpcmp
suffixlen
tcmultout
tcout
@@ -115,4 +99,3 @@
zmod
zrefresh
zsetterm
-ztat
diff -u -r oldsrc/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- oldsrc/Zle/zle_tricky.c Fri Nov 5 09:01:23 1999
+++ Src/Zle/zle_tricky.c Fri Nov 5 09:54:34 1999
@@ -1739,6 +1739,116 @@
return (int)(*a - *b);
}
+/* This is used to print the strings (e.g. explanations). *
+ * It returns the number of lines printed. */
+
+/**/
+int
+printfmt(char *fmt, int n, int dopr, int doesc)
+{
+ char *p = fmt, nc[DIGBUFSIZE];
+ int l = 0, cc = 0, b = 0, s = 0, u = 0, m;
+
+ for (; *p; p++) {
+ /* Handle the `%' stuff (%% == %, %n == <number of matches>). */
+ if (doesc && *p == '%') {
+ if (*++p) {
+ m = 0;
+ switch (*p) {
+ case '%':
+ if (dopr)
+ putc('%', shout);
+ cc++;
+ break;
+ case 'n':
+ sprintf(nc, "%d", n);
+ if (dopr)
+ fprintf(shout, nc);
+ cc += strlen(nc);
+ break;
+ case 'B':
+ b = 1;
+ if (dopr)
+ tcout(TCBOLDFACEBEG);
+ break;
+ case 'b':
+ b = 0; m = 1;
+ if (dopr)
+ tcout(TCALLATTRSOFF);
+ break;
+ case 'S':
+ s = 1;
+ if (dopr)
+ tcout(TCSTANDOUTBEG);
+ break;
+ case 's':
+ s = 0; m = 1;
+ if (dopr)
+ tcout(TCSTANDOUTEND);
+ break;
+ case 'U':
+ u = 1;
+ if (dopr)
+ tcout(TCUNDERLINEBEG);
+ break;
+ case 'u':
+ u = 0; m = 1;
+ if (dopr)
+ tcout(TCUNDERLINEEND);
+ break;
+ case '{':
+ for (p++; *p && (*p != '%' || p[1] != '}'); p++, cc++)
+ if (dopr)
+ putc(*p, shout);
+ if (*p)
+ p++;
+ else
+ p--;
+ break;
+ }
+ if (dopr && m) {
+ if (b)
+ tcout(TCBOLDFACEBEG);
+ if (s)
+ tcout(TCSTANDOUTBEG);
+ if (u)
+ tcout(TCUNDERLINEBEG);
+ }
+ } else
+ break;
+ } else {
+ cc++;
+ if (*p == '\n') {
+ if (dopr) {
+ if (tccan(TCCLEAREOL))
+ tcout(TCCLEAREOL);
+ else {
+ int s = columns - 1 - (cc % columns);
+
+ while (s-- > 0)
+ putc(' ', shout);
+ }
+ }
+ l += 1 + (cc / columns);
+ cc = 0;
+ }
+ if (dopr)
+ putc(*p, shout);
+ }
+ }
+ if (dopr) {
+ if (tccan(TCCLEAREOL))
+ tcout(TCCLEAREOL);
+ else {
+ int s = columns - 1 - (cc % columns);
+
+ while (s-- > 0)
+ putc(' ', shout);
+ }
+ }
+ return l + (cc / columns);
+}
+
/* This is used to print expansions. */
/**/
diff -u -r oldsrc/zsh.export Src/zsh.export
--- oldsrc/zsh.export Fri Nov 5 09:00:37 1999
+++ Src/zsh.export Fri Nov 5 09:04:28 1999
@@ -1,4 +1,5 @@
#!
+SHTTY
addbuiltins
addconddefs
addedx
@@ -145,7 +146,6 @@
inwhat
isfirstln
jobtab
-keymapnamtab
lastpid
lastval
lchdir
@@ -200,7 +200,6 @@
ppid
prefork
prepromptfns
-printfmt
printif
printparamnode
printqt
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-11-05 9:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-05 9:09 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-11-22 9:36 Sven Wischnowsky
1999-11-22 15:14 ` Oliver Kiddle
1999-11-04 19:12 Oliver Kiddle
1999-11-05 9:19 ` Bart Schaefer
1999-11-05 11:56 ` Zefram
1999-11-05 15:40 ` Bart Schaefer
1999-11-05 17:30 ` Oliver Kiddle
1999-11-05 17:51 ` Bart Schaefer
1999-11-19 16:58 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199911050909.KAA02664@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).