mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:31:16 -07:00
This commit was manufactured by cvs2svn to create tag
'KDE_3_1_0_RELEASE'. svn path=/tags/KDE_3_1_0_RELEASE/kdenetwork/krfb/; revision=202081
This commit is contained in:
@@ -552,7 +552,7 @@ int main(int argc,char *argv[])
|
||||
for(i=argc-1;i>0;i--)
|
||||
#ifdef LOCAL_CONTROL
|
||||
if(i<argc-1 && !strcmp(argv[i],"-toggleviewonly")) {
|
||||
sprintf(message,"t%s",argv[i+1]);
|
||||
snprintf(message, sizeof(message), "t%s",argv[i+1]);
|
||||
send_message(&single_instance,message);
|
||||
exit(0);
|
||||
} else if(!strcmp(argv[i],"-listclients")) {
|
||||
@@ -562,7 +562,7 @@ int main(int argc,char *argv[])
|
||||
} else
|
||||
#ifdef BACKCHANNEL
|
||||
if(i<argc-1 && !strcmp(argv[i],"-backchannel")) {
|
||||
sprintf(message,"b%s",argv[i+1]);
|
||||
snprintf(message, sizeof(message), "b%s",argv[i+1]);
|
||||
send_message(&single_instance,message);
|
||||
exit(0);
|
||||
} else
|
||||
|
||||
@@ -65,8 +65,12 @@ typedef unsigned long KeySym;
|
||||
#elif defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#include <sys/types.h>
|
||||
#include <machine/endian.h>
|
||||
#ifndef _BYTE_ORDER
|
||||
#define _BYTE_ORDER BYTE_ORDER
|
||||
#endif
|
||||
#ifndef _LITTLE_ENDIAN
|
||||
#define _LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#endif
|
||||
#elif defined (__SVR4) && defined (__sun) /* Solaris */
|
||||
#include <sys/types.h>
|
||||
#if defined(__sparc)
|
||||
|
||||
@@ -83,8 +83,7 @@ void
|
||||
sraSpanCheck(const sraSpan *span, const char *text) {
|
||||
/* Check the span is valid! */
|
||||
if (span->start == span->end) {
|
||||
printf(text);
|
||||
printf(":%d-%d\n", span->start, span->end);
|
||||
printf("%s:%d-%d\n", text, span->start, span->end);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ int main(int argc,char** argv)
|
||||
for(i=argc-1;i>0;i--)
|
||||
#ifdef LOCAL_CONTROL
|
||||
if(i<argc-1 && !strcmp(argv[i],"-toggleviewonly")) {
|
||||
sprintf(message,"t%s",argv[i+1]);
|
||||
snprintf(message, sizeof(message), "t%s",argv[i+1]);
|
||||
send_message(&single_instance,message);
|
||||
exit(0);
|
||||
} else if(!strcmp(argv[i],"-listclients")) {
|
||||
@@ -348,7 +348,7 @@ int main(int argc,char** argv)
|
||||
} else
|
||||
#ifdef BACKCHANNEL
|
||||
if(i<argc-1 && !strcmp(argv[i],"-backchannel")) {
|
||||
sprintf(message,"b%s",argv[i+1]);
|
||||
snprintf(message, sizeof(message), "b%s",argv[i+1]);
|
||||
send_message(&single_instance,message);
|
||||
exit(0);
|
||||
} else
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
static char *local_address = NULL;
|
||||
static char *inet_address = NULL;
|
||||
static const char *local_address = NULL;
|
||||
static const char *inet_address = NULL;
|
||||
|
||||
/* max number of network interfaces*/
|
||||
#define MAX_IF 8
|
||||
@@ -85,7 +85,8 @@ char *getdefaultdev()
|
||||
FILE *fp = fopen( PROCROUTE, "r");
|
||||
char buff[4096], gate_addr[128], net_addr[128];
|
||||
char mask_addr[128];
|
||||
int irtt, window, mss, num, metric, iflags, refcnt, use;
|
||||
int irtt, window, mss, num, metric, refcnt, use;
|
||||
unsigned int iflags;
|
||||
char i;
|
||||
if( !fp ) {
|
||||
return NULL;
|
||||
@@ -93,9 +94,9 @@ char *getdefaultdev()
|
||||
i=0;
|
||||
// cruise through the list, and find the gateway interface
|
||||
while( fgets(buff, 1023, fp) ) {
|
||||
num = sscanf(buff, "%s %s %s %X %d %d %d %s %d %d %d\n",
|
||||
num = sscanf(buff, "%15s %127s %127s %X %d %d %d %127s %d %d %d\n",
|
||||
iface, net_addr, gate_addr, &iflags, &refcnt, &use, &metric,
|
||||
&mask_addr, &mss, &window, &irtt);
|
||||
mask_addr, &mss, &window, &irtt);
|
||||
i++;
|
||||
if( i == 1) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user