Subversion Repositories SvarDOS

Rev

Rev 599 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 599 Rev 623
Line 36... Line 36...
36
 
36
 
37
const char *svarlang_strid(unsigned short id) {
37
const char *svarlang_strid(unsigned short id) {
38
  const char *ptr = svarlang_mem;
38
  const char *ptr = svarlang_mem;
39
  /* find the string id in langblock memory */
39
  /* find the string id in langblock memory */
40
  for (;;) {
40
  for (;;) {
41
    if (((unsigned short *)ptr)[0] == id) {
41
    if (((unsigned short *)ptr)[0] == id) return(ptr + 4);
42
      ptr += 3;
-
 
43
      return(ptr);
-
 
44
    }
-
 
45
    if (ptr[2] == 0) return(NULL);
42
    if (((unsigned short *)ptr)[1] == 0) return(ptr + 2); /* end of strings - return an empty string */
46
    ptr += ptr[2] + 3;
43
    ptr += ((unsigned short *)ptr)[1] + 4;
47
  }
44
  }
48
}
45
}
49
 
46
 
50
 
47
 
51
int svarlang_load(const char *progname, const char *lang, const char *nlspath) {
48
int svarlang_load(const char *progname, const char *lang, const char *nlspath) {