Mercurial > octave
comparison src/input.cc @ 1215:c56c0565afd5
[project @ 1995-04-06 05:12:20 by jwe]
author | jwe |
---|---|
date | Thu, 06 Apr 1995 05:13:57 +0000 |
parents | b6360f2d4fa6 |
children | b01f9577b0da |
comparison
equal
deleted
inserted
replaced
1214:0bf4d2b7def4 | 1215:c56c0565afd5 |
---|---|
237 char *result = new char [PROMPT_GROWTH]; | 237 char *result = new char [PROMPT_GROWTH]; |
238 int c; | 238 int c; |
239 char *temp = 0; | 239 char *temp = 0; |
240 | 240 |
241 result[0] = 0; | 241 result[0] = 0; |
242 while (c = *string++) | 242 while ((c = *string++)) |
243 { | 243 { |
244 if (c == '\\') | 244 if (c == '\\') |
245 { | 245 { |
246 c = *string; | 246 c = *string; |
247 | 247 |
349 case 'h': | 349 case 'h': |
350 { | 350 { |
351 char *t_string; | 351 char *t_string; |
352 | 352 |
353 temp = strsave (host_name); | 353 temp = strsave (host_name); |
354 if (t_string = strchr (temp, '.')) | 354 t_string = strchr (temp, '.'); |
355 if (t_string); | |
355 *t_string = '\0'; | 356 *t_string = '\0'; |
356 | 357 |
357 goto add_string; | 358 goto add_string; |
358 } | 359 } |
359 | 360 |