Discussion:
[patch] backout accidental whitespace additions
O.Sezer
2005-12-12 12:08:46 UTC
Permalink
This patch backs-out some whitespace which
seems to be accidentally added to the cvs
after the 0.16.2 release.

Cheers

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: q2cvs-accidental-whitespace.diff
URL: <http://icculus.org/pipermail/quake2/attachments/20051212/31ee906d/attachment.diff>
Brendan Burns
2005-12-12 13:27:48 UTC
Permalink
Thanks!
I'll get these into CVS.

--brendan
Post by O.Sezer
This patch backs-out some whitespace which
seems to be accidentally added to the cvs
after the 0.16.2 release.
Cheers
plain text document attachment (q2cvs-accidental-whitespace.diff)
diff -urNp quake2~/src/qcommon/cmd.c quake2/src/qcommon/cmd.c
--- quake2~/src/qcommon/cmd.c 2005-05-22 02:27:25.000000000 +0300
+++ quake2/src/qcommon/cmd.c 2005-12-12 13:52:02.000000000 +0200
@@ -215,16 +215,15 @@ void Cbuf_Execute (void)
if (text[i] == '\n')
break;
}
-
+
// sku - removed potentional buffer overflow vulnerability
if( i > sizeof( line ) - 1 ) {
i = sizeof( line ) - 1;
}
-
-
+
memcpy (line, text, i);
line[i] = 0;
-
+
// delete the text from the command buffer and move remaining commands down
// this is necessary because commands (exec, alias) can insert data at the
// beginning of the text buffer
@@ -781,7 +780,6 @@ char *Cmd_CompleteCommand (char *partial
cmd_function_t *cmd;
int len;
cmdalias_t *a;
- cvar_t *cvar;
len = strlen(partial);
@@ -795,7 +793,7 @@ char *Cmd_CompleteCommand (char *partial
for (a=cmd_alias ; a ; a=a->next)
if (!strcmp (partial, a->name))
return a->name;
-
+
// check for partial match
for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
if (!strncmp (partial,cmd->name, len))
@@ -803,7 +801,7 @@ char *Cmd_CompleteCommand (char *partial
for (a=cmd_alias ; a ; a=a->next)
if (!strncmp (partial, a->name, len))
return a->name;
-
+
return NULL;
}
diff -urNp quake2~/src/ref_gl/gl_local.h quake2/src/ref_gl/gl_local.h
--- quake2~/src/ref_gl/gl_local.h 2005-09-06 16:02:26.000000000 +0300
+++ quake2/src/ref_gl/gl_local.h 2005-12-12 13:52:02.000000000 +0200
@@ -248,7 +248,6 @@ extern cvar_t *vid_gamma;
extern cvar_t *intensity;
-
extern int gl_lightmap_format;
extern int gl_solid_format;
extern int gl_alpha_format;
diff -urNp quake2~/src/server/sv_main.c quake2/src/server/sv_main.c
--- quake2~/src/server/sv_main.c 2005-02-01 02:44:57.000000000 +0200
+++ quake2/src/server/sv_main.c 2005-12-12 13:47:40.000000000 +0200
@@ -345,7 +345,7 @@ void SVC_DirectConnect (void)
if (NET_CompareBaseAdr (adr, cl->netchan.remote_address)
&& ( cl->netchan.qport == qport
|| adr.port == cl->netchan.remote_address.port ) )
- {
+ {
// sku - avoid reusing slot of the client already connected
if( cl->state != cs_zombie ) {
Netchan_OutOfBandPrint( NS_SERVER, adr, "print\nConnected client from this IP is already present.\n" );
diff -urNp quake2~/src/server/sv_user.c quake2/src/server/sv_user.c
--- quake2~/src/server/sv_user.c 2005-02-04 22:56:07.000000000 +0200
+++ quake2/src/server/sv_user.c 2005-12-12 13:54:21.000000000 +0200
@@ -153,29 +153,28 @@ void SV_Configstrings_f (void)
&& start < MAX_CONFIGSTRINGS)
{
if (sv.configstrings[start][0])
- {
-
- MSG_WriteByte (&sv_client->netchan.message, svc_configstring);
- MSG_WriteShort (&sv_client->netchan.message, start);
- MSG_WriteString (&sv_client->netchan.message, sv.configstrings[start]);
-
-/*
- int length;
-
- // sku - write configstrings that exceed MAX_QPATH
- // in proper-sized chunks
- length = strlen( sv.configstrings[start] );
- if( length > MAX_QPATH ) {
- length = MAX_QPATH;
- }
-
- MSG_WriteByte (&sv_client->netchan.message, svc_configstring);
- MSG_WriteShort (&sv_client->netchan.message, start);
- MSG_WriteString (&sv_client->netchan.message, sv.configstrings[start]);
- SZ_Write (&sv_client->netchan.message, sv.configstrings[start], length);
- MSG_WriteByte (&sv_client->netchan.message, 0);
+ {
+ MSG_WriteByte (&sv_client->netchan.message, svc_configstring);
+ MSG_WriteShort (&sv_client->netchan.message, start);
+ MSG_WriteString (&sv_client->netchan.message, sv.configstrings[start]);
+
+/*
+ int length;
+
+ // sku - write configstrings that exceed MAX_QPATH
+ // in proper-sized chunks
+ length = strlen( sv.configstrings[start] );
+ if( length > MAX_QPATH ) {
+ length = MAX_QPATH;
+ }
+
+ MSG_WriteByte (&sv_client->netchan.message, svc_configstring);
+ MSG_WriteShort (&sv_client->netchan.message, start);
+ MSG_WriteString (&sv_client->netchan.message, sv.configstrings[start]);
+ SZ_Write (&sv_client->netchan.message, sv.configstrings[start], length);
+ MSG_WriteByte (&sv_client->netchan.message, 0);
*/
- }
+ }
start++;
}
diff -urNp quake2~/src/client/cl_scrn.c quake2/src/client/cl_scrn.c
--- quake2~/src/client/cl_scrn.c 2005-05-22 02:27:25.000000000 +0300
+++ quake2/src/client/cl_scrn.c 2005-12-12 13:52:02.000000000 +0200
@@ -1290,7 +1290,7 @@ void SCR_UpdateScreen (void)
int numframes;
int i;
float separation[2] = { 0, 0 };
-
+
// if the screen is disabled (loading plaque is up, or vid mode changing)
// do nothing at all
if (cls.disable_screen)
diff -urNp quake2~/src/linux/gl_glx.c quake2/src/linux/gl_glx.c
--- quake2~/src/linux/gl_glx.c 2005-01-28 00:35:20.000000000 +0200
+++ quake2/src/linux/gl_glx.c 2005-12-12 13:56:12.000000000 +0200
@@ -79,8 +79,7 @@ static int joy_fd;
#endif
#define KEY_MASK (KeyPressMask | KeyReleaseMask)
-#define MOUSE_MASK (ButtonPressMask | ButtonReleaseMask | \
- PointerMotionMask | ButtonMotionMask )
+#define MOUSE_MASK (ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonMotionMask )
#define X_MASK (KEY_MASK | MOUSE_MASK | VisibilityChangeMask | StructureNotifyMask )
//GLX Functions
diff -urNp quake2~/src/linux/rw_x11.c quake2/src/linux/rw_x11.c
--- quake2~/src/linux/rw_x11.c 2005-02-04 18:41:40.000000000 +0200
+++ quake2/src/linux/rw_x11.c 2005-12-12 13:56:12.000000000 +0200
@@ -123,8 +123,7 @@ qboolean mouse_active;
int mx, my, mouse_buttonstate;
#define KEY_MASK (KeyPressMask | KeyReleaseMask)
-#define MOUSE_MASK (ButtonPressMask | ButtonReleaseMask | \
- PointerMotionMask | ButtonMotionMask )
+#define MOUSE_MASK (ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonMotionMask )
#define X_MASK (KEY_MASK | MOUSE_MASK | VisibilityChangeMask | StructureNotifyMask | ExposureMask )
static int x_shmeventtype;
Loading...