diff options
author | itojun <itojun@FreeBSD.org> | 1997-08-24 23:44:05 +0800 |
---|---|---|
committer | itojun <itojun@FreeBSD.org> | 1997-08-24 23:44:05 +0800 |
commit | a4ce5de7812da35dde3683ff8a78da4f093f0653 (patch) | |
tree | 2b1c26cad5025ce573de7c8cf8c309f851df1602 /mail | |
parent | d4154098ef4283a879cbb77326083d52ee696484 (diff) | |
download | freebsd-ports-gnome-a4ce5de7812da35dde3683ff8a78da4f093f0653.tar.gz freebsd-ports-gnome-a4ce5de7812da35dde3683ff8a78da4f093f0653.tar.zst freebsd-ports-gnome-a4ce5de7812da35dde3683ff8a78da4f093f0653.zip |
imported a new port for xpbiff.
A replacement for xbiff that handles popup window with mail header.
PR: 4121
Submitted by: sanpei@yy.cs.keio.ac.jp
Diffstat (limited to 'mail')
-rw-r--r-- | mail/xpbiff/Makefile | 56 | ||||
-rw-r--r-- | mail/xpbiff/distinfo | 1 | ||||
-rw-r--r-- | mail/xpbiff/files/Imakefile.xpg4.diff | 11 | ||||
-rw-r--r-- | mail/xpbiff/files/LocPixmap.c | 241 | ||||
-rw-r--r-- | mail/xpbiff/files/patch-aa | 124 | ||||
-rw-r--r-- | mail/xpbiff/files/patch-ab | 12 | ||||
-rw-r--r-- | mail/xpbiff/files/patch-ac | 346 | ||||
-rw-r--r-- | mail/xpbiff/files/xpbiff.youbin.diff | 11 | ||||
-rw-r--r-- | mail/xpbiff/pkg-comment | 1 | ||||
-rw-r--r-- | mail/xpbiff/pkg-descr | 37 | ||||
-rw-r--r-- | mail/xpbiff/pkg-plist | 1 |
11 files changed, 841 insertions, 0 deletions
diff --git a/mail/xpbiff/Makefile b/mail/xpbiff/Makefile new file mode 100644 index 000000000000..394708f20d41 --- /dev/null +++ b/mail/xpbiff/Makefile @@ -0,0 +1,56 @@ +# New ports collection makefile for: xpbiff +# Version required: 1.27 +# Date created: 2 April 1997 +# Whom: Yoshiro MIHIRA <sanpei@yy.cs.keio.ac.jp> +# +# $Id$ + +DISTNAME= xpbiff +PKGNAME= xpbiff-1.27 +CATEGORIES?= mail +MASTER_SITES= ftp://ftp.ics.es.osaka-u.ac.jp/pub/xpbiff/ +DISTFILES= xpbiff-1.27-with-YOUBIN.tar.gz.uu + +MAINTAINER?= sanpei@yy.cs.keio.ac.jp + +LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm + +USE_IMAKE= yes +NO_INSTALL_MANPAGES= yes +WRKSRC= ${WRKDIR}/xpbiff + +.if defined(PREFIX) && ${PREFIX} != ${LOCALBASE} +YOUBINBINDIR= ${PREFIX} +.else +YOUBINBINDIR= ${LOCALBASE} +.endif + +do-extract: + @(cd ${DISTDIR}; \ + if [ ! -f ${DISTNAME}.tar.gz ]; then \ + uudecode ${DISTFILES} ; \ + fi) + @${RM} -rf ${WRKDIR} + @${MKDIR} ${WRKDIR} + @(cd ${WRKDIR}; tar -xzf \ + ${DISTDIR}/${DISTNAME}.tar.gz) + +pre-patch: + @(${RM} -rf ${WRKSRC}/LocPixmap.c; \ + ${CP} ${FILESDIR}/LocPixmap.c ${WRKSRC} ); + +post-patch: + @(for libfile in /usr/lib/libxpg4*; do \ + if [ ! "$$libfile" = "" ]; then \ + ${ECHO_MSG} "===> Finding the xpg4 library in /usr/lib"; \ + (cd ${WRKSRC}; ${PATCH} -s < ${FILESDIR}/Imakefile.xpg4.diff );\ + break 1; \ + fi; \ + done) +.if defined(YOUBIN) + @(cd ${WRKSRC}; ${PATCH} -s < ${FILESDIR}/xpbiff.youbin.diff ); +.endif + @${MV} ${WRKSRC}/config.h ${WRKSRC}/config.h.org + @${SED} "s=%YOUBINBINDIR%=${YOUBINBINDIR}/bin=" < ${WRKSRC}/config.h.org > ${WRKSRC}/config.h + +.include <bsd.port.mk> diff --git a/mail/xpbiff/distinfo b/mail/xpbiff/distinfo new file mode 100644 index 000000000000..1836c7bc5608 --- /dev/null +++ b/mail/xpbiff/distinfo @@ -0,0 +1 @@ +MD5 (xpbiff-1.27-with-YOUBIN.tar.gz.uu) = ac22b7cea37557317d456b95eb7ad70d diff --git a/mail/xpbiff/files/Imakefile.xpg4.diff b/mail/xpbiff/files/Imakefile.xpg4.diff new file mode 100644 index 000000000000..ed5501306b3e --- /dev/null +++ b/mail/xpbiff/files/Imakefile.xpg4.diff @@ -0,0 +1,11 @@ +--- Imakefile.org Thu Apr 10 23:39:59 1997 ++++ Imakefile Thu Apr 10 23:40:16 1997 +@@ -58,7 +58,7 @@ + LOCAL_LDFLAGS = $(XI18NLIBDIR) $(UCBLIBDIR) + DEPLIBS = $(DEPXPMLIB) XawClientDepLibs $(DEPXWCHARLIB) + LOCAL_LIBRARIES = $(XPMLIB) XawClientLibs $(XWCHARLIB) +-EXTRA_LIBRARIES = $(UCBLIB) -lm ExtraLibraries ++EXTRA_LIBRARIES = $(UCBLIB) -lm -lxpg4 ExtraLibraries + SRCS = xpbiff.c $(CONVSRC) + OBJS = xpbiff.o $(CONVOBJ) + diff --git a/mail/xpbiff/files/LocPixmap.c b/mail/xpbiff/files/LocPixmap.c new file mode 100644 index 000000000000..e679b6975a5d --- /dev/null +++ b/mail/xpbiff/files/LocPixmap.c @@ -0,0 +1,241 @@ +/* Change for xpbiff by Yoshikazu Yamamoto(y-yamamt@ics.es.osaka-u.ac.jp) at Oct 19, 1993 */ + +/* * Last edited: Sep 17 14:39 1991 (mallet) */ +/* + * $Id: LocPixmap.c,v 1.3 1991/09/18 18:28:27 mallet Exp $ + * + * Copyright 1991 Lionel Mallet + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Lionel MALLET not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. Lionel MALLET makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * Lionel MALLET DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL Lionel MALLET BE LIABLE FOR ANY SPECIAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Lionel Mallet - SIMULOG + */ + +#include <X11/Xlib.h> +#include <X11/Xresource.h> +#include <X11/Xutil.h> +#include <X11/StringDefs.h> +#include <sys/param.h> /* get MAXPATHLEN if possible */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 256 +#endif + +#include <X11/Xmu/CvtCache.h> +#include <X11/xpm.h> +#include <X11/Xmu/Drawing.h> + + +/* + * LocatePixmapFile - read a pixmap file using the normal defaults + */ + +Pixmap LocatePixmapFile (screen, name, srcname, srcnamelen, + widthp, heightp, mask) + Screen *screen; + char *name; + char *srcname; /* RETURN */ + int srcnamelen; + int *widthp, *heightp; /* RETURN */ + Pixmap *mask; /* RETURN */ +{ + Display *dpy = DisplayOfScreen (screen); + Window root = RootWindowOfScreen (screen); + Bool try_plain_name = True; + XmuCvtCache *cache = _XmuCCLookupDisplay (dpy); + char **file_paths; + char filename[MAXPATHLEN]; + unsigned int width, height; + int xhot, yhot; + int i; + static char **split_path_string(); + + + /* + * look in cache for pixmap path + */ + if (cache) { + if (!cache->string_to_bitmap.bitmapFilePath) { + XrmName xrm_name[2]; + XrmClass xrm_class[2]; + XrmRepresentation rep_type; + XrmValue value; + + xrm_name[0] = XrmStringToName ("bitmapFilePath"); + xrm_name[1] = NULL; + xrm_class[0] = XrmStringToClass ("BitmapFilePath"); + xrm_class[1] = NULL; + /* + * XXX - warning, derefing Display * until XDisplayDatabase + */ + if (!XrmGetDatabase(dpy)) { + /* what a hack; need to initialize dpy->db */ + (void) XGetDefault (dpy, "", ""); + } + if (XrmQGetResource (XrmGetDatabase(dpy), xrm_name, xrm_class, + &rep_type, &value) && + rep_type == XrmStringToQuark(XtRString)) { + cache->string_to_bitmap.bitmapFilePath = + split_path_string (value.addr); + } + } + file_paths = cache->string_to_bitmap.bitmapFilePath; + } + + + /* + * Search order: + * 1. name if it begins with / or ./ + * 2. "each prefix in file_paths"/name + * 3. BITMAPDIR/name + * 4. name if didn't begin with / or . + */ + +#ifndef BITMAPDIR +#define BITMAPDIR "/usr/include/X11/bitmaps" +#endif + + for (i = 1; i <= 4; i++) { + char *fn = filename; + Pixmap pixmap; + XpmAttributes attributes; + unsigned char *data; + + switch (i) { + case 1: + if (!(name[0] == '/' || (name[0] == '.') && name[1] == '/')) + continue; + fn = name; + try_plain_name = False; + break; + case 2: + if (file_paths && *file_paths) { + sprintf (filename, "%s/%s", *file_paths, name); + file_paths++; + i--; + break; + } + continue; + case 3: + sprintf (filename, "%s/%s", BITMAPDIR, name); + break; + case 4: + if (!try_plain_name) continue; + fn = name; + break; + } + + data = NULL; + pixmap = None; + if (XmuReadBitmapDataFromFile (fn, &width, &height, &data, + &xhot, &yhot) == BitmapSuccess) { + pixmap = XCreatePixmapFromBitmapData (dpy, root, (char *) data, + width, height, + (unsigned long) 1, + (unsigned long) 0, + (unsigned int) 1); + XFree ((char *)data); + if (pixmap != None) { + if (widthp) *widthp = (int)width; + if (heightp) *heightp = (int)height; + if (srcname && srcnamelen > 0) { + strncpy (srcname, fn, srcnamelen - 1); + srcname[srcnamelen - 1] = '\0'; + } + *mask = None; + return pixmap; + } + } + attributes.visual = DefaultVisualOfScreen (screen); + attributes.colormap = DefaultColormapOfScreen (screen); + attributes.depth = DefaultDepthOfScreen (screen); + attributes.colorsymbols = (ColorSymbol *)NULL; + attributes.numsymbols = 0; + attributes.valuemask = XpmVisual | XpmColormap | XpmDepth; + if (pixmap == None && + XpmReadPixmapFile (dpy, root, fn, &pixmap, mask, + &attributes) == XpmPixmapSuccess) { + if (widthp) *widthp = (int)attributes.width; + if (heightp) *heightp = (int)attributes.height; + if (srcname && srcnamelen > 0) { + strncpy (srcname, fn, srcnamelen - 1); + srcname[srcnamelen - 1] = '\0'; + } + XpmFreeAttributes(&attributes); + return pixmap; + } + } + *mask = None; + return None; +} + + +/* + * split_path_string - split a colon-separated list into its constituent + * parts; to release, free list[0] and list. + */ +static char **split_path_string (src) + register char *src; +{ + int nelems = 1; + register char *dst; + char **elemlist, **elem; + + /* count the number of elements */ + for (dst = src; *dst; dst++) if (*dst == ':') nelems++; + + /* get memory for everything */ + dst = (char *) malloc (dst - src + 1); + if (!dst) return NULL; + elemlist = (char **) calloc ((nelems + 1), sizeof (char *)); + if (!elemlist) { + free (dst); + return NULL; + } + + /* copy to new list and walk up nulling colons and setting list pointers */ + strcpy (dst, src); + for (elem = elemlist, src = dst; *src; src++) { + if (*src == ':') { + *elem++ = dst; + *src = '\0'; + dst = src + 1; + } + } + *elem = dst; + + return elemlist; +} + +/* +void _XmuStringToBitmapInitCache (c) + register XmuCvtCache *c; +{ + c->string_to_bitmap.bitmapFilePath = NULL; +} + +void _XmuStringToBitmapFreeCache (c) + register XmuCvtCache *c; +{ + if (c->string_to_bitmap.bitmapFilePath) { + if (c->string_to_bitmap.bitmapFilePath[0]) + free (c->string_to_bitmap.bitmapFilePath[0]); + free ((char *) (c->string_to_bitmap.bitmapFilePath)); + } +} +*/ diff --git a/mail/xpbiff/files/patch-aa b/mail/xpbiff/files/patch-aa new file mode 100644 index 000000000000..591ffc95b679 --- /dev/null +++ b/mail/xpbiff/files/patch-aa @@ -0,0 +1,124 @@ +--- config.h.orig Wed Oct 19 14:56:25 1994 ++++ config.h Mon Jul 14 23:11:10 1997 +@@ -8,7 +8,7 @@ + /* + * For X11R6 + */ +-#undef X11R6 ++#define X11R6 + + /* + * For System V +@@ -33,6 +33,12 @@ + #undef NO_CUSERID + + /* ++ * Your system has getpwuid() in library ++ */ ++ ++#define HAVE_GETPWUID ++ ++/* + * For MH scan users + */ + +@@ -42,45 +48,71 @@ + * For Shape Extension + */ + +-#undef SHAPE ++#define SHAPE + + /* + * Check Environment Variable MAIL for check file + */ +-#undef GETENV_MAIL ++#define GETENV_MAIL + + /* + * Set Local Spool pathname + */ + #undef SPOOLPATH "/usr/mail" + ++#ifndef SPOOLPATH ++#ifdef __FreeBSD__ ++#include <paths.h> ++#define SPOOLPATH _PATH_MAILDIR ++#else ++#undef SPOOLPATH "/usr/mail" ++#endif ++#endif ++ + /* + * For X pixmap + */ +-#undef XPM +-#undef DepXpmLib /usr/local/lib/libXpm.a ++#define XPM ++ ++#ifdef XPM ++#ifdef __FreeBSD__ ++#undef DepXpmLib ++#else ++#define DepXpmLib /usr/local/lib/libXpm.a ++#endif /* __FreeBSD__ */ ++#endif /* XPM */ + + /* + * For using I18N Xaw + */ +-#undef XI18N +-/* If you use X11R6, these settings below are not necessary */ ++#ifndef XI18N ++#ifdef __FreeBSD__ ++#define XI18N ++#endif ++#endif ++ ++#ifdef XI18N ++#undef X11R5_Xsi /* define if X11R5 Xsi */ ++#endif ++ ++#ifdef X11R5_Xsi /* When X11R5 Xsi, define followings if you want */ + #undef DepXawLib /usr/local/lib/I18N/libXaw.a + #undef DepXwcharLib /usr/local/lib/I18N/libXwchar.a + #undef Xi18nLibDir -L/usr/local/lib/I18N \ + -L/usr/local/lib + #undef Xi18nIncDir -I/usr/local/X11/include ++#endif + + /* + * Convert JIS to Japanese EUC + */ +-#undef JCONVERT ++#define JCONVERT + #undef GUESS_JIS + + /* + * Process MIME header, charset=ISO-2022-JP, base 64 encoding + */ +-#undef ISO_2022_JP ++#define ISO_2022_JP + + /* + * For SUN Audio +@@ -88,9 +120,17 @@ + #undef SUN_AUDIO + #undef AudioIncDir /usr/demo/SOUND + ++/* ++ * For BSD Audio (FreeBSD) ++ */ ++#define BSD_AUDIO ++ + /* + * For YOUBIN Service + */ + #undef YOUBIN +-#undef YoubinBinDir /usr/local/bin +-#undef YOUBIN_DEFAULT_SERVER_HOST "server" ++ ++#ifdef YOUBIN ++#define YoubinBinDir %YOUBINBINDIR% ++#define YOUBIN_DEFAULT_SERVER_HOST "server" ++#endif /* YOUBIN */ diff --git a/mail/xpbiff/files/patch-ab b/mail/xpbiff/files/patch-ab new file mode 100644 index 000000000000..2bf6efa618c6 --- /dev/null +++ b/mail/xpbiff/files/patch-ab @@ -0,0 +1,12 @@ +--- StrToPmap.c.org Fri Apr 11 01:27:17 1997 ++++ StrToPmap.c Fri Apr 11 01:27:38 1997 +@@ -90,8 +90,7 @@ + done(pixmap, Pixmap2); + return; + } +- +- pixmap[0] = locate_pixmap_file (*((Screen **) args[0].addr), name, ++ pixmap[0] = LocatePixmapFile(*((Screen **) args[0].addr), name, + NULL, 0, NULL, NULL, &pixmap[1]); + + if (pixmap[0] != None) { diff --git a/mail/xpbiff/files/patch-ac b/mail/xpbiff/files/patch-ac new file mode 100644 index 000000000000..6e5e244aa399 --- /dev/null +++ b/mail/xpbiff/files/patch-ac @@ -0,0 +1,346 @@ +--- xpbiff.c.orig Thu Oct 27 15:42:52 1994 ++++ xpbiff.c Tue Jul 15 13:42:03 1997 +@@ -74,6 +74,12 @@ + #endif + #endif /* SUN_AUDIO */ + ++#ifdef BSD_AUDIO ++#include <machine/soundcard.h> ++#define MAX_SOUND_VOL 95 ++#define MIN_SOUND_VOL 05 ++#endif ++ + #ifndef X11R3 + #include <X11/Xaw/Box.h> + #include <X11/Xaw/Label.h> +@@ -116,7 +122,11 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <stdio.h> ++#include <stdlib.h> + #include <math.h> ++#ifdef HAVE_GETPWUID ++#include <pwd.h> ++#endif /* HAVE_GETPWUID */ + + #ifdef YOUBIN + +@@ -149,11 +159,13 @@ + + #ifndef YOUBIN + ++#ifndef SPOOLPATH + #ifdef USG + #define SPOOLPATH "/usr/mail/" + #else + #define SPOOLPATH "/usr/spool/mail/" + #endif ++#endif + + #else /* YOUBIN */ + +@@ -324,7 +336,7 @@ + NULL + }; + +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + String mail_sndfile; + int volume; + #endif +@@ -399,7 +411,7 @@ + {"nomailPixmapMask", "NomailPixmapMask", XtRBitmap, sizeof(Pixmap), + (Cardinal)&noPixmapMask, XtRBitmap, None}, + #endif +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + {"mailSndFile", "MailSndFile", XtRString, sizeof(String), + (Cardinal)&mail_sndfile, XtRString, None}, + {"volume", "Volume", XtRInt, sizeof(int), +@@ -445,7 +457,7 @@ + {"-server", "*server", XrmoptionSepArg, NULL}, + {"-preserve", "*preserve", XrmoptionNoArg, "true"}, + #endif /* YOUBIN */ +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + {"-sndfile", "*mailSndFile", XrmoptionSepArg, NULL}, + {"-volume", "*volume", XrmoptionSepArg, NULL}, + #endif +@@ -485,9 +497,9 @@ + XGCValues values; + XtTranslations newTranslations; + static XtActionsRec redrawActions[] = { +- {"expose", (XtCallbackProc) redraw_callback}, +- {"select", (XtCallbackProc) popup_again}, +- {"quit", (XtCallbackProc) quit}, ++ {"expose", (XtActionProc) redraw_callback}, ++ {"select", (XtActionProc) popup_again}, ++ {"quit", (XtActionProc) quit}, + }; + + static char *overrideTranslations = +@@ -498,6 +510,9 @@ + int dummy; + int i; + ++#ifdef HAVE_GETPWUID ++ struct passwd *pw; ++#endif + #ifdef JCONVERT + char *locale_name; + Locale_ent *p; +@@ -514,28 +529,40 @@ + #endif /* !YOUBIN */ + + #ifdef YOUBIN +- if ((prog_name = strrchr(argv[0], '/')) != NULL) { +- prog_name++; +- } else { +- prog_name = argv[0]; +- } ++ if ((prog_name = strrchr(argv[0], '/')) != NULL) { ++ prog_name++; ++ } else { ++ prog_name = argv[0]; ++ } + #else /* !YOUBIN */ +- if (spoolPath != NULL && spoolPath[0] != '\0') ++ if (spoolPath != NULL && spoolPath[0] != '\0') { + strcpy(spool_path, spoolPath); +- else ++ } else { + strcpy(spool_path, SPOOLPATH); +- if (spool_path[strlen(spool_path) - 1] != '/') ++ } ++ if (spool_path[strlen(spool_path) - 1] != '/') { + strcat(spool_path, "/"); ++ } ++ + #ifdef GETENV_MAIL +- if (getenv("MAIL") != NULL) ++ if (getenv("MAIL") != NULL) { + strcpy(spool_path, getenv("MAIL")); +- else +-#endif +-#ifndef NO_CUSERID +- strcat(spool_path, cuserid(NULL)); +-#else ++ } else { ++#endif /* GETENV_MAIL */ ++ ++#ifdef HAVE_GETPWUID ++ pw = getpwuid(getuid()); ++ strcat(spool_path, pw->pw_name); ++#elif defined(NO_CUSERID) + strcat(spool_path, getenv("USER")); +-#endif ++#else ++ strcat(spool_path, (char *)cuserid(NULL)); ++#endif /* NO_CUSERID && HAVE_GETPWUID */ ++ ++#ifdef GETENV_MAIL ++ } ++#endif /* GETENV_MAIL */ ++ + #endif /* !YOUBIN */ + + #ifdef XI18N +@@ -646,7 +673,7 @@ + fprintf(stderr, " [-server host]\n"); + fprintf(stderr, " [-nopreserve]\n"); + #endif +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + fprintf(stderr, " [-sndfile audio_file]\n"); + fprintf(stderr, " [-volume percentage]\n"); + #endif +@@ -775,7 +802,7 @@ + /* Interval timer start */ + #ifndef YOUBIN + polling_id = XtAppAddTimeOut(app_con, +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) polling_time, (XtTimerCallbackProc) Polling, NULL); + #else /* YOUBIN */ + if (server == NULL) { + gethostname(serv_name, sizeof(serv_name)); +@@ -931,7 +958,7 @@ + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); + if (bell == True) +- beep(XtDisplay(toplevel), 0); ++ beep(XtDisplay(toplevel)); + /* XBell(XtDisplay(toplevel), 0); */ + } + else if (file_stat.st_size > mail_size) { +@@ -955,7 +982,8 @@ + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); + if (bell == True) +- XBell(XtDisplay(toplevel), 0); ++ beep(XtDisplay(toplevel)); ++ /* XBell(XtDisplay(toplevel), 0); */ + } + else { + mail_size = file_stat.st_size; +@@ -982,7 +1010,7 @@ + /* No arrive */ + + polling_id = XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) polling_time, (XtTimerCallbackProc) Polling, NULL); + + } + #endif /* !YOUBIN */ +@@ -1071,7 +1099,7 @@ + if (popdown == True) { + popdown_button = XtCreateManagedWidget("popdown_button", commandWidgetClass, info_base, NULL, + ZERO); +- XtAddCallback(popdown_button, XtNcallback, BreakPopup, (XtPointer) NULL); ++ XtAddCallback(popdown_button, XtNcallback, (XtCallbackProc) BreakPopup, (XtPointer) NULL); + } + arg_count = 0; + XtSetArg(args[arg_count], XtNlabel, head); +@@ -1147,7 +1175,8 @@ + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); + if (bell == True) +- XBell(XtDisplay(toplevel), 0); ++ beep(XtDisplay(toplevel)); ++ /* XBell(XtDisplay(toplevel), 0); */ + } + else { + mail_size = file_stat.st_size; +@@ -1169,7 +1198,7 @@ + + XtRemoveTimeOut(polling_id); + polling_id = XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) polling_time, (XtTimerCallbackProc) Polling, NULL); + } + #endif /* !YOUBIN */ + +@@ -1749,13 +1778,22 @@ + static void beep (display) + Display *display; + { +-#ifdef SUN_AUDIO ++#if defined(SUN_AUDIO) || defined(BSD_AUDIO) + int audiofd, filefd; +- int rn, wn, len; ++ int rn; ++#ifdef SUN_AUDIO ++ int wn, len; + unsigned char buf[256]; + Audio_filehdr *au_hdr; + audio_info_t ais; +- ++#elif defined(BSD_AUDIO) ++ int mixerfd, mixerid, supported; ++ static int bsize; ++ static char *buf; ++ struct stat sbuf; ++ int level, level_tmp; ++#endif ++ + if (mail_sndfile) { + audiofd = open( "/dev/audio", O_WRONLY | O_NDELAY ); + if (audiofd < 0) +@@ -1766,6 +1804,7 @@ + return; + } + ++#ifdef SUN_AUDIO + if( ioctl( audiofd, AUDIO_GETINFO, &ais ) ) + { + fprintf(stderr, "%s: Problem retrieving /dev/audio info.\n", +@@ -1782,6 +1821,24 @@ + return; + } + ++#elif defined(BSD_AUDIO) ++ /* Open the mixer device */ ++ mixerfd = open ("/dev/mixer", O_RDWR, 0); ++ if (mixerfd > 0) ++ { ++ if (volume > MAX_SOUND_VOL) ++ volume = MAX_SOUND_VOL; ++ else if (volume < MIN_SOUND_VOL) ++ volume = MIN_SOUND_VOL; ++ mixerid = SOUND_MIXER_PCM; ++ /* storing volume level */ ++ ioctl(mixerfd,MIXER_READ(mixerid),&level_tmp); ++ ++ level = (volume << 8) | volume; ++ ioctl(mixerfd,MIXER_WRITE(mixerid),&level); ++ } ++#endif ++ + filefd = open(mail_sndfile, O_RDONLY); + if (filefd < 0) + { +@@ -1791,6 +1848,7 @@ + return; + } + ++#ifdef SUN_AUDIO + /* Read in the audio header */ + rn = read(filefd, buf, sizeof(Audio_filehdr)); + +@@ -1841,12 +1899,28 @@ + usleep(1000); + } + } +- close(audiofd); ++#elif defined(BSD_AUDIO) ++ ioctl(audiofd, SNDCTL_DSP_RESET, 0); ++ fstat(filefd, &sbuf); ++ bsize = sbuf.st_size; ++ buf = malloc((u_int)bsize); ++ if ( (rn = read(filefd, buf, bsize)) > 0) ++ write(audiofd, buf, rn); ++ ioctl(audiofd, SNDCTL_DSP_SYNC, 0); ++ free(buf); ++ if (mixerfd > 0) ++ { ++ /* restoring volume level */ ++ ioctl(mixerfd,MIXER_WRITE(mixerid),&level_tmp); ++ close(mixerfd); ++ } ++#endif ++ close(audiofd); + close(filefd); + } + else +- XBell (display, volume); +-#else /* !SUN_AUDIO */ ++ XBell (display, 0); ++#else /* !SUN_AUDIO && !BSD_AUDIO */ + XBell (display, 0); + #endif /* SUN_AUDIO */ + return; +@@ -1917,12 +1991,12 @@ + + if (popup_time) + XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) popup_time, BreakPopup, NULL); ++ (unsigned long) popup_time, (XtTimerCallbackProc) BreakPopup, NULL); + } + } + XSync(XtDisplay(toplevel), 0); + if (bell == True) { +- beep(XtDisplay(toplevel), 0); ++ beep(XtDisplay(toplevel)); + } + } else if (mail_size < saved_mail_size){ + /* No mail */ +@@ -2031,7 +2105,7 @@ + } + if (popup_time) + XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) popup_time, BreakPopup, NULL); ++ (unsigned long) popup_time, (XtTimerCallbackProc) BreakPopup, NULL); + } + if (raise == True) { + XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); + + diff --git a/mail/xpbiff/files/xpbiff.youbin.diff b/mail/xpbiff/files/xpbiff.youbin.diff new file mode 100644 index 000000000000..6806651b518f --- /dev/null +++ b/mail/xpbiff/files/xpbiff.youbin.diff @@ -0,0 +1,11 @@ +--- config.h.org Sat Jun 14 14:47:22 1997 ++++ config.h Sat Jun 14 14:47:28 1997 +@@ -122,7 +122,7 @@ + /* + * For YOUBIN Service + */ +-#undef YOUBIN ++#define YOUBIN + + #ifdef YOUBIN + #ifdef LOCALBASE diff --git a/mail/xpbiff/pkg-comment b/mail/xpbiff/pkg-comment new file mode 100644 index 000000000000..a8249a83166d --- /dev/null +++ b/mail/xpbiff/pkg-comment @@ -0,0 +1 @@ +A replacement for xbiff that handles popup window with mail header. diff --git a/mail/xpbiff/pkg-descr b/mail/xpbiff/pkg-descr new file mode 100644 index 000000000000..9b9c6671eaf7 --- /dev/null +++ b/mail/xpbiff/pkg-descr @@ -0,0 +1,37 @@ + + << xpbiff >> + + Fancy biff program under X11 environment. + +*** Support MIME Japanese extension *** + + This ports collection support Japanese strings in From, + Subject field. Please set enviroment variable LANG to + ja_JP.EUC. + + setenv LANG ja_JP.EUC + +*** Support xpm file for bit map *** + + This ports collection support xpm file for bit map. + +*** SUN_AUDIO is Experimental Supported *** + +*** Known Problem *** + + (1) HANKAKU-KANA + Xpbiff dumps core, because code conversion routines jis2euc() + assumes "the conversion does not makes the string longer". But + when converting so-called 'hankaku-kana', this assumption breaks. + +Thank you. + +*** Acknowledgements to this ports file *** + Special thanks to: + Makoto MATSUSHITA <matusita@ics.es.osaka-u.ac.jp> + Satoshi TAOKA <taoka@infonets.hiroshima-u.ac.jp> + Nozomu MATSUI <nozomu@yy.cs.keio.ac.jp> + Gaku TASHIRO <manabu@yy.cs.keio.ac.jp> + +- Yoshiro MIHIRA +(sanpei@yy.cs.keio.ac.jp) diff --git a/mail/xpbiff/pkg-plist b/mail/xpbiff/pkg-plist new file mode 100644 index 000000000000..75b3138f8910 --- /dev/null +++ b/mail/xpbiff/pkg-plist @@ -0,0 +1 @@ +bin/xpbiff |