[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01790] [ruby-1.5.3] path_check_1

From: ts <decoux@...>
Date: 2000-03-09 13:41:45 UTC
List: ruby-talk #1790
 I don't understand these lines in file.c

static int
path_check_1(path)
    char *path;
{
    struct stat st;
    char *p = 0;
    char *s;

    if (!is_absolute_path(path)) {
        char buf[MAXPATHLEN+1];

#ifdef HAVE_GETCWD
        if (getcwd(path, sizeof(path)) == 0) return 0;
#else
        if (getwd(path) == 0) return 0;
#endif
 

 If I'm right sizeof(path) == sizeof(char *) this mean that path_check_1
 always return 0 if the path is not absolute and length of absolute 
 path > 4 

 (1960, 1962).gsub!(/path/, 'buf'), no ?


Guy Decoux

In This Thread

Prev Next