zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: AIX .export files
@ 1999-11-04 19:12 Oliver Kiddle
  1999-11-05  9:19 ` Bart Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Kiddle @ 1999-11-04 19:12 UTC (permalink / raw)
  To: Zsh workers

I had a go at compiling 3.1.6-bart-8 on AIX. The first problem I had
was with the standard AIX awk. I got this error:

 awk -f ../../Src/makepro.awk parameter.c Src/Modules > parameter.pro
awk: 0602-564 Format item static void shempty  cannot be longer than
3,000 bytes.
 The input line number is 1756. The file is parameter.c.
 The source line number is 179.

The generated parameter.pro was fine up to and including the blank line
after the '#ifndef GLOBAL_PROTOTYPES' line. I was able to create it by
transfering the file to a linux machine and using gawk. Has anyone got
any thoughts on what the problem is - my guess is a limitation of AIX
awk. Can parameter.c be changed to avoid it?

I've also attached a patch to the .export files for compiling on AIX.
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?

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.

--- zle.export.bak	Tue Oct 19 00:30:27 1999
+++ zle.export	Thu Nov  4 18:57:07 1999
@@ -3,6 +3,7 @@
 addzlefunction
 amatches
 asklist
+autoq
 backdel
 backkill
 bindk
@@ -10,12 +11,21 @@
 brbeg
 brend
 calclist
+cfargs
+cfret
 clearflag
 clearlist
 clearscreen
+clwnum
+clwords
+clwpos
+cmdstr
+compfunc
+compwidget
 deletezlefunction
 do_menucmp
 do_single
+dupstrspace
 fixsuffix
 foredel
 forekill
@@ -23,42 +33,84 @@
 getkey
 getkeycmd
 getzlequery
+hascompmod
 hasoldlist
 hasperm
+inbackt
+incompfunc
+instring
+inststrlen
+insubscr
 invalidatelist
+iremovesuffix
 lastambig
-lastmatches
+lastbrbeg
+lastbrend
+lastcmd
 lastlmatches
+lastmatches
+lastpostbr
+lastprebr
 lbindk
+linarr
+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
 redisplay
 refthingy
 reversemenucomplete
 selectlocalmap
+showagain
 showinglist
 skipnolist
 spaceinline
+strbpcmp
+strbpcmp
+suffixlen
 tcmultout
 tcout
 thingies
 trashzle
 ungetkeycmd
 unlinkkeymap
+unmetafy_line
+useglob
+usemenu
 validlist
+varedarg
+varname
+wb
+we
+zlehooks
 zlenoargs
 zmod
 zrefresh
--- /dev/null	Thu Nov  4 18:38:43 1999
+++ complete.export	Thu Nov  4 18:58:00 1999
@@ -0,0 +1,126 @@
+#!
+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
+complastprompt
+comppatmatch
+compprefix
+compqiprefix
+compqisuffix
+compquote
+compsuffix
+compwords
+comp_match
+comp_str
+cpcmatcher
+ctokenize
+curexpl
+deletezlefunction
+do_menucmp
+do_single
+dupbrinfo
+dupstrspace
+endcmgroup
+fixsuffix
+foredel
+freebrinfo
+freecmatcher
+freematches
+getkeycmd
+get_user_var
+hasmatched
+hasoldlist
+haspattern
+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
+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
--- zsh.export.bak	Sun Sep 26 22:51:25 1999
+++ zsh.export	Thu Nov  4 18:58:42 1999
@@ -1,5 +1,4 @@
 #!
-SHTTY
 addbuiltins
 addconddefs
 addedx
@@ -10,14 +9,17 @@
 addmathfunc
 addmathfuncs
 addparamdefs
+adduserdir
 addwrapper
-arrvargetfn
-arrvarsetfn
 aliastab
+alloc
 alloc_stackp
 appstr
 arrdup
 arrlen
+arrsetfn
+arrvargetfn
+arrvarsetfn
 attachtty
 bangchar
 bin_notavail
@@ -33,15 +35,16 @@
 cmdnamtab
 columns
 compctlreadptr
+condtab
 cond_match
 cond_str
 cond_val
-condtab
 convbase
 coprocin
 coprocout
 countlinknodes
 countprompt
+createaliasnode
 createparam
 ctxtlex
 curhist
@@ -78,9 +81,9 @@
 fallback_zleread
 fetchvalue
 fignore
-file_type
 filesub
 filesubstr
+file_type
 findcmd
 freearray
 freeheap
@@ -102,13 +105,12 @@
 getsparam
 getstrvalue
 gettempname
-glob_pre
-glob_suf
 global_heapalloc
 global_permalloc
 globlist
+glob_pre
+glob_suf
 gotwordptr
-has_token
 hasam
 hashcmd
 hasher
@@ -116,6 +118,7 @@
 hashsetfn
 hasspecial
 haswilds
+has_token
 hcalloc
 hgetc
 hgetline
@@ -142,6 +145,7 @@
 inwhat
 isfirstln
 jobtab
+keymapnamtab
 lastpid
 lastval
 lchdir
@@ -164,10 +168,10 @@
 mypid
 nameddirtab
 ncalloc
-new_heaps
 newhashtable
 newlinklist
 newparamtable
+new_heaps
 nicechar
 nicezputs
 niceztrdup
@@ -185,8 +189,8 @@
 paramtab
 parbegin
 parend
-parse_string
 parsestr
+parse_string
 patcompile
 path
 pathchecked
@@ -196,6 +200,7 @@
 ppid
 prefork
 prepromptfns
+printfmt
 printif
 printparamnode
 printqt
@@ -235,6 +240,7 @@
 shout
 shttyinfo
 sigfuncs
+sigmsg
 sigtrapped
 singsub
 skipparens
@@ -255,11 +261,13 @@
 strvargetfn
 strvarsetfn
 switch_heaps
+SHTTY
 tclen
 tcstr
 termflags
-thisjob
 tgoto
+thingytab
+thisjob
 tok
 tokenize
 tokstr
@@ -315,4 +323,5 @@
 ztrftime
 ztrlen
 ztrsub
+zwarn
 zwarnnam


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
  1999-11-04 19:12 PATCH: AIX .export files Oliver Kiddle
@ 1999-11-05  9:19 ` Bart Schaefer
  1999-11-05 11:56   ` Zefram
  0 siblings, 1 reply; 10+ messages in thread
From: Bart Schaefer @ 1999-11-05  9:19 UTC (permalink / raw)
  To: Zsh workers

On Nov 4,  7:12pm, Oliver Kiddle wrote:
} Subject: PATCH: AIX .export files
}
} I had a go at compiling 3.1.6-bart-8 on AIX. The first problem I had
} was with the standard AIX awk. I got this error:
} 
}  awk -f ../../Src/makepro.awk parameter.c Src/Modules > parameter.pro
} awk: 0602-564 Format item static void shempty  cannot be longer than
} 3,000 bytes.

This appears to refer to the awk-variable `local' which is being printed
during the END block, and which has accumulated all the static function
prototypes during processing of the file.

Possible solutions:

(1) Try using
	printf "%s", locals
    on line 149 of makepro.awk.
(2) Reorder the functions so as many as possible are defined before they
    are referenced, and then remove the /**/ from all except those that
    cannot be so ordered.
(3) Break up parameter.c into several files.
(4) Rewrite makepro.awk to avoid accumulating all the function def'n's
    before printing any of them, thus producing uglier .pro files.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
  1999-11-05  9:19 ` Bart Schaefer
@ 1999-11-05 11:56   ` Zefram
  1999-11-05 15:40     ` Bart Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Zefram @ 1999-11-05 11:56 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

Bart Schaefer wrote:
>(4) Rewrite makepro.awk to avoid accumulating all the function def'n's
>    before printing any of them, thus producing uglier .pro files.

This one gets my vote.  The .pro files aren't primarily meant to be nice;
I made it collect all the locals together to make it as close as possible
to how a human would lay it out, but if that's causing problems it can
be sacrificed.

Or there's another possibility: run makepro.awk over the file twice,
once generating local definitions and once externals, and glue the two
together.  You'd get the current form of .pro files, without requiring
awk to handle lengthy strings, at the cost of doubling generation time.

-zefram


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
  1999-11-05 11:56   ` Zefram
@ 1999-11-05 15:40     ` Bart Schaefer
  1999-11-05 17:30       ` Oliver Kiddle
  0 siblings, 1 reply; 10+ messages in thread
From: Bart Schaefer @ 1999-11-05 15:40 UTC (permalink / raw)
  To: zsh-workers

On Nov 5, 11:56am, Zefram wrote:
} Subject: Re: PATCH: AIX .export files
}
} Bart Schaefer wrote:
} >(4) Rewrite makepro.awk to avoid accumulating all the function def'n's
} >    before printing any of them, thus producing uglier .pro files.
} 
} This one gets my vote.

I'm actually quite optimistic that `printf "%s", locals' will do the trick.
The error message indicates that the *format* string to printf can't be
more than 3k, not that there's a limit on the rest of the data.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
  1999-11-05 15:40     ` Bart Schaefer
@ 1999-11-05 17:30       ` Oliver Kiddle
  1999-11-05 17:51         ` Bart Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Kiddle @ 1999-11-05 17:30 UTC (permalink / raw)
  To: zsh-workers

Bart Schaefer wrote:
> 
> I'm actually quite optimistic that `printf "%s", locals' will do the trick.
> The error message indicates that the *format* string to printf can't be
> more than 3k, not that there's a limit on the rest of the data.

I replaced line 149 with that and I still get the error message about
'Format item %s cannot be longer than 3000 bytes.'

I also tried Sven's patch for the .export files and got a few undefined
symbols. I won't have a chance until Monday to finish building a full
list of the missing symbols but I'll try to get it done then.

What options should I be using with patch. The patch I'm using (which is
the GNU one not IBM's), couldn't cope with the lines starting 'diff' in
the patch file and it also couldn't cope with the part for compresult.c.
It initially though it was reversed and when I told it that it wasn't,
it failed to apply.

Oliver Kiddle


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
  1999-11-05 17:30       ` Oliver Kiddle
@ 1999-11-05 17:51         ` Bart Schaefer
  1999-11-19 16:58           ` Oliver Kiddle
  0 siblings, 1 reply; 10+ messages in thread
From: Bart Schaefer @ 1999-11-05 17:51 UTC (permalink / raw)
  To: Oliver Kiddle, zsh-workers

On Nov 5,  5:30pm, Oliver Kiddle wrote:
} Subject: Re: PATCH: AIX .export files
}
} Bart Schaefer wrote:
} > 
} > I'm actually quite optimistic that `printf "%s", locals' will do the trick.
} > The error message indicates that the *format* string to printf can't be
} > more than 3k, not that there's a limit on the rest of the data.
} 
} I replaced line 149 with that and I still get the error message about
} 'Format item %s cannot be longer than 3000 bytes.'

Rats.

Well, one last thing to try before hacking more vigorously is

	print locals

i.e. forget "printf" (I'm not sure why it was used there, anyway).

} I also tried Sven's patch for the .export files and got a few undefined
} symbols. I won't have a chance until Monday to finish building a full
} list of the missing symbols but I'll try to get it done then.
} 
} What options should I be using with patch. The patch I'm using (which is
} the GNU one not IBM's), couldn't cope with the lines starting 'diff' in
} the patch file and it also couldn't cope with the part for compresult.c.

That's odd; it applied straightaway for me.  Did you use -p0 ?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
  1999-11-05 17:51         ` Bart Schaefer
@ 1999-11-19 16:58           ` Oliver Kiddle
  0 siblings, 0 replies; 10+ messages in thread
From: Oliver Kiddle @ 1999-11-19 16:58 UTC (permalink / raw)
  To: Zsh workers

Sorry for being a bit slow to reply to these - I've been quite busy at
work recently.

Bart Schaefer wrote:

> Well, one last thing to try before hacking more vigorously is
>         print locals

That worked - brilliant. I've attached the patch to make that change.

> } What options should I be using with patch. The patch I'm using (which is
> That's odd; it applied straightaway for me.  Did you use -p0 ?

I didn't use -p0 - I was using -p1. I didn't think properly when I read
the man page. I've had problems with patches before and that must have
been the problem. Thanks.

Sven 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 thi

I applied your patch and got unresolved symbols when building
complist.so. These symbols turned out to be all listed in zle.export. I
altered the Src/Zle/Makefile so that the EXPIMP_complist = line included
a reference to import zle.export. Zsh then compiled without any further
problems. Obviously the Makefile is auto-generated so a patch to it
isn't the proper fix. I don't understand the whole make setup so I'm not
sure what is - adding zle to complist.mdd's moddeps might be?

Oliver Kiddle

--- Src/makepro.awk	Thu Apr 15 19:14:21 1999
+++ Src/makepro.awk.bak	Mon Nov  8 12:05:56 1999
@@ -146,7 +146,7 @@
 	printf "\n"
 	printf "#ifndef GLOBAL_PROTOTYPES\n"
 	printf "\n"
-	printf locals
+	print locals
 	printf "\n"
 	printf "#endif /* !GLOBAL_PROTOTYPES */\n"
     }


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
  1999-11-22  9:36 Sven Wischnowsky
@ 1999-11-22 15:14 ` Oliver Kiddle
  0 siblings, 0 replies; 10+ messages in thread
From: Oliver Kiddle @ 1999-11-22 15:14 UTC (permalink / raw)
  To: Zsh workers

Sven Wischnowsky wrote:

> Yes, I guess. I thought that it would automatically use those
> moddeps'ed in complete.mdd.
> 
> Could you try?

That solved the trouble with complist.so - thanks.

Compiling pws-9, I again got unresolved symbols - presumably due to
changes since bart-8. This time it was for compctl.so which, it seems
also depends on zle. The same problem then for computil.so (which only
uses incompfunc from zle.so).

I've fixed the .export files, this time taking more care to put
symbols in the right .export file though I may have made mistakes. I
also checked for cases of a symbol appearing in more than one .export
file which revealed that compctl.export should be deleted I hope my
patch to .distfiles is the correct way to indicate this.

Oliver

--- Src/zsh.export.bak	Fri Nov 19 17:51:39 1999
+++ Src/zsh.export	Mon Nov 22 15:07:03 1999
@@ -89,6 +89,7 @@
 freearray
 freeheap
 freelinklist
+freepatprog
 freestr
 freestruct
 getaparam
@@ -106,6 +107,7 @@
 getsparam
 getstrvalue
 gettempname
+getvalue
 global_heapalloc
 global_permalloc
 globlist
@@ -227,10 +229,13 @@
 runshfunc
 scancountparams
 scanhashtable
+sepjoin
 setaparam
+setarrvalue
 sethparam
 setlimits
 setsparam
+setstrvalue
 settrap
 settyinfo
 sfcontext
@@ -260,7 +265,6 @@
 strvargetfn
 strvarsetfn
 switch_heaps
-SHTTY
 tclen
 tcstr
 termflags
--- Src/Zle/compctl.mdd.bak	Mon Nov 22 13:34:14 1999
+++ Src/Zle/compctl.mdd	Mon Nov 22 13:34:26 1999
@@ -1,4 +1,4 @@
-moddeps="complete"
+moddeps="complete zle"
 
 autobins="compctl"
 
--- Src/Zle/complete.export.bak	Mon Nov 22 12:32:55 1999
+++ Src/Zle/complete.export	Mon Nov 22 12:41:58 1999
@@ -19,6 +19,7 @@
 compprefix
 compqiprefix
 compqisuffix
+compqstack
 compquote
 compsuffix
 compwords
@@ -58,6 +59,7 @@
 minfo
 mnum
 mstack
+multiquote
 nmatches
 onlyexpl
 parse_cmatcher
@@ -68,5 +70,6 @@
 ripre
 set_gmatcher
 set_list_array
+tildequote
 update_bmatchers
 ztat
--- Src/Zle/computil.mdd.bak	Mon Nov 22 14:23:44 1999
+++ Src/Zle/computil.mdd	Mon Nov 22 14:23:57 1999
@@ -1,4 +1,4 @@
-moddeps="complete"
+moddeps="complete zle"
 
 objects="computil.o"
 
--- Src/Zle/zle.export.bak	Fri Nov 19 17:51:39 1999
+++ Src/Zle/zle.export	Mon Nov 22 12:39:34 1999
@@ -16,6 +16,7 @@
 clwnum
 clwords
 clwpos
+clwsize
 cmdstr
 compfunc
 compwidget
--- Src/Zle/.distfiles.bak	Mon Nov 22 13:19:48 1999
+++ Src/Zle/.distfiles	Mon Nov 22 15:03:02 1999
@@ -2,7 +2,7 @@
     .cvsignore .distfiles .exrc
     comp.h complete.mdd complete.c complete.export
     compcore.c compmatch.c compresult.c
-    compctl.mdd compctl.c compctl.h compctl.export
+    compctl.mdd compctl.c compctl.h
     complist.mdd complist.c
     computil.mdd computil.c
     deltochar.mdd deltochar.c


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
@ 1999-11-22  9:36 Sven Wischnowsky
  1999-11-22 15:14 ` Oliver Kiddle
  0 siblings, 1 reply; 10+ messages in thread
From: Sven Wischnowsky @ 1999-11-22  9:36 UTC (permalink / raw)
  To: zsh-workers


Oliver Kiddle wrote:

> ...
> 
> Sven 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 thi
> 
> I applied your patch and got unresolved symbols when building
> complist.so. These symbols turned out to be all listed in zle.export. I
> altered the Src/Zle/Makefile so that the EXPIMP_complist = line included
> a reference to import zle.export. Zsh then compiled without any further
> problems. Obviously the Makefile is auto-generated so a patch to it
> isn't the proper fix. I don't understand the whole make setup so I'm not
> sure what is - adding zle to complist.mdd's moddeps might be?

Yes, I guess. I thought that it would automatically use those
moddeps'ed in complete.mdd.

Could you try?

Bye
 Sven

diff -u oldsrc/Zle/complist.mdd Src/Zle/complist.mdd
--- oldsrc/Zle/complist.mdd	Mon Nov 22 10:21:03 1999
+++ Src/Zle/complist.mdd	Mon Nov 22 10:21:17 1999
@@ -1,3 +1,3 @@
-moddeps="complete"
+moddeps="complete zle"
 
 objects="complist.o"

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: PATCH: AIX .export files
@ 1999-11-05  9:09 Sven Wischnowsky
  0 siblings, 0 replies; 10+ messages in thread
From: Sven Wischnowsky @ 1999-11-05  9:09 UTC (permalink / raw)
  To: zsh-workers


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~1999-11-22 15:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-04 19:12 PATCH: AIX .export files 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
1999-11-05  9:09 Sven Wischnowsky
1999-11-22  9:36 Sven Wischnowsky
1999-11-22 15:14 ` Oliver Kiddle

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).