From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/29082 Path: main.gmane.org!not-for-mail From: Michael Piotrowski Newsgroups: gmane.emacs.gnus.general Subject: Re: Attachments forwarded by MS Outlook Date: 04 Feb 2000 11:40:52 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035165814 730 80.91.224.250 (21 Oct 2002 02:03:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:03:34 +0000 (UTC) Return-Path: Original-Received: from lisa.math.uh.edu (lisa.math.uh.edu [129.7.128.49]) by mailhost.sclp.com (Postfix) with ESMTP id 3225DD051F for ; Fri, 4 Feb 2000 05:42:16 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by lisa.math.uh.edu (8.9.1/8.9.1) with ESMTP id EAB03663; Fri, 4 Feb 2000 04:40:43 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 04 Feb 2000 04:40:00 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id EAA07878 for ; Fri, 4 Feb 2000 04:39:48 -0600 (CST) Original-Received: from viper.ntp.springer.de (viper.ntp.springer.de [192.129.24.14]) by mailhost.sclp.com (Postfix) with ESMTP id BCB7BD051F for ; Fri, 4 Feb 2000 05:39:44 -0500 (EST) Original-Received: (from mxp@localhost) by viper.ntp.springer.de (8.8.6 (PHNE_17135)/8.8.6) id LAA06179; Fri, 4 Feb 2000 11:40:52 +0100 (MET) Original-To: ding@gnus.org X-Face: %OvAx]kKl`N,i?yQ+$^p9w2oy)Yg|O}a_~6wtRQ@UTZ*(jSPubbonT]m++M>YBtJqkZZa!W "y5`aI.FoKO%$JHz=ws|i?y^o2bds(+pcp>gcX]H}?-tCzL^ABzJUWYzS{"!_hFg: JD)`kxRKLsNp In-Reply-To: Steve Harris's message of "02 Feb 2000 09:22:16 -0800" Original-Lines: 14 User-Agent: Gnus/5.0804 (Gnus v5.8.4) XEmacs/21.1 (Bryce Canyon) X-Operating-System: hpux Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:29082 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:29082 --=-=-= Steve Harris writes: > Mark Simpson's tnef program [1] might help here. I downloaded the > source but could not compile it on Solaris for lack of 'getopt.h'! Can It needs GNU getopt and thus doesn't compile out of the box on UNIX. Attached is a patch which changes it to use Standard getopt instead. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=tnef.diff Content-Description: Patch to src/main.c and src/tnef.c *** main.c.orig Fri Feb 4 11:02:57 2000 --- main.c Fri Feb 4 11:34:53 2000 *************** *** 27,33 **** #include #include ! #include #include "tnef.h" --- 27,33 ---- #include #include ! #include #include "tnef.h" *************** *** 42,54 **** "Public License. For more information about these matters, see the file\n" "named COPYING."; static const char* USAGE = \ ! "-f FILE, --file=FILE\tuse FILE as input ('-' == stdin)\n" ! "-d DIR, --directory=DIR\tput unpacked files in DIR\n" ! "-l, --list \tlist files, do not extract\n" ! "-n, --dry_run \tparse the file only\n" ! "-v, --verbose \tproduce verbose output\n" ! "-h, --help \tshow this message\n" ! "--version \tdisplay version and copyright\n" "\nIf FILE is not specified standard input is used\n" "\nReport bugs to \n"; --- 42,53 ---- "Public License. For more information about these matters, see the file\n" "named COPYING."; static const char* USAGE = \ ! "-f FILE\tuse FILE as input ('-' == stdin)\n" ! "-d DIR\tput unpacked files in DIR\n" ! "-l\tlist files, do not extract\n" ! "-n\tparse the file only\n" ! "-v\tproduce verbose output\n" ! "-h\tshow this message\n" "\nIf FILE is not specified standard input is used\n" "\nReport bugs to \n"; *************** *** 72,112 **** parse_cmdline (int argc, char **argv) { int i = 0; ! int option_index = 0; ! static struct option long_options[] = ! { ! {"file", required_argument, 0, 'f' }, ! {"directory", required_argument, 0, 'd' }, ! {"help", no_argument, 0, 'h'}, ! {"verbose", no_argument, 0, 'v'}, ! {"dry_run", no_argument, 0, 'n'}, ! {"list", no_argument, 0, 'l'}, /* for now same as -n */ ! {"version", no_argument, 0, 0}, ! { 0, 0, 0, 0 } ! }; ! while ((i = getopt_long (argc, argv, "f:d:vhnl", ! long_options, &option_index)) != -1) { switch (i) { - case 0: /* long options with no val field */ - if (strcmp (long_options[option_index].name, - "version") == 0) - { - fprintf (stderr, "%s %s\n", PACKAGE, VERSION); - fprintf (stderr, COPYRIGHTS); - fprintf (stderr, "\n"); - fprintf (stderr, NO_WARRANTY, PACKAGE, PACKAGE); - fprintf (stderr, "\n"); - exit (0); - } - else - { - abort (); /* impossible! */ - } - break; - case 'v': verbose = 1; break; --- 71,83 ---- parse_cmdline (int argc, char **argv) { int i = 0; ! extern char *optarg; ! extern int optind, optopt; ! while ((i = getopt (argc, argv, "f:d:vhnl")) != -1) { switch (i) { case 'v': verbose = 1; break; *** tnef.c.orig Fri Feb 4 11:12:38 2000 --- tnef.c Fri Feb 4 11:13:40 2000 *************** *** 43,52 **** #define GETINT16(p) (uint16)(p[0]+(p[1]<<8)) /* Program Options: */ ! static int Verbose_Output = 0; /* Shall we shout it from the rooftops? */ ! static int Dry_Run = 0; /* Parse file only */ ! static FILE* Input_File = NULL; /* Input File */ ! static char* Directory = NULL; /* Where to put output */ /* Array of days of the week for translating a date */ --- 43,52 ---- #define GETINT16(p) (uint16)(p[0]+(p[1]<<8)) /* Program Options: */ ! int Verbose_Output = 0; /* Shall we shout it from the rooftops? */ ! int Dry_Run = 0; /* Parse file only */ ! FILE* Input_File = NULL; /* Input File */ ! char* Directory = NULL; /* Where to put output */ /* Array of days of the week for translating a date */ --=-=-= -- Michael Piotrowski, M.A. Electronic Technologies, Springer-Verlag Heidelberg --=-=-=--