Commit 1f129e8a authored by gkiagia's avatar gkiagia

Fix compilation in c89 mode.

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork/krfb/libvncserver@1195284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
parent e2c3255c
......@@ -30,7 +30,7 @@
#include <rfb/rfb.h>
/* RFB 3.8 clients are well informed */
void rfbClientSendString(rfbClientPtr cl, char *reason);
void rfbClientSendString(rfbClientPtr cl, const char *reason);
/*
......
......@@ -668,7 +668,7 @@ extern rfbClientPtr rfbNewUDPClient(rfbScreenInfoPtr rfbScreen);
extern rfbClientPtr rfbReverseConnection(rfbScreenInfoPtr rfbScreen,char *host, int port);
extern void rfbClientConnectionGone(rfbClientPtr cl);
extern void rfbProcessClientMessage(rfbClientPtr cl);
extern void rfbClientConnFailed(rfbClientPtr cl, char *reason);
extern void rfbClientConnFailed(rfbClientPtr cl, const char *reason);
extern void rfbNewUDPConnection(rfbScreenInfoPtr rfbScreen,int sock);
extern void rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen);
extern rfbBool rfbSendFramebufferUpdate(rfbClientPtr cl, sraRegionPtr updateRegion);
......@@ -684,7 +684,7 @@ extern void rfbSendBell(rfbScreenInfoPtr rfbScreen);
extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length);
extern rfbBool rfbSendFileTransferChunk(rfbClientPtr cl);
extern rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer);
extern rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, char *buffer);
extern rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, const char *buffer);
extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length);
extern rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length);
......
......@@ -647,7 +647,7 @@ rfbProcessClientProtocolVersion(rfbClientPtr cl)
void
rfbClientSendString(rfbClientPtr cl, char *reason)
rfbClientSendString(rfbClientPtr cl, const char *reason)
{
char *buf;
int len = strlen(reason);
......@@ -672,7 +672,7 @@ rfbClientSendString(rfbClientPtr cl, char *reason)
void
rfbClientConnFailed(rfbClientPtr cl,
char *reason)
const char *reason)
{
char *buf;
int len = strlen(reason);
......@@ -1088,7 +1088,7 @@ rfbBool rfbSendTextChatMessage(rfbClientPtr cl, uint32_t length, char *buffer)
int DB = 1;
rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, char *buffer)
rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, const char *buffer)
{
rfbFileTransferMsg ft;
ft.type = rfbFileTransfer;
......
......@@ -86,7 +86,7 @@ int ScaleY(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int y)
/* So, all of the encodings point to the ->screen->frameBuffer,
* We need to change this!
*/
void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int *y, int *w, int *h, char *function)
void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int *y, int *w, int *h, const char *function)
{
double x1,y1,w1,h1, x2, y2, w2, h2;
double scaleW = ((double) to->width) / ((double) from->width);
......
int ScaleX(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int x);
int ScaleY(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int y);
void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int *y, int *w, int *h, char *function);
void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int *y, int *w, int *h, const char *function);
void rfbScaledScreenUpdateRect(rfbScreenInfoPtr screen, rfbScreenInfoPtr ptr, int x0, int y0, int w0, int h0);
void rfbScaledScreenUpdate(rfbScreenInfoPtr screen, int x1, int y1, int x2, int y2);
rfbScreenInfoPtr rfbScaledScreenAllocate(rfbClientPtr cl, int width, int height);
......
......@@ -143,7 +143,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef WIN32
#define InlineX __inline
#else
#define InlineX inline
# ifndef __STRICT_ANSI__
# define InlineX inline
# else
# define InlineX
# endif
#endif
#ifdef ZYWRLE_ENCODE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment