/* add all etch symbols from file to our symbol cache  */
static void add_symbols_of_file(const char *filename)
/* add all etch symbols from file to our symbol cache  */
static void add_symbols_of_file(const char *filename)
{
  FILE *pFile;
  pFile = ws_fopen(filename, "r");
  if (pFile != NULL) {
    char line[256];
    while (fgets(line, sizeof line, pFile) != NULL) {
      unsigned int hash;
      size_t length, pos;
      length = strlen(line);
      if (length < 10)
        continue;
      pos = length - 1;
      while (pos > 0 && (line[pos] == 0xD || line[pos] == 0xA)) {
        pos--;
      }
      line[pos + 1] = '\0';
      if (sscanf(&line[0], "%x", &hash) != 1)
        continue;
      pos = strcspn(line, ",");
      if ((line[pos] != '\0') && (line[pos+1] !='\0'))
        gbl_symbols_array_append(hash,
                                 g_strdup_printf("%." ETCH_MAX_SYMBOL_LENGTH "s", &line[pos+1]));
      }
    fclose(pFile);
  }
}