Revise filename shortening rules
The rules DOSFS used to create the short name version of a long filename were quite wide of the recommendations from Microsoft. This causes problems in particular with bootloaders that are a little more simplistic and use the short name form, only to find "BOOTCODE.BIN" has been replaced by "BOOTCO~1.BIN" by DOSFS. Also, the long filename entried created for new long filenames left the reserved fields unset. Some of these seem to have special meanings to Windows which faults them ("extended attribute handle invalid") when running chkdsk. DOSnaming.c: replaced the shorten_lfn function, sprinkled in a few token consts, set the reserved fields in long file names to 0 DOSclusters.c/OpsFunc.c/OpsFile.c: remove shorttemp no longer needed, simplify sprintf/memcpy/memcpy into a single sprintf DOSFS.h: familiar MIN/MAX maxros added Tested in isolation in harness "test/shorten" and comparing floppy discs generated with "test/shortgen" from Windows and DOSFS. Fixes ticket #313. Version 1.06. Tagged as 'DOSFS-1_06'
Showing with 322 additions and 194 deletions