'\\{Octa}' {yylval = strtol(yytext+2,NULL,8); return(CCHAR);}
'\\.' {yylval = yytext[2]; return(CCHAR);}
'.' {yylval = yytext[1]; return(CCHAR);}
-\" {p=kbs_buf.kb_string;
+\" {p=(char *) kbs_buf.kb_string;
pmax=p+sizeof(kbs_buf.kb_string)-1;
BEGIN(STR);}
<STR>\\{Octa} {if(p>=pmax)stringovfl();*p++=strtol(yytext+1,NULL,8);}
;
charsetline : CHARSET STRLITERAL EOL
{
- set_charset(kbs_buf.kb_string);
+ set_charset((char *) kbs_buf.kb_string);
}
;
altismetaline : ALT_IS_META EOL
;
usualcomposeline: COMPOSE AS USUAL FOR STRLITERAL EOL
{
- compose_as_usual(kbs_buf.kb_string);
+ compose_as_usual((char *) kbs_buf.kb_string);
}
| COMPOSE AS USUAL EOL
{
int nocompose = 0;
int
-main(unsigned int argc, char *argv[]) {
+main(int argc, char *argv[]) {
const char *short_opts = "cC:dhmsuqvV";
const struct option long_opts[] = {
{ "clearcompose", no_argument, NULL, 'c' },
char *user_dir[2] = { 0, 0 };
while(ev) {
char *t = index(ev, ':');
- char sv;
+ char sv = 0;
if (t) {
sv = *t;
*t = 0;
while(*p++);
}
func_table[x] = p;
- sh = strlen(kbs.kb_string) + 1;
+ sh = strlen((char *) kbs.kb_string) + 1;
if (fp + sh > func_buf + sizeof(func_buf)) {
fprintf(stderr,
_("%s: addfunc: func_buf overflow\n"), progname);
r = fp;
while (q > p)
*--r = *--q;
- strcpy(p, kbs.kb_string);
+ strcpy(p, (char *) kbs.kb_string);
for (i = x + 1; i < MAX_NR_FUNC; i++)
if (func_table[i])
func_table[i] += sh;
for (i = 0; i < MAX_NR_FUNC; i++) {
kbs_buf.kb_func = i;
if ((p = func_table[i])) {
- strcpy(kbs_buf.kb_string, p);
+ strcpy((char *) kbs_buf.kb_string, p);
if (ioctl(fd, KDSKBSENT, (unsigned long)&kbs_buf))
fprintf(stderr, _("failed to bind string '%s' to function %s\n"),
ostr(kbs_buf.kb_string), syms[KT_FN].table[kbs_buf.kb_func]);
for (i=0; i<30; i++) if(stringvalues[i]) {
struct kbsentry ke;
ke.kb_func = i;
- strncpy(ke.kb_string, stringvalues[i], sizeof(ke.kb_string));
+ strncpy((char *) ke.kb_string, stringvalues[i], sizeof(ke.kb_string));
ke.kb_string[sizeof(ke.kb_string)-1] = 0;
addfunc(ke);
}
writepsffontheader(ofil, width, height, fontlen, &psftype, flags);
utf8 = (psftype == 2);
- (void)fwrite(fontbuf, charsize, fontlen, ofil);
+ if ((fwrite(fontbuf, charsize, fontlen, ofil)) != fontlen) {
+ fprintf(stderr, _("Cannot write font file"));
+ exit(EX_IOERR);
+ }
+
/* unimaps: -1 => do nothing: caller will append map */
if (uclistheads != NULL && uclistheads != (struct unicode_list*)-1) {
struct unicode_list *ul;