This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
funcs.c
866 lines (746 loc) · 16.4 KB
/
funcs.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
/*
** $Id: funcs.c,v 2.0 90/09/19 19:53:19 paul Rel $
**
** Miscellaneous routines.
*/
/*
** Copyright 1989,1990 by Paul Sutcliffe Jr.
**
** Permission is hereby granted to copy, reproduce, redistribute,
** or otherwise use this software as long as: there is no monetary
** profit gained specifically from the use or reproduction or this
** software, it is not sold, rented, traded or otherwise marketed,
** and this copyright notice is included prominently in any copy
** made.
**
** The author make no claims as to the fitness or correctness of
** this software for any use whatsoever, and it is provided as is.
** Any use of this software is at the user's own risk.
*/
/*
** $Log: funcs.c,v $
** Revision 2.0 90/09/19 19:53:19 paul
** Initial 2.0 release
**
*/
#include "getty.h"
#include "table.h"
#include <ctype.h>
#ifdef I_TIME
#include <time.h>
#endif /* I_TIME */
#ifdef I_SYSTIME
#include <sys/time.h>
#endif /* I_SYSTIME */
#ifdef DOUNAME
#include <sys/utsname.h>
#endif /* DOUNAME */
#include <setjmp.h>
#include <signal.h>
#if defined(RCSID) && !defined(lint)
static char *RcsId =
"@(#)$Id: funcs.c,v 2.0 90/09/19 19:53:19 paul Rel $";
#endif
#ifndef MAXBUF
#define MAXBUF 512 /* buffer size */
#endif /* MAXBUF */
#ifndef EXPFAIL
#define EXPFAIL 30 /* default num seconds to wait for expected input */
#endif /* EXPFAIL */
#define EXPECT 0 /* states for chat() */
#define SEND 1
#define AUTOBD 0376 /* marker for AutoBaud digits */
char *unquote();
int expect(), send();
boolean expmatch();
sig_t expalarm();
/*
** Fputs() - does fputs() with '\' and '@' expansion
**
** Returns EOF if an error occurs.
*/
int
Fputs(s, stream)
register char *s;
register FILE *stream;
{
char c, n, tbuf[9], ubuf[32];
time_t clock;
struct tm *lt, *localtime();
while (c = *s++) {
if ((c == '@') && (n = *s++)) {
switch (n) {
case 'B': /* speed (baud rate) */
if (*Speed && Fputs(Speed, stream) == EOF)
return(EOF);
break;
case 'D': /* date */
(void) time(&clock);
lt = localtime(&clock);
(void) sprintf(tbuf, "%02d/%02d/%02d",
++(lt->tm_mon),
lt->tm_mday, lt->tm_year);
if (Fputs(tbuf, stream) == EOF)
return(EOF);
break;
case 'L': /* line */
if (*Device && Fputs(Device, stream) == EOF)
return(EOF);
break;
case 'S': /* system node name */
if (*SysName && Fputs(SysName, stream) == EOF)
return(EOF);
break;
#ifdef M_XENIX
/* Special case applys here: SCO XENIX's
* /etc/gettydefs file has "\r\n@!login: " as
* the login field value, and replaces the "@"
* with the system node name. This will do
* the same thing.
*/
case '!':
if (*SysName && Fputs(SysName, stream) == EOF)
return(EOF);
(void) fputc(n, stream);
break;
#endif /* M_XENIX */
case 'T': /* time */
(void) time(&clock);
lt = localtime(&clock);
(void) sprintf(tbuf, "%02d:%02d:%02d",
lt->tm_hour,
lt->tm_min, lt->tm_sec);
if (Fputs(tbuf, stream) == EOF)
return(EOF);
break;
case 'U': /* number of active users */
(void) sprintf(ubuf, "%d", Nusers);
if (Fputs(ubuf, stream) == EOF)
return(EOF);
break;
case 'V': /* version */
if (*Version && Fputs(Version, stream) == EOF)
return(EOF);
break;
case '@': /* in case '@@' was used */
if (fputc(n, stream) == EOF)
return(EOF);
break;
}
} else {
if (c == '\\')
s = unquote(s, &c);
/* we're in raw mode: send CR before every LF
*/
if (c == '\n' && (fputc('\r', stream) == EOF))
return(EOF);
if (c && fputc(c, stream) == EOF)
return(EOF);
}
}
return(SUCCESS);
}
/*
** getuname() - retrieve the system's node name
**
** Returns pointer to name or a zero-length string if not found.
*/
char *
getuname()
{
#ifdef HOSTNAME /* hardwire the name */
static char name[] = HOSTNAME;
return(name);
#else /* HOSTNAME */
#ifdef M_XENIX
#define SYSTEMID "/etc/systemid"
static FILE *fp;
#endif /* M_XENIX */
struct utsname uts;
static char name[80];
name[0] = '\0';
#ifdef DOUNAME /* dig it out of the kernel */
if (uname(&uts) != FAIL)
(void) strcpy(name, uts.nodename);
#endif /* DOUNAME */
#ifdef M_XENIX /* if Xenix's uts.nodename is empty */
if (strlen(name) == 0) {
if ((fp = fopen(SYSTEMID, "r")) != (FILE *) NULL) {
(void) fgets(name, sizeof(name), fp);
(void) fclose(fp);
name[strlen(name)-1] = '\0';
}
}
#endif /* M_XENIX */
#ifdef PHOSTNAME /* get it from the shell */
if (strlen(name) == 0) {
FILE *cmd;
if ((cmd = popen(PHOSTNAME, "r")) != (FILE *) NULL) {
(void) fgets(name, sizeof(name), cmd);
(void) pclose(cmd);
name[strlen(name)-1] = '\0';
}
}
#endif /* PHOSTNAME */
return(name);
#endif /* HOSTNAME */
}
/*
** settermio() - setup tty according to termio values
*/
void
settermio(termio, state)
register TERMIO *termio;
int state;
{
register int i;
static TERMIO setterm;
#ifdef TRS16
/* Tandy 16/6000 console's BREAK key sends ^C
*/
char Cintr = (strequal(Device, "console")) ? '\003' : CINTR;
#else
char Cintr = CINTR;
#endif /* TRS16 */
#ifdef MY_ERASE
char Cerase = MY_ERASE;
#else
char Cerase = CERASE;
#endif /* MY_ERASE */
#ifdef MY_KILL
char Ckill = MY_KILL;
#else
char Ckill = CKILL;
#endif /* MY_KILL */
(void) ioctl(STDIN, TCGETA, &setterm);
switch (state) {
case INITIAL:
setterm.c_iflag = termio->c_iflag;
setterm.c_oflag = termio->c_oflag;
setterm.c_cflag = termio->c_cflag;
setterm.c_lflag = termio->c_lflag;
setterm.c_line = termio->c_line;
/* single character processing
*/
setterm.c_lflag &= ~(ICANON);
setterm.c_cc[VMIN] = 1;
setterm.c_cc[VTIME] = 0;
/* sanity check
*/
if ((setterm.c_cflag & CBAUD) == 0)
setterm.c_cflag |= B9600;
if ((setterm.c_cflag & CSIZE) == 0)
setterm.c_cflag |= DEF_CFL;
setterm.c_cflag |= (CREAD | HUPCL);
(void) ioctl(STDIN, TCSETAF, &setterm);
break;
case FINAL:
setterm.c_iflag = termio->c_iflag;
setterm.c_oflag = termio->c_oflag;
setterm.c_cflag = termio->c_cflag;
setterm.c_lflag = termio->c_lflag;
setterm.c_line = termio->c_line;
/* sanity check
*/
if ((setterm.c_cflag & CBAUD) == 0)
setterm.c_cflag |= B9600;
if ((setterm.c_cflag & CSIZE) == 0)
setterm.c_cflag |= DEF_CFL;
setterm.c_cflag |= CREAD;
/* set c_cc[] chars to reasonable values
*/
for (i=0; i < NCC; i++)
setterm.c_cc[i] = CNUL;
setterm.c_cc[VINTR] = Cintr;
setterm.c_cc[VQUIT] = CQUIT;
setterm.c_cc[VERASE] = Cerase;
setterm.c_cc[VKILL] = Ckill;
setterm.c_cc[VEOF] = CEOF;
#ifdef CEOL
setterm.c_cc[VEOL] = CEOL;
#endif /* CEOL */
(void) ioctl(STDIN, TCSETAW, &setterm);
break;
}
}
/*
** chat() - handle expect/send sequence to Device
**
** Returns FAIL if an error occurs.
*/
int
chat(s)
char *s;
{
register int state = EXPECT;
boolean finished = FALSE, if_fail = FALSE;
char c, *p;
char word[MAXLINE+1]; /* buffer for next word */
debug3(D_INIT, "chat(%s) called\n", s);
while (!finished) {
p = word;
while (((c = (*s++ & 0177)) != '\0') && c != ' ' && c != '-')
*p++ = (c) ? c : '\177';
if (c == '\0')
finished = TRUE;
if (c == '-')
if_fail = (if_fail == FALSE) ? TRUE : FALSE;
*p = '\0';
switch (state) {
case EXPECT:
if (expect(word) == FAIL) {
if (if_fail == FALSE)
return(FAIL); /* no if-fail seq */
} else {
/* eat up rest of current sequence
*/
if (if_fail == TRUE) {
while ((c = (*s++ & 0177)) != '\0' &&
c != ' ')
;
if (c == '\0')
finished = TRUE;
}
}
state = SEND;
break;
case SEND:
if (send(word) == FAIL)
return(FAIL);
state = EXPECT;
break;
}
continue;
}
debug2(D_INIT, "chat() successful\n");
return (SUCCESS);
}
/*
** unquote() - decode char(s) after a '\' is found.
**
** Returns the pointer s; decoded char in *c.
*/
char valid_oct[] = "01234567";
char valid_dec[] = "0123456789";
char valid_hex[] = "0123456789aAbBcCdDeEfF";
char *
unquote(s, c)
char *s, *c;
{
int value, base;
char n, *valid;
n = *s++;
switch (n) {
case 'b':
*c = '\b'; break;
case 'c':
if ((n = *s++) == '\n')
*c = '\0';
else
*c = n;
break;
case 'f':
*c = '\f'; break;
case 'n':
*c = '\n'; break;
case 'r':
*c = '\r'; break;
case 's':
*c = ' '; break;
case 't':
*c = '\t'; break;
case '\n':
*c = '\0'; break; /* ignore NL which follows a '\' */
case '\\':
*c = '\\'; break; /* '\\' will give a single '\' */
default:
if (isdigit(n)) {
value = 0;
if (n == '0') {
if (*s == 'x') {
valid = valid_hex;
base = 16;
s++;
} else {
valid = valid_oct;
base = 8;
}
} else {
valid = valid_dec;
base = 10;
s--;
}
while (strpbrk(s, valid) == s) {
value = (value * base) + (int) (n - '0');
s++;
}
*c = (char) (value & 0377);
} else {
*c = n;
}
break;
}
return(s);
}
/*
** send() - send a string to stdout
*/
int
send(s)
register char *s;
{
register int retval = SUCCESS;
char ch;
debug2(D_INIT, "SEND: (");
if (strequal(s, "\"\"")) { /* ("") used as a place holder */
debug2(D_INIT, "[nothing])\n");
return(retval);
}
while (ch = *s++) {
if (ch == '\\') {
switch (*s) {
case 'p': /* '\p' == pause */
debug2(D_INIT, "[pause]");
(void) sleep(1);
s++;
continue;
case 'd': /* '\d' == delay */
debug2(D_INIT, "[delay]");
(void) sleep(2);
s++;
continue;
case 'K': /* '\K' == BREAK */
debug2(D_INIT, "[break]");
(void) ioctl(STDOUT, TCSBRK, 0);
s++;
continue;
default:
s = unquote(s, &ch);
break;
}
}
debug3(D_INIT, ((ch < ' ') ? "^%c" : "%c"),
((ch < ' ') ? ch | 0100 : ch));
if (write(STDOUT, &ch, 1) == FAIL) {
retval = FAIL;
break;
}
}
debug3(D_INIT, ") -- %s\n", (retval == SUCCESS) ? "OK" : "Failed");
return(retval);
}
/*
** expect() - look for a specific string on stdin
*/
jmp_buf env; /* here so expalarm() sees it */
int
expect(s)
register char *s;
{
register int i;
register int expfail = EXPFAIL;
register retval = FAIL;
char ch, *p, word[MAXLINE+1], buf[MAXBUF];
sig_t (*oldalarm)();
if (strequal(s, "\"\"")) { /* ("") used as a place holder */
debug2(D_INIT, "EXPECT: ([nothing])\n");
return(SUCCESS);
}
#ifdef lint
/* shut lint up about 'warning: oldalarm may be used before set' */
oldalarm = signal(SIGALRM, SIG_DFL);
#endif /* lint */
/* look for escape chars in expected word
*/
for (p = word; ch = (*s++ & 0177);) {
if (ch == '\\') {
if (*s == 'A') { /* spot for AutoBaud digits */
*p++ = AUTOBD;
s++;
continue;
} else if (*s == 'T') { /* change expfail timeout */
if (isdigit(*++s)) {
s = unquote(s, &ch);
/* allow 3 - 255 second timeout */
if ((expfail = (int) ch) < 3)
expfail = 3;
}
continue;
} else
s = unquote(s, &ch);
}
*p++ = (ch) ? ch : '\177';
}
*p = '\0';
if (setjmp(env)) { /* expalarm returns non-zero here */
debug3(D_INIT, "[timed out after %d seconds]\n", expfail);
(void) signal(SIGALRM, oldalarm);
return(FAIL);
}
oldalarm = signal(SIGALRM, expalarm);
(void) alarm((unsigned) expfail);
debug3(D_INIT, "EXPECT: <%d> (", expfail);
debug1(D_INIT, word);
debug2(D_INIT, "), GOT:\n");
p = buf;
while (read(STDIN, &ch, 1) == 1) {
debug3(D_INIT, ((ch < ' ') ? "^%c" : "%c"),
((ch < ' ') ? ch | 0100 : ch));
*p++ = (char) ((int) ch & 0177);
*p = '\0';
if (strlen(buf) >= strlen(word)) {
for (i=0; buf[i]; i++)
if (expmatch(&buf[i], word)) {
retval = SUCCESS;
break;
}
}
if (retval == SUCCESS)
break;
}
(void) alarm((unsigned) 0);
(void) signal(SIGALRM, oldalarm);
debug3(D_INIT, " -- %s\n", (retval == SUCCESS) ? "got it" : "Failed");
return(retval);
}
/*
** expmatch() - compares expected string with the one gotten
*/
#ifdef TELEBIT
char valid[] = "0123456789FAST";
#else /* TELEBIT */
char valid[] = "0123456789";
#endif /* TELEBIT */
boolean
expmatch(got, exp)
register char *got;
register char *exp;
{
register int ptr = 0;
while (*exp) {
if (*exp == AUTOBD) { /* substitute real digits gotten */
while (*got && strpbrk(got, valid) == got) {
AutoBaud = TRUE;
if (ptr < (sizeof(AutoRate) - 2))
AutoRate[ptr++] = *got;
got++;
}
if (*got == '\0')
return(FALSE); /* didn't get it all yet */
AutoRate[ptr] = '\0';
exp++;
continue;
}
if (*got++ != *exp++)
return(FALSE); /* no match */
}
return(TRUE);
}
/*
** expalarm() - called when expect()'s SIGALRM goes off
*/
sig_t
expalarm()
{
longjmp(env, 1);
}
/*
** getlogname() - get the users login response
**
** Returns int value indicating success.
*/
int
getlogname(termio, name, size)
TERMIO *termio;
register char *name;
int size;
{
register int count;
register int lower = 0;
register int upper = 0;
char ch, *p;
ushort lflag;
#ifdef MY_ERASE
char Erase = MY_ERASE;
#else
char Erase = CERASE;
#endif /* MY_ERASE */
#ifdef MY_KILL
char Kill = MY_KILL;
#else
char Kill = CKILL;
#endif /* MY_KILL */
debug2(D_GETL, "getlogname() called\n");
(void) ioctl(STDIN, TCGETA, termio);
lflag = termio->c_lflag;
termio->c_iflag = 0;
termio->c_oflag = 0;
termio->c_cflag = 0;
termio->c_lflag = 0;
p = name; /* point to beginning of buffer */
count = 0; /* nothing entered yet */
do {
if (read(STDIN, &ch, 1) != 1) /* nobody home */
exit(0);
if ((ch = (char) ((int) ch & 0177)) == CEOF)
if (p == name) /* ctrl-d was first char */
exit(0);
if (ch == CQUIT) /* user wanted out, i guess */
exit(0);
if (ch == '\0') {
debug2(D_GETL, "returned (BADSPEED)\n");
return(BADSPEED);
}
if (!(lflag & ECHO)) {
(void) putc(ch, stdout);
(void) fflush(stdout);
}
if (ch == Erase) {
if (count) {
if (!(lflag & ECHOE)) {
(void) fputs(" \b", stdout);
(void) fflush(stdout);
}
--p;
--count;
}
} else if (ch == Kill) {
if (!(lflag & ECHOK)) {
(void) fputs("\r\n", stdout);
(void) fflush(stdout);
}
p = name;
count = 0;
} else {
*p++ = ch;
count++;
if (islower(ch))
lower++;
if (isupper(ch))
upper++;
}
} while ((ch != '\n') && (ch != '\r') && (count < size));
*(--p) = '\0'; /* terminate buffer */
if (ch == '\r') {
(void) putc('\n', stdout);
(void) fflush(stdout);
termio->c_iflag |= ICRNL; /* turn on cr/nl xlate */
termio->c_oflag |= ONLCR;
} else if (ch == '\n') {
(void) putc('\r', stdout);
(void) fflush(stdout);
}
if (strlen(name) == 0) {
debug2(D_GETL, "returned (NONAME)\n");
return(NONAME);
}
if (upper && !lower) {
#ifdef WARNCASE
if (WarnCase) {
WarnCase = FALSE;
debug2(D_GETL, "returned (BADCASE)\n");
return(BADCASE);
}
#endif /* WARNCASE */
for (p=name; *p; p++) /* make all chars UC */
*p = toupper(*p);
termio->c_iflag |= IUCLC;
termio->c_oflag |= OLCUC;
termio->c_lflag |= XCASE;
}
debug3(D_GETL, "returned (SUCCESS), name=(%s)\n", *name);
return(SUCCESS);
}
/*
** logerr() - display an error message
*/
void
logerr(msg)
register char *msg;
{
register FILE *co;
char *errdev;
errdev = (Check) ? "/dev/tty" : CONSOLE;
if ((co = fopen(errdev, "w")) != (FILE *) NULL) {
(void) fprintf(co, "\r\n%s (%s): %s\r\n", MyName, Device, msg);
(void) fclose(co);
}
#ifdef TRYMAIL
else {
char buf[MAXLINE];
FILE *popen();
(void) sprintf(buf, "%s %s", MAILER, NOTIFY);
if ((co = popen(buf, "w")) != (FILE *) NULL) {
(void) fprintf(co, "To: %s\n", NOTIFY);
(void) fprintf(co, "Subject: %s problem\n\n", MyName);
(void) fprintf(co, "%s: %s\n", Device, msg);
(void) pclose(co);
}
}
#endif /* TRYMAIL */
}
#ifdef DEBUG
/*
** debug() - an fprintf to the debug file
**
** Only does the output if the requested level is "set."
*/
#ifdef VARARGS
#include <varargs.h>
/*VARARGS2*/
void
debug(lvl, fmt, va_alist)
int lvl;
char *fmt;
va_dcl
{
va_list args;
va_start(args);
if (Debug & lvl) {
(void) vfprintf(Dfp, fmt, args);
(void) fflush(Dfp);
}
va_end(args);
}
#else /* VARARGS */
/*VARARGS2*/
void
debug(lvl, fmt, arg1, arg2, arg3, arg4)
int lvl;
char *fmt;
{
if (Debug & lvl) {
(void) fprintf(Dfp, fmt, arg1, arg2, arg3, arg4);
(void) fflush(Dfp);
}
}
#endif /* VARARGS */
/*
** dprint() - like debug(), but shows control chars
*/
void
dprint(lvl, word)
int lvl;
char *word;
{
char *p, *fmt, ch;
if (Debug & lvl) {
p = word;
while (ch = *p++) {
if (ch == AUTOBD) {
(void) fputs("[speed]", Dfp);
(void) fflush(Dfp);
continue;
} else if (ch < ' ') {
fmt = "^%c";
ch = ch | 0100;
} else {
fmt = "%c";
}
(void) fprintf(Dfp, fmt, ch);
}
(void) fflush(Dfp);
}
}
#endif /* DEBUG */
/* end of funcs.c */