1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 03:32:24 +00:00

dticon: fix implicit-function-declaration warnings

This commit is contained in:
Jon Trulson 2021-11-15 15:47:08 -07:00
parent 6f553130a3
commit 3f1f2ea0f6
21 changed files with 323 additions and 22 deletions

View file

@ -10,8 +10,8 @@ if SOLARIS
dticon_LDADD += -ldl
endif
dticon_SOURCES = dtIconShell.c event.c fileIO.c fileIODialog.c \
globals.c graphics.c help.c image.c main.c \
newIconDialog.c process.c queryDialog.c \
stdErrDialog.c utils.c constants.h externals.h \
help.h main.h
dticon_SOURCES = dtIconShell.c event.c event.h fileIO.c fileIO.h \
fileIODialog.c globals.c graphics.c graphics.h \
help.c image.c image.h main.c newIconDialog.c \
process.c queryDialog.c stdErrDialog.c utils.c \
utils.h constants.h externals.h help.h main.h

View file

@ -63,8 +63,17 @@
Includes, Defines, and Global variables from the Declarations Editor:
*******************************************************************************/
void ProcessTabletEvent(
Widget w,
XEvent *xptr,
String *params,
Cardinal num_params ); // event.c
#include "externals.h"
#include "main.h"
#include "utils.h"
#include "process.h"
#define RES_CONVERT( res_name, res_value) \
XtVaTypedArg, (res_name), XmRString, (res_value), strlen(res_value) + 1

View file

@ -61,6 +61,11 @@
#include <Xm/Xm.h>
#include "externals.h"
#include "main.h"
#include "utils.h"
#include "process.h"
#include "fileIO.h"
#include "graphics.h"
#include "image.h"
#ifdef DEBUG
extern Widget iconForm;

View file

@ -0,0 +1,33 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* 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
*/
#pragma once
/* event.c */
void ProcessTabletEvent(Widget w, XEvent *xptr, String *params, Cardinal num_params);
void Do_ButtonOp(XEvent *xptr);
void EndPolyOp(void);
void iLine(int x1, int y1, int x2, int y2, Boolean backupFlag);
void iRectangle(int x, int y, int width, int height, Boolean backupFlag);
void iArc(int x, int y, int width, int height, Boolean backupFlag);
void iPolygon(void);

View file

@ -28,6 +28,9 @@
* (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
* Novell, Inc.
**********************************************************************/
#pragma once
#include <Xm/Xm.h>
#include <X11/xpm.h>
#include "constants.h"

View file

@ -59,11 +59,14 @@
#include <Xm/Xm.h>
#include <Xm/TextF.h>
#include <Xm/FileSB.h>
#include <Xm/ToggleBG.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "externals.h"
#include "main.h"
#include "utils.h"
#include "process.h"
#ifdef __TOOLTALK
#include <Tt/tttk.h>
@ -87,7 +90,6 @@ unsigned int width_ret, height_ret;
extern GC scratch_gc;
extern void PixelTableClear();
extern int PixelTableLookup();
extern void send_tt_saved();
extern void Display_XPMFile(int, int);
extern void Display_XBMFile(int, int);

View file

@ -0,0 +1,32 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* 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
*/
#pragma once
/* fileIO.c */
void Do_FileIO(Widget wid, XtPointer client_unused, XmFileSelectionBoxCallbackStruct *callback_data);
Boolean Read_File(char *fnameIn);
Boolean Write_File(char *fnameIn);
void Display_XPMFile(int width, int height);
void Display_XBMFile(int width, int height);
void SetFileIODialogInfo(void);

View file

@ -54,9 +54,12 @@
** implied warranty.
**
******************************************************************************/
#include <Xm/Xm.h>
#include <stdlib.h>
#include <math.h>
#include <Xm/Xm.h>
#include "externals.h"
#include "utils.h"
#include "process.h"
extern GC scratch_gc;

View file

@ -0,0 +1,31 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* 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
*/
#pragma once
/* graphics.c */
void Flicker_Arc(Window win, int x1, int y1, int x2, int y2);
void Circle_Box(Window win, int x1, int y1, int x2, int y2, XRectangle *box);
void Set_HotBox_Coords(void);
void Start_HotBox(int flag);
void Stop_HotBox(void);

View file

@ -66,6 +66,7 @@
#include <Dt/HelpDialog.h>
#include "help.h"
#include "main.h"
#include "utils.h"
extern Widget circleButton, editMenu_addHS_pb, editMenu_clear_pb;
extern Widget editMenu_copy_pb, editMenu_cut_pb, editMenu_deleteHS_pb;

View file

@ -28,6 +28,9 @@
* (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
* Novell, Inc.
**********************************************************************/
#pragma once
#include "externals.h"
/* help index flags */
@ -158,3 +161,15 @@
#define HELP_VOLUME "Iconed"
#define HELP_HELP_VOLUME "Help4Help"
/* help.c */
void AssignHelpCallbacks(void);
void HelpTriggerCB(Widget w, caddr_t client_data, caddr_t call_data);
void HelpOnItemCB(Widget w, caddr_t client_data, caddr_t call_data);
void HelpHyperlinkCB(Widget w, caddr_t client_data_unused, caddr_t call_data);
void HelpCloseCB(Widget w, caddr_t client_data, caddr_t call_data_unused);
void HelpSetVolAndLocation(int topic);
void DisplayHelp(char *helpVolume, char *locationId);
void DisplayNewHelp(char *helpVolume, char *locationId);
void DisplayHelpDialog(Widget helpDialog, char *helpVolume, char *locationId);
Widget CreateHelpDialog(HelpStruct *pHelp);

View file

@ -54,8 +54,11 @@
******************************************************************************/
#include <stdio.h>
#include "externals.h"
#include "utils.h"
#include "process.h"
#include "image.h"
int flood_min_x, flood_min_y, flood_max_x, flood_max_y;
static int flood_min_x, flood_min_y, flood_max_x, flood_max_y;
/***************************************************************************

View file

@ -0,0 +1,32 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* 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
*/
#pragma once
/* image.c */
int Mirror_Image(int orientation);
int Block_Rotate(XImage *src_image, XImage *dst_image, int rtype);
void Scale_Image(void);
int Flood_Region(int flood_x, int flood_y);
void Set_FloodLimits(int x, int y);
int Flood_Fill(XImage *color_image, XImage *mono_image, int x, int y, int width, int height, unsigned long new_pixel, unsigned long new_mono);

View file

@ -50,6 +50,11 @@
#include <Dt/UserMsg.h>
#include "externals.h"
#include "main.h"
#include "help.h"
#include "event.h"
#include "utils.h"
#include "process.h"
#ifdef __TOOLTALK
#include <Tt/tttk.h>
@ -63,8 +68,12 @@ Tt_message ProcessToolTalkMediaMessage( );
extern void ProcessAppArgs();
void send_tt_saved();
#define dticon_ptype "DT_Icon_Editor"
int edit_notifier(char* fname, Tt_message msg, int clear);
#endif
#define ERROR -1
#define NO_ERROR 0

View file

@ -49,6 +49,8 @@
#include "main.h"
#include "externals.h"
#include "process.h"
/*******************************************************************************
Includes, Defines, and Global variables from the Declarations Editor:

View file

@ -89,14 +89,23 @@
#include <Xm/DragC.h>
#include <Dt/Dnd.h>
#include <Dt/Connect.h>
#include <Dt/HelpDialog.h>
#include "main.h"
#include "utils.h"
#include "process.h"
#include "graphics.h"
#include "image.h"
#include "fileIO.h"
#ifdef __TOOLTALK
#include <Tt/tttk.h>
extern void ReplyToMessage( );
extern Tt_message replyMsg;
int edit_notifier(char* fname, Tt_message msg, int clear);
#endif
static void Do_DropCheckOp(DtDndTransferCallback);
@ -776,11 +785,6 @@ Process_GridState( void )
* Purpose: Convert the "object" received from bms to a full path name *
* note: I am making BIG assumptions about the format of the *
* file I am getting from dtfile. "<host> - <path>" *
* WARNING: I have used an Xe function directly (XeIsLocalHostP), rather *
* than include Dt/Connect.h, which was causing bad things to *
* happen at build time, probably because dticon is not ansi- *
* clean (it tried to get c++ version of /usr/include/stdlib.h?) *
* It's simply too late to clean up the ansi... (the bell tolls) *
* *
***************************************************************************/
static char *
@ -799,7 +803,7 @@ ConvertDropName( char *objects)
/* check if same host */
tmp[0] = '\0';
if ((Boolean)XeIsLocalHostP(host))
if (DtIsLocalHostP(host))
{
char *slash = NULL;
tmp[0] = ' ';

View file

@ -0,0 +1,54 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* 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
*/
#pragma once
/* process.c */
void Process_New(void);
void Process_Open(void);
void Process_Save(void);
void Process_SaveAs(void);
void Process_Quit(void);
void Process_Query_OK(void);
void Process_Query_Cancel(void);
void Process_Size_OK(void);
void Eval_NewSize(int width, int height);
void Process_Size_Cancel(void);
void Process_StdErr_OK(void);
void Process_Undo(void);
void Process_Cut(void);
void Process_Copy(XImage **img, XImage **img_mono);
void Process_Paste(void);
void Process_Scale(void);
void Process_Resize(void);
void Process_Clear(void);
void Process_GrabImage(void);
void Process_AddHotspot(void);
void Process_DeleteHotspot(void);
void Process_RotateLeft(void);
void Process_RotateRight(void);
void Process_FlipV(void);
void Process_FlipH(void);
void Process_GridState(void);
void Process_DropCheckOp(Widget w, XtPointer client_data, XtPointer call_data);
void Process_DropOp(Widget w, XtPointer client_data, XtPointer call_data);
void Do_Paste(int x, int y);

View file

@ -41,6 +41,7 @@
#include <Xm/MessageB.h>
#include "main.h"
#include "externals.h"
#include "process.h"
#define RES_CONVERT( res_name, res_value) \
XtVaTypedArg, (res_name), XmRString, (res_value), strlen(res_value) + 1

View file

@ -40,6 +40,7 @@
#include <Xm/MwmUtil.h>
#include "main.h"
#include "externals.h"
#include "process.h"
#include <Xm/MessageB.h>

View file

@ -86,11 +86,19 @@
#include <Xm/XmP.h>
#include <Xm/MessageB.h>
#include <Xm/VendorSEP.h>
#include <Xm/ToggleB.h>
#include <Dt/Dt.h>
#include <Dt/UserMsg.h>
#include <Xm/DragC.h>
#include <Dt/Dnd.h>
#include <Dt/Session.h>
#include "externals.h"
#include "main.h"
#include "process.h"
#include "fileIO.h"
#include "graphics.h"
#include "image.h"
/* Copied from Xm/BaseClassI.h */
extern XmWidgetExtData _XmGetWidgetExtData(
Widget widget,
@ -149,14 +157,6 @@ void Init_Icons(
int PixelTableLookup(
Pixel pixelIn,
Boolean allocNew);
extern void *Process_DropCheckOp(
Widget,
XtPointer,
XtPointer);
extern void *Process_DropOp(
Widget,
XtPointer,
XtPointer);
extern void Repaint_Tablet(Window, int, int, int, int);
extern void Init_Widget_List(void);
extern void Init_Pen_Colors(Widget);

View file

@ -0,0 +1,61 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* 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
*/
#pragma once
/* utils.c */
void Create_Gfx_Labels(unsigned long fg, unsigned long bg);
void Init_Editor(Widget wid);
void GetMarginData(void);
void New_MagFactor(int new_value);
void New_FileFormat(int new_value);
void Icon_Coords(int normal_x, int normal_y, int *fat_x, int *fat_y);
void Tablet_Coords(int fat_x, int fat_y, int *raw_x, int *raw_y);
void Quantize(int *x, int *y, int center);
void Repaint_Exposed_Tablet(void);
void Repaint_Tablet(Window win, int x, int y, int width, int height);
void Paint_Tile(int x, int y, GC gc);
void Transfer_Back_Image(int x1, int y1, int x2, int y2, Boolean tflag);
void Init_Widget_List(void);
void Init_Pen_Colors(Widget wid);
void Init_Color_Table(void);
void Size_IconForm(Dimension width, Dimension height);
void Init_Icons(Dimension width, Dimension height, Boolean saveFlag);
void RegisterDropSites(void);
void Abort(char *str);
void stat_out(char *msg, char *arg0, char *arg1, char *arg2, char *arg3, char *arg4, char *arg5, char *arg6);
void PixelTableClear(void);
int PixelTableLookup(Pixel pixelIn, Boolean allocNew);
void Switch_FillSolids(void);
void Select_New_Pen(int n);
void Backup_Icons(void);
void DoErrorDialog(char *str);
void DoQueryDialog(char *str);
void Do_GrabOp(void);
int LoadGrabbedImage(int x, int y, int width, int height);
void ParseAppArgs(int num, char *cmd[]);
void ProcessAppArgs(void);
void Set_Gfx_Labels(Boolean flag);
void SaveSession(void);
void GetSessionInfo(void);
void ChangeTitle(void);