comparison src/w32.c @ 15213:867e4ead88d9

(map_win32_filename): If not a fat volume, cvt name to dos.
author Richard M. Stallman <rms@gnu.org>
date Sat, 11 May 1996 17:26:00 +0000
parents 6565b268b12a
children e44ef00f509f
comparison
equal deleted inserted replaced
15212:3b8ece0572d5 15213:867e4ead88d9
761 map_win32_filename (const char * name, const char ** pPath) 761 map_win32_filename (const char * name, const char ** pPath)
762 { 762 {
763 static char shortname[MAX_PATH]; 763 static char shortname[MAX_PATH];
764 char * str = shortname; 764 char * str = shortname;
765 char c; 765 char c;
766 const char * orig_name = name;
767 char * path; 766 char * path;
768 767
769 if (is_fat_volume (name, &path)) /* truncate to 8.3 */ 768 if (is_fat_volume (name, &path)) /* truncate to 8.3 */
770 { 769 {
771 register int left = 8; /* maximum number of chars in part */ 770 register int left = 8; /* maximum number of chars in part */
839 } 838 }
840 break; 839 break;
841 } 840 }
842 } 841 }
843 *str = '\0'; 842 *str = '\0';
844 843 }
845 name = shortname; 844 else
845 {
846 strcpy (shortname, name);
847 unixtodos_filename (shortname);
846 } 848 }
847 849
848 if (pPath) 850 if (pPath)
849 *pPath = name + (path - orig_name); 851 *pPath = shortname + (path - name);
850 852
851 return name; 853 return shortname;
852 } 854 }
853 855
854 856
855 /* Shadow some MSVC runtime functions to map requests for long filenames 857 /* Shadow some MSVC runtime functions to map requests for long filenames
856 to reasonable short names if necessary. This was originally added to 858 to reasonable short names if necessary. This was originally added to