comparison src/term.c @ 8977:b3da1ec8d156 v7.4.1774

commit https://github.com/vim/vim/commit/902647d2dfb42dce8449dfbbc22dab27a528744d Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 22 11:49:06 2016 +0200 patch 7.4.1774 Problem: Cterm true color feature has warnings. Solution: Add type casts.
author Christian Brabandt <cb@256bit.org>
date Fri, 22 Apr 2016 12:00:07 +0200
parents 9c097bfad637
children 3b51b0aeb9a3
comparison
equal deleted inserted replaced
8976:7cbde3a1c69b 8977:b3da1ec8d156
1381 1381
1382 while (!feof(fd)) 1382 while (!feof(fd))
1383 { 1383 {
1384 int len; 1384 int len;
1385 int pos; 1385 int pos;
1386 char *color; 1386
1387 1387 (void)fgets(line, LINE_LEN, fd);
1388 ignored = fgets(line, LINE_LEN, fd);
1389 len = strlen(line); 1388 len = strlen(line);
1390 1389
1391 if (len <= 1 || line[len-1] != '\n') 1390 if (len <= 1 || line[len-1] != '\n')
1392 continue; 1391 continue;
1393 1392
1395 1394
1396 i = sscanf(line, "%d %d %d %n", &r, &g, &b, &pos); 1395 i = sscanf(line, "%d %d %d %n", &r, &g, &b, &pos);
1397 if (i != 3) 1396 if (i != 3)
1398 continue; 1397 continue;
1399 1398
1400 color = line + pos; 1399 if (STRICMP(line + pos, name) == 0)
1401
1402 if (STRICMP(color, name) == 0)
1403 { 1400 {
1404 fclose(fd); 1401 fclose(fd);
1405 return (guicolor_T) RGB(r, g, b); 1402 return (guicolor_T) RGB(r, g, b);
1406 } 1403 }
1407 } 1404 }