227 |
Call the function (chat-connect) |
Call the function (chat-connect) |
228 |
*/ |
*/ |
229 |
int |
int |
230 |
chat_connect () |
chat_connect (filename) |
231 |
|
char *filename; |
232 |
{ |
{ |
233 |
SCM result = SCM_UNDEFINED; |
SCM result = SCM_UNDEFINED; |
234 |
SCM connect; |
SCM connect; |
238 |
gh_new_procedure ("chat-send", chat_send, 1, 0, 0); |
gh_new_procedure ("chat-send", chat_send, 1, 0, 0); |
239 |
gh_new_procedure ("chat-try", chat_try, 2, 0, 1); |
gh_new_procedure ("chat-try", chat_try, 2, 0, 1); |
240 |
|
|
241 |
gh_eval_file (PARAM_MODEM_CHAT_SCRIPT); |
gh_eval_file (filename); |
242 |
connect = gh_lookup ("chat-connect"); |
connect = gh_lookup ("chat-connect"); |
243 |
result = gh_call0 (connect); |
result = gh_call0 (connect); |
244 |
|
|
245 |
if (!gh_boolean_p (result)) |
if (!gh_boolean_p (result)) |
246 |
{ |
{ |
247 |
log (LOG_ERR, gettext ("%s: returned value isn't a boolean.\n"), |
log (LOG_ERR, gettext ("%s: returned value isn't a boolean.\n"), |
248 |
PARAM_MODEM_CHAT_SCRIPT); |
filename); |
249 |
log (LOG_ERR, gettext ("Couldn't continue, exiting.\n")); |
log (LOG_ERR, gettext ("Couldn't continue, exiting.\n")); |
250 |
exit (1); |
exit (1); |
251 |
} |
} |