summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-26 04:57:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-26 04:57:48 +0000
commitd25060dd825da29f1eeb18cde9a539071bcd0f3e (patch)
treef1c44c887f6993f1809a2e5dce66a333c312297f
parent17880a7ef4068af2f579a2b7c607ca15a9dcef51 (diff)
downloadruby-d25060dd825da29f1eeb18cde9a539071bcd0f3e.tar.gz
ruby-d25060dd825da29f1eeb18cde9a539071bcd0f3e.tar.xz
ruby-d25060dd825da29f1eeb18cde9a539071bcd0f3e.zip
* dln.c (load_1, dln_find_1): constified.
* ruby.c (usage): constified. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--dln.c4
-rw-r--r--ruby.c4
3 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b01fadda5..162ecec85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
-Thu Jul 26 13:37:47 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jul 26 13:57:45 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * dln.c (load_1, dln_find_1): constified.
* dln.c (conv_to_posix_path): removed.
+ * ruby.c (usage): constified.
+
* ruby.c (rubylib_mangled_path, rubylib_mangled_path2): return
VALUE instead of a pointer to static buffer.
diff --git a/dln.c b/dln.c
index deae9ac2c..8b4695400 100644
--- a/dln.c
+++ b/dln.c
@@ -612,7 +612,7 @@ reloc_repl(int no, struct undef *undef, struct indr_data *data)
static int
load_1(int fd, long disp, const char *need_init)
{
- static char *libc = LIBC_NAME;
+ static const char *libc = LIBC_NAME;
struct exec hdr;
struct relocation_info *reloc = NULL;
long block = 0;
@@ -1714,7 +1714,7 @@ dln_find_1(const char *fname, const char *path, int exe_flag /* non 0 if looking
#endif
#if defined(DOSISH)
if (exe_flag) {
- static const char *extension[] = {
+ static const char *const extension[] = {
#if defined(MSDOS)
".com", ".exe", ".bat",
#if defined(DJGPP)
diff --git a/ruby.c b/ruby.c
index 279fe4d0b..7fb36355f 100644
--- a/ruby.c
+++ b/ruby.c
@@ -80,7 +80,7 @@ usage(const char *name)
/* This message really ought to be max 23 lines.
* Removed -h because the user already knows that option. Others? */
- static const char *usage_msg[] = {
+ static const char *const usage_msg[] = {
"-0[octal] specify record separator (\\0, if no argument)",
"-a autosplit mode with -n or -p (splits $_ into $F)",
"-c check syntax only",
@@ -106,7 +106,7 @@ usage(const char *name)
"--version print the version",
NULL
};
- const char **p = usage_msg;
+ const char *const *p = usage_msg;
printf("Usage: %s [switches] [--] [programfile] [arguments]\n", name);
while (*p)