Ejemplo n.º 1
0
static void print_dictionary_table(FILE *output, FILE *outputHeader)
{
  int i;
  if (strlen(doc_type) > 0)
  {
    fprintf(output, "\nstatic const NW_Ucs2 NW_%s_docType[] = {", dict_name);
    for (i=0; i < (int) strlen(doc_type); i++)
      fprintf(output, "\'%c\',", doc_type[i]);
    fprintf(output, "\'\\0\'};\n");
  }

  fprintf(output, 
          "\n"
          "/*\n"
          " * Dictionary\n"
          " */\n"
          );

  fprintf(outputHeader, "extern const %s NW_%s_WBXMLDictionary\n",
          DICTIONARY_TABLE_T, dict_name);
  fprintf(output, "%s NW_%s_WBXMLDictionary = {\n", DICTIONARY_TABLE_T, dict_name);
  fprintf(output, "\tNW_%s_PublicId,\n", dict_name);

  /* Print the doc type as a UCS2 string */
  fprintf(output, "\t(%s *)NW_%s_docType,\n", "NW_Ucs2", dict_name);

  /* Add the tag and attribute code page */
  add_codepage(output, tag_codepages, TAG_NAME);
  add_codepage(output, attr_codepages, ATTR_NAME);

  fprintf(output, "};\n");
}
Ejemplo n.º 2
0
BOOL CALLBACK EnumCodePagesProc(LPTSTR name) {
  UINT		id;
  int		msnum;

  if ((id=_tcstoul(name,NULL,10))!=0 && (msnum=get_mscp_num(id))>=0)
    add_codepage(ms_codepages[msnum].name,id,ms_codepages[msnum].alias1,
	ms_codepages[msnum].alias2);
  return TRUE;
}