[PATCH:twm 3/3] Make various helper & callback functions private to session.c

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jul 30 22:35:08 PDT 2013


Nothing else ever called them, so no reason to export them.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 src/session.c |   36 ++++++++++++++++++------------------
 src/session.h |   18 ------------------
 2 files changed, 18 insertions(+), 36 deletions(-)

diff --git a/src/session.c b/src/session.c
index d15700b..3898fcd 100644
--- a/src/session.c
+++ b/src/session.c
@@ -78,7 +78,7 @@ static char *unique_filename ( const char *path, const char *prefix, int *pFd );
 #endif
 
 
-char *
+static char *
 GetClientID (Window window)
 {
     char *client_id = NULL;
@@ -116,7 +116,7 @@ GetClientID (Window window)
 
 
 
-char *
+static char *
 GetWindowRole (Window window)
 {
     XTextProperty tp;
@@ -132,7 +132,7 @@ GetWindowRole (Window window)
 
 
 
-int
+static int
 write_byte (FILE *file, unsigned char b)
 {
     if (fwrite ((char *) &b, 1, 1, file) != 1)
@@ -141,7 +141,7 @@ write_byte (FILE *file, unsigned char b)
 }
 
 
-int
+static int
 write_ushort (FILE *file, unsigned short s)
 {
     unsigned char   file_short[2];
@@ -154,7 +154,7 @@ write_ushort (FILE *file, unsigned short s)
 }
 
 
-int
+static int
 write_short (FILE *file, short s)
 {
     unsigned char   file_short[2];
@@ -167,7 +167,7 @@ write_short (FILE *file, short s)
 }
 
 
-int
+static int
 write_counted_string (FILE *file, char *string)
 {
     if (string)
@@ -190,7 +190,7 @@ write_counted_string (FILE *file, char *string)
 
 
 
-int
+static int
 read_byte (FILE *file, unsigned char *bp)
 {
     if (fread ((char *) bp, 1, 1, file) != 1)
@@ -199,7 +199,7 @@ read_byte (FILE *file, unsigned char *bp)
 }
 
 
-int
+static int
 read_ushort (FILE *file, unsigned short *shortp)
 {
     unsigned char   file_short[2];
@@ -211,7 +211,7 @@ read_ushort (FILE *file, unsigned short *shortp)
 }
 
 
-int
+static int
 read_short (FILE *file, short *shortp)
 {
     unsigned char   file_short[2];
@@ -223,7 +223,7 @@ read_short (FILE *file, short *shortp)
 }
 
 
-int
+static int
 read_counted_string (FILE *file, char **stringp)
 {
     unsigned char  len;
@@ -289,7 +289,7 @@ read_counted_string (FILE *file, char **stringp)
  * Height ever changed by user		1
  */
 
-int
+static int
 WriteWinConfigEntry (FILE *configFile, TwmWindow *theWindow,
                      char *clientId, char *windowRole)
 {
@@ -383,7 +383,7 @@ WriteWinConfigEntry (FILE *configFile, TwmWindow *theWindow,
 }
 
 
-int
+static int
 ReadWinConfigEntry (FILE *configFile, unsigned short version,
 		    TWMWinConfigEntry **pentry)
 {
@@ -728,7 +728,7 @@ unique_filename (
 
 
 
-void
+static void
 SaveYourselfPhase2CB (SmcConn smcConn, SmPointer clientData)
 {
     int scrnum;
@@ -906,7 +906,7 @@ SaveYourselfPhase2CB (SmcConn smcConn, SmPointer clientData)
 
 
 
-void
+static void
 SaveYourselfCB (
     SmcConn smcConn,
     SmPointer clientData,
@@ -926,7 +926,7 @@ SaveYourselfCB (
 
 
 
-void
+static void
 DieCB (SmcConn smcConn, SmPointer clientData)
 {
     SmcCloseConnection (smcConn, 0, NULL);
@@ -936,7 +936,7 @@ DieCB (SmcConn smcConn, SmPointer clientData)
 
 
 
-void
+static void
 SaveCompleteCB (SmcConn smcConnm, SmPointer clientData)
 {
     ;
@@ -944,7 +944,7 @@ SaveCompleteCB (SmcConn smcConnm, SmPointer clientData)
 
 
 
-void
+static void
 ShutdownCancelledCB (SmcConn smcConn, SmPointer clientData)
 {
     if (!sent_save_done)
@@ -956,7 +956,7 @@ ShutdownCancelledCB (SmcConn smcConn, SmPointer clientData)
 
 
 
-void
+static void
 ProcessIceMsgProc (XtPointer client_data, int *source, XtInputId *id)
 {
     IceConn	ice_conn = (IceConn) client_data;
diff --git a/src/session.h b/src/session.h
index e8c2c1c..05b51fe 100644
--- a/src/session.h
+++ b/src/session.h
@@ -28,26 +28,8 @@
 #include <X11/SM/SMlib.h>
 
 extern void ConnectToSessionManager ( char *previous_id );
-extern void DieCB ( SmcConn smcConn, SmPointer clientData );
-extern char * GetClientID ( Window window );
 extern int GetWindowConfig ( TwmWindow *theWindow, short *x, short *y, unsigned short *width, unsigned short *height, Bool *iconified, Bool *icon_info_present, short *icon_x, short *icon_y, Bool *width_ever_changed_by_user, Bool *height_ever_changed_by_user );
-extern char * GetWindowRole ( Window window );
-extern void ProcessIceMsgProc ( XtPointer client_data, int *source, XtInputId *id );
-extern int ReadWinConfigEntry ( FILE *configFile, unsigned short version, TWMWinConfigEntry **pentry );
 extern void ReadWinConfigFile ( char *filename );
-extern int read_byte ( FILE *file, unsigned char *bp );
-extern int read_counted_string ( FILE *file, char **stringp );
-extern int read_short ( FILE *file, short *shortp );
-extern int read_ushort ( FILE *file, unsigned short *shortp );
-extern void SaveCompleteCB ( SmcConn smcConn, SmPointer clientData );
-extern void SaveYourselfCB ( SmcConn smcConn, SmPointer clientData, int saveType, Bool shutdown, int interactStyle, Bool fast );
-extern void SaveYourselfPhase2CB ( SmcConn smcConn, SmPointer clientData );
-extern void ShutdownCancelledCB ( SmcConn smcConn, SmPointer clientData );
-extern int WriteWinConfigEntry ( FILE *configFile, TwmWindow *theWindow, char *clientId, char *windowRole );
-extern int write_byte ( FILE *file, unsigned char b );
-extern int write_counted_string ( FILE *file, char *string );
-extern int write_short ( FILE *file, short s );
-extern int write_ushort ( FILE *file, unsigned short s );
 
 extern SmcConn smcConn;
 
-- 
1.7.9.2



More information about the xorg-devel mailing list