version 1.15, 2009/11/26 14:46:08 |
version 1.16, 2009/12/03 22:50:10 |
|
|
termnext = s; |
termnext = s; |
while ((termstr = strsep(&termnext, ",")) != NULL) { |
while ((termstr = strsep(&termnext, ",")) != NULL) { |
entnext = termstr; |
entnext = termstr; |
|
|
entstr = strsep(&entnext, ":"); |
entstr = strsep(&entnext, ":"); |
if (entstr == NULL || entnext == NULL) |
if (entstr == NULL || entnext == NULL) |
continue; |
continue; |
|
|
|
|
val = NULL; |
val = NULL; |
removeflag = 0; |
removeflag = 0; |
if ((ptr = strchr(entstr, '=')) != NULL) { |
if ((ptr = strchr(entstr, '=')) != NULL) { |
*ptr++ = '\0'; |
*ptr++ = '\0'; |
val = xstrdup(ptr); |
val = xstrdup(ptr); |
if (strunvis(val, ptr) == -1) { |
if (strunvis(val, ptr) == -1) { |
|
|
if (setupterm(name, fd, &error) != OK) { |
if (setupterm(name, fd, &error) != OK) { |
switch (error) { |
switch (error) { |
case 1: |
case 1: |
xasprintf(cause, "can't use hardcopy terminal: %s", name); |
xasprintf( |
|
cause, "can't use hardcopy terminal: %s", name); |
break; |
break; |
case 0: |
case 0: |
xasprintf(cause, "missing or unsuitable terminal: %s", name); |
xasprintf( |
|
cause, "missing or unsuitable terminal: %s", name); |
break; |
break; |
case -1: |
case -1: |
xasprintf(cause, "can't find terminfo database"); |
xasprintf(cause, "can't find terminfo database"); |