2 SPDX-License-Identifier: GPL-2.0-or-later
3 Clisp has problems with generated Windows 'short names' e.g.
5 C:\Users\TESTTE~1\AppData\Local\Temp
6 Windows generates a short name for the temporary dir, when the
7 username contains spaces and is longer than 8 chars.
8 This program converts that path name to the 'long version', so that Clisp has
9 no problems with long user names and plotting commands.
17 int main(int argc
, char *argv
[])
20 TCHAR buffer
[BUFSIZE
];
24 _tprintf(TEXT("Usage: maxima_longnames [filename]\n\n"));
25 _tprintf(TEXT("This program converts Windows generated short filenames (ending with \"~\"\n"));
26 _tprintf(TEXT("and a number (8.3 format for compatibility with old Windows/DOS versions))\n"));
27 _tprintf(TEXT("back to the long filename (The short name cause problems with CLISP.)\n"));
31 // Retrieve the long path name.
33 retval
= GetLongPathName(argv
[1],
39 // Handle an error condition.
40 printf ("GetLongPathName failed (%d)\n", GetLastError());
43 else printf("%s", buffer
);