|
From: Earnie B. <ea...@us...> - 2005-05-22 10:35:51
|
Update of /cvsroot/mingw/msys/packages/bash/2.05b/builtins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13866/builtins Modified Files: cd.def fc.def Log Message: * ChangeLog: New file. * support/config.guess: Add support for MSYS. * support/config.sub: Ditto. * builtin/cd.def (pwd): Add -W switch. * builtin/fc.def (fc_readline): Handle \r. * subst.c (string_list_dollar_at): Handle win32 separators. (read_comsub): Handle \r. (command_substitute): Ditto. * variables.c (make_variable_value): Path conversion for prefix variable. (bind_variable): Handle \r. * parse.y (yy_getc): Ditto. * y.tab.c (yy_getc): Ditto. Index: cd.def =================================================================== RCS file: /cvsroot/mingw/msys/packages/bash/2.05b/builtins/cd.def,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cd.def 22 May 2005 10:13:05 -0000 1.1 --- cd.def 22 May 2005 10:35:28 -0000 1.2 *************** *** 292,299 **** $BUILTIN pwd $FUNCTION pwd_builtin ! $SHORT_DOC pwd [-PL] Print the current working directory. With the -P option, pwd prints the physical directory, without any symbolic links; the -L option ! makes pwd follow symbolic links. $END --- 292,300 ---- $BUILTIN pwd $FUNCTION pwd_builtin ! $SHORT_DOC pwd [-PLW] Print the current working directory. With the -P option, pwd prints the physical directory, without any symbolic links; the -L option ! makes pwd follow symbolic links; the -W option makes pwd print the absolute ! windows path. $END *************** *** 312,316 **** verbatim_pwd = no_symbolic_links; reset_internal_getopt (); ! while ((opt = internal_getopt (list, "LP")) != -1) { switch (opt) --- 313,317 ---- verbatim_pwd = no_symbolic_links; reset_internal_getopt (); ! while ((opt = internal_getopt (list, "LPW")) != -1) { switch (opt) *************** *** 322,325 **** --- 323,329 ---- verbatim_pwd = 0; break; + case 'W': + verbatim_pwd = 2; + break; default: builtin_usage (); *************** *** 331,336 **** #define tcwd the_current_working_directory ! directory = tcwd ? (verbatim_pwd ? sh_physpath (tcwd, 0) : tcwd) : get_working_directory ("pwd"); #undef tcwd --- 335,350 ---- #define tcwd the_current_working_directory ! switch (verbatim_pwd) ! { ! case 2: ! { ! directory = xmalloc(PATH_MAX); ! cygwin_conv_to_win32_path (tcwd, directory); ! } ! break; ! default: ! directory = tcwd ? (verbatim_pwd ? sh_physpath (tcwd, 0) : tcwd) : get_working_directory ("pwd"); + } #undef tcwd Index: fc.def =================================================================== RCS file: /cvsroot/mingw/msys/packages/bash/2.05b/builtins/fc.def,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fc.def 22 May 2005 10:13:05 -0000 1.1 --- fc.def 22 May 2005 10:35:29 -0000 1.2 *************** *** 510,513 **** --- 510,516 ---- { register int c; + #ifdef __MSYS__ + register int d; + #endif int line_len = 0, lindex = 0; char *line = (char *)NULL; *************** *** 520,523 **** --- 523,530 ---- if (c == '\n') { + #ifdef __MSYS__ + if (d == '\r') + lindex==; + #endif line[lindex++] = '\n'; line[lindex++] = '\0'; *************** *** 526,529 **** --- 533,539 ---- else line[lindex++] = c; + #ifdef __MSYS__ + d = c; + #endif } |