/[gcl]/gcl/o/pathname.d
ViewVC logotype

Diff of /gcl/o/pathname.d

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by camm, Wed Dec 1 17:46:32 2004 UTC revision 1.22 by camm, Fri Jun 10 15:13:59 2005 UTC
# Line 263  object item,a_list,value; Line 263  object item,a_list,value;
263   */   */
264    
265  object  object
266  pathname_case_word(word, casekey)  pathname_case_word(wrd, casekey)
267  object word, casekey;  object wrd, casekey;
268  {  {
269          object x=word;          object x=wrd;
270    
271  #ifdef ANSI_COMMON_LISP  #ifdef ANSI_COMMON_LISP
272    
# Line 274  object word, casekey; Line 274  object word, casekey;
274          int seen_upper=0;          int seen_upper=0;
275          int i;          int i;
276    
277          if (type_of(word) == t_string) {          if (type_of(wrd) == t_string) {
278              for (i=0; i<word->st.st_fillp; i++) {              for (i=0; i<wrd->st.st_fillp; i++) {
279                  if (isupper(word->st.st_self[i])) seen_upper=1;                  if (isupper(wrd->st.st_self[i])) seen_upper=1;
280                  if (islower(word->st.st_self[i])) seen_lower=1;                  if (islower(wrd->st.st_self[i])) seen_lower=1;
281              }              }
282              if (casekey == sKcommon) {              if (casekey == sKcommon) {
283                  if (seen_lower != seen_upper) {                  if (seen_lower != seen_upper) {
284                      x=copy_simple_string(word);                      x=copy_simple_string(wrd);
285                      for (i=0; i<word->st.st_fillp; i++) {                      for (i=0; i<wrd->st.st_fillp; i++) {
286                          if (isupper(word->st.st_self[i]))                          if (isupper(wrd->st.st_self[i]))
287                              x->st.st_self[i]=tolower(x->st.st_self[i]);                              x->st.st_self[i]=tolower(x->st.st_self[i]);
288                          else                          else
289                          if (islower(word->st.st_self[i]))                          if (islower(wrd->st.st_self[i]))
290                              x->st.st_self[i]=toupper(x->st.st_self[i]);                              x->st.st_self[i]=toupper(x->st.st_self[i]);
291                      }                      }
292                  }                  }
293              } else              } else
294              if (casekey == sKdowncase) {              if (casekey == sKdowncase) {
295                  if ((seen_lower != seen_upper) || pathname_resolve(pathKansi))                  if ((seen_lower != seen_upper) || pathname_resolve(pathKansi))
296                  {   x=copy_simple_string(word);                  {   x=copy_simple_string(wrd);
297                      for (i=0; i<word->st.st_fillp; i++)                      for (i=0; i<wrd->st.st_fillp; i++)
298                          if (isupper(word->st.st_self[i]))                          if (isupper(wrd->st.st_self[i]))
299                              x->st.st_self[i]=tolower(x->st.st_self[i]);                              x->st.st_self[i]=tolower(x->st.st_self[i]);
300                  }                  }
301              }              }

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26