about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-04 15:21:57 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-04 15:21:57 +0000
commitd9e74e94dd7cfff1faa5761f3e8e4b48282aa580 (patch)
treec4afb5cb0ec61f616511f1a64a64a38d19df814b
parent3a903f4839911204f04b4d2777a189941c9e5c06 (diff)
downloadzsh-d9e74e94dd7cfff1faa5761f3e8e4b48282aa580.tar.gz
zsh-d9e74e94dd7cfff1faa5761f3e8e4b48282aa580.tar.xz
zsh-d9e74e94dd7cfff1faa5761f3e8e4b48282aa580.zip
zsh-workers:7353
-rw-r--r--Src/Modules/example.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Src/Modules/example.c b/Src/Modules/example.c
index 50b8c1626..b0bbee967 100644
--- a/Src/Modules/example.c
+++ b/Src/Modules/example.c
@@ -32,7 +32,7 @@
 
 /* parameters */
 
-static long intparam;
+static zlong intparam;
 static char *strparam;
 static char **arrparam;
 
@@ -55,7 +55,11 @@ bin_example(char *nam, char **args, char *ops, int func)
 	fputs(*args, stdout);
     }
     printf("\nName: %s\n", nam);
+#ifdef ZSH_64_BIT_TYPE
+    printf("\nInteger Parameter: %s\n", output64(intparam));
+#else
     printf("\nInteger Parameter: %ld\n", intparam);
+#endif
     printf("String Parameter: %s\n", strparam ? strparam : "");
     printf("Array Parameter:");
     if (p)
@@ -76,10 +80,10 @@ bin_example(char *nam, char **args, char *ops, int func)
 static int
 cond_p_len(char **a, int id)
 {
-    char *s1 = cond_str(a, 0);
+    char *s1 = cond_str(a, 0, 0);
 
     if (a[1]) {
-	long v = cond_val(a, 1);
+	zlong v = cond_val(a, 1);
 
 	return strlen(s1) == v;
     } else {
@@ -91,7 +95,7 @@ cond_p_len(char **a, int id)
 static int
 cond_i_ex(char **a, int id)
 {
-    char *s1 = cond_str(a, 0), *s2 = cond_str(a, 1);
+    char *s1 = cond_str(a, 0, 0), *s2 = cond_str(a, 1, 0);
 
     return !strcmp("example", dyncat(s1, s2));
 }