mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
source code formatting
This commit is contained in:
@@ -18,25 +18,25 @@ typedef struct {
|
||||
|
||||
static void handle_ptyn(char *arg, RDSModulator* mod, char* output) {
|
||||
arg[PTYN_LENGTH] = 0;
|
||||
set_rds_ptyn(mod->enc, xlat(arg));
|
||||
set_rds_ptyn(mod->enc, convert_to_rds_charset(arg));
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
static void handle_tps(char *arg, RDSModulator* mod, char* output) {
|
||||
arg[PS_LENGTH * 2] = 0;
|
||||
set_rds_tps(mod->enc, xlat(arg));
|
||||
set_rds_tps(mod->enc, convert_to_rds_charset(arg));
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
static void handle_rt1(char *arg, RDSModulator* mod, char* output) {
|
||||
arg[RT_LENGTH * 2] = 0;
|
||||
set_rds_rt1(mod->enc, xlat(arg));
|
||||
set_rds_rt1(mod->enc, convert_to_rds_charset(arg));
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
static void handle_rt2(char *arg, RDSModulator* mod, char* output) {
|
||||
arg[RT_LENGTH * 2] = 0;
|
||||
set_rds_rt2(mod->enc, xlat(arg));
|
||||
set_rds_rt2(mod->enc, convert_to_rds_charset(arg));
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ static void handle_lps(char *arg, RDSModulator* mod, char* output) {
|
||||
|
||||
static void handle_ps(char *arg, RDSModulator* mod, char* output) {
|
||||
arg[PS_LENGTH * 2] = 0;
|
||||
set_rds_ps(mod->enc, xlat(arg));
|
||||
set_rds_ps(mod->enc, convert_to_rds_charset(arg));
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
|
||||
@@ -86,12 +86,11 @@ uint8_t add_rds_af(RDSAFs *af_list, float freq) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define XLATSTRLEN 255
|
||||
char *xlat(char *str) {
|
||||
static char new_str[XLATSTRLEN];
|
||||
char *convert_to_rds_charset(char *str) {
|
||||
static char new_str[255];
|
||||
uint8_t i = 0;
|
||||
|
||||
while (*str != 0 && i < XLATSTRLEN) {
|
||||
while (*str != 0 && i < 255) {
|
||||
switch (*str) {
|
||||
case 0xc2:
|
||||
str++;
|
||||
|
||||
Reference in New Issue
Block a user