aboutsummaryrefslogtreecommitdiff
path: root/apps/xcalc
diff options
context:
space:
mode:
Diffstat (limited to 'apps/xcalc')
-rw-r--r--apps/xcalc/makefile24
-rw-r--r--apps/xcalc/math.c3
-rw-r--r--apps/xcalc/xcalc.c2
3 files changed, 28 insertions, 1 deletions
diff --git a/apps/xcalc/makefile b/apps/xcalc/makefile
new file mode 100644
index 000000000..4d20e4d82
--- /dev/null
+++ b/apps/xcalc/makefile
@@ -0,0 +1,24 @@
+WINAPP = xcalc
+
+DEFINES += XT_NO_SM IEEE
+
+INCLUDELIBFILES = \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \
+ $(MHMAKECONF)\libXpm\src\$(OBJDIR)\libXpm.lib \
+ $(MHMAKECONF)\libXau\$(OBJDIR)\libXau.lib \
+ $(MHMAKECONF)\libXaw\src\$(OBJDIR)\libXaw.lib \
+ $(MHMAKECONF)\libXt\src\$(OBJDIR)\libXt.lib \
+ $(MHMAKECONF)\libXext\src\$(OBJDIR)\libXext.lib \
+ $(MHMAKECONF)\libXmu\src\$(OBJDIR)\libXmu.lib \
+ $(MHMAKECONF)\libX11\$(OBJDIR)\libX11.lib
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+LINKLIBS += $(PTHREADLIB)
+
+CSRCS = \
+ actions.c \
+ math.c \
+ xcalc.c
diff --git a/apps/xcalc/math.c b/apps/xcalc/math.c
index c8ac1a846..706a3e7d8 100644
--- a/apps/xcalc/math.c
+++ b/apps/xcalc/math.c
@@ -17,6 +17,7 @@
*/
#include "xcalc.h"
+#include <unistd.h>
#ifndef M_PI /* sometimes defined in math.h */
#define M_PI 3.14159265358979323846
@@ -80,7 +81,7 @@ static int priority(int op);
#ifndef HAVE_STRLCPY
/* Close enough for the short strings copied in xcalc */
-static inline size_t
+static __inline size_t
strlcpy(char *dst, const char *src, size_t size)
{
strncpy(dst, src, size);
diff --git a/apps/xcalc/xcalc.c b/apps/xcalc/xcalc.c
index bc262b681..68a69ec4e 100644
--- a/apps/xcalc/xcalc.c
+++ b/apps/xcalc/xcalc.c
@@ -117,6 +117,8 @@ main(int argc, char **argv)
XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
+ XawInitializeWidgetSet(); // Needed to have the string to bitmap conversion function initialised
+
toplevel = XtAppInitialize(&xtcontext, "XCalc", Options, XtNumber(Options),
&argc, argv, NULL, NULL, 0);
if (argc != 1) Syntax(argc, argv);