1998-07-02 04:09:37 +00:00
|
|
|
*** pop_msg.c.orig Wed Jul 1 23:54:51 1998
|
|
|
|
--- pop_msg.c Thu Jul 2 07:12:46 1998
|
1998-06-28 17:50:22 +00:00
|
|
|
***************
|
1998-07-02 04:09:37 +00:00
|
|
|
*** 43,48 ****
|
|
|
|
--- 43,49 ----
|
|
|
|
#endif
|
1998-06-28 17:50:22 +00:00
|
|
|
va_list ap;
|
|
|
|
register char * mp;
|
1998-07-02 04:09:37 +00:00
|
|
|
+ int l, len; /* remaining buffer length */
|
|
|
|
#ifdef PYRAMID
|
|
|
|
char * arg1, *arg2, *arg3, *arg4, *arg5, *arg6;
|
|
|
|
#endif
|
1998-06-28 17:50:22 +00:00
|
|
|
***************
|
1998-07-02 04:09:37 +00:00
|
|
|
*** 67,72 ****
|
|
|
|
--- 68,74 ----
|
|
|
|
#endif
|
1998-06-28 17:50:22 +00:00
|
|
|
/* Point to the message buffer */
|
|
|
|
mp = message;
|
|
|
|
+ len = sizeof(message);
|
|
|
|
|
|
|
|
/* Format the POP status code at the beginning of the message */
|
|
|
|
if (stat == POP_SUCCESS)
|
|
|
|
***************
|
1998-07-02 04:09:37 +00:00
|
|
|
*** 75,86 ****
|
1998-06-28 17:50:22 +00:00
|
|
|
(void)sprintf (mp,"%s ",POP_ERR);
|
|
|
|
|
|
|
|
/* Point past the POP status indicator in the message message */
|
|
|
|
! mp += strlen(mp);
|
|
|
|
|
|
|
|
/* Append the message (formatted, if necessary) */
|
1998-07-02 04:09:37 +00:00
|
|
|
if (format) {
|
1998-06-28 17:50:22 +00:00
|
|
|
#ifdef HAVE_VPRINTF
|
|
|
|
! vsprintf(mp,format,ap);
|
|
|
|
#else
|
|
|
|
# ifdef PYRAMID
|
1998-07-02 04:09:37 +00:00
|
|
|
(void)sprintf(mp,format, arg1, arg2, arg3, arg4, arg5, arg6);
|
|
|
|
--- 77,89 ----
|
1998-06-28 17:50:22 +00:00
|
|
|
(void)sprintf (mp,"%s ",POP_ERR);
|
|
|
|
|
|
|
|
/* Point past the POP status indicator in the message message */
|
|
|
|
! l = strlen(mp);
|
|
|
|
! len -= l, mp += l;
|
|
|
|
|
|
|
|
/* Append the message (formatted, if necessary) */
|
1998-07-02 04:09:37 +00:00
|
|
|
if (format) {
|
1998-06-28 17:50:22 +00:00
|
|
|
#ifdef HAVE_VPRINTF
|
|
|
|
! vsnprintf(mp,len-3,format,ap);
|
|
|
|
#else
|
|
|
|
# ifdef PYRAMID
|
1998-07-02 04:09:37 +00:00
|
|
|
(void)sprintf(mp,format, arg1, arg2, arg3, arg4, arg5, arg6);
|