*
* MaOSstartup(char *path) : create working dir in "$HOME/Library/Application Support" etc.
*
+ * where *path is argv[0], the file name of the running executable
+ *
*/
#ifdef __APPLE__
// If the current work dir is NOT "/", just do nothing
//
*workdir=0;
- c=getcwd(workdir,sizeof(workdir));
+ if (getcwd(workdir,sizeof(workdir)) == NULL) return;
if (strlen(workdir) != 1 || *workdir != '/') return;
//
//
// Copy icon from app bundle to the work dir
//
- c=getcwd(workdir,sizeof(workdir));
- if (strlen(path) < 1024) {
+ if (getcwd(workdir,sizeof(workdir)) != NULL && strlen(path) < 1024) {
//
// source = basename of the executable
//
static enum MIDIaction last_wheel_action=MIDI_ACTION_NONE ;
static struct timespec tp, last_wheel_tp={0,0};
long delta;
- struct timespec ts;
- double now;
+ struct timespec ts; // used in debug code
+ double now; // used in debug code
//Un-comment the next three lines to get a log of incoming MIDI events with milli-second time stamps
//clock_gettime(CLOCK_MONOTONIC, &ts);
if (cw_keyer_internal) {
// Stops CAT cw transmission if paddle hit in "internal" CW
- if ((dash || dot) && cw_keyer_internal) cw_key_hit=1;
+ if ((dash || dot)) cw_key_hit=1;
} else {
#ifdef LOCALCW
//
if (cw_keyer_internal) {
// Stops CAT cw transmission if paddle hit in "internal" CW
- if ((dash || dot) && cw_keyer_internal) cw_key_hit=1;
+ if ((dash || dot)) cw_key_hit=1;
} else {
#ifdef LOCALCW
//
vfo[id].band=b;
vfo[id].frequency=entry->frequency;
vfo[id].mode=entry->mode;
- vfo[id].filter=entry->filter;
vfo[id].lo=band->frequencyLO+band->errorLO;
//
-// Change to the filter/NR combination stored for this mode
+// Apply the filter/NR combination stored for this mode
//
m=vfo[id].mode;