mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dln.c (load_1, dln_find_1): constified.
* ruby.c (usage): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d772c1af14
commit
73c59df711
3 changed files with 9 additions and 5 deletions
|
@ -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.
|
||||
|
||||
|
|
4
dln.c
4
dln.c
|
@ -636,7 +636,7 @@ load_1(fd, disp, need_init)
|
|||
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;
|
||||
|
@ -1791,7 +1791,7 @@ dln_find_1(fname, path, exe_flag)
|
|||
#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)
|
||||
|
|
4
ruby.c
4
ruby.c
|
@ -77,7 +77,7 @@ usage(name)
|
|||
/* This message really ought to be max 23 lines.
|
||||
* Removed -h because the user already knows that option. Others? */
|
||||
|
||||
static 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",
|
||||
|
@ -103,7 +103,7 @@ usage(name)
|
|||
"--version print the version",
|
||||
NULL
|
||||
};
|
||||
char **p = usage_msg;
|
||||
const char *const *p = usage_msg;
|
||||
|
||||
printf("Usage: %s [switches] [--] [programfile] [arguments]\n", name);
|
||||
while (*p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue