Back to index

texmacs  1.0.7.15
Functions
otl_conf.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void otl_conf_set_verbose (void)
pdf_objotl_find_conf (const char *conf_name)
void otl_init_conf (void)
void otl_close_conf (void)
pdf_objotl_conf_get_class (pdf_obj *conf, const char *ident)
char * otl_conf_get_script (pdf_obj *conf)
char * otl_conf_get_language (pdf_obj *conf)
pdf_objotl_conf_get_rule (pdf_obj *conf)
pdf_objotl_conf_find_opt (pdf_obj *conf, const char *opt_tag)

Function Documentation

void otl_close_conf ( void  )

Definition at line 636 of file otl_conf.c.

Here is the call graph for this function:

Here is the caller graph for this function:

pdf_obj* otl_conf_find_opt ( pdf_obj conf,
const char *  opt_tag 
)

Definition at line 607 of file otl_conf.c.

{
  pdf_obj *opt_conf = NULL;
  pdf_obj *options;

  ASSERT(conf);

  options = pdf_lookup_dict(conf, "option");
  if (options && opt_tag)
    opt_conf = pdf_lookup_dict(options, opt_tag);
  else
    opt_conf = NULL;

  return opt_conf;
}

Here is the call graph for this function:

Here is the caller graph for this function:

pdf_obj* otl_conf_get_class ( pdf_obj conf,
const char *  ident 
)
char* otl_conf_get_language ( pdf_obj conf)

Definition at line 588 of file otl_conf.c.

{
  pdf_obj *language;

  ASSERT(conf);

  language = pdf_lookup_dict(conf, "language");

  return pdf_string_value(language);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 600 of file otl_conf.c.

{
  ASSERT(conf);
  return pdf_lookup_dict(conf, "rule");
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* otl_conf_get_script ( pdf_obj conf)

Definition at line 576 of file otl_conf.c.

{
  pdf_obj *script;

  ASSERT(conf);

  script = pdf_lookup_dict(conf, "script");

  return pdf_string_value(script);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void otl_conf_set_verbose ( void  )

Definition at line 43 of file otl_conf.c.

{
  verbose++;
}

Here is the caller graph for this function:

pdf_obj* otl_find_conf ( const char *  conf_name)

Definition at line 509 of file otl_conf.c.

{
  pdf_obj *rule;
  pdf_obj *script, *language;
  pdf_obj *options;

  return  NULL;

  if (otl_confs)
    rule = pdf_lookup_dict(otl_confs, conf_name);
  else {
    otl_confs = pdf_new_dict();
    rule = NULL;
  }

  if (!rule) {
    rule = otl_read_conf(conf_name);
    if (rule) {
      pdf_add_dict(otl_confs,
                 pdf_new_name(conf_name), rule);
      script   = pdf_lookup_dict(rule, "script");
      language = pdf_lookup_dict(rule, "language");
      options  = pdf_lookup_dict(rule, "option");
      if (!script) {
       script = pdf_new_string("*", 1);
       pdf_add_dict(rule,
                   pdf_new_name("script"),
                   script);
       WARN("Script unspecified in \"%s\"...", conf_name);
      }
      if (!language) {
       language = pdf_new_string("dflt", 4);
       pdf_add_dict(rule,
                   pdf_new_name("language"),
                   language);
       WARN("Language unspecified in \"%s\"...", conf_name);
      }

      if (options) {
       pdf_obj *optkeys, *opt, *key;
       long     i, num_opts;

       optkeys  = pdf_dict_keys(options);
       num_opts = pdf_array_length(optkeys);
       for (i = 0; i < num_opts; i++) {
         key = pdf_get_array(optkeys, i);
         opt = pdf_lookup_dict(options, pdf_name_value(key));
         if (!pdf_lookup_dict(opt, "script"))
           pdf_add_dict(opt,
                      pdf_new_name("script"),
                      pdf_link_obj(script));
         if (!pdf_lookup_dict(opt, "language"))
           pdf_add_dict(opt,
                      pdf_new_name("language"),
                      pdf_link_obj(language));
       }
       pdf_release_obj(optkeys);
      }

    }
  }

  return rule;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void otl_init_conf ( void  )

Definition at line 624 of file otl_conf.c.

Here is the call graph for this function:

Here is the caller graph for this function: