only uppercase new filename, not path

This commit is contained in:
Dagen Brock 2020-06-08 22:21:12 -05:00
parent a00c62d2a1
commit 0363868a66
2 changed files with 19 additions and 11 deletions

View File

@ -2027,7 +2027,6 @@ int savelofragment() {
/* save single lo-res and double lo-res */ /* save single lo-res and double lo-res */
/* save raster images of 48 or 40 scanlines /* save raster images of 48 or 40 scanlines
(full graphics or mixed text and graphics) */ (full graphics or mixed text and graphics) */
if (lores == 1) { if (lores == 1) {
if (appletop == 1) { if (appletop == 1) {
fl = 802; fl = 802;
@ -3511,13 +3510,13 @@ void FloydSteinberg(int y, int width) {
* 2 1 * 2 1
1 2 1 1 2 1
1 (1/8) 1 (1/8)
Serpentine Serpentine
1 2 * 1 2 *
1 2 1 1 2 1
1 1
*/ */
/* if error summing is turned-on add the accumulated rounding error /* if error summing is turned-on add the accumulated rounding error
@ -6740,15 +6739,22 @@ int main(int argc, char **argv) {
/* user titling file */ /* user titling file */
sprintf(usertextfile, "%s.txt", fname); sprintf(usertextfile, "%s.txt", fname);
/* This breaks pathing on Linux which is case sensitive */
/* Maybe rewrite to not change case of the entire path */
#if 0
/* upper case basename for Apple II Output */ /* upper case basename for Apple II Output */
for (idx = 0; fname[idx] != (uchar)0; idx++) { // get filename part so we only upper case that
ch = toupper(fname[idx]); char *filename = strrchr(fname, '/');
fname[idx] = ch; // no slash found so use full string
if (!filename) {
filename = fname;
} else {
filename++; // advance pointer past '/'
} }
#endif // now upper part/full string
for (idx = 0; filename[idx] != (uchar)0; idx++) {
ch = toupper(filename[idx]);
filename[idx] = ch;
}
strcpy(hgrwork, fname); strcpy(hgrwork, fname);
if (basename == 1) { if (basename == 1) {

View File

@ -4,7 +4,9 @@ echo " --- Super High-Tech Test Suite v0.1234zaxxon ---"
##################################### #####################################
# LORES # LORES
echo "LORES TEST START" echo "LORES TEST START"
echo " - RUN: '$B2D black-40x48.bmp L N'"
$B2D black-40x48.bmp L N $B2D black-40x48.bmp L N
echo " - RUN: '$B2D white-40x48.bmp L N'"
$B2D white-40x48.bmp L N $B2D white-40x48.bmp L N
diff BLACK-40X48.SLO BLACK.LORES diff BLACK-40X48.SLO BLACK.LORES