Remove infrastructure to auto-generate proto.h

If proto.h is supposed to be auto-generated it should probably not be
present in the repo at all. Re-running cproto showed that proto.h has
been manually edited for quite some time, so this just makes this the
only workflow.

It also gets rid of a bit of #ifdefs, so that's nice.
This commit is contained in:
Karl Mikaelsson 2017-10-05 10:09:42 +02:00
parent db8b56db44
commit 1f13c85583
7 changed files with 1 additions and 63 deletions

View File

@ -59,17 +59,6 @@ installkeymaps:
cp keymaps/modifiers $(DESTDIR)$(KEYMAP_PATH)
chmod 644 $(DESTDIR)$(KEYMAP_PATH)/*
.PHONY: proto
proto:
cat proto.head > proto.h
cproto -DMAKE_PROTO \
bitmap.c cache.c channels.c cliprdr.c disk.c mppc.c ewmhints.c \
iso.c licence.c mcs.c orders.c parallel.c printer.c printercache.c \
pstcache.c rdesktop.c rdp5.c rdp.c rdpdr.c rdpsnd.c \
secure.c serial.c tcp.c xclip.c xkeymap.c xwin.c lspci.c seamless.c \
scard.c >> proto.h
cat proto.tail >> proto.h
.PHONY: clean
clean:
rm -f *.o *~ rdesktop
@ -98,8 +87,6 @@ rdesktop-$(VERSION).tar.gz: Makefile configure
rdesktop-$(VERSION)/rdesktop.spec \
rdesktop-$(VERSION)/*.c \
rdesktop-$(VERSION)/*.h \
rdesktop-$(VERSION)/proto.head \
rdesktop-$(VERSION)/proto.tail \
rdesktop-$(VERSION)/keymaps/?? \
rdesktop-$(VERSION)/keymaps/??-* \
rdesktop-$(VERSION)/keymaps/common \

View File

@ -201,7 +201,7 @@ ewmh_init()
/*
Get the window state: normal/minimized/maximized.
*/
#ifndef MAKE_PROTO
int
ewmh_get_window_state(Window w)
{
@ -580,9 +580,6 @@ ewmh_is_window_above(Window w)
return above;
}
#endif /* MAKE_PROTO */
#if 0
/* FIXME: _NET_MOVERESIZE_WINDOW is for pagers, not for

View File

@ -1,26 +0,0 @@
/* -*- c-basic-offset: 8 -*-
rdesktop: A Remote Desktop Protocol client.
Copyright (C) Matthew Chapman 1999-2007
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RDESKTOP_PROTO_H
#define RDESKTOP_PROTO_H
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

View File

@ -1,8 +0,0 @@
/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */
#endif

View File

@ -189,7 +189,4 @@
#include "stream.h"
#include "constants.h"
#include "types.h"
#ifndef MAKE_PROTO
#include "proto.h"
#endif

View File

@ -28,7 +28,6 @@
#include <sys/types.h>
#include <time.h>
#include <arpa/inet.h>
#ifndef MAKE_PROTO
#ifdef __APPLE__
#include <PCSC/wintypes.h>
#include <PCSC/pcsclite.h>
@ -86,7 +85,6 @@ static void *queue_handler_function(void *data);
/* code segment */
#endif /* MAKE_PROTO */
void
scardSetInfo(uint32 epoch, uint32 device, uint32 id, uint32 bytes_out)
{
@ -96,8 +94,6 @@ scardSetInfo(uint32 epoch, uint32 device, uint32 id, uint32 bytes_out)
curEpoch = epoch;
}
#ifndef MAKE_PROTO
static RD_NTSTATUS
scard_create(uint32 device_id, uint32 accessmask, uint32 sharemode, uint32 create_disposition,
uint32 flags_and_attributes, char *filename, RD_NTHANDLE * phandle)
@ -122,7 +118,6 @@ scard_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint
{
return RD_STATUS_SUCCESS;
}
#endif /* MAKE_PROTO */
/* Enumeration of devices from rdesktop.c */
/* returns numer of units found and initialized. */
@ -247,7 +242,6 @@ scard_enum_devices(uint32 * id, char *optarg)
return count;
}
#ifndef MAKE_PROTO
typedef struct _scard_handle_list_t
{
struct _scard_handle_list_t *next;
@ -2699,7 +2693,6 @@ DEVICE_FNS scard_fns = {
scard_write,
thread_wrapper
};
#endif /* MAKE_PROTO */
void
scard_lock(int lock)

View File

@ -503,7 +503,6 @@ xclip_probe_selections()
The SelectionNotify event is sent from the clipboard owner to the requestor
after his request was satisfied.
If this function is called, we're the requestor side. */
#ifndef MAKE_PROTO
void
xclip_handle_SelectionNotify(XSelectionEvent * event)
{
@ -954,7 +953,6 @@ xclip_handle_PropertyNotify(XPropertyEvent * event)
(event->window == DefaultRootWindow(g_display)))
xclip_probe_selections();
}
#endif
/* Called when the RDP server announces new clipboard data formats.