News:

Come Chat with us live! Learn how HERE!

Main Menu

Patches Explained.

Started by PwNz!, October 17, 2007, 12:46:36 PM

PwNz!

Can someone please explain a patch.
I know - means to remove it and + to add it. But what about @'s and things.

Could someone please explain all the symbols and how they are used, and what happens. With tjw's patch here:


Index: src/server/server.h
===================================================================
--- src/server/server.h (revision 823)
+++ src/server/server.h (working copy)
@@ -169,6 +169,7 @@
netchan_buffer_t **netchan_end_queue;

int oldServerTime;
+ qboolean csupdated[MAX_CONFIGSTRINGS+1];
} client_t;

//=============================================================================
@@ -227,6 +228,8 @@
extern cvar_t *sv_rconPassword;
extern cvar_t *sv_privatePassword;
extern cvar_t *sv_allowDownload;
+extern cvar_t *sv_wwwDownload;
+extern cvar_t *sv_wwwBaseURL;
extern cvar_t *sv_maxclients;

extern cvar_t *sv_privateClients;
@@ -272,6 +275,7 @@
//
void SV_SetConfigstring( int index, const char *val );
void SV_GetConfigstring( int index, char *buffer, int bufferSize );
+void SV_UpdateConfigstrings( client_t *client );

void SV_SetUserinfo( int index, const char *val );
void SV_GetUserinfo( int index, char *buffer, int bufferSize );
r either hacking or asian! ~V//Arch_Enemy

Why do we kill people who are killing people to show that killing people is wrong?  ~Holly Near

To kill a man is not to defend a doctrine, but to kill a man.  ~Michael Servetus

next_ghost

Index: file to patch
===================================================================
--- old file (revision info)
+++ new file (revision info)
@@ -first line in old file,old hunk size +first line in new file,new hunk size @@
changes
@@ ... @@
another change in the same file
Index: another file to patch
===================================================================
...
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

PwNz!

Thank you :)

So, would this mean that this line -@@ -169,6 +169,7 @@ , deletes line 169 and replaces it with the patch one.    netchan_buffer_t **netchan_end_queue;
 and the rest? or just that line.
   int            oldServerTime;
+   qboolean         csupdated[MAX_CONFIGSTRINGS+1];    
} client_t;
r either hacking or asian! ~V//Arch_Enemy

Why do we kill people who are killing people to show that killing people is wrong?  ~Holly Near

To kill a man is not to defend a doctrine, but to kill a man.  ~Michael Servetus

Caveman

why not just simply apply the patch and have a look see what happened to the source?

That would be faster than reading the manual / howto or waiting here to get an answer you like.

Plague

Quote from: Cavemanwhy not just simply apply the patch and have a look see what happened to the source?

That would be faster than reading the manual / howto or waiting here to get an answer you like.

Why don't you just load a gun, aim it at your head and fire?

Once again we're blessed with the infallible logic of Caveman.

benmachine

Quote from: PwNz!Thank you :)

So, would this mean that this line -@@ -169,6 +169,7 @@ , deletes line 169 and replaces it with the patch one.    netchan_buffer_t **netchan_end_queue;
 and the rest? or just that line.
   int            oldServerTime;
+   qboolean         csupdated[MAX_CONFIGSTRINGS+1];    
} client_t;
The patch you showed doesn't delete anything, it simply adds some variables and a function prototype.
benmachine

PwNz!

So whats this mean? @@ -169,6 +169,7 @@
r either hacking or asian! ~V//Arch_Enemy

Why do we kill people who are killing people to show that killing people is wrong?  ~Holly Near

To kill a man is not to defend a doctrine, but to kill a man.  ~Michael Servetus

Undeference

Need help? Ask intelligently. Please share solutions you find.

Quote from: tuple on February 15, 2008, 11:54:10 PMThats what we need, helpful players, not more powerful admins.

benmachine

Quote from: PwNz!So whats this mean? @@ -169,6 +169,7 @@
Where in the original file there were six lines starting at 169, there are now seven.
benmachine

kangounator

seriously you should not really mind what it exactly it means, you should focus on + and - (the @@ will just help you now where it is in the file)
Quote from: CitRoNMuuuuuuuuuh ]={:}