Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: minor module-condition fixes
- X-seq: zsh-workers 4880
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: PATCH: minor module-condition fixes
- Date: Tue, 5 Jan 1999 14:05:27 +0100 (MET)
The patch below fixes:
- The code in code.c printed an extra `-' before the condition name.
- Defining autoloaded condition codes in the .mdd files wasn't
possible until now (the patch makes `auto{in,pre}fixconds' be used).
Bye
Sven
*** Util/zsh-development-guide.old Tue Jan 5 14:00:05 1999
--- Util/zsh-development-guide Tue Jan 5 14:01:12 1999
***************
*** 120,134 ****
is build. To describe the module it can/should set the following shell
variables:
! - moddeps modules on which this module depends (default none)
! - nozshdep non-empty indicates no dependence on the `zsh' pseudo-module
! - alwayslink if non-empty, always link the module into the executable
! - autobins builtins defined by the module, for autoloading
! - objects .o files making up this module (*must* be defined)
! - proto .pro files for this module (default generated from $objects)
! - headers extra headers for this module (default none)
! - hdrdeps extra headers on which the .mdh depends (default none)
! - otherincs extra headers that are included indirectly (default none)
Be sure to put the values in quotes. For further enlightenment have a
look at the `mkmakemod.sh' script in the Src directory of the
--- 120,137 ----
is build. To describe the module it can/should set the following shell
variables:
! - moddeps modules on which this module depends (default none)
! - nozshdep non-empty indicates no dependence on the `zsh' pseudo-module
! - alwayslink if non-empty, always link the module into the executable
! - autobins builtins defined by the module, for autoloading
! - autoinfixconds infix condition codes defined by the module, for
! autoloading (without the leading `-')
! - autoprefixconds like autoinfixconds, but for prefix condition codes
! - objects .o files making up this module (*must* be defined)
! - proto .pro files for this module (default generated from $objects)
! - headers extra headers for this module (default none)
! - hdrdeps extra headers on which the .mdh depends (default none)
! - otherincs extra headers that are included indirectly (default none)
Be sure to put the values in quotes. For further enlightenment have a
look at the `mkmakemod.sh' script in the Src directory of the
diff -c os/cond.c Src/cond.c
*** os/cond.c Fri Dec 18 10:06:36 1998
--- Src/cond.c Tue Jan 5 13:50:40 1999
***************
*** 54,60 ****
int l = arrlen((char **) c->right);
if (l < cd->min || (cd->max >= 0 && l > cd->max)) {
! zerr("unrecognized condition: `-%s'", (char *) c->left, 0);
return 0;
}
}
--- 54,60 ----
int l = arrlen((char **) c->right);
if (l < cd->min || (cd->max >= 0 && l > cd->max)) {
! zerr("unrecognized condition: `%s'", (char *) c->left, 0);
return 0;
}
}
***************
*** 68,80 ****
int l = arrlen(a);
if (l < cd->min || (cd->max >= 0 && l > cd->max)) {
! zerr("unrecognized condition: `-%s'", (char *) c->left, 0);
return 0;
}
a[0] = (char *) c->left;
return cd->handler(a, cd->condid);
} else
! zerr("unrecognized condition: `-%s'", (char *) c->left, 0);
}
return 0;
}
--- 68,80 ----
int l = arrlen(a);
if (l < cd->min || (cd->max >= 0 && l > cd->max)) {
! zerr("unrecognized condition: `%s'", (char *) c->left, 0);
return 0;
}
a[0] = (char *) c->left;
return cd->handler(a, cd->condid);
} else
! zerr("unrecognized condition: `%s'", (char *) c->left, 0);
}
return 0;
}
diff -c os/mkbltnmlst.sh Src/mkbltnmlst.sh
*** os/mkbltnmlst.sh Tue Jan 5 13:51:24 1999
--- Src/mkbltnmlst.sh Tue Jan 5 13:53:26 1999
***************
*** 24,33 ****
*" $x_mod "*) ;;
*) echo "/* non-linked-in known module \`$x_mod' */"
eval "loc=\$loc_$x_mod"
! unset moddeps autobins
. $srcdir/../$loc/${x_mod}.mdd
for bin in $autobins; do
echo " add_autobin(\"$bin\", \"$x_mod\");"
done
for dep in $moddeps; do
case $bin_mods in
--- 24,39 ----
*" $x_mod "*) ;;
*) echo "/* non-linked-in known module \`$x_mod' */"
eval "loc=\$loc_$x_mod"
! unset moddeps autobins autoinfixconds autoprefixconds
. $srcdir/../$loc/${x_mod}.mdd
for bin in $autobins; do
echo " add_autobin(\"$bin\", \"$x_mod\");"
+ done
+ for cond in $autoinfixconds; do
+ echo " add_autocond(\"$cond\", 1, \"$x_mod\");"
+ done
+ for cond in $autoprefixconds; do
+ echo " add_autocond(\"$cond\", 0, \"$x_mod\");"
done
for dep in $moddeps; do
case $bin_mods in
diff -c os/mkmakemod.sh Src/mkmakemod.sh
*** os/mkmakemod.sh Tue Jan 5 13:51:24 1999
--- Src/mkmakemod.sh Tue Jan 5 13:56:31 1999
***************
*** 17,31 ****
# defines one module. The .mdd file is actually a shell script, which will
# be sourced. It may define the following shell variables:
#
! # moddeps modules on which this module depends (default none)
! # nozshdep non-empty indicates no dependence on the `zsh' pseudo-module
! # alwayslink if non-empty, always link the module into the executable
! # autobins builtins defined by the module, for autoloading
! # objects .o files making up this module (*must* be defined)
! # proto .pro files for this module (default generated from $objects)
! # headers extra headers for this module (default none)
! # hdrdeps extra headers on which the .mdh depends (default none)
! # otherincs extra headers that are included indirectly (default none)
#
# The .mdd file may also include a Makefile.in fragment between lines
# `:<<\Make' and `Make' -- this will be copied into Makemod.in.
--- 17,34 ----
# defines one module. The .mdd file is actually a shell script, which will
# be sourced. It may define the following shell variables:
#
! # moddeps modules on which this module depends (default none)
! # nozshdep non-empty indicates no dependence on the `zsh' pseudo-module
! # alwayslink if non-empty, always link the module into the executable
! # autobins builtins defined by the module, for autoloading
! # autoinfixconds infix condition codes defined by the module, for
! # autoloading (without the leading `-')
! # autoprefixconds like autoinfixconds, but for prefix condition codes
! # objects .o files making up this module (*must* be defined)
! # proto .pro files for this module (default generated from $objects)
! # headers extra headers for this module (default none)
! # hdrdeps extra headers on which the .mdh depends (default none)
! # otherincs extra headers that are included indirectly (default none)
#
# The .mdd file may also include a Makefile.in fragment between lines
# `:<<\Make' and `Make' -- this will be copied into Makemod.in.
***************
*** 167,173 ****
for module in $here_modules; do
unset moddeps nozshdep alwayslink hasexport
! unset autobins
unset objects proto headers hdrdeps otherincs
. $top_srcdir/$the_subdir/${module}.mdd
test -n "${moddeps+set}" || moddeps=
--- 170,176 ----
for module in $here_modules; do
unset moddeps nozshdep alwayslink hasexport
! unset autobins autoinfixconds autoprefixconds
unset objects proto headers hdrdeps otherincs
. $top_srcdir/$the_subdir/${module}.mdd
test -n "${moddeps+set}" || moddeps=
diff -c os/Modules/example.mdd Src/Modules/example.mdd
*** os/Modules/example.mdd Tue Jan 5 13:51:44 1999
--- Src/Modules/example.mdd Tue Jan 5 13:56:59 1999
***************
*** 1,3 ****
--- 1,6 ----
autobins="example"
+ autoinfixconds="ex"
+ autoprefixconds="len"
+
objects="example.o"
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author