[comp.sys.apollo] Controlling case of returned name from name_$get_path

conliffe@caen.engin.umich.edu (Darryl C. Conliffe) (08/17/89)

While using name_$get_path, I find the returned pathname
is in all upper case letters.  Does anyone know (1) why,
and/or (2) how to get the pathname as it really exists?
-- 
___________________

 Darryl C. Conliffe  conliffe@caen.engin.umich.edu  (313) 721-6069
-------------------

conliffe@caen.engin.umich.edu (Darryl C. Conliffe) (08/22/89)

In article <452e55a9.1d6d5@apollo.HP.COM>, mishkin@apollo.HP.COM (Nathaniel Mishkin) writes:
> In article <45124af7.14df5@ulsoy.engin.umich.edu> conliffe@caen.engin.umich.edu (Darryl C. Conliffe) writes:
> >While using name_$get_path, I find the returned pathname
> >is in all upper case letters.  Does anyone know (1) why,
> >and/or (2) how to get the pathname as it really exists?
> 
> Contrary to a previous, almost correct followup to this posting, the
> correct call to use is "name_$get_path_lc", not "name_$get_path_cc".
> "name_$get_path_cc" (actually all the "_cc" calls) exist only for
> historical reasons -- they got put out before we realized that we really
> wanted all the name-returning calls to take an input parameter that
> specifies the actual length of the caller's output buffer.
> 

Nat, the _cc calls allow me to use them in code to run
on SR 9.7 and SR 10.  The _lc calls are defined only at SR 10.
They don't help me yet! ;=)

>                     -- Nat Mishkin

mishkin@apollo.HP.COM (Nathaniel Mishkin) (08/22/89)

In article <45124af7.14df5@ulsoy.engin.umich.edu> conliffe@caen.engin.umich.edu (Darryl C. Conliffe) writes:
>While using name_$get_path, I find the returned pathname
>is in all upper case letters.  Does anyone know (1) why,
>and/or (2) how to get the pathname as it really exists?

Contrary to a previous, almost correct followup to this posting, the
correct call to use is "name_$get_path_lc", not "name_$get_path_cc".
"name_$get_path_cc" (actually all the "_cc" calls) exist only for
historical reasons -- they got put out before we realized that we really
wanted all the name-returning calls to take an input parameter that
specifies the actual length of the caller's output buffer.

BTW, the reason that "name_$get_path" (in fact all the very old
name-returning calls) didn't start returning mixed-case names at sr10
was because we were concerned about programs that did things like:

        name_$get_path(...);
        if (...last 4 chars of returned path is ".TXT"...) {
            ...
        }

Note that the program would be checking for ".TXT" and not ".txt".  Of
course, some other program might use the returned pathname as *input*
to some call that takes a pathname and then *that* call will fail because
the file's name is "foo" not "FOO".  Basically, someone loses either
way.  However, the DOWNCASE hack can sort of accomodate the latter class
of program so we decided to not break the former class of program.

-- 
                    -- Nat Mishkin
                       Apollo Computer Inc., Chelmsford, MA
                       mishkin@apollo.com