Author Topic: Patches Explained.  (Read 6961 times)

PwNz!

  • Posts: 161
  • Turrets: +0/-0
Patches Explained.
« on: October 17, 2007, 12:46:36 pm »
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:


Code: [Select]
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

  • Posts: 892
  • Turrets: +3/-6
Re: Patches Explained.
« Reply #1 on: October 17, 2007, 03:11:36 pm »
Code: [Select]
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!

  • Posts: 161
  • Turrets: +0/-0
Patches Explained.
« Reply #2 on: October 17, 2007, 09:30:40 pm »
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

  • Guest
Patches Explained.
« Reply #3 on: October 17, 2007, 10:15:57 pm »
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

  • Posts: 238
  • Turrets: +13/-13
Patches Explained.
« Reply #4 on: October 17, 2007, 10:20:01 pm »
Quote from: "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.


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

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Patches Explained.
« Reply #5 on: October 17, 2007, 10:59:42 pm »
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!

  • Posts: 161
  • Turrets: +0/-0
Patches Explained.
« Reply #6 on: October 18, 2007, 02:13:35 am »
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

  • Tremulous Developers
  • *
  • Posts: 1254
  • Turrets: +122/-45
Patches Explained.
« Reply #7 on: October 18, 2007, 07:14:29 am »
Need help? Ask intelligently. Please share solutions you find.

Thats what we need, helpful players, not more powerful admins.

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Patches Explained.
« Reply #8 on: October 18, 2007, 04:06:28 pm »
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

  • Posts: 35
  • Turrets: +2/-1
Patches Explained.
« Reply #9 on: October 18, 2007, 09:08:57 pm »
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: CitRoN
Muuuuuuuuuh ]={:}