X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fprograms%2Fdtwm%2FSession.c;h=33d167b88d52b77ef282c2201b3c5af843e04f01;hb=008c224771b07c8f664f2ae2f03a78fdfcfdd387;hp=afb4d6ffdf803f3fb057eeb493779543453fc800;hpb=c884521619ded86baea5e0a74c8d0d2234c232fe;p=oweals%2Fcde.git diff --git a/cde/programs/dtwm/Session.c b/cde/programs/dtwm/Session.c index afb4d6ff..33d167b8 100644 --- a/cde/programs/dtwm/Session.c +++ b/cde/programs/dtwm/Session.c @@ -16,11 +16,10 @@ * details. * * You should have received a copy of the GNU Lesser General Public - * License along with these librararies and programs; if not, write + * License along with these libraries and programs; if not, write * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ -/* $TOG: Session.c /main/5 1997/05/20 08:20:18 samborn $ */ /************************************************************************ * * File: Session.c @@ -79,9 +78,7 @@ extern String unpost_monitor_arrow_image; ************************************************************************/ static char * -SessionFileGetName () - - +SessionFileGetName (void) { char * home_dir; char * file_name; @@ -114,9 +111,7 @@ SessionFileGetName () ************************************************************************/ void -SessionRestoreData () - - +SessionRestoreData (void) { FILE * fd; @@ -185,7 +180,7 @@ SessionRestoreData () max_subpanel_count += 10; subpanel_data = (SubpanelData **) XtRealloc ((char *) subpanel_data, - sizeof (SubpanelData **) * max_subpanel_count); + sizeof (SubpanelData *) * max_subpanel_count); } subpanel_data[subpanel_count] = control_data->subpanel_data; @@ -315,7 +310,7 @@ SessionRestoreData () if (panel.dynamic_data_count > 0) { panel.dynamic_data_list = (DynamicComponent **) - XtMalloc (sizeof (DynamicComponent **) * panel.max_dynamic_data_count); + XtMalloc (sizeof (DynamicComponent *) * panel.max_dynamic_data_count); } dynamic_data_count = 0; @@ -478,9 +473,7 @@ SessionRestoreData () ************************************************************************/ void -WmFrontPanelSessionSaveData () - - +WmFrontPanelSessionSaveData (void) { FILE * fd; @@ -528,7 +521,7 @@ WmFrontPanelSessionSaveData () max_subpanel_count += 10; subpanel_data = (SubpanelData **) XtRealloc ((char *) subpanel_data, - sizeof (SubpanelData **) * max_subpanel_count); + sizeof (SubpanelData *) * max_subpanel_count); } subpanel_data[subpanel_count] = control_data->subpanel_data; @@ -556,7 +549,7 @@ WmFrontPanelSessionSaveData () { if (XtIsManaged (subpanel_data[i]->shell)) fprintf (fd, "%s %d %d %d\n", - subpanel_data[i]-> + (char *) subpanel_data[i]-> element_values[SUBPANEL_NAME].parsed_value, XtX (subpanel_data[i]->shell), XtY (subpanel_data[i]->shell), @@ -578,9 +571,9 @@ WmFrontPanelSessionSaveData () subpanel_data[i]->parent_control_data) { fprintf (fd, "%s %s\n", - subpanel_data[i]-> + (char *) subpanel_data[i]-> element_values[SUBPANEL_NAME].parsed_value, - subpanel_data[i]->default_control-> + (char *) subpanel_data[i]->default_control-> element_values[CONTROL_NAME].parsed_value); } @@ -662,7 +655,7 @@ SessionAddFileData (char * file_name, panel.max_dynamic_data_count += 10; panel.dynamic_data_list = (DynamicComponent **) XtRealloc ((char *) panel.dynamic_data_list, - sizeof (DynamicComponent **) * panel.max_dynamic_data_count); + sizeof (DynamicComponent *) * panel.max_dynamic_data_count); } panel.dynamic_data_list[count] = @@ -832,5 +825,7 @@ SessionDeleteAll(void) strcpy(srcname + srclen, entry->d_name); remove (srcname); } + + closedir(dir); }