Free Hero Mesh

Check-in [eaea2c00a7]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Ensure that class/message names made by {make} do not contain invalid characters.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: eaea2c00a73a239b36253996c4718b659cf0ece5
User & Date: user on 2022-08-11 04:38:21
Other Links: manifest | tags
Context
2022-08-11
20:11
Implement level hashes calculation. check-in: a9af94f292 user: user tags: trunk
04:38
Ensure that class/message names made by {make} do not contain invalid characters. check-in: eaea2c00a7 user: user tags: trunk
04:25
Implement CONFIG_EXTRA_SCREEN_INIT check-in: 831a8baa13 user: user tags: trunk
Changes

Modified class.c from [fe260125ee] to [dbf58fd0d2].

363
364
365
366
367
368
369






370
371
372
373
374
375
376
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382







+
+
+
+
+
+







      glohash[h].id=0xFFFF;
      return h;
    }
    h=(h+1)%HASH_SIZE;
    if(h==m) ParseError("Hash table full\n");
  }
}

static int check_improper_name(void) {
  unsigned char*p=tokenstr;
  while(*p) if(*p++<=32) return 1;
  return 0;
}

#define ReturnToken(x,y) do{ tokent=x; tokenv=y; return; }while(0)

static void nxttok1(void) {
  int c,i,fl,n,pr;
  magain: if(macstack) {
    TokenList*tl=0;
933
934
935
936
937
938
939

940
941
942
943

944
945
946
947
948
949
950
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958







+




+







              tokenv=look_hash(glohash,HASH_SIZE,0x2800,0x2FFF,num_globals+0x2800,"user global variables")?:(num_globals++)+0x2800;
              return;
            case 0x0010: // %
              ReturnToken(TF_NAME|TF_ABNORMAL,OP_LOCAL);
            case 0x0011: // =%
              ReturnToken(TF_NAME|TF_ABNORMAL|TF_EQUAL,OP_LOCAL);
            case 0x0020: // #
              if(check_improper_name()) ParseError("Improper message name in {make}\n");
              tokent=TF_NAME;
              tokenv=look_message_name()+0xC000;
              return;
            case 0x0040: // $
              if(!*tokenstr || *tokenstr=='(' || check_improper_name()) ParseError("Improper class name in {make}\n");
              tokent=TF_NAME;
              tokenv=look_class_name()+0x4000;
              return;
            case 0x0080: // &
              tokent=TF_FUNCTION|TF_ABNORMAL;
              tokenv=look_hash(glohash,HASH_SIZE,0x8000,0xBFFF,num_functions+0x8000,"user functions")?:(num_functions++)+0x8000;
              return;