Free Hero Mesh

Diff
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Differences From Artifact [de04341ba7]:

To Artifact [f537a694cd]:


986
987
988
989
990
991
992

993
994
995
996
997

998
999
1000
1001
1002
1003
1004
1005
1006
1007

1008
1009
1010
1011
1012
1013
1014
  if(!n) return;
  if(n==367) n=437;
  if(fontdata && fontdata!=pcfont) fatal("Multiple code page specifications\n");
  optionquery[1]=Q_codepage;
  v=xrm_get_resource(resourcedb,optionquery,optionquery,2);
  if(!v || !*v) {
    if(n==437 || ignore_code_page()) return;

    fatal("Cannot load code page %d; code page file is not configured\n",n);
  }
  fp=fopen(v,"r");
  if(!fp) {
    perror(0);

    fatal("Cannot open code page file\n");
  }
  fontdata=d=malloc(0x800);
  if(!d) fatal("Allocation failed\n");
  memcpy(d,pcfont,0x800);
  name:
  s=i=0;
  for(;;) {
    c=fgetc(fp);
    if(c<0) {

      if(n!=437 && !ignore_code_page()) fatal("Cannot find code page %d\n",n);
      goto done;
    }
    if(!c) break;
    if(!s) {
      if(c<'0' || c>'9') s=1;
      else if(c=='0' && !i) s=1;







>





>










>







986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
  if(!n) return;
  if(n==367) n=437;
  if(fontdata && fontdata!=pcfont) fatal("Multiple code page specifications\n");
  optionquery[1]=Q_codepage;
  v=xrm_get_resource(resourcedb,optionquery,optionquery,2);
  if(!v || !*v) {
    if(n==437 || ignore_code_page()) return;
    if(main_options['T']) goto done;
    fatal("Cannot load code page %d; code page file is not configured\n",n);
  }
  fp=fopen(v,"r");
  if(!fp) {
    perror(0);
    if(main_options['T']) goto done;
    fatal("Cannot open code page file\n");
  }
  fontdata=d=malloc(0x800);
  if(!d) fatal("Allocation failed\n");
  memcpy(d,pcfont,0x800);
  name:
  s=i=0;
  for(;;) {
    c=fgetc(fp);
    if(c<0) {
      if(main_options['T']) goto done;
      if(n!=437 && !ignore_code_page()) fatal("Cannot find code page %d\n",n);
      goto done;
    }
    if(!c) break;
    if(!s) {
      if(c<'0' || c>'9') s=1;
      else if(c=='0' && !i) s=1;