upgrade to unarj 2.43

This commit is contained in:
brad 1999-03-04 03:49:12 +00:00
parent fa6d6cdf47
commit 9746128c56
6 changed files with 98 additions and 138 deletions

View File

@ -1,21 +1,18 @@
# OpenBSD makefile for: unarj
# Version required: 2.41
# Date created: 16 Nov 1997
# Whom: ejovi
#
# $OpenBSD: Makefile,v 1.3 1998/10/06 20:54:59 marc Exp $
#
# $OpenBSD: Makefile,v 1.4 1999/03/04 03:49:12 brad Exp $
# $FreeBSD: Makefile,v 1.12 1999/02/17 22:25:36 ache Exp $
DISTNAME= unarj
PKGNAME= unarj-2.41
DISTNAME= unarj-2.43
CATEGORIES= archivers
MASTER_SITES= ftp://garbo.uwasa.fi/unix/arcers/ \
ftp://ftp.kiarchive.ru/pub/unix/arcers/
DISTFILES= unarj241.tar.Z
MASTER_SITES= ftp://ftp.kiarchive.ru/pub/unix/arcers/
EXTRACT_SUFX= .tgz
MAINTAINER= joey@OpenBSD.ORG
do-install:
cd ${WRKSRC}; ${INSTALL_PROGRAM} ${DISTNAME} ${PREFIX}/bin
${INSTALL} -d -m 755 -o $(SHAREOWN) -g ${SHAREGRP} \
${PREFIX}/share/doc/unarj
cd ${WRKSRC}; ${INSTALL_PROGRAM} unarj ${PREFIX}/bin
cd ${WRKSRC}; ${INSTALL_DATA} unarj.doc technote.doc \
${PREFIX}/share/doc/unarj
.include <bsd.port.mk>

View File

@ -1 +1 @@
MD5 (unarj241.tar.Z) = 19d0849fa336847a49206778f1c61953
MD5 (unarj-2.43.tgz) = 5240b3c376a3ecac692246c9c482d8c7

View File

@ -1,84 +1,16 @@
*** Makefile.old Wed Jul 17 22:02:20 1991
--- Makefile Wed Dec 28 04:39:21 1994
***************
*** 1,5 ****
!
! CC=cc
all: unarj
--- 1,4 ----
! CFLAGS+=-DUNIX
all: unarj
*** environ.c.old Wed Jun 23 09:07:20 1993
--- environ.c Wed Dec 28 04:38:04 1994
***************
*** 534,541 ****
}
long
! gettz() /* returns the offset from GMT in seconds */
{
#define NOONOFFSET 43200L
#define SEC_IN_DAY (24L * 60L * 60L)
#define INV_VALUE (SEC_IN_DAY + 1L)
--- 534,545 ----
}
long
! gettz(stamp) /* returns the offset from GMT in seconds */
! time_t stamp;
{
+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ return -localtime(&stamp)->tm_gmtoff;
+ #else
#define NOONOFFSET 43200L
#define SEC_IN_DAY (24L * 60L * 60L)
#define INV_VALUE (SEC_IN_DAY + 1L)
***************
*** 551,556 ****
--- 555,561 ----
noontm = localtime(&noon);
retval = NOONOFFSET - 60 * (60 * noontm->tm_hour - noontm->tm_min);
return retval;
+ #endif
}
long
***************
*** 608,614 ****
(uint) attribute;
(uint) host;
! m_time = mstonix(tstamp) + gettz();
tb.mtime = m_time; /* Set modification time */
tb.atime = m_time; /* Set access time */
--- 613,620 ----
(uint) attribute;
(uint) host;
! m_time = mstonix(tstamp);
! m_time += gettz(m_time);
tb.mtime = m_time; /* Set modification time */
tb.atime = m_time; /* Set access time */
*** unarj.h.old Wed Jun 23 09:07:20 1993
--- unarj.h Wed Dec 28 04:25:07 1994
***************
*** 104,111 ****
--- 104,115 ----
#endif
typedef unsigned char uchar; /* 8 bits or more */
+ #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
typedef unsigned int uint; /* 16 - 32 bits or more */
typedef unsigned short ushort; /* 16 bits or more */
+ #else
+ # include <sys/types.h>
+ #endif
typedef unsigned long ulong; /* 32 bits or more */
#define USHRT_BIT (CHAR_BIT * sizeof(ushort))
--- unarj.h.orig Mon Sep 29 06:00:24 1997
+++ unarj.h Wed Mar 3 22:24:35 1999
@@ -106,9 +106,11 @@
#endif
typedef unsigned char uchar; /* 8 bits or more */
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
typedef unsigned int uint; /* 16 - 32 bits or more */
-typedef unsigned short ushort; /* 16 bits or more */
-typedef unsigned long ulong; /* 32 bits or more */
+#else
+#include <sys/types.h>
+#endif
#define USHRT_BIT (CHAR_BIT * sizeof(ushort))

View File

@ -1,10 +0,0 @@
--- unarj.h.orig Sun Nov 16 12:15:54 1997
+++ unarj.h Sun Nov 16 12:16:23 1997
@@ -110,7 +110,6 @@
#else
# include <sys/types.h>
#endif
-typedef unsigned long ulong; /* 32 bits or more */
#define USHRT_BIT (CHAR_BIT * sizeof(ushort))

View File

@ -1,30 +1,68 @@
*** environ.c.orig Tue Nov 25 15:13:34 1997
--- environ.c Tue Nov 25 15:19:24 1997
***************
*** 431,442 ****
#include <time.h>
#ifndef time_t
#define time_t long
#endif
extern struct tm *localtime();
- extern time_t time();
extern char *strcpy();
extern voidp *malloc();
--- 431,443 ----
#include <time.h>
+ #if !(defined(__OpenBSD__))
#ifndef time_t
#define time_t long
#endif
+ #endif
extern struct tm *localtime();
extern char *strcpy();
extern voidp *malloc();
--- environ.c.orig Mon Sep 29 06:00:24 1997
+++ environ.c Wed Mar 3 22:39:43 1999
@@ -40,11 +40,14 @@
#define SUBS_DEFINED
+#include <stdlib.h>
#include <string.h>
#include <dos.h>
#include <io.h>
#include <fcntl.h>
#include <alloc.h>
+#include <sys/types.h>
+#include <utime.h>
FILE *
file_open(name, mode)
@@ -432,14 +435,17 @@
#include <time.h>
+#if !(defined(__OpenBSD__))
#ifndef time_t
#define time_t long
#endif
+#endif
+#if !(defined(BSD) && BSD >= 199306)
extern struct tm *localtime();
-extern time_t time();
extern char *strcpy();
extern voidp *malloc();
+#endif
FILE *
file_open(name, mode)
@@ -535,8 +541,12 @@
}
long
-gettz() /* returns the offset from GMT in seconds */
+gettz(stamp) /* returns the offset from GMT in seconds */
+time_t stamp;
{
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ return -localtime(&stamp)->tm_gmtoff;
+#else
#define NOONOFFSET 43200L
#define SEC_IN_DAY (24L * 60L * 60L)
#define INV_VALUE (SEC_IN_DAY + 1L)
@@ -552,6 +562,7 @@
noontm = localtime(&noon);
retval = NOONOFFSET - 60 * (60 * noontm->tm_hour - noontm->tm_min);
return retval;
+#endif
}
long
@@ -609,7 +620,8 @@
(uint) attribute;
(uint) host;
- m_time = mstonix(tstamp) + gettz();
+ m_time = mstonix(tstamp);
+ m_time += gettz(m_time);
tb.mtime = m_time; /* Set modification time */
tb.atime = m_time; /* Set access time */

View File

@ -1 +1,4 @@
bin/unarj
share/doc/unarj/unarj.doc
share/doc/unarj/technote.doc
@dirrm share/doc/unarj