Revision: 76680
http://sourceforge.net/p/brlcad/code/76680
Author: starseeker
Date: 2020-08-07 13:55:15 +0000 (Fri, 07 Aug 2020)
Log Message:
-----------
consolidate
Modified Paths:
--------------
brlcad/trunk/src/mged/CMakeLists.txt
brlcad/trunk/src/mged/fbserv.c
Removed Paths:
-------------
brlcad/trunk/src/mged/fbserv.h
Modified: brlcad/trunk/src/mged/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/mged/CMakeLists.txt 2020-08-07 13:45:31 UTC (rev
76679)
+++ brlcad/trunk/src/mged/CMakeLists.txt 2020-08-07 13:55:15 UTC (rev
76680)
@@ -106,7 +106,6 @@
comb_bool.h
comb_bool_parse.y
comb_bool_scan.l
- fbserv.h
htmlLibraryUi.h
menu.h
mged.h
Modified: brlcad/trunk/src/mged/fbserv.c
===================================================================
--- brlcad/trunk/src/mged/fbserv.c 2020-08-07 13:45:31 UTC (rev 76679)
+++ brlcad/trunk/src/mged/fbserv.c 2020-08-07 13:55:15 UTC (rev 76680)
@@ -40,15 +40,14 @@
#include "./mged.h"
#include "./mged_dm.h"
-#include "./fbserv.h"
-
#define NET_LONG_LEN 4 /* # bytes to network long */
+extern const struct pkg_switch pkg_switch[];
/*
* Communication error. An error occurred on the PKG link.
*/
-HIDDEN void
+static void
communications_error(const char *str)
{
bu_log("%s", str);
@@ -55,7 +54,7 @@
}
-HIDDEN void
+static void
fbserv_setup_socket(int fd)
{
int on = 1;
@@ -89,7 +88,7 @@
}
-HIDDEN void
+static void
fbserv_drop_client(int sub)
{
if (clients[sub].c_pkg != PKC_NULL) {
@@ -115,7 +114,7 @@
/*
* Process arrivals from existing clients.
*/
-HIDDEN void
+static void
fbserv_existing_client_handler(ClientData clientData, int UNUSED(mask))
{
int i;
@@ -170,9 +169,9 @@
#if defined(_WIN32) && !defined(__CYGWIN__)
-HIDDEN struct pkg_conn *fbserv_makeconn(int fd, const struct pkg_switch
*switchp);
+static struct pkg_conn *fbserv_makeconn(int fd, const struct pkg_switch
*switchp);
-HIDDEN void
+static void
fbserv_new_client(struct pkg_conn *pcp,
Tcl_Channel chan)
@@ -205,7 +204,7 @@
}
-HIDDEN void
+static void
fbserv_new_client_handler(ClientData clientData,
Tcl_Channel chan,
char *host,
@@ -309,7 +308,7 @@
}
-HIDDEN struct pkg_conn *
+static struct pkg_conn *
fbserv_makeconn(int fd,
const struct pkg_switch *switchp)
{
@@ -350,7 +349,7 @@
#else /* defined(_WIN32) && !defined(__CYGWIN__) */
-HIDDEN void
+static void
fbserv_new_client(struct pkg_conn *pcp)
{
int i;
@@ -381,7 +380,7 @@
/*
* Accept any new client connections.
*/
-HIDDEN void
+static void
fbserv_new_client_handler(ClientData clientData, int UNUSED(mask))
{
uintptr_t datafd = (uintptr_t)clientData;
@@ -1061,6 +1060,39 @@
(void)free(buf);
}
+const struct pkg_switch pkg_switch[] = {
+ { MSG_FBOPEN, rfbopen, "Open Framebuffer",
NULL },
+ { MSG_FBCLOSE, rfbclose, "Close Framebuffer",
NULL },
+ { MSG_FBCLEAR, rfbclear, "Clear Framebuffer",
NULL },
+ { MSG_FBREAD, rfbread, "Read Pixels", NULL },
+ { MSG_FBWRITE, rfbwrite, "Write Pixels", NULL },
+ { MSG_FBWRITE + MSG_NORETURN, rfbwrite, "Asynch write", NULL },
+ { MSG_FBCURSOR, rfbcursor, "Cursor", NULL },
+ { MSG_FBGETCURSOR, rfbgetcursor, "Get Cursor", NULL },
/*NEW*/
+ { MSG_FBSCURSOR, rfbscursor, "Screen Cursor", NULL
}, /*OLD*/
+ { MSG_FBWINDOW, rfbwindow, "Window", NULL },
/*OLD*/
+ { MSG_FBZOOM, rfbzoom, "Zoom", NULL },
/*OLD*/
+ { MSG_FBVIEW, rfbview, "View", NULL },
/*NEW*/
+ { MSG_FBGETVIEW, rfbgetview, "Get View", NULL },
/*NEW*/
+ { MSG_FBRMAP, rfbrmap, "R Map", NULL },
+ { MSG_FBWMAP, rfbwmap, "W Map", NULL },
+ { MSG_FBHELP, rfbhelp, "Help Request", NULL },
+ { MSG_ERROR, rfbunknown, "Error Message", NULL
},
+ { MSG_CLOSE, rfbunknown, "Close Connection",
NULL },
+ { MSG_FBREADRECT, rfbreadrect, "Read Rectangle", NULL
},
+ { MSG_FBWRITERECT, rfbwriterect, "Write Rectangle",
NULL },
+ { MSG_FBWRITERECT + MSG_NORETURN, rfbwriterect, "Write Rectangle",
NULL },
+ { MSG_FBBWREADRECT, rfbbwreadrect, "Read BW Rectangle",
NULL },
+ { MSG_FBBWWRITERECT, rfbbwwriterect, "Write BW Rectangle",
NULL },
+ { MSG_FBBWWRITERECT + MSG_NORETURN, rfbbwwriterect, "Write BW Rectangle",
NULL },
+ { MSG_FBFLUSH, rfbflush, "Flush Output", NULL },
+ { MSG_FBFLUSH + MSG_NORETURN, rfbflush, "Flush Output", NULL },
+ { MSG_FBFREE, rfbfree, "Free Resources", NULL
},
+ { MSG_FBPOLL, rfbpoll, "Handle Events", NULL
},
+ { MSG_FBSETCURSOR, rfbsetcursor, "Set Cursor Shape",
NULL },
+ { MSG_FBSETCURSOR + MSG_NORETURN, rfbsetcursor, "Set Cursor Shape",
NULL },
+ { 0, NULL, NULL, NULL }
+};
/*
* Local Variables:
Deleted: brlcad/trunk/src/mged/fbserv.h
===================================================================
--- brlcad/trunk/src/mged/fbserv.h 2020-08-07 13:45:31 UTC (rev 76679)
+++ brlcad/trunk/src/mged/fbserv.h 2020-08-07 13:55:15 UTC (rev 76680)
@@ -1,85 +0,0 @@
-/* F B S E R V . H
- * BRL-CAD
- *
- * Copyright (c) 2004-2020 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-/** @file mged/fbserv.h
- * Package Handlers.
- */
-#ifndef MGED_FBSERV_H
-#define MGED_FBSERV_H
-
-#include "dm.h"
-
-void rfbopen(struct pkg_conn *pcp, char *buf), rfbclose(struct pkg_conn *pcp,
char *buf), rfbclear(struct pkg_conn *pcp, char *buf), rfbread(struct pkg_conn
*pcp, char *buf), rfbwrite(struct pkg_conn *pcp, char *buf);
-void rfbcursor(struct pkg_conn *pcp, char *buf), rfbgetcursor(struct pkg_conn
*pcp, char *buf);
-void rfbrmap(struct pkg_conn *pcp, char *buf), rfbwmap(struct pkg_conn *pcp,
char *buf);
-void rfbhelp(struct pkg_conn *pcp, char *buf);
-void rfbreadrect(struct pkg_conn *pcp, char *buf), rfbwriterect(struct
pkg_conn *pcp, char *buf);
-void rfbbwreadrect(struct pkg_conn *pcp, char *buf), rfbbwwriterect(struct
pkg_conn *pcp, char *buf);
-void rfbpoll(struct pkg_conn *pcp, char *buf), rfbflush(struct pkg_conn *pcp,
char *buf), rfbfree(struct pkg_conn *pcp, char *buf);
-void rfbview(struct pkg_conn *pcp, char *buf), rfbgetview(struct pkg_conn
*pcp, char *buf);
-void rfbsetcursor(struct pkg_conn *pcp, char *buf);
-void rfbunknown(struct pkg_conn *pcp, char *buf);
-/* Old Routines */
-void rfbscursor(struct pkg_conn *pcp, char *buf), rfbwindow(struct pkg_conn
*pcp, char *buf), rfbzoom(struct pkg_conn *pcp, char *buf);
-
-static struct pkg_switch pkg_switch[] = {
- { MSG_FBOPEN, rfbopen, "Open Framebuffer",
NULL },
- { MSG_FBCLOSE, rfbclose, "Close Framebuffer",
NULL },
- { MSG_FBCLEAR, rfbclear, "Clear Framebuffer",
NULL },
- { MSG_FBREAD, rfbread, "Read Pixels", NULL },
- { MSG_FBWRITE, rfbwrite, "Write Pixels", NULL },
- { MSG_FBWRITE + MSG_NORETURN, rfbwrite, "Asynch write", NULL },
- { MSG_FBCURSOR, rfbcursor, "Cursor", NULL },
- { MSG_FBGETCURSOR, rfbgetcursor, "Get Cursor", NULL },
/*NEW*/
- { MSG_FBSCURSOR, rfbscursor, "Screen Cursor", NULL
}, /*OLD*/
- { MSG_FBWINDOW, rfbwindow, "Window", NULL },
/*OLD*/
- { MSG_FBZOOM, rfbzoom, "Zoom", NULL },
/*OLD*/
- { MSG_FBVIEW, rfbview, "View", NULL },
/*NEW*/
- { MSG_FBGETVIEW, rfbgetview, "Get View", NULL },
/*NEW*/
- { MSG_FBRMAP, rfbrmap, "R Map", NULL },
- { MSG_FBWMAP, rfbwmap, "W Map", NULL },
- { MSG_FBHELP, rfbhelp, "Help Request", NULL },
- { MSG_ERROR, rfbunknown, "Error Message", NULL },
- { MSG_CLOSE, rfbunknown, "Close Connection",
NULL },
- { MSG_FBREADRECT, rfbreadrect, "Read Rectangle", NULL
},
- { MSG_FBWRITERECT, rfbwriterect, "Write Rectangle", NULL
},
- { MSG_FBWRITERECT + MSG_NORETURN, rfbwriterect, "Write Rectangle", NULL
},
- { MSG_FBBWREADRECT, rfbbwreadrect, "Read BW Rectangle",
NULL },
- { MSG_FBBWWRITERECT, rfbbwwriterect, "Write BW Rectangle",
NULL },
- { MSG_FBBWWRITERECT + MSG_NORETURN, rfbbwwriterect, "Write BW
Rectangle", NULL },
- { MSG_FBFLUSH, rfbflush, "Flush Output", NULL },
- { MSG_FBFLUSH + MSG_NORETURN, rfbflush, "Flush Output", NULL },
- { MSG_FBFREE, rfbfree, "Free Resources", NULL
},
- { MSG_FBPOLL, rfbpoll, "Handle Events", NULL },
- { MSG_FBSETCURSOR, rfbsetcursor, "Set Cursor Shape",
NULL },
- { MSG_FBSETCURSOR + MSG_NORETURN, rfbsetcursor, "Set Cursor Shape",
NULL },
- { 0, NULL, NULL, NULL }
-};
-
-
-#endif /* MGED_FBSERV_H */
-/*
- * Local Variables:
- * mode: C
- * tab-width: 8
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits