summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYukihiro Matsumoto <matz@ruby-lang.org>1997-12-25 08:06:30 (GMT)
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-17 13:09:33 (GMT)
commit4207990990f8c8da414710816c32ae5fd0ae6987 (patch)
tree655a18271e3e85812f7fc6e008400f2f4f795593
parent66541bbb3630a5c512f8012c52ae777ab83beba5 (diff)
version 1.0-971225v1_0_971225
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-1.0-971225.tar.gz Thu Dec 25 17:06:30 1997 Yukihiro Matsumoto <matz@netlab.co.jp> * version 1.0-971225 * some minor bug fixes.
-rw-r--r--ChangeLog6
-rw-r--r--hash.c5
-rw-r--r--lib/date.rb2
-rw-r--r--main.c9
-rw-r--r--missing/nt.c3
-rw-r--r--st.c11
-rw-r--r--st.h5
-rw-r--r--version.h4
8 files changed, 25 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 6dbf442..8c4a1ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Dec 25 17:06:30 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * version 1.0-971225
+
+ * some minor bug fixes.
+
Tue Dec 9 17:54:56 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
* version 1.0-971209
diff --git a/hash.c b/hash.c
index 0ced1d5..e93c85a 100644
--- a/hash.c
+++ b/hash.c
@@ -108,11 +108,12 @@ hash_foreach_iter(key, value, arg)
return status;
}
-static int
+static VALUE
hash_foreach_call(arg)
struct hash_foreach_arg *arg;
{
- return st_foreach(arg->hash->tbl, hash_foreach_iter, arg);
+ st_foreach(arg->hash->tbl, hash_foreach_iter, arg);
+ return Qnil;
}
static int
diff --git a/lib/date.rb b/lib/date.rb
index cfb9b96..998c2e8 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -151,7 +151,7 @@ end
def Date.at(d)
if d.kind_of? Time
- return Date.new(1900+d.year, d.mon, d.mday)
+ return Date.new(1900+d.year, d.mon+1, d.mday)
end
if d.kind_of? Date
return Date.at(d.period)
diff --git a/main.c b/main.c
index 473b51d..98a1384 100644
--- a/main.c
+++ b/main.c
@@ -8,6 +8,8 @@
************************************************/
+#include "ruby.h"
+
#ifdef DJGPP
unsigned int _stklen = 0x100000;
#endif
@@ -16,13 +18,6 @@ unsigned int _stklen = 0x100000;
int _stacksize = 131072;
#endif
-#if (_MSC_VER >= 1000)
-__declspec(dllexport) void __stdcall ruby_init();
-__declspec(dllexport) void __stdcall ruby_options(int, char *[]);
-__declspec(dllexport) void __stdcall ruby_run(void);
-__declspec(dllexport) void __stdcall NtInitialize(int *, char ***);
-#endif
-
int
main(argc, argv, envp)
int argc;
diff --git a/missing/nt.c b/missing/nt.c
index 96db616..7210e1b 100644
--- a/missing/nt.c
+++ b/missing/nt.c
@@ -501,6 +501,7 @@ mypopen (char *cmd, char *mode)
return fp;
}
+
fRet = CreatePipe(&hInFile, &hOutFile, &sa, 2048L);
if (!fRet)
Fatal("cannot open pipe \"%s\" (%s)", cmd, strerror(errno));
@@ -863,7 +864,7 @@ NtCmdGlob (NtCmdLineElement *patt)
if (patt->flags & NTMALLOC)
free(patt->str);
- free(patt);
+ // free(patt); //TODO: memory leak occures here. we have to fix it.
}
//
diff --git a/st.c b/st.c
index 9067fad..6b25bc8 100644
--- a/st.c
+++ b/st.c
@@ -32,7 +32,9 @@ static struct st_hash_type type_strhash = {
strhash,
};
-extern void *xmalloc();
+void *xmalloc();
+void *xcalloc();
+void *xrealloc();
static void rehash();
#define max(a,b) ((a) > (b) ? (a) : (b))
@@ -84,7 +86,7 @@ st_init_strtable()
return st_init_table(&type_strhash);
}
-int
+void
st_free_table(table)
st_table *table;
{
@@ -175,7 +177,7 @@ st_insert(table, key, value)
}
}
-int
+void
st_add_direct(table, key, value)
st_table *table;
char *key;
@@ -334,7 +336,6 @@ st_delete_safe(table, key, value, never)
char *never;
{
int hash_val;
- st_table_entry *tmp;
register st_table_entry *ptr;
hash_val = do_hash(*key, table);
@@ -367,7 +368,7 @@ st_delete_safe(table, key, value, never)
return 0;
}
-int
+void
st_foreach(table, func, arg)
st_table *table;
enum st_retval (*func)();
diff --git a/st.h b/st.h
index cfd8645..c27b110 100644
--- a/st.h
+++ b/st.h
@@ -36,8 +36,9 @@ st_table *st_init_table();
st_table *st_init_table_with_size();
st_table *st_init_numtable();
st_table *st_init_strtable();
-int st_delete(), st_insert(), st_foreach(), st_free_table();
-int st_lookup(), st_find_or_add(), st_add_direct();
+int st_delete(), st_delete_safe(), st_insert();
+int st_lookup(), st_find_or_add();
+void st_foreach(), st_add_direct(), st_free_table();
st_table *st_copy();
#define ST_NUMCMP ((int (*)()) 0)
diff --git a/version.h b/version.h
index 390ba9f..a4aaff6 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
-#define RUBY_VERSION "1.0-971209"
-#define VERSION_DATE "97/12/09"
+#define RUBY_VERSION "1.0-971225"
+#define VERSION_DATE "97/12/25"