diff --git a/src/callinput.c b/src/callinput.c index eea6bf772..1d6c69474 100644 --- a/src/callinput.c +++ b/src/callinput.c @@ -594,12 +594,33 @@ char callinput(void) { x = auto_cq(); } + + case '?': + { + if (*hiscall != '\0') { + if (trxmode == CWMODE || trxmode == DIGIMODE) + { + strcat(hiscall, " ?"); + sendmessage(message[4]); + hiscall[strlen(hiscall) - 2] = '\0'; + + } + else + { + play_file(ph_message[4]); + } + } + x = -1; + break; + } + case 127: /* backspace */ { if (*hiscall != '\0') { + getyx(stdscr, cury, curx); - mvprintw(cury, curx - 1, " "); - mvprintw(cury, curx - 1, ""); + mvprintw(cury, curx - 1, " "); + mvprintw(cury, curx - 1, ""); hiscall[strlen(hiscall) - 1] = '\0'; if (atoi(hiscall) < 1800) { /* no frequency */ diff --git a/src/writecabrillo.c b/src/writecabrillo.c index e8c570ff1..349221392 100644 --- a/src/writecabrillo.c +++ b/src/writecabrillo.c @@ -98,6 +98,7 @@ struct qso_t { int is_comment(char *buffer); struct qso_t *get_next_record (FILE *fp); void free_qso(struct qso_t *ptr); +void removechars(char *string, char *removechars); /** check if logline is only a comment */ @@ -512,6 +513,7 @@ void prepare_line( struct qso_t *qso, struct cabrillo_desc *desc, char *buf ) { break; case MYCALL: strcpy(tmp, call); + removechars(tmp, "+-"); add_rpadded( buf, g_strchomp(tmp), item->len ); break; case HISCALL: @@ -622,6 +624,7 @@ int write_cabrillo(void) /* open logfile and create a cabrillo file */ strcpy(cabrillo_tmp_name, call); + removechars(cabrillo_tmp_name, "+-"); g_strstrip(cabrillo_tmp_name); /* drop \n */ strcat(cabrillo_tmp_name, ".cbr"); @@ -910,3 +913,18 @@ int write_adif(void) return (0); } // end write_adif + +void removechars(char *string, char *removechars) +{ + char *src, *dst; + for(;*removechars != '\0'; removechars++) + { + for(src = dst = string; *src != '\0'; src++) + { + *dst = *src; + if(*dst != *removechars) dst++; + + } + *dst = '\0'; + } +}