* PATCH: mod_export
@ 2006-08-04 11:38 Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2006-08-04 11:38 UTC (permalink / raw)
To: Zsh hackers list
I messed up mod_export markers in two ways: there should be one for
(mb_)metacharlenconv(), and they weren't generated properly for the
stdargs/varargs-convoluted function declarations.
Index: Src/makepro.awk
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/makepro.awk,v
retrieving revision 1.3
diff -u -r1.3 makepro.awk
--- Src/makepro.awk 5 Jun 2006 16:55:38 -0000 1.3
+++ Src/makepro.awk 4 Aug 2006 11:36:06 -0000
@@ -91,6 +91,7 @@
# Handle each declarator.
if (match(line, /VA_ALIST/)) {
# Already has VARARGS handling.
+
# Put parens etc. back
gsub(/@[{]/, "((", line)
gsub(/@}/, "))", line)
@@ -105,6 +106,13 @@
if(locality ~ /E/)
dtype = "extern " dtype
+ if (match(line, /[_0-9A-Za-z]+\(VA_ALIST/))
+ dnam = substr(line, RSTART, RLENGTH-9)
+
+ # If this is exported, add it to the exported symbol list.
+ if (exported)
+ printf "X%s\n", dnam
+
printf "%s%s %s\n", locality, dtype, line
} else {
while(match(line, /^[^,]*,/)) {
Index: Src/utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
retrieving revision 1.131
diff -u -r1.131 utils.c
--- Src/utils.c 3 Aug 2006 15:37:49 -0000 1.131
+++ Src/utils.c 4 Aug 2006 11:36:08 -0000
@@ -3877,7 +3877,7 @@
*/
/**/
-int
+mod_export int
mb_metacharlenconv(const char *s, wint_t *wcp)
{
char inchar;
@@ -3980,7 +3980,7 @@
/* Simple replacement for mb_metacharlenconv */
/**/
-int
+mod_export int
metacharlenconv(char *x, int *c)
{
if (*x == Meta) {
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-04 11:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-04 11:38 PATCH: mod_export Peter Stephenson
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).