First amiga steps

This commit is contained in:
Andreas Zdziarstek committed 2021-01-16 21:31:02 +01:00
1 parent bdd1c91f0c
commit 95a45bff48
2 files changed
+3 -8

No files matched your search

+1 -6
View File
@@ -79,11 +79,6 @@ char *optarg; /* argument associated with option */
#define BADARG ((*options == ':') ? (int)':' : (int)'?')
#define INORDER (int)1
#ifndef __CYGWIN__
#define __progname __argv[0]
#else
extern char __declspec(dllimport) *__progname;
#endif
#ifdef __CYGWIN__
static char EMSG[] = "";
@@ -115,7 +110,7 @@ static const char illoptstring[] = "unknown option -- %s";
static void
_vwarnx(const char *fmt,va_list ap)
{
(void)fprintf(stderr,"%s: ",__progname);
(void)fprintf(stderr,"Error: ");
if (fmt != NULL)
(void)vfprintf(stderr,fmt,ap);
(void)fprintf(stderr,"\n");
@@ -110,7 +110,7 @@ int main(int argc, char *argv[]) {
// The MIDI backend may add some more short options
// Be sure that strlen(optstr) remains <32
// Could also generate new string of arboitrary
// Could also generate new string of arbitrary
// but don't really wanna mess with malloc/free
// for this bit
mididev_add_optstr(optstr);
@@ -168,7 +168,7 @@ int main(int argc, char *argv[]) {
while(1) {
errno = 0;
*mptr = (unsigned char)strtoul(optarg, &end, 16);
if(errno || end==mptr)
if(errno || end==optarg)
break;
custom_midi_len++;
mptr++;