mirror of
https://github.com/bobbimanners/ProDOS-Utils.git
synced 2024-06-01 03:41:34 +00:00
Do not trim volume directory to less than 4 blocks
This commit is contained in:
parent
3044e81aac
commit
31f8c72ab3
18
sortdir.c
18
sortdir.c
|
@ -4,8 +4,6 @@
|
||||||
* Bobbi January-June 2020
|
* Bobbi January-June 2020
|
||||||
*
|
*
|
||||||
* TODO: *** When trimming dirs fix EOF in directory header ***
|
* TODO: *** When trimming dirs fix EOF in directory header ***
|
||||||
* TODO: Trimming unused directory blocks
|
|
||||||
* TODO: Don't trim volume directory to <4 blocks
|
|
||||||
* TODO: Get both ProDOS-8 and GNO versions to build from this source
|
* TODO: Get both ProDOS-8 and GNO versions to build from this source
|
||||||
*
|
*
|
||||||
* Revision History
|
* Revision History
|
||||||
|
@ -39,7 +37,8 @@
|
||||||
* v0.77 Implemented zeroblock() for ProDOS-8.
|
* v0.77 Implemented zeroblock() for ProDOS-8.
|
||||||
* v0.78 Improved error handling when too many files to sort.
|
* v0.78 Improved error handling when too many files to sort.
|
||||||
* v0.79 Trim unused directory blocks after sorting. Write freelist to disk.
|
* v0.79 Trim unused directory blocks after sorting. Write freelist to disk.
|
||||||
* v0.80 Reinstated no-op sort (useful for compacting dir without reordering)
|
* v0.80 Reinstated no-op sort (useful for compacting dir without reordering).
|
||||||
|
* v0.81 Do not trim volume directory to <4 blocks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#pragma debug 9
|
//#pragma debug 9
|
||||||
|
@ -67,7 +66,7 @@
|
||||||
#define SORT /* Enable sorting code */
|
#define SORT /* Enable sorting code */
|
||||||
#define FREELIST /* Checking of free list */
|
#define FREELIST /* Checking of free list */
|
||||||
#define AUXMEM /* Auxiliary memory support on //e and up */
|
#define AUXMEM /* Auxiliary memory support on //e and up */
|
||||||
#undef CMDLINE /* Command line option parsing */
|
#undef CMDLINE /* Command line option parsing */
|
||||||
#undef TRIMDIR /* Enable trimming of directory blocks */
|
#undef TRIMDIR /* Enable trimming of directory blocks */
|
||||||
|
|
||||||
#define NLEVELS 4 /* Number of nested sorts permitted */
|
#define NLEVELS 4 /* Number of nested sorts permitted */
|
||||||
|
@ -1906,8 +1905,13 @@ uchar writedir(uchar device) {
|
||||||
}
|
}
|
||||||
#ifdef TRIMDIR
|
#ifdef TRIMDIR
|
||||||
} else {
|
} else {
|
||||||
puts("Trimming dir blk");
|
/* Standard volume directory is blocks 2-5 (4 blocks)
|
||||||
trimdirblock(b->blocknum);
|
* We will not trim volume directory to less than 4 blocks
|
||||||
|
*/
|
||||||
|
if (b->blocknum > 5) {
|
||||||
|
puts("Trimming dir blk");
|
||||||
|
trimdirblock(b->blocknum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
}
|
}
|
||||||
|
@ -1974,7 +1978,7 @@ void interactive(void) {
|
||||||
|
|
||||||
revers(1);
|
revers(1);
|
||||||
hlinechar(' ');
|
hlinechar(' ');
|
||||||
fputs("S O R T D I R v0.80 alpha Use ^ to return to previous question", stdout);
|
fputs("S O R T D I R v0.81 alpha Use ^ to return to previous question", stdout);
|
||||||
hlinechar(' ');
|
hlinechar(' ');
|
||||||
revers(0);
|
revers(0);
|
||||||
|
|
||||||
|
|
BIN
sortdir.po
BIN
sortdir.po
Binary file not shown.
Loading…
Reference in New Issue
Block a user