1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
Author: Andreas Beckmann <anbe@debian.org>
Description: fix building with -Werror=implicit-function-declaration
--- a/libXg/mkfont.c
+++ b/libXg/mkfont.c
@@ -2,6 +2,7 @@
#include <libc.h>
#include <libg.h>
#include <string.h>
+#include <stdlib.h>
/*
* Cobble fake font using existing subfont
--- a/libXg/rdbitmapfile.c
+++ b/libXg/rdbitmapfile.c
@@ -1,4 +1,5 @@
/* Copyright (c) 1992 AT&T - All rights reserved. */
+#include <unistd.h>
#include <libc.h>
#include <libg.h>
#include "libgint.h"
--- a/libXg/getrect.c
+++ b/libXg/getrect.c
@@ -1,4 +1,5 @@
/* Copyright (c) 1992 AT&T - All rights reserved. */
+#include <unistd.h>
#include <libc.h>
#include <libg.h>
#include "libgint.h"
--- a/libXg/Gwin.h
+++ b/libXg/Gwin.h
@@ -44,4 +44,7 @@ extern String GwinSelectionSwap(Widget,
extern char* Gwinselect_get(Widget w);
extern void Gwinselect_put(Widget w,char*s);
+long latin1(unsigned char *k);
+long unicode(unsigned char *k);
+
#endif /* GWIN_H */
--- a/libXg/xtbinit.c
+++ b/libXg/xtbinit.c
@@ -2,6 +2,7 @@
#include <libc.h>
#include <libg.h>
#include <stdio.h>
+#include <unistd.h>
#include "libgint.h"
#define COMPRESSMOUSE
@@ -85,7 +86,7 @@ static Font * initfont(char *, XFontStr
static void reshaped(int, int, int, int);
static void gotchar(int);
static void gotmouse(Gwinmouse *);
-static int log2(int);
+static int ilog2(int);
static void pixtocolor(Pixel, XColor *);
static Subfont *XFontStructtoSubfont(XFontStruct *);
static Ebuf *ebread(Esrc *);
@@ -188,7 +189,7 @@ xtbinit(Errfunc f, char *class, int *par
pixtocolor(_fgpixel, &_fgcolor);
pixtocolor(_bgpixel, &_bgcolor);
screen.id = (int) XtWindow(widg);
- screen.ldepth = log2(depth);
+ screen.ldepth = ilog2(depth);
screen.flag = SCR;
if(_fgpixel != 0)
screen.flag |= BL1;
@@ -364,7 +365,7 @@ gottimeout(XtPointer cldata, XtIntervalI
}
static int
-log2(int n)
+ilog2(int n)
{
int i, v;
@@ -653,7 +654,7 @@ estop(unsigned long key)
{
int s;
- s = log2(key);
+ s = ilog2(key);
if (!esrc[s].inuse){
berror("key not in use");
}
@@ -666,7 +667,7 @@ estoptimer(unsigned long key)
{
int s;
- s = log2(key);
+ s = ilog2(key);
if (!esrc[s].inuse){
berror("key not in use");
}
--- a/libXg/wrbitmapfile.c
+++ b/libXg/wrbitmapfile.c
@@ -1,6 +1,8 @@
/* Copyright (c) 1992 AT&T - All rights reserved. */
#include <libc.h>
#include <libg.h>
+#include <stdio.h>
+#include <unistd.h>
#include "libgint.h"
#define CHUNK 4096
|