276 |
fprintf(f, _("Usage:\n" |
fprintf(f, _("Usage:\n" |
277 |
"General options:\n" |
"General options:\n" |
278 |
" gnokii --help\n" |
" gnokii --help\n" |
279 |
" gnokii --monitor [delay]\n" |
" gnokii --monitor [delay|once]\n" |
280 |
" gnokii --version\n" |
" gnokii --version\n" |
281 |
"SMS options:\n" |
"SMS options:\n" |
282 |
" gnokii --getsms memory_type start [end] [-f file] [-F file] [-d]\n" |
" gnokii --getsms memory_type start [end] [-f file] [-F file] [-d]\n" |
2750 |
cb_widx = 0; |
cb_widx = 0; |
2751 |
gn_sm_functions(GN_OP_SetCellBroadcast, &data, &state); |
gn_sm_functions(GN_OP_SetCellBroadcast, &data, &state); |
2752 |
|
|
2753 |
d = argc ? atoi(argv[0]) : 1; |
if (argc) |
2754 |
|
d = !strcasecmp(argv[0], "once") ? -1 : atoi(argv[0]); |
2755 |
|
else |
2756 |
|
d = 1; |
2757 |
|
|
2758 |
while (!bshutdown) { |
while (!bshutdown) { |
2759 |
if (gn_sm_functions(GN_OP_GetRFLevel, &data, &state) == GN_ERR_NONE) |
if (gn_sm_functions(GN_OP_GetRFLevel, &data, &state) == GN_ERR_NONE) |
2814 |
if (readcbmessage(&cbmessage) == GN_ERR_NONE) |
if (readcbmessage(&cbmessage) == GN_ERR_NONE) |
2815 |
fprintf(stdout, _("Cell broadcast received on channel %d: %s\n"), cbmessage.channel, cbmessage.message); |
fprintf(stdout, _("Cell broadcast received on channel %d: %s\n"), cbmessage.channel, cbmessage.message); |
2816 |
|
|
2817 |
|
if (d < 0) break; |
2818 |
sleep(d); |
sleep(d); |
2819 |
} |
} |
2820 |
|
|