Subversion Repositories SvarDOS

Rev

Rev 190 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 190 Rev 191
Line 55... Line 55...
55
    scr[offset] = attr | c;
55
    scr[offset] = attr | c;
56
    offset += step;
56
    offset += step;
57
  }
57
  }
58
}
58
}
59
 
59
 
60
void video_putstring(int y, int x, unsigned short attr, char *s, int maxlen) {
60
void video_putstring(int y, int x, unsigned short attr, const char *s, int maxlen) {
61
  if (x < 0) { /* means 'center out' */
61
  if (x < 0) { /* means 'center out' */
62
    int slen;
62
    int slen;
63
    for (slen = 0; s[slen] != 0; slen++); /* faster than strlen() */
63
    for (slen = 0; s[slen] != 0; slen++); /* faster than strlen() */
64
    x = 40 - (slen >> 1);
64
    x = 40 - (slen >> 1);
65
  }
65
  }
Line 68... Line 68...
68
    scr[x++] = attr | *s;
68
    scr[x++] = attr | *s;
69
    s++;
69
    s++;
70
  }
70
  }
71
}
71
}
72
 
72
 
73
void video_putstringfix(int y, int x, unsigned short attr, char *s, int w) {
73
void video_putstringfix(int y, int x, unsigned short attr, const char *s, int w) {
74
  x += (y << 6) + (y << 4); /* I use x as an offset now */
74
  x += (y << 6) + (y << 4); /* I use x as an offset now */
75
  while (w-- > 0) {
75
  while (w-- > 0) {
76
    scr[x++] = attr | *s;
76
    scr[x++] = attr | *s;
77
    if (*s != 0) s++;
77
    if (*s != 0) s++;
78
  }
78
  }