Tremulous Forum
		Mods => Modding Center => Topic started by: PwNz! 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:
 
 
 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 );
- 
				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
 ===================================================================
 ...
- 
				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;
- 
				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 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.
- 
				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.
- 
				So whats this mean? @@ -169,6 +169,7 @@
			
- 
				http://www.wikipedia.org/wiki/diff#Unified_format
			
- 
				So whats this mean? @@ -169,6 +169,7 @@ 
 Where in the original file there were six lines starting at 169, there are now seven.
- 
				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)