aboutsummaryrefslogtreecommitdiffstats
path: root/dvb-t/se-Falun_Lovberget
blob: 8b6cd13fe4e87068b2fff62eb32d73e71250b3c5 (plain)
1
2
3
4
5
6
# Sweden - Falun/Lövberget
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*************************************************************************
 ** Sample1
 ** Load sample.cfg and increment the "X" setting
 *************************************************************************/

#include <stdio.h>
#include <libconfig.h>

struct config_t cfg;

/***************************************************************************/

int main(int argc, char **argv)
{
  char *file = "sample.cfg", *var = "x";

  if(argc >= 2)
    file = argv[1];

  if(argc >= 3)
    var = argv[2];

/* Initialize the configuration */
  config_init(&cfg);

  /* Load the file */
  printf("loading [%s]...", file);
  if(!config_read_file(&cfg, file))
    printf("failed\n");
  else
  {
    config_setting_t *setting = NULL;

    printf("ok\n");

    /* Get the variable setting from the configuration.. */
    printf("increment \"%s\"...", var);
    setting = config_lookup(&cfg, var);
    if(!setting)
      printf("failed\n");
    else
    {
      long x = config_setting_get_int(setting);
      x++;
      config_setting_set_int(setting, x);
      printf("ok (%s=%lu)\n", var, x);

      /* Save the changes */
      printf("saving [%s]...", file);
      config_write_file(&cfg, file);
      printf("ok\n");

      printf("Done!\n");
    }
  }

  /* Free the configuration */
  config_destroy(&cfg);

  return 0;
}

/***************************************************************************/