1 /*@ S-nail - a mail user agent derived from Berkeley Mail.
2 *@ Auxiliary functions.
4 * Copyright (c) 2000-2004 Gunnar Ritter, Freiburg i. Br., Germany.
5 * Copyright (c) 2012 - 2013 Steffen "Daode" Nurpmeso <sdaoden@users.sf.net>.
8 * Copyright (c) 1980, 1993
9 * The Regents of the University of California. All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 #include <sys/utsname.h>
51 # include <sys/socket.h>
61 /* {hold,rele}_all_sigs() */
62 static size_t _alls_depth
;
63 static sigset_t _alls_nset
, _alls_oset
;
66 panic(char const *format
, ...)
70 fprintf(stderr
, tr(1, "Panic: "));
73 vfprintf(stderr
, format
, ap
);
84 if (_alls_depth
++ == 0) {
85 sigfillset(&_alls_nset
);
86 sigdelset(&_alls_nset
, SIGKILL
);
87 sigdelset(&_alls_nset
, SIGSTOP
);
88 sigprocmask(SIG_BLOCK
, &_alls_nset
, &_alls_oset
);
95 if (--_alls_depth
== 0)
96 sigprocmask(SIG_SETMASK
, &_alls_oset
, (sigset_t
*)NULL
);
100 * Touch the named message by setting its MTOUCH flag.
101 * Touched messages have the effect of not being sent
102 * back to the system mailbox on exit.
105 touch(struct message
*mp
)
108 mp
->m_flag
|= MTOUCH
;
109 if ((mp
->m_flag
& MREAD
) == 0)
110 mp
->m_flag
|= MREAD
|MSTATUS
;
114 * Test to see if the passed file name is a directory.
115 * Return true if it is.
118 is_dir(char const *name
)
122 if (stat(name
, &sbuf
) < 0)
124 return(S_ISDIR(sbuf
.st_mode
));
128 * Count the number of arguments in the given string raw list.
131 argcount(char **argv
)
135 for (ap
= argv
; *ap
++ != NULL
;)
137 return ap
- argv
- 1;
141 colalign(const char *cp
, int col
, int fill
, int *cols_decr_used_or_null
)
143 int col_orig
= col
, n
, sz
;
146 np
= nb
= salloc(mb_cur_max
* strlen(cp
) + col
+ 1);
148 #if defined (HAVE_MBTOWC) && defined (HAVE_WCWIDTH)
149 if (mb_cur_max
> 1) {
152 if ((sz
= mbtowc(&wc
, cp
, mb_cur_max
)) < 0) {
155 if ((n
= wcwidth(wc
)) < 0)
159 #endif /* HAVE_MBTOWC && HAVE_WCWIDTH */
166 if (sz
== 1 && spacechar(*cp
)) {
174 if (fill
&& col
!= 0) {
176 memmove(nb
+ col
, nb
, (size_t)(np
- nb
));
177 memset(nb
, ' ', col
);
179 memset(np
, ' ', col
);
185 if (cols_decr_used_or_null
!= NULL
)
186 *cols_decr_used_or_null
-= col_orig
- col
;
191 paging_seems_sensible(void)
196 if (IS_TTY_SESSION() && (cp
= voption("crt")) != NULL
)
197 ret
= (*cp
!= '\0') ? (size_t)atol(cp
) : (size_t)scrnheight
;
202 page_or_print(FILE *fp
, size_t lines
)
209 if ((rows
= paging_seems_sensible()) != 0 && lines
== 0) {
210 while ((c
= getc(fp
)) != EOF
)
211 if (c
== '\n' && ++lines
> rows
)
216 if (rows
!= 0 && lines
>= rows
)
217 run_command(get_pager(), 0, fileno(fp
), -1, NULL
, NULL
, NULL
);
219 while ((c
= getc(fp
)) != EOF
)
224 which_protocol(const char *name
)
226 register const char *cp
;
232 if (name
[0] == '%' && name
[1] == ':')
234 for (cp
= name
; *cp
&& *cp
!= ':'; cp
++)
235 if (!alnumchar(*cp
&0377))
237 if (cp
[0] == ':' && cp
[1] == '/' && cp
[2] == '/') {
238 if (strncmp(name
, "pop3://", 7) == 0)
243 tr(216, "No POP3 support compiled in.\n"));
245 if (strncmp(name
, "pop3s://", 8) == 0)
250 tr(225, "No SSL support compiled in.\n"));
252 if (strncmp(name
, "imap://", 7) == 0)
257 tr(269, "No IMAP support compiled in.\n"));
259 if (strncmp(name
, "imaps://", 8) == 0)
264 tr(225, "No SSL support compiled in.\n"));
266 return PROTO_UNKNOWN
;
268 /* TODO This is the de facto maildir code and thus belongs
269 * TODO into maildir! */
270 file
: p
= PROTO_FILE
;
271 np
= ac_alloc((sz
= strlen(name
)) + 5);
272 memcpy(np
, name
, sz
+ 1);
273 if (stat(name
, &st
) == 0) {
274 if (S_ISDIR(st
.st_mode
)) {
275 strcpy(&np
[sz
], "/tmp");
276 if (stat(np
, &st
) == 0 && S_ISDIR(st
.st_mode
)) {
277 strcpy(&np
[sz
], "/new");
278 if (stat(np
, &st
) == 0 &&
279 S_ISDIR(st
.st_mode
)) {
280 strcpy(&np
[sz
], "/cur");
281 if (stat(np
, &st
) == 0 &&
288 strcpy(&np
[sz
], ".gz");
289 if (stat(np
, &st
) < 0) {
290 strcpy(&np
[sz
], ".bz2");
291 if (stat(np
, &st
) < 0) {
292 if ((cp
= value("newfolders")) != 0 &&
293 strcmp(cp
, "maildir") == 0)
310 h
= (h
<< 4 & 0xffffffff) + (*cp
&0377);
311 if ((g
= h
& 0xf0000000) != 0) {
322 const long primes
[] = {
323 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521,
324 131071, 262139, 524287, 1048573, 2097143, 4194301,
325 8388593, 16777213, 33554393, 67108859, 134217689,
326 268435399, 536870909, 1073741789, 2147483647
331 for (i
= 0; i
< sizeof primes
/ sizeof *primes
; i
++)
332 if ((mprime
= primes
[i
]) >= (n
< 65536 ? n
*4 :
333 n
< 262144 ? n
*2 : n
))
335 if (i
== sizeof primes
/ sizeof *primes
)
336 mprime
= n
; /* not so prime, but better than failure */
341 expand_shell_escape(char const **s
, bool_t use_nail_extensions
)
346 if ((c
= *xs
& 0xFF) == '\0')
352 switch ((c
= *xs
& 0xFF)) {
354 case 'a': c
= '\a'; break;
355 case 'b': c
= '\b'; break;
356 case 'c': c
= PROMPT_STOP
;break;
357 case 'f': c
= '\f'; break;
358 case 'n': c
= '\n'; break;
359 case 'r': c
= '\r'; break;
360 case 't': c
= '\t'; break;
361 case 'v': c
= '\v'; break;
363 for (++xs
, c
= 0, n
= 4; --n
> 0 && octalchar(*xs
); ++xs
) {
368 /* S-nail extension for nice (get)prompt(()) support */
372 if (use_nail_extensions
) {
375 c
= exec_last_comm_error
? '1' : '0';
388 /* A sole <backslash> at EOS is treated as-is! */
403 static char buf
[PROMPT_BUFFER_SIZE
];
407 if (options
& OPT_NOPROMPT
)
409 else if ((ccp
= value("prompt")) == NULL
) {
410 buf
[0] = value("bsdcompat") ? '&' : '?';
416 for (cp
= buf
; PTRCMP(cp
, <, buf
+ sizeof(buf
) - 1); ++cp
) {
419 int c
= expand_shell_escape(&ccp
, TRU1
);
424 if (c
== 0 || c
== PROMPT_STOP
)
427 a
= (c
== PROMPT_DOLLAR
) ? account_name
: displayname
;
431 if (PTRCMP(cp
+ l
, >=, buf
+ sizeof(buf
) - 1))
446 struct passwd
*pw
= getpwuid(uid
);
448 return pw
== NULL
? NULL
: pw
->pw_name
;
457 if ((np
= getenv("USER")) != NULL
)
459 if ((np
= getname(uid
= getuid())) != NULL
)
461 panic(tr(201, "Cannot associate a name with uid %d\n"), (int)uid
);
467 nodename(int mayoverride
)
469 static char *hostname
;
474 struct addrinfo hints
, *res
;
476 struct hostent
*hent
;
480 if (mayoverride
&& (hn
= value("hostname")) != NULL
&& *hn
!= '\0') {
481 if (hostname
!= NULL
)
483 hostname
= sstrdup(hn
);
484 } else if (hostname
== NULL
) {
489 memset(&hints
, 0, sizeof hints
);
490 hints
.ai_family
= AF_UNSPEC
;
491 hints
.ai_socktype
= SOCK_DGRAM
; /* dummy */
492 hints
.ai_flags
= AI_CANONNAME
;
493 if (getaddrinfo(hn
, "0", &hints
, &res
) == 0) {
494 if (res
->ai_canonname
!= NULL
) {
495 size_t l
= strlen(res
->ai_canonname
);
496 hn
= ac_alloc(l
+ 1);
497 memcpy(hn
, res
->ai_canonname
, l
+ 1);
502 hent
= gethostbyname(hn
);
508 hostname
= sstrdup(hn
);
509 #if defined HAVE_SOCKETS && defined HAVE_IPV6
510 if (hn
!= ut
.nodename
)
518 lookup_password_for_token(char const *token
)
524 var
= ac_alloc(tl
+ 10);
526 memcpy(var
, "password-", 9);
527 memcpy(var
+ 9, token
, tl
);
530 if ((cp
= value(var
)) != NULL
)
537 getrandstring(size_t length
)
539 static unsigned char nodedigest
[16];
551 data
= ac_alloc(length
);
552 if ((fd
= open("/dev/urandom", O_RDONLY
)) < 0 ||
553 length
!= (size_t)read(fd
, data
, length
)) {
560 MD5Update(&ctx
, (unsigned char *)cp
, strlen(cp
));
561 MD5Final(nodedigest
, &ctx
);
563 /* In that case it's only used for boundaries and
564 * Message-Id:s so that srand(3) should suffice */
566 for (i
= 0; i
< sizeof(nodedigest
); ++i
)
567 nodedigest
[i
] = (unsigned char)(
571 for (i
= 0; i
< length
; i
++)
573 (int)(255 * (rand() / (RAND_MAX
+ 1.0))) ^
574 nodedigest
[i
% sizeof nodedigest
]);
579 (void)b64_encode_buf(&b64
, data
, length
, B64_SALLOC
);
581 assert(length
< b64
.l
);
582 b64
.s
[length
] = '\0';
588 md5tohex(char hex
[MD5TOHEX_SIZE
], void const *vp
)
593 for (i
= 0; i
< MD5TOHEX_SIZE
/ 2; i
++) {
595 hex
[j
] = hexchar((cp
[i
] & 0xf0) >> 4);
596 hex
[++j
] = hexchar(cp
[i
] & 0x0f);
598 hex
[MD5TOHEX_SIZE
] = '\0';
603 cram_md5_string(char const *user
, char const *pass
, char const *b64
)
606 char digest
[16], *cp
;
612 (void)b64_decode(&out
, &in
, NULL
);
613 assert(out
.s
!= NULL
);
615 hmac_md5((unsigned char*)out
.s
, out
.l
, UNCONST(pass
), strlen(pass
),
618 cp
= md5tohex(salloc(MD5TOHEX_SIZE
+ 1), digest
);
621 in
.l
= lu
+ MD5TOHEX_SIZE
+1;
622 in
.s
= ac_alloc(lu
+ 1 + MD5TOHEX_SIZE
+1);
623 memcpy(in
.s
, user
, lu
);
625 memcpy(in
.s
+ lu
+ 1, cp
, MD5TOHEX_SIZE
);
626 (void)b64_encode(&out
, &in
, B64_SALLOC
|B64_CRLF
);
630 #endif /* HAVE_MD5 */
633 makedir(const char *name
)
638 if (mkdir(name
, 0700) < 0) {
640 if ((e
== EEXIST
|| e
== ENOSYS
) &&
641 stat(name
, &st
) == 0 &&
642 (st
.st_mode
&S_IFMT
) == S_IFDIR
)
653 if ((cw
->cw_fd
= open(".", O_RDONLY
)) < 0)
655 if (fchdir(cw
->cw_fd
) < 0) {
665 if (fchdir(cw
->cw_fd
) < 0)
671 cwrelse(struct cw
*cw
)
675 #else /* !HAVE_FCHDIR */
679 if (getcwd(cw
->cw_wd
, sizeof cw
->cw_wd
) == NULL
|| chdir(cw
->cw_wd
) < 0)
687 if (chdir(cw
->cw_wd
) < 0)
694 cwrelse(struct cw
*cw
)
698 #endif /* !HAVE_FCHDIR */
701 makeprint(struct str
const *in
, struct str
*out
)
703 static int print_all_chars
= -1;
704 char const *inp
, *maxp
;
708 if (print_all_chars
== -1)
709 print_all_chars
= (value("print-all-chars") != NULL
);
712 out
->s
= outp
= smalloc(msz
);
716 if (print_all_chars
) {
718 memcpy(outp
, inp
, out
->l
);
722 #if defined (HAVE_MBTOWC) && defined (HAVE_WCTYPE_H)
723 if (mb_cur_max
> 1) {
724 char mbb
[MB_LEN_MAX
+ 1];
730 n
= mbtowc(&wc
, inp
, maxp
- inp
);
736 /* FIXME Why mbtowc() resetting here?
737 * FIXME what about ISO 2022-JP plus -- those
738 * FIXME will loose shifts, then!
739 * FIXME THUS - we'd need special "known points"
740 * FIXME to do so - say, after a newline!!
741 * FIXME WE NEED TO CHANGE ALL USES +MBLEN! */
742 (void)mbtowc(&wc
, NULL
, mb_cur_max
);
743 wc
= utf8
? 0xFFFD : '?';
748 if (!iswprint(wc
) && wc
!= '\n' && wc
!= '\r' &&
749 wc
!= '\b' && wc
!= '\t') {
750 if ((wc
& ~(wchar_t)037) == 0)
751 wc
= utf8
? 0x2400 | wc
: '?';
753 wc
= utf8
? 0x2421 : '?';
755 wc
= utf8
? 0x2426 : '?';
757 if ((n
= wctomb(mbb
, wc
)) <= 0)
760 if (out
->l
>= msz
- 1) {
761 dist
= outp
- out
->s
;
762 out
->s
= srealloc(out
->s
, msz
+= 32);
763 outp
= &out
->s
[dist
];
765 for (i
= 0; i
< n
; i
++)
769 #endif /* HAVE_MBTOWC && HAVE_WCTYPE_H */
774 if (!isprint(c
) && c
!= '\n' && c
!= '\r' &&
775 c
!= '\b' && c
!= '\t')
782 out
->s
[out
->l
] = '\0';
793 makeprint(&in
, &out
);
794 rp
= salloc(out
.l
+ 1);
795 memcpy(rp
, out
.s
, out
.l
);
802 prout(const char *s
, size_t sz
, FILE *fp
)
809 makeprint(&in
, &out
);
810 n
= fwrite(out
.s
, 1, out
.l
, fp
);
816 putuc(int u
, int c
, FILE *fp
)
820 #if defined HAVE_MBTOWC && defined HAVE_WCTYPE_H
821 if (utf8
&& u
& ~(wchar_t)0177) {
822 char mbb
[MB_LEN_MAX
];
824 if ((n
= wctomb(mbb
, u
)) > 0) {
826 for (i
= 0; i
< n
; ++i
)
827 if (putc(mbb
[i
] & 0377, fp
) == EOF
) {
832 rv
= (putc('\0', fp
) != EOF
);
836 #endif /* HAVE_MBTOWC && HAVE_WCTYPE_H */
837 rv
= (putc(c
, fp
) != EOF
);
842 time_current_update(struct time_current
*tc
, bool_t full_update
)
844 tc
->tc_time
= time(NULL
);
846 memcpy(&tc
->tc_gm
, gmtime(&tc
->tc_time
), sizeof tc
->tc_gm
);
847 memcpy(&tc
->tc_local
, localtime(&tc
->tc_time
),
848 sizeof tc
->tc_local
);
849 sstpcpy(tc
->tc_ctime
, ctime(&tc
->tc_time
));
855 int my_optind
= 1, /*my_opterr = 1,*/ my_optopt
;
858 my_getopt(int argc
, char *const argv
[], char const *optstring
) /* XXX */
860 static char const *lastp
;
864 if (optstring
[0] == ':') {
873 if (optind
>= argc
|| argv
[optind
] == 0 ||
874 argv
[optind
][0] != '-' ||
875 argv
[optind
][1] == '\0')
877 if (argv
[optind
][1] == '-' && argv
[optind
][2] == '\0') {
881 curp
= &argv
[optind
][1];
884 while (optstring
[0]) {
885 if (optstring
[0] == ':' || optstring
[0] != optopt
) {
889 if (optstring
[1] == ':') {
890 if (curp
[1] != '\0') {
891 optarg
= UNCONST(&curp
[1]);
894 if ((optind
+= 2) > argc
) {
895 if (!colon
/*&& opterr*/) {
896 fprintf(stderr
, tr(79,
897 "%s: option requires an argument -- %c\n"),
898 argv
[0], (char)optopt
);
900 return colon
? ':' : '?';
902 optarg
= argv
[optind
- 1];
913 if (!colon
/*&& opterr*/)
914 fprintf(stderr
, tr(78, "%s: illegal option -- %c\n"),
923 #endif /* HAVE_GETOPT */
932 (smalloc_safe
)(size_t s SMALLOC_DEBUG_ARGS
)
937 rv
= (smalloc
)(s SMALLOC_DEBUG_ARGSCALL
);
943 (srealloc_safe
)(void *v
, size_t s SMALLOC_DEBUG_ARGS
)
948 rv
= (srealloc
)(v
, s SMALLOC_DEBUG_ARGSCALL
);
954 (scalloc_safe
)(size_t nmemb
, size_t size SMALLOC_DEBUG_ARGS
)
959 rv
= (scalloc
)(nmemb
, size SMALLOC_DEBUG_ARGSCALL
);
966 smalloc(size_t s SMALLOC_DEBUG_ARGS
)
972 if ((p
= malloc(s
)) == NULL
)
978 srealloc(void *v
, size_t s SMALLOC_DEBUG_ARGS
)
986 if ((r
= realloc(v
, s
)) == NULL
)
992 scalloc(size_t nmemb
, size_t size SMALLOC_DEBUG_ARGS
)
998 if ((vp
= calloc(nmemb
, size
)) == NULL
)
1003 #else /* !HAVE_ASSERTS */
1019 struct chunk
*_mlist
, *_mfree
;
1022 (smalloc
)(size_t s SMALLOC_DEBUG_ARGS
)
1028 s
+= sizeof(struct chunk
);
1030 if ((p
.p
= malloc(s
)) == NULL
)
1033 if ((p
.c
->next
= _mlist
) != NULL
)
1035 p
.c
->file
= mdbg_file
;
1036 p
.c
->line
= (us_it
)mdbg_line
;
1038 p
.c
->size
= (ui_it
)s
;
1044 (srealloc
)(void *v
, size_t s SMALLOC_DEBUG_ARGS
)
1048 if ((p
.p
= v
) == NULL
) {
1049 p
.p
= (smalloc
)(s
, mdbg_file
, mdbg_line
);
1055 fprintf(stderr
, "srealloc(): region freed! At %s, line %d\n"
1056 "\tLast seen: %s, line %d\n",
1057 mdbg_file
, mdbg_line
, p
.c
->file
, p
.c
->line
);
1064 p
.c
->prev
->next
= p
.c
->next
;
1065 if (p
.c
->next
!= NULL
)
1066 p
.c
->next
->prev
= p
.c
->prev
;
1071 s
+= sizeof(struct chunk
);
1073 if ((p
.p
= realloc(p
.c
, s
)) == NULL
)
1076 if ((p
.c
->next
= _mlist
) != NULL
)
1078 p
.c
->file
= mdbg_file
;
1079 p
.c
->line
= (us_it
)mdbg_line
;
1081 p
.c
->size
= (ui_it
)s
;
1088 (scalloc
)(size_t nmemb
, size_t size SMALLOC_DEBUG_ARGS
)
1097 size
+= sizeof(struct chunk
);
1099 if ((p
.p
= malloc(size
)) == NULL
)
1101 memset(p
.p
, 0, size
);
1103 if ((p
.c
->next
= _mlist
) != NULL
)
1105 p
.c
->file
= mdbg_file
;
1106 p
.c
->line
= (us_it
)mdbg_line
;
1108 p
.c
->size
= (ui_it
)size
;
1114 (sfree
)(void *v SMALLOC_DEBUG_ARGS
)
1118 if ((p
.p
= v
) == NULL
) {
1119 fprintf(stderr
, "sfree(NULL) from %s, line %d\n",
1120 mdbg_file
, mdbg_line
);
1126 fprintf(stderr
, "sfree(): double-free avoided at %s, line %d\n"
1127 "\tLast seen: %s, line %d\n",
1128 mdbg_file
, mdbg_line
, p
.c
->file
, p
.c
->line
);
1135 p
.c
->prev
->next
= p
.c
->next
;
1136 if (p
.c
->next
!= NULL
)
1137 p
.c
->next
->prev
= p
.c
->prev
;
1140 if (options
& OPT_DEBUG
) {
1154 for (p
.c
= _mfree
; p
.c
!= NULL
;) {
1163 if (options
& OPT_DEBUG
)
1164 fprintf(stderr
, "smemreset(): freed %lu regions/%lu bytes\n",
1169 (smemtrace
)(void *v
)
1177 if ((fp
= Ftemp(&cp
, "Ra", "w+", 0600, 1)) == NULL
) {
1184 fprintf(fp
, "Currently allocated memory chunks:\n");
1185 for (p
.c
= _mlist
; p
.c
!= NULL
; ++lines
, p
.c
= p
.c
->next
)
1186 fprintf(fp
, "%p (%5u bytes): %s, line %hu\n",
1188 (ui_it
)(p
.c
->size
- sizeof(struct chunk
)),
1189 p
.c
->file
, p
.c
->line
);
1191 if (options
& OPT_DEBUG
) {
1192 fprintf(fp
, "sfree()d memory chunks awaiting free():\n");
1193 for (p
.c
= _mfree
; p
.c
!= NULL
; ++lines
, p
.c
= p
.c
->next
)
1194 fprintf(fp
, "%p (%5u bytes): %s, line %hu\n",
1196 (ui_it
)(p
.c
->size
- sizeof(struct chunk
)),
1197 p
.c
->file
, p
.c
->line
);
1200 page_or_print(fp
, lines
);
1206 #endif /* HAVE_ASSERTS */