diff -Nru schism-20190805/debian/changelog schism-20200412/debian/changelog --- schism-20190805/debian/changelog 2020-01-14 05:52:28.000000000 +0000 +++ schism-20200412/debian/changelog 2020-05-15 05:35:28.000000000 +0000 @@ -1,3 +1,10 @@ +schism (2:20200412-1) unstable; urgency=medium + + * New upstream version. + * Bump standards version to 4.5.0. + + -- Gürkan Myczko Fri, 15 May 2020 07:35:28 +0200 + schism (2:20190805-3) unstable; urgency=medium * Team upload. diff -Nru schism-20190805/debian/control schism-20200412/debian/control --- schism-20190805/debian/control 2020-01-14 05:52:28.000000000 +0000 +++ schism-20200412/debian/control 2020-05-15 05:35:28.000000000 +0000 @@ -9,7 +9,7 @@ libsdl1.2-dev, libxext-dev, libasound2-dev -Standards-Version: 4.4.1 +Standards-Version: 4.5.0 Vcs-Git: https://salsa.debian.org/multimedia-team/schism.git Vcs-Browser: https://salsa.debian.org/multimedia-team/schism Homepage: http://schismtracker.org/ diff -Nru schism-20190805/fmt/it.c schism-20200412/fmt/it.c --- schism-20190805/fmt/it.c 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/fmt/it.c 2020-05-12 14:54:03.000000000 +0000 @@ -679,7 +679,7 @@ } else if ((hdr.cwtv >> 12) == 1) { tid = NULL; strcpy(song->tracker_id, "Schism Tracker "); - ver_decode_cwtv(hdr.cwtv, song->tracker_id + strlen(song->tracker_id)); + ver_decode_cwtv(hdr.cwtv, hdr.reserved, song->tracker_id + strlen(song->tracker_id)); } else if ((hdr.cwtv >> 12) == 0 && hist != 0 && hdr.reserved != 0) { // early catch to exclude possible false positives without repeating a bunch of stuff. } else if (hdr.cwtv == 0x0214 && hdr.cmwt == 0x0200 && hdr.flags == 9 && hdr.special == 0 diff -Nru schism-20190805/fmt/s3m.c schism-20200412/fmt/s3m.c --- schism-20190805/fmt/s3m.c 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/fmt/s3m.c 2020-05-12 14:54:03.000000000 +0000 @@ -80,6 +80,7 @@ uint16_t trkvers; uint16_t flags; uint16_t special; + uint16_t reserved; uint32_t adlib = 0; // bitset int uc; const char *tid = NULL; @@ -140,10 +141,11 @@ if (slurp_getc(fp) != 0xfc) misc &= ~S3M_CHANPAN; /* stored pan values */ - /* Interesting: Impulse Tracker appears to leave some junk data in this unused section, and what's - more, it always seems to follow the same general pattern. So it's actually possible to identify - whether a song was saved in IT, then loaded and re-saved in ST3. */ - slurp_seek(fp, 8, SEEK_CUR); + /* Extended Schism Tracker version information */ + slurp_read(fp, &reserved, 2); + reserved = bswapLE16(reserved); + /* Impulse Tracker hides its edit timer in the next four bytes. */ + slurp_seek(fp, 6, SEEK_CUR); slurp_read(fp, &special, 2); // field not used by st3 special = bswapLE16(special); @@ -415,7 +417,7 @@ case 4: tid = NULL; strcpy(song->tracker_id, "Schism Tracker "); - ver_decode_cwtv(trkvers, song->tracker_id + strlen(song->tracker_id)); + ver_decode_cwtv(trkvers, reserved, song->tracker_id + strlen(song->tracker_id)); break; case 5: tid = "OpenMPT %d.%02x"; @@ -492,7 +494,9 @@ uint16_t flags, cwtv, ffi; // 0, 0x4nnn, 2 for unsigned char scrm[4]; // "SCRM" uint8_t gv, is, it, mv, uc, dp; // gv is half range of IT, uc should be 8/12/16, dp is 252 - uint8_t junk[10]; // last 2 bytes are "special", which means "more junk" + uint16_t reserved; // extended version information is stored here + uint32_t reserved2; // Impulse Tracker hides its edit timer here + uint8_t junk[4]; // last 2 bytes are "special", which means "more junk" }; struct s3i_header { @@ -899,6 +903,7 @@ hdr.mv |= 128; hdr.uc = 16; // ultraclick (the "Waste GUS channels" option) hdr.dp = 252; + hdr.reserved = bswapLE16(ver_reserved); /* The sample data parapointers are 24+4 bits, whereas pattern data and sample headers are only 16+4 bits -- so while the sample data can be written up to 268 MB within the file (starting at 0xffffff0), diff -Nru schism-20190805/include/it_defs.h schism-20200412/include/it_defs.h --- schism-20190805/include/it_defs.h 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/include/it_defs.h 2020-05-12 14:54:03.000000000 +0000 @@ -24,7 +24,7 @@ uint8_t pwd; uint16_t msglength; uint32_t msgoffset; - uint32_t reserved2; + uint32_t reserved; uint8_t chnpan[64]; uint8_t chnvol[64]; }; diff -Nru schism-20190805/include/version.h schism-20200412/include/version.h --- schism-20190805/include/version.h 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/include/version.h 2020-05-12 14:54:03.000000000 +0000 @@ -26,7 +26,8 @@ /* various boilerplate defined in version.c */ extern const char *ver_short_copyright; extern const char *ver_short_based_on; -extern short ver_cwtv; /* lower 12 bits of the IT/S3M cwtv field */ +extern unsigned short ver_cwtv; /* lower 12 bits of the IT/S3M cwtv field */ +extern unsigned short ver_reserved; /* full version number in case 12 bits are not enough */ extern const char *schism_banner(int classic) __attribute__((pure)); @@ -34,8 +35,8 @@ /* little hack, need to call this at startup */ void ver_init(void); -/* get yyyy-mm-dd or 0.nn version from cwtv (buf should be >=11 chars) */ -void ver_decode_cwtv(uint16_t cwtv, char *buf); +/* get yyyy-mm-dd or 0.nn version from cwtv + reserved (buf should be >=11 chars) */ +void ver_decode_cwtv(uint16_t cwtv, uint32_t reserved, char *buf); #endif diff -Nru schism-20190805/schism/audio_loadsave.c schism-20200412/schism/audio_loadsave.c --- schism-20190805/schism/audio_loadsave.c 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/schism/audio_loadsave.c 2020-05-12 14:54:03.000000000 +0000 @@ -692,7 +692,7 @@ hdr.msgoffset = bswapLE32(extra + 0xc0 + nord + 4 * (nins + nsmp + npat)); hdr.msglength = bswapLE16(msglen); } - // hdr.reserved2 + hdr.reserved = bswapLE32(ver_reserved); for (n = 0; n < 64; n++) { hdr.chnpan[n] = ((current_song->channels[n].flags & CHN_SURROUND) diff -Nru schism-20190805/schism/disko.c schism-20200412/schism/disko.c --- schism-20190805/schism/disko.c 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/schism/disko.c 2020-05-12 14:54:03.000000000 +0000 @@ -828,7 +828,7 @@ strcpy(strrchr(fmt, '%'), "ten seconds flat"); } log_appendf(5, fmt, - ((double) samples_0 * (disko_output_bits / 8) * disko_output_channels * num_files) / 1048576.0, + ((double) samples_0 * (disko_output_bits / 8) * export_dwsong.mix_channels * num_files) / 1048576.0, samples_0 / disko_output_rate / 60, (samples_0 / disko_output_rate) % 60, elapsed); break; diff -Nru schism-20190805/schism/page_loadinst.c schism-20200412/schism/page_loadinst.c --- schism-20190805/schism/page_loadinst.c 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/schism/page_loadinst.c 2020-05-12 14:54:03.000000000 +0000 @@ -371,7 +371,9 @@ static int file_list_handle_key(struct key_event * k) { + dmoz_file_t *f; int new_file = current_file; + int c = unicode_to_ascii(k->unicode); new_file = CLAMP(new_file, 0, flist.num_files - 1); @@ -386,64 +388,34 @@ new_file = top_file + (k->y - 13); } } - } else if (slash_search_mode > -1) { - int c = unicode_to_ascii(k->unicode); - if (k->sym == SDLK_RETURN || k->sym == SDLK_ESCAPE) { + } + switch (k->sym) { + case SDLK_UP: new_file--; slash_search_mode = -1; break; + case SDLK_DOWN: new_file++; slash_search_mode = -1; break; + case SDLK_PAGEUP: new_file -= 35; slash_search_mode = -1; break; + case SDLK_PAGEDOWN: new_file += 35; slash_search_mode = -1; break; + case SDLK_HOME: new_file = 0; slash_search_mode = -1; break; + case SDLK_END: new_file = flist.num_files - 1; slash_search_mode = -1; break; + + case SDLK_ESCAPE: + if (slash_search_mode < 0) { + if (k->state == KEY_RELEASE && NO_MODIFIER(k->mod)) + set_page(PAGE_SAMPLE_LIST); + return 1; + } /* else fall through */ + case SDLK_RETURN: + if (slash_search_mode < 0) { if (k->state == KEY_PRESS) - return 1; + return 0; + handle_enter_key(); slash_search_mode = -1; - status.flags |= NEED_UPDATE; - return 1; - } else if (k->sym == SDLK_BACKSPACE) { - if (k->state == KEY_RELEASE) + } else { + if (k->state == KEY_PRESS) return 1; - slash_search_mode--; + slash_search_mode = -1; status.flags |= NEED_UPDATE; - reposition_at_slash_search(); - return 1; - } else if (c >= 32) { - if (k->state == KEY_RELEASE) - return 1; - if (slash_search_mode < PATH_MAX) { - slash_search_str[ slash_search_mode ] = c; - slash_search_mode++; - reposition_at_slash_search(); - status.flags |= NEED_UPDATE; - } return 1; } - } - - switch (k->sym) { - case SDLK_UP: - new_file--; - slash_search_mode = -1; - break; - case SDLK_DOWN: - new_file++; - slash_search_mode = -1; - break; - case SDLK_PAGEUP: - new_file -= 35; - slash_search_mode = -1; - break; - case SDLK_PAGEDOWN: - new_file += 35; - slash_search_mode = -1; - break; - case SDLK_HOME: - new_file = 0; - slash_search_mode = -1; - break; - case SDLK_END: - new_file = flist.num_files - 1; - slash_search_mode = -1; - break; - case SDLK_RETURN: - if (k->state == KEY_PRESS) - return 0; - handle_enter_key(); - slash_search_mode = -1; return 1; case SDLK_DELETE: if (k->state == KEY_RELEASE) @@ -452,23 +424,40 @@ if (flist.num_files > 0) dialog_create(DIALOG_OK_CANCEL, "Delete file?", do_delete_file, NULL, 1, NULL); return 1; - case SDLK_ESCAPE: - slash_search_mode = -1; - if (k->state == KEY_RELEASE && NO_MODIFIER(k->mod)) - set_page(PAGE_INSTRUMENT_LIST); - return 1; - case SDLK_SLASH: - if (k->orig_sym == SDLK_SLASH) { - if (status.flags & CLASSIC_MODE) return 0; + case SDLK_BACKSPACE: + if (slash_search_mode > -1) { if (k->state == KEY_RELEASE) - return 0; - slash_search_mode = 0; + return 1; + slash_search_mode--; status.flags |= NEED_UPDATE; + reposition_at_slash_search(); return 1; } - default: - if (k->mouse == MOUSE_NONE) + case SDLK_SLASH: + if (slash_search_mode < 0) { + if (k->orig_sym == SDLK_SLASH) { + if (k->state == KEY_PRESS) + return 0; + slash_search_mode = 0; + status.flags |= NEED_UPDATE; + return 1; + } return 0; + } /* else fall through */ + default: + f = flist.files[current_file]; + if (c >= 32 && (slash_search_mode > -1 || (f && (f->type & TYPE_DIRECTORY)))) { + if (k->state == KEY_RELEASE) + return 1; + if (slash_search_mode < 0) slash_search_mode = 0; + if (slash_search_mode < PATH_MAX) { + slash_search_str[slash_search_mode++] = c; + reposition_at_slash_search(); + status.flags |= NEED_UPDATE; + } + return 1; + } + if (!k->mouse) return 0; } if (k->mouse == MOUSE_CLICK) { @@ -484,7 +473,6 @@ } new_file = CLAMP(new_file, 0, flist.num_files - 1); - if (new_file < 0) new_file = 0; if (new_file != current_file) { current_file = new_file; file_list_reposition(); diff -Nru schism-20190805/schism/version.c schism-20200412/schism/version.c --- schism-20190805/schism/version.c 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/schism/version.c 2020-05-12 14:54:03.000000000 +0000 @@ -49,8 +49,10 @@ 0x052 = (0x052 - 0x050) + 2009-10-31 = 2009-11-02 0x14f = (0x14f - 0x050) + 2009-10-31 = 2010-07-13 0xffe = (0xfff - 0x050) + 2009-10-31 = 2020-10-27 - = 0xfff: a non-value indicating a date after 2020-10-27 (assuming Schism Tracker still exists then) */ -short ver_cwtv; + = 0xfff: a non-value indicating a date after 2020-10-27. in this case, the full version number is stored in a reserved header field. + this field follows the same format, using the same epoch, but without adding 0x50. */ +unsigned short ver_cwtv; +unsigned short ver_reserved; /* these should be 50 characters or shorter, as they are used in the startup dialog */ const char *ver_short_copyright = @@ -123,6 +125,7 @@ epoch_sec = mktime(&epoch); version_sec = mktime(&version); ver_cwtv = 0x050 + (version_sec - epoch_sec) / 86400; + ver_reserved = ver_cwtv < 0xfff ? 0 : (ver_cwtv - 0x050); ver_cwtv = CLAMP(ver_cwtv, 0x050, 0xfff); /* show build date if we don't know last commit date (no git) */ @@ -137,7 +140,7 @@ top_banner_normal[sizeof(top_banner_normal) - 1] = '\0'; /* to be sure */ } -void ver_decode_cwtv(uint16_t cwtv, char *buf) +void ver_decode_cwtv(uint16_t cwtv, uint32_t reserved, char *buf) { struct tm version; time_t version_sec; @@ -145,7 +148,7 @@ cwtv &= 0xfff; if (cwtv > 0x050) { // Annoyingly, mktime uses local time instead of UTC. Why etc. - version_sec = ((cwtv - 0x050) * 86400) + epoch_sec; + version_sec = ((cwtv < 0xfff ? (cwtv - 0x050) : reserved) * 86400) + epoch_sec; if (localtime_r(&version_sec, &version)) { sprintf(buf, "%04d-%02d-%02d", version.tm_year + 1900, version.tm_mon + 1, version.tm_mday); diff -Nru schism-20190805/schism/widget.c schism-20200412/schism/widget.c --- schism-20190805/schism/widget.c 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/schism/widget.c 2020-05-12 14:54:03.000000000 +0000 @@ -417,12 +417,9 @@ if (!group) return; /* assert */ - for (i = 0; group[i] >= 0; i++) { + for (i = 0; group[i] >= 0; i++) p_widgets[group[i]].d.togglebutton.state = 0; - p_widgets[group[i]].depressed = 0; - } p_widgets[widget].d.togglebutton.state = 1; - p_widgets[widget].depressed = 1; if (do_callback) { if (p_widgets[widget].changed) diff -Nru schism-20190805/sys/fd.org/schism.desktop schism-20200412/sys/fd.org/schism.desktop --- schism-20190805/sys/fd.org/schism.desktop 2019-08-05 18:03:58.000000000 +0000 +++ schism-20200412/sys/fd.org/schism.desktop 2020-05-12 14:54:03.000000000 +0000 @@ -9,7 +9,7 @@ Exec=schismtracker %f Type=Application Icon=schism-icon-128 -Categories=Audio;Midi;Sequencer;Player;Music; +Categories=AudioVideo;Audio;Midi;Sequencer;Player;Music; MimeType=audio/x-it;audio/x-s3m;audio/x-xm;audio/x-mod; Keywords=impulse;module;midi;music;