summaryrefslogtreecommitdiff
path: root/save.c
diff options
context:
space:
mode:
Diffstat (limited to 'save.c')
-rw-r--r--save.c206
1 files changed, 42 insertions, 164 deletions
diff --git a/save.c b/save.c
index 36bb8dc..bc7bc0e 100644
--- a/save.c
+++ b/save.c
@@ -23,11 +23,15 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
******************************************************************************/
+/* $XFree86: xc/programs/xsm/save.c,v 3.4 2001/12/14 20:02:27 dawes Exp $ */
#include "xsm.h"
#include "save.h"
#include "saveutil.h"
#include "popup.h"
+#include "info.h"
+#include "lock.h"
+#include "choose.h"
#include <X11/Shell.h>
#include <X11/Xaw/Form.h>
@@ -94,15 +98,10 @@ static Bool help_visible = False;
static String name_in_use = NULL;
static Bool name_locked = False;
-void SetSaveSensitivity ();
static void
-MakeCurrentSession (new_name, name_changed)
-
-String new_name;
-Bool name_changed;
-
+MakeCurrentSession(String new_name, Bool name_changed)
{
char title[256];
List *cl;
@@ -190,10 +189,7 @@ Bool name_changed;
#define NAME_LOCKED 3
static int
-GetSaveName (nameRet)
-
-String *nameRet;
-
+GetSaveName(String *nameRet)
{
String new_name = NULL;
Bool name_changed;
@@ -253,12 +249,7 @@ String *nameRet;
static void
-GetSaveOptions (saveType, interactStyle, fast)
-
-int *saveType;
-int *interactStyle;
-Bool *fast;
-
+GetSaveOptions(int *saveType, int *interactStyle, Bool *fast)
{
XtPointer ptr;
@@ -279,12 +270,8 @@ Bool *fast;
-DoSave (saveType, interactStyle, fast)
-
-int saveType;
-int interactStyle;
-Bool fast;
-
+void
+DoSave(int saveType, int interactStyle, Bool fast)
{
ClientRec *client;
List *cl;
@@ -354,13 +341,7 @@ Bool fast;
static void
-SaveOkAction (w, event, params, num_params)
-
-Widget w;
-XEvent *event;
-String *params;
-Cardinal *num_params;
-
+SaveOkAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
XtCallCallbacks (saveOkButton, XtNcallback, NULL);
}
@@ -368,13 +349,7 @@ Cardinal *num_params;
static void
-DelSaveWinAction (w, event, params, num_params)
-
-Widget w;
-XEvent *event;
-String *params;
-Cardinal *num_params;
-
+DelSaveWinAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
XtCallCallbacks (saveCancelButton, XtNcallback, NULL);
}
@@ -382,13 +357,8 @@ Cardinal *num_params;
static void
-DelNameInUseWinAction (w, event, params, num_params)
-
-Widget w;
-XEvent *event;
-String *params;
-Cardinal *num_params;
-
+DelNameInUseWinAction(Widget w, XEvent *event, String *params,
+ Cardinal *num_params)
{
XtCallCallbacks (nameInUseCancelButton, XtNcallback, NULL);
}
@@ -396,13 +366,8 @@ Cardinal *num_params;
static void
-DelBadSaveWinAction (w, event, params, num_params)
-
-Widget w;
-XEvent *event;
-String *params;
-Cardinal *num_params;
-
+DelBadSaveWinAction(Widget w, XEvent *event, String *params,
+ Cardinal *num_params)
{
if (XtIsManaged (badSaveCancelButton))
XtCallCallbacks (badSaveCancelButton, XtNcallback, NULL);
@@ -413,13 +378,8 @@ Cardinal *num_params;
static void
-DelSaveHelpWinAction (w, event, params, num_params)
-
-Widget w;
-XEvent *event;
-String *params;
-Cardinal *num_params;
-
+DelSaveHelpWinAction(Widget w, XEvent *event, String *params,
+ Cardinal *num_params)
{
XtCallCallbacks (helpSaveOkButton, XtNcallback, NULL);
}
@@ -427,12 +387,7 @@ Cardinal *num_params;
static void
-SaveOkXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+SaveOkXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
String name = NULL;
char label[256];
@@ -504,10 +459,7 @@ XtPointer callData;
void
-LetClientInteract (cl)
-
-List *cl;
-
+LetClientInteract(List *cl)
{
ClientRec *client = (ClientRec *) cl->thing;
@@ -524,8 +476,7 @@ List *cl;
void
-StartPhase2 ()
-
+StartPhase2(void)
{
List *cl;
@@ -556,8 +507,7 @@ StartPhase2 ()
void
-FinishUpSave ()
-
+FinishUpSave(void)
{
ClientRec *client;
List *cl;
@@ -656,12 +606,7 @@ FinishUpSave ()
static void
-SaveCancelXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+SaveCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
XtPopdown (savePopup);
@@ -681,17 +626,8 @@ XtPointer callData;
*/
static Widget
-AddToggle (widgetName, parent, state, radioGroup, radioData,
- fromHoriz, fromVert)
-
-char *widgetName;
-Widget parent;
-int state;
-Widget radioGroup;
-XtPointer radioData;
-Widget fromHoriz;
-Widget fromVert;
-
+AddToggle(char *widgetName, Widget parent, int state, Widget radioGroup,
+ XtPointer radioData, Widget fromHoriz, Widget fromVert)
{
Widget toggle;
@@ -710,10 +646,7 @@ Widget fromVert;
void
-SetSaveSensitivity (on)
-
-Bool on;
-
+SetSaveSensitivity(Bool on)
{
XtSetSensitive (savePopup, on);
@@ -741,13 +674,8 @@ Bool on;
void
-SavePopupStructureNotifyXtHandler (w, closure, event, continue_to_dispatch)
-
-Widget w;
-XtPointer closure;
-XEvent *event;
-Boolean *continue_to_dispatch;
-
+SavePopupStructureNotifyXtHandler(Widget w, XtPointer closure, XEvent *event,
+ Boolean *continue_to_dispatch)
{
if (event->type == MapNotify)
{
@@ -781,12 +709,7 @@ Boolean *continue_to_dispatch;
static void
-NameInUseOverwriteXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+NameInUseOverwriteXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
if (name_locked)
{
@@ -812,12 +735,7 @@ XtPointer callData;
static void
-NameInUseCancelXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+NameInUseCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
XtPopdown (nameInUsePopup);
XtPopup (savePopup, XtGrabNone);
@@ -828,12 +746,7 @@ XtPointer callData;
static void
-BadSaveOkXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+BadSaveOkXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
ListFreeAllButHead (FailedSaveList);
XtPopdown (badSavePopup);
@@ -843,12 +756,7 @@ XtPointer callData;
static void
-BadSaveCancelXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+BadSaveCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
ListFreeAllButHead (FailedSaveList);
XtPopdown (badSavePopup);
@@ -879,12 +787,7 @@ XtPointer callData;
static void
-BadSaveListXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+BadSaveListXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
}
@@ -892,12 +795,7 @@ XtPointer callData;
static void
-HelpSaveXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+HelpSaveXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
static int first_time = 1;
@@ -922,12 +820,7 @@ XtPointer callData;
static void
-HelpSaveOkXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+HelpSaveOkXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
XtPopdown (helpPopup);
help_visible = 0;
@@ -936,7 +829,7 @@ XtPointer callData;
void
-create_save_popup ()
+create_save_popup(void)
{
XtTranslations translations;
@@ -1247,7 +1140,7 @@ create_save_popup ()
void
-PopupSaveDialog ()
+PopupSaveDialog(void)
{
static int first_time = 1;
@@ -1284,12 +1177,7 @@ PopupSaveDialog ()
void
-CheckPointXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+CheckPointXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
wantShutdown = False;
PopupSaveDialog ();
@@ -1299,12 +1187,7 @@ XtPointer callData;
void
-ShutdownSaveXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+ShutdownSaveXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
wantShutdown = True;
PopupSaveDialog ();
@@ -1313,7 +1196,7 @@ XtPointer callData;
void
-PopupBadSave ()
+PopupBadSave(void)
{
ClientRec *client;
@@ -1359,7 +1242,7 @@ PopupBadSave ()
if (strcmp (pprop->name, SmProgram) == 0)
{
- progName = (char *) GetProgramName ((char *) pval->value);
+ progName = GetProgramName ((char *) pval->value);
if ((int) strlen (progName) > maxlen1)
maxlen1 = strlen (progName);
@@ -1411,7 +1294,7 @@ PopupBadSave ()
if (strcmp (pprop->name, SmProgram) == 0)
{
- progName = (char *) GetProgramName ((char *) pval->value);
+ progName = GetProgramName ((char *) pval->value);
}
else if (strcmp (pprop->name, "_XC_RestartService") == 0)
{
@@ -1479,12 +1362,7 @@ PopupBadSave ()
void
-ShutdownDontSaveXtProc (w, client_data, callData)
-
-Widget w;
-XtPointer client_data;
-XtPointer callData;
-
+ShutdownDontSaveXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
List *cl;
ClientRec *client;