- Update to release 6.6.2
OBS-URL: https://build.opensuse.org/package/show/devel:tools/cdecl?expand=0&rev=8
This commit is contained in:
parent
1b8e761de4
commit
420e092248
@ -1,88 +0,0 @@
|
||||
--- cdecl-2.5.orig/Makefile
|
||||
+++ cdecl-2.5/Makefile
|
||||
@@ -15,9 +15,9 @@
|
||||
#
|
||||
# add -DUSE_READLINE To compile in support for the GNU readline library.
|
||||
|
||||
-CFLAGS= -s -O2 -DUSE_READLINE
|
||||
+CFLAGS= -g -O2 -DUSE_READLINE
|
||||
CC= gcc
|
||||
-LIBS= -lreadline -ltermcap
|
||||
+LIBS= -lreadline
|
||||
ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++
|
||||
BINDIR= /usr/bin
|
||||
MANDIR= /usr/man/man1
|
||||
@@ -26,7 +26,7 @@
|
||||
INSTALL_DATA= install -c -m 644
|
||||
|
||||
cdecl: c++decl
|
||||
- ln c++decl cdecl
|
||||
+ ln -s c++decl cdecl
|
||||
|
||||
c++decl: cdgram.c cdlex.c cdecl.c
|
||||
$(CC) $(CFLAGS) -o c++decl cdecl.c $(LIBS)
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
install: cdecl
|
||||
$(INSTALL) cdecl $(BINDIR)
|
||||
- ln $(BINDIR)/cdecl $(BINDIR)/c++decl
|
||||
+ ln -s cdecl $(BINDIR)/c++decl
|
||||
$(INSTALL_DATA) cdecl.1 $(MANDIR)
|
||||
$(INSTALL_DATA) c++decl.1 $(MANDIR)
|
||||
|
||||
--- cdecl-2.5.orig/cdecl.1
|
||||
+++ cdecl-2.5/cdecl.1
|
||||
@@ -274,7 +274,7 @@
|
||||
<modifier> ::= short | long | unsigned | signed | <ptrmod>
|
||||
<ptrmodlist> ::= <ptrmod> <ptrmodlist> | NOTHING
|
||||
<ptrmod> ::= const | volatile | noalias
|
||||
- <storage> ::= auto | extern | register | auto
|
||||
+ <storage> ::= auto | extern | register | static
|
||||
<optstorage> ::= NOTHING | <storage>
|
||||
<options> ::= NOTHING | <options>
|
||||
| create | nocreate
|
||||
--- cdecl-2.5.orig/cdecl.c
|
||||
+++ cdecl-2.5/cdecl.c
|
||||
@@ -67,6 +67,7 @@
|
||||
# include <stddef.h>
|
||||
# include <string.h>
|
||||
# include <stdarg.h>
|
||||
+# include <errno.h>
|
||||
#else
|
||||
# ifndef NOVARARGS
|
||||
# include <varargs.h>
|
||||
@@ -90,7 +91,7 @@
|
||||
#ifdef USE_READLINE
|
||||
# include <readline/readline.h>
|
||||
/* prototypes for functions related to readline() */
|
||||
- char * getline();
|
||||
+ char * get_line();
|
||||
char ** attempt_completion(char *, int, int);
|
||||
char * keyword_completion(char *, int);
|
||||
char * command_completion(char *, int);
|
||||
@@ -124,7 +125,6 @@
|
||||
|
||||
#if __STDC__
|
||||
char *ds(char *), *cat(char *, ...), *visible(int);
|
||||
- int getopt(int,char **,char *);
|
||||
int main(int, char **);
|
||||
int yywrap(void);
|
||||
int dostdin(void);
|
||||
@@ -375,7 +375,7 @@
|
||||
static char *line_read = NULL;
|
||||
|
||||
/* Read a string, and return a pointer to it. Returns NULL on EOF. */
|
||||
-char * getline ()
|
||||
+char * get_line ()
|
||||
{
|
||||
/* If the buffer has already been allocated, return the memory
|
||||
to the free pool. */
|
||||
@@ -887,7 +887,7 @@
|
||||
|
||||
if (!quiet) (void) printf("Type `help' or `?' for help\n");
|
||||
ret = 0;
|
||||
- while ((line = getline())) {
|
||||
+ while ((line = get_line())) {
|
||||
if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
|
||||
free(line);
|
||||
return ret;
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8259d3e811c2c54c30d83259d5207b23c5a39aa1b371975f08ef5fb0abadafc5
|
||||
size 19548
|
3
cdecl-6.6.2.tar.gz
Normal file
3
cdecl-6.6.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:490d19d07737d0598d1fd80c6eeddd4850df9058c2569d22c8ced9816aec11cc
|
||||
size 721716
|
@ -1,3 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 16 15:57:23 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 6.6.2
|
||||
* Command-line long-options.
|
||||
* Distinguishes among K&R C, C89, C95, C99, C11, C18, C++98,
|
||||
C++03, C++11, C++14, C++17, and C++20.
|
||||
* Support for C89 const, restrict, and volatile declarations.
|
||||
* Support for the standard C95 type wchar_t.
|
||||
* Support for the standard C99 types _Bool, _Complex,
|
||||
_Imaginary, int8_t, int16_t, ptrdiff_t, size_t, etc.
|
||||
* Support for C99 static, type-qualified, and variable length
|
||||
array function arguments.
|
||||
* Support for the standard C11 atomic types atomic_bool,
|
||||
atomic_char, etc.
|
||||
* Support for the standard C11 and C++11 types char16_t,
|
||||
char32_t, and thread_local.
|
||||
* Support for inline function and variable declarations.
|
||||
* Support for typedef declarations.
|
||||
* Support for variadic function arguments.
|
||||
* Support for C and C++ alternative tokens (and, and_eq, etc.).
|
||||
* Support for C++ mutable data members, namespaces and scoped
|
||||
names, new-style casts, throw, overloaded operators, and
|
||||
friend, virtual and pure virtual member function
|
||||
declarations, and user-defined conversion operators.
|
||||
* Support for C++11 constexpr, enum class, final, noexcept,
|
||||
override, rvalue references, user-defined literals, using (as
|
||||
a typedef synonym), the function trailing return-type syntax,
|
||||
and ref-qualified member function declarations.
|
||||
* Support for C++ [[carries_dependency]], [[deprecated]],
|
||||
[[maybe_unused]], [[nodiscard]], and [[noreturn]] attribute
|
||||
specifiers.
|
||||
* Better warning and error messages complete with location
|
||||
information and color.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 11 09:08:54 UTC 2015 - schwab@suse.de
|
||||
|
||||
|
37
cdecl.spec
37
cdecl.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package cdecl
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,24 +12,23 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
|
||||
Name: cdecl
|
||||
Version: 2.5
|
||||
Release: 1
|
||||
Group: Development/Languages/C and C++
|
||||
Version: 6.6.2
|
||||
Release: 0
|
||||
Summary: C/C++ function declaration translator
|
||||
Url: ftp://ftp.oss.cc.gatech.edu/pub/linux/devel/lang/c/cdecl-2.5.tar.gz
|
||||
License: SUSE-Public-Domain
|
||||
License: GPL-3.0-only
|
||||
Group: Development/Languages/C and C++
|
||||
URL: https://github.com/paul-j-lucas/cdecl/
|
||||
|
||||
Source: %name-%version.tar.xz
|
||||
Patch1: %name-2.5-deb11.diff
|
||||
Patch2: keyword-identifier.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: bison flex readline-devel xz
|
||||
Source: https://github.com/paul-j-lucas/cdecl/releases/download/cdecl-6.6.2/cdecl-6.6.2.tar.gz
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: readline-devel
|
||||
|
||||
%description
|
||||
Turn English phrases to C or C++ declarations Cdecl is a program
|
||||
@ -41,21 +40,17 @@ version it has command line editing and history with the GNU readline
|
||||
library.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%patch -P 1 -P 2 -p1
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
make CFLAGS="%optflags -DUSE_READLINE -DOLD_READLINE" %{?_smp_mflags};
|
||||
%configure
|
||||
|
||||
%install
|
||||
b="%buildroot";
|
||||
install -dm0755 "$b/%_bindir";
|
||||
install -dm0755 "$b/%_mandir/man1";
|
||||
make install BINDIR="$b/%_bindir" MANDIR="$b/%_mandir/man1";
|
||||
%make_install
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%_bindir/*
|
||||
%_mandir/*/*
|
||||
%license COPYING
|
||||
|
||||
%changelog
|
||||
|
@ -1,60 +0,0 @@
|
||||
From: schwab@suse.de
|
||||
Date: Thu Jun 11 09:08:54 +0000
|
||||
|
||||
"restrict" is a keyword used by the programming language. Rename it.
|
||||
|
||||
Index: cdecl-2.5/cdecl.c
|
||||
===================================================================
|
||||
--- cdecl-2.5.orig/cdecl.c
|
||||
+++ cdecl-2.5/cdecl.c
|
||||
@@ -241,7 +241,7 @@ struct
|
||||
/* for unsupported combinations of types. */
|
||||
void mbcheck()
|
||||
{
|
||||
- register int i, j, restrict;
|
||||
+ register int i, j, restriction;
|
||||
char *t1, *t2;
|
||||
|
||||
/* Loop through the types */
|
||||
@@ -258,26 +258,26 @@ void mbcheck()
|
||||
if (!(modbits & crosstypes[j].bit))
|
||||
continue;
|
||||
/* check the type of restriction */
|
||||
- restrict = crosscheck[i][j];
|
||||
- if (restrict == ALWAYS)
|
||||
+ restriction = crosscheck[i][j];
|
||||
+ if (restriction == ALWAYS)
|
||||
continue;
|
||||
t1 = crosstypes[i].name;
|
||||
t2 = crosstypes[j].name;
|
||||
- if (restrict == NEVER)
|
||||
+ if (restriction == NEVER)
|
||||
{
|
||||
notsupported("", t1, t2);
|
||||
}
|
||||
- else if (restrict == RITCHIE)
|
||||
+ else if (restriction == RITCHIE)
|
||||
{
|
||||
if (RitchieFlag)
|
||||
notsupported(" (Ritchie Compiler)", t1, t2);
|
||||
}
|
||||
- else if (restrict == PREANSI)
|
||||
+ else if (restriction == PREANSI)
|
||||
{
|
||||
if (PreANSIFlag || RitchieFlag)
|
||||
notsupported(" (Pre-ANSI Compiler)", t1, t2);
|
||||
}
|
||||
- else if (restrict == ANSI)
|
||||
+ else if (restriction == ANSI)
|
||||
{
|
||||
if (!RitchieFlag && !PreANSIFlag)
|
||||
notsupported(" (ANSI Compiler)", t1, t2);
|
||||
@@ -286,7 +286,7 @@ void mbcheck()
|
||||
{
|
||||
(void) fprintf (stderr,
|
||||
"%s: Internal error in crosscheck[%d,%d]=%d!\n",
|
||||
- progname, i, j, restrict);
|
||||
+ progname, i, j, restriction);
|
||||
exit(1); /* NOTREACHED */
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user