This commit is contained in:
commit
397c35f965
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
gsm-1.0.10.tar.gz
Normal file
3
gsm-1.0.10.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ddab700db455e13bcf9bc0592b320e61c6a7c692fb3cef7881b14b2df1a39069
|
||||
size 65928
|
13
libgsm-include.patch
Normal file
13
libgsm-include.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- src/toast.c
|
||||
+++ src/toast.c
|
||||
@@ -8,6 +8,10 @@
|
||||
|
||||
#include "toast.h"
|
||||
|
||||
+#include <stdio.h>
|
||||
+#include <getopt.h>
|
||||
+#include <sys/stat.h>
|
||||
+
|
||||
/* toast -- lossy sound compression using the gsm library.
|
||||
*/
|
||||
|
13
libgsm-options.patch
Normal file
13
libgsm-options.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- Makefile
|
||||
+++ Makefile
|
||||
@@ -22,8 +22,8 @@
|
||||
######### both integer and floating point multiplications.
|
||||
######### This flag is still in the experimental stage.
|
||||
|
||||
-#WAV49 = -DWAV49
|
||||
-WAV49 =
|
||||
+WAV49 = -DWAV49
|
||||
+#WAV49 =
|
||||
######### Define to enable the GSM library's option to pack GSM frames
|
||||
######### in the style used by the WAV #49 format. If you want to write
|
||||
######### a tool that produces .WAV files which contain GSM-encoded data,
|
22
libgsm-paths.patch
Normal file
22
libgsm-paths.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- Makefile
|
||||
+++ Makefile
|
||||
@@ -80,8 +80,8 @@
|
||||
|
||||
GSM_INSTALL_ROOT = $(INSTALL_ROOT)
|
||||
GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
|
||||
-GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
|
||||
-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
|
||||
+GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include/gsm
|
||||
+GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3
|
||||
|
||||
|
||||
# Where do you want to install the toast binaries and their manpage?
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
TOAST_INSTALL_ROOT = $(INSTALL_ROOT)
|
||||
TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
|
||||
-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
|
||||
+TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1
|
||||
|
||||
# Other tools
|
||||
|
11
libgsm-strict-aliasing.patch
Normal file
11
libgsm-strict-aliasing.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/toast.c
|
||||
+++ src/toast.c
|
||||
@@ -390,7 +390,7 @@
|
||||
ut[0] = instat.st_atime;
|
||||
ut[1] = instat.st_mtime;
|
||||
|
||||
- (void) utime(outname, (struct utimbuf *)ut);
|
||||
+ (void) utime(outname, ut);
|
||||
|
||||
#endif /* UTIMBUF */
|
||||
}
|
15
libgsm.changes
Normal file
15
libgsm.changes
Normal file
@ -0,0 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 8 15:22:05 CEST 2006 - sbrabec@suse.cz
|
||||
|
||||
- Compile with WAV-style framing support.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:37:28 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 15:43:30 CET 2006 - sbrabec@suse.cz
|
||||
|
||||
- New SuSE package, version 1.0.10.
|
||||
|
135
libgsm.spec
Normal file
135
libgsm.spec
Normal file
@ -0,0 +1,135 @@
|
||||
#
|
||||
# spec file for package libgsm (Version 1.0.10)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: libgsm
|
||||
%define _name gsm
|
||||
Version: 1.0.10
|
||||
Release: 12
|
||||
%define _version 1.0-pl10
|
||||
%define __version 1.0.10-13
|
||||
Group: Productivity/Multimedia/Sound/Editors and Convertors
|
||||
License: BSD, Other License(s), see package
|
||||
Summary: GSM 06.10 Lossy Speech Compressor Library and Utilities
|
||||
# Found at http://www.dmn.tzi.org/software/gsm/
|
||||
Source: %{_name}-%{version}.tar.gz
|
||||
# This is a Debian patch file with debian chunks removed.
|
||||
Patch: %{name}_%{__version}.patch
|
||||
Patch1: libgsm-paths.patch
|
||||
Patch2: libgsm-include.patch
|
||||
Patch3: libgsm-strict-aliasing.patch
|
||||
Patch4: libgsm-options.patch
|
||||
Autoreqprov: on
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Contains libraries and binaries for a GSM speech compressor. libgsm
|
||||
contains a standard implementation of the European GSM 06.10
|
||||
provisional standard for full-rate speech transcoding, prI-ETS 300 036,
|
||||
which uses RPE/LTP (residual pulse excitation/long term prediction)
|
||||
coding at 13 kbit/s.
|
||||
|
||||
GSM 06.10 compresses frames of 160 13-bit samples (8 kHz sampling rate,
|
||||
which is a frame rate of 50 Hz) into 260 bits. For compatibility with
|
||||
typical UNIX applications, our implementation turns frames of 160
|
||||
16-bit linear samples into 33-byte frames (1650 Bytes/s). The quality
|
||||
of the algorithm is good enough for reliable speaker recognition. Even
|
||||
music often survives transcoding in recognizable form (given the
|
||||
bandwidth limitations of 8 kHz sampling rate).
|
||||
|
||||
The interfaces offered are a front-end modelled after compress(1) and a
|
||||
library API. Compression and decompression run faster than realtime on
|
||||
most SPARCstations. The implementation has been verified against the
|
||||
ETSI standard test patterns.
|
||||
|
||||
|
||||
|
||||
%package devel
|
||||
Group: Productivity/Multimedia/Sound/Editors and Convertors
|
||||
Summary: GSM 06.10 Lossy Speech Compressor Library and Utilities
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description devel
|
||||
Contains libraries and binaries for a GSM speech compressor. libgsm
|
||||
contains a standard implementation of the European GSM 06.10
|
||||
provisional standard for full-rate speech transcoding, prI-ETS 300 036,
|
||||
which uses RPE/LTP (residual pulse excitation/long term prediction)
|
||||
coding at 13 kbit/s.
|
||||
|
||||
GSM 06.10 compresses frames of 160 13-bit samples (8 kHz sampling rate,
|
||||
i.e. a frame rate of 50 Hz) into 260 bits; for compatibility with
|
||||
typical UNIX applications, our implementation turns frames of 160
|
||||
16-bit linear samples into 33-byte frames (1650 Bytes/s). The quality
|
||||
of the algorithm is good enough for reliable speaker recognition; even
|
||||
music often survives transcoding in recognizable form (given the
|
||||
bandwidth limitations of 8 kHz sampling rate).
|
||||
|
||||
The interfaces offered are a front end modelled after compress(1), and
|
||||
a library API. Compression and decompression run faster than realtime
|
||||
on most SPARCstations. The implementation has been verified against
|
||||
the ETSI standard test patterns.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -n %{_name}-%{_version}
|
||||
%patch -p1
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4
|
||||
# ChangeLog.orig is not allowed by filelist check.
|
||||
cp -a ChangeLog.orig ChangeLog_orig
|
||||
|
||||
%build
|
||||
make CCFLAGS="-c $RPM_OPT_FLAGS -D_POSIX_SOURCE -D_BSD_SOURCE -DNeedFunctionPrototypes=1" lib/libgsm.a
|
||||
cp lib/libgsm.a lib/libgsm.a.save
|
||||
make clean
|
||||
make CCFLAGS="-c $RPM_OPT_FLAGS -D_POSIX_SOURCE -D_BSD_SOURCE -DNeedFunctionPrototypes=1 -fPIC"
|
||||
cp lib/libgsm.a.save lib/libgsm.a
|
||||
touch lib/libgsm.a
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/{include/gsm,%{_lib},bin,share/man/man{1,3}}
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT/usr GSM_INSTALL_LIB=$RPM_BUILD_ROOT/usr/%{_lib} install
|
||||
cp -d lib/libgsm.so* $RPM_BUILD_ROOT/usr/%{_lib}
|
||||
( cd $RPM_BUILD_ROOT/usr/%{_lib} ; ln -sf libgsm.so.1 libgsm.so )
|
||||
cp inc/{private.h,proto.h,unproto.h} $RPM_BUILD_ROOT/usr/include/gsm/
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%run_ldconfig
|
||||
|
||||
%postun
|
||||
%run_ldconfig
|
||||
|
||||
%files
|
||||
%defattr (-, root, root)
|
||||
%doc COPYRIGHT ChangeLog ChangeLog_orig MACHINES README
|
||||
/usr/%{_lib}/*.so.*
|
||||
/usr/bin/*
|
||||
%doc /usr/share/man/man?/*.*
|
||||
|
||||
%files devel
|
||||
%defattr (-, root, root)
|
||||
/usr/%{_lib}/*.so
|
||||
/usr/%{_lib}/*.*a
|
||||
/usr/include/gsm
|
||||
|
||||
%changelog -n libgsm
|
||||
* Tue Aug 08 2006 - sbrabec@suse.cz
|
||||
- Compile with WAV-style framing support.
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Mon Jan 09 2006 - sbrabec@suse.cz
|
||||
- New SuSE package, version 1.0.10.
|
272
libgsm_1.0.10-13.patch
Normal file
272
libgsm_1.0.10-13.patch
Normal file
@ -0,0 +1,272 @@
|
||||
--- libgsm-1.0.10.orig/Makefile
|
||||
+++ libgsm-1.0.10/Makefile
|
||||
@@ -96,7 +96,7 @@
|
||||
# Other tools
|
||||
|
||||
SHELL = /bin/sh
|
||||
-LN = ln
|
||||
+LN = ln -s
|
||||
BASENAME = basename
|
||||
AR = ar
|
||||
ARFLAGS = cr
|
||||
@@ -140,6 +140,7 @@
|
||||
# Targets
|
||||
|
||||
LIBGSM = $(LIB)/libgsm.a
|
||||
+LIBGSMSO= $(LIB)/libgsm.so
|
||||
|
||||
TOAST = $(BIN)/toast
|
||||
UNTOAST = $(BIN)/untoast
|
||||
@@ -279,7 +280,7 @@
|
||||
|
||||
# Target rules
|
||||
|
||||
-all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
|
||||
+all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
|
||||
@-echo $(ROOT): Done.
|
||||
|
||||
tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
|
||||
@@ -299,6 +300,11 @@
|
||||
|
||||
# The basic API: libgsm
|
||||
|
||||
+$(LIBGSMSO): $(LIB) $(GSM_OBJECTS)
|
||||
+ $(LD) -o $@.1.0.10 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc
|
||||
+ ln -fs libgsm.so.1.0.10 lib/libgsm.so.1
|
||||
+ ln -fs libgsm.so.1.0.10 lib/libgsm.so
|
||||
+
|
||||
$(LIBGSM): $(LIB) $(GSM_OBJECTS)
|
||||
-rm $(RMFLAGS) $(LIBGSM)
|
||||
$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
|
||||
@@ -308,15 +314,15 @@
|
||||
# Toast, Untoast and Tcat -- the compress-like frontends to gsm.
|
||||
|
||||
$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
|
||||
- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
|
||||
+ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
|
||||
|
||||
$(UNTOAST): $(BIN) $(TOAST)
|
||||
-rm $(RMFLAGS) $(UNTOAST)
|
||||
- $(LN) $(TOAST) $(UNTOAST)
|
||||
+ $(LN) toast $(UNTOAST)
|
||||
|
||||
$(TCAT): $(BIN) $(TOAST)
|
||||
-rm $(RMFLAGS) $(TCAT)
|
||||
- $(LN) $(TOAST) $(TCAT)
|
||||
+ $(LN) toast $(TCAT)
|
||||
|
||||
|
||||
# The local bin and lib directories
|
||||
@@ -426,7 +432,9 @@
|
||||
|
||||
clean: semi-clean
|
||||
-rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
|
||||
- $(TOAST) $(TCAT) $(UNTOAST) \
|
||||
+ $(LIBGSMSO) $(LIB)/libgsm.so.1.0.10 \
|
||||
+ $(LIB)libgsm.so.1 \
|
||||
+ $(TOAST) $(TCAT) $(UNTOAST) \
|
||||
$(ROOT)/gsm-1.0.tar.Z
|
||||
|
||||
|
||||
--- libgsm-1.0.10.orig/inc/gsm.h
|
||||
+++ libgsm-1.0.10/inc/gsm.h
|
||||
@@ -54,6 +54,10 @@
|
||||
#define GSM_OPT_FRAME_INDEX 5
|
||||
#define GSM_OPT_FRAME_CHAIN 6
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
extern gsm gsm_create GSM_P((void));
|
||||
extern void gsm_destroy GSM_P((gsm));
|
||||
|
||||
@@ -66,6 +70,10 @@
|
||||
extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *));
|
||||
extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *));
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#undef GSM_P
|
||||
|
||||
#endif /* GSM_H */
|
||||
--- libgsm-1.0.10.orig/inc/config.h
|
||||
+++ libgsm-1.0.10/inc/config.h
|
||||
@@ -9,29 +9,29 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
-/*efine SIGHANDLER_T int /* signal handlers are void */
|
||||
-/*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */
|
||||
+/*efine SIGHANDLER_T int -* signal handlers are void */
|
||||
+/*efine HAS_SYSV_SIGNAL 1 -* sigs not blocked/reset? */
|
||||
|
||||
#define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */
|
||||
-/*efine HAS_LIMITS_H 1 /* /usr/include/limits.h */
|
||||
+#define HAS_STDIO_H 1 /* /usr/include/stdio.h */
|
||||
+/*efine HAS_LIMITS_H 1 -* /usr/include/limits.h */
|
||||
#define HAS_FCNTL_H 1 /* /usr/include/fcntl.h */
|
||||
-/*efine HAS_ERRNO_DECL 1 /* errno.h declares errno */
|
||||
|
||||
#define HAS_FSTAT 1 /* fstat syscall */
|
||||
#define HAS_FCHMOD 1 /* fchmod syscall */
|
||||
#define HAS_CHMOD 1 /* chmod syscall */
|
||||
#define HAS_FCHOWN 1 /* fchown syscall */
|
||||
#define HAS_CHOWN 1 /* chown syscall */
|
||||
-/*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */
|
||||
+/*efine HAS__FSETMODE 1 -* _fsetmode -- set file mode */
|
||||
|
||||
#define HAS_STRING_H 1 /* /usr/include/string.h */
|
||||
-/*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */
|
||||
+/*efine HAS_STRINGS_H 1 -* /usr/include/strings.h */
|
||||
|
||||
#define HAS_UNISTD_H 1 /* /usr/include/unistd.h */
|
||||
#define HAS_UTIME 1 /* POSIX utime(path, times) */
|
||||
-/*efine HAS_UTIMES 1 /* use utimes() syscall instead */
|
||||
+/*efine HAS_UTIMES 1 -* use utimes() syscall instead */
|
||||
#define HAS_UTIME_H 1 /* UTIME header file */
|
||||
-/*efine HAS_UTIMBUF 1 /* struct utimbuf */
|
||||
-/*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */
|
||||
+/*efine HAS_UTIMBUF 1 -* struct utimbuf */
|
||||
+/*efine HAS_UTIMEUSEC 1 -* microseconds in utimbuf? */
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
--- libgsm-1.0.10.orig/inc/toast.h
|
||||
+++ libgsm-1.0.10/inc/toast.h
|
||||
@@ -16,11 +16,12 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
+#include <pthread.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <errno.h>
|
||||
-#ifndef HAS_ERRNO_DECL
|
||||
- extern int errno;
|
||||
+#ifndef errno
|
||||
+ extern int errno;
|
||||
#endif
|
||||
|
||||
#ifdef HAS_LIMITS_H
|
||||
@@ -37,6 +38,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#ifdef HAS_STDIO_H
|
||||
+# include <stdio.h>
|
||||
+#endif
|
||||
+
|
||||
#include "gsm.h"
|
||||
|
||||
#ifndef S_ISREG
|
||||
--- libgsm-1.0.10.orig/src/code.c
|
||||
+++ libgsm-1.0.10/src/code.c
|
||||
@@ -9,8 +9,8 @@
|
||||
#include "config.h"
|
||||
|
||||
|
||||
-#ifdef HAS_STDLIB_H
|
||||
-#include <stdlib.h>
|
||||
+#ifdef HAS_STRING_H
|
||||
+#include <string.h>
|
||||
#else
|
||||
# include "proto.h"
|
||||
extern char * memcpy P((char *, char *, int));
|
||||
--- libgsm-1.0.10.orig/src/debug.c
|
||||
+++ libgsm-1.0.10/src/debug.c
|
||||
@@ -49,7 +49,7 @@
|
||||
fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
|
||||
while (from <= to) {
|
||||
|
||||
- fprintf(stderr, "%d ", ptr[ from ] );
|
||||
+ fprintf(stderr, "%ld ", ptr[ from ] );
|
||||
from++;
|
||||
if (nprinted++ >= 7) {
|
||||
nprinted = 0;
|
||||
@@ -63,14 +63,14 @@
|
||||
char * name,
|
||||
longword value )
|
||||
{
|
||||
- fprintf(stderr, "%s: %d\n", name, (long)value );
|
||||
+ fprintf(stderr, "%s: %ld\n", name, (long)value );
|
||||
}
|
||||
|
||||
void gsm_debug_word P2( (name, value),
|
||||
char * name,
|
||||
word value )
|
||||
{
|
||||
- fprintf(stderr, "%s: %d\n", name, (long)value);
|
||||
+ fprintf(stderr, "%s: %ld\n", name, (long)value);
|
||||
}
|
||||
|
||||
#endif
|
||||
--- libgsm-1.0.10.orig/src/toast.c
|
||||
+++ libgsm-1.0.10/src/toast.c
|
||||
@@ -251,8 +251,8 @@
|
||||
{
|
||||
char * s;
|
||||
if (!(s = malloc(len))) {
|
||||
- fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n",
|
||||
- progname, len);
|
||||
+ fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n",
|
||||
+ progname, (long) len);
|
||||
onintr();
|
||||
exit(1);
|
||||
}
|
||||
@@ -270,7 +270,7 @@
|
||||
maxlen = strlen(name) + 1 + strlen(want) + strlen(cut);
|
||||
p = strcpy(emalloc(maxlen), name);
|
||||
|
||||
- if (s = suffix(p, cut)) strcpy(s, want);
|
||||
+ if ((s = suffix(p, cut))) strcpy(s, want);
|
||||
else if (*want && !suffix(p, want)) strcat(p, want);
|
||||
|
||||
return p;
|
||||
@@ -386,7 +386,7 @@
|
||||
ut[0] = instat.st_atime;
|
||||
ut[1] = instat.st_mtime;
|
||||
|
||||
- (void) utime(outname, ut);
|
||||
+ (void) utime(outname, (struct utimbuf *)ut);
|
||||
|
||||
#endif /* UTIMBUF */
|
||||
}
|
||||
@@ -416,7 +416,7 @@
|
||||
}
|
||||
if (st->st_nlink > 1 && !f_cat && !f_precious) {
|
||||
fprintf(stderr,
|
||||
- "%s: \"%s\" has %s other link%s -- unchanged.\n",
|
||||
+ "%s: \"%s\" has %d other link%s -- unchanged.\n",
|
||||
progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2));
|
||||
return 0;
|
||||
}
|
||||
@@ -585,8 +585,8 @@
|
||||
|
||||
if (cc != sizeof(s)) {
|
||||
if (cc >= 0) fprintf(stderr,
|
||||
- "%s: incomplete frame (%d byte%s missing) from %s\n",
|
||||
- progname, sizeof(s) - cc,
|
||||
+ "%s: incomplete frame (%ld byte%s missing) from %s\n",
|
||||
+ progname, (long) sizeof(s) - cc,
|
||||
"s" + (sizeof(s) - cc == 1),
|
||||
inname ? inname : "stdin" );
|
||||
gsm_destroy(r);
|
||||
@@ -624,8 +624,6 @@
|
||||
|
||||
static int process P1((name), char * name)
|
||||
{
|
||||
- int step = 0;
|
||||
-
|
||||
out = (FILE *)0;
|
||||
in = (FILE *)0;
|
||||
|
||||
@@ -779,7 +777,6 @@
|
||||
case 'h': help(); exit(0);
|
||||
|
||||
default:
|
||||
- usage:
|
||||
fprintf(stderr,
|
||||
"Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
|
||||
progname);
|
Loading…
x
Reference in New Issue
Block a user