ref: 8e9b3935e13faea2d4304b0f557754c43290a266
parent: dcda9073c2fef62d70544e8dac46c2919c908587
author: sirjofri <sirjofri@sirjofri.de>
date: Sun Feb 9 10:58:29 EST 2025
makes many functions static
--- a/n_box.c
+++ b/n_box.c
@@ -8,7 +8,7 @@
#define N_TYPE NBox_Type
char* NBox_Type = "NBox";
-Rectangle
+static Rectangle
box_calcsize(Nelem* nelem, Image* screen, Rectangle r)
{
NBox* b = (NBox*)nelem;
@@ -71,7 +71,7 @@
return nil;
}
-int
+static int
box_hit(Nelem* nelem, Mouse m)
{
NBox* b = (NBox*)nelem;
@@ -82,7 +82,7 @@
return 0;
}
-void
+static void
box_free(Nelem* nelem)
{
Nelem* ch;
@@ -95,7 +95,7 @@
free(b);
}
-Nlist*
+static Nlist*
box_getchildren(Nelem* nelem)
{
NBox* b = (NBox*)nelem;
@@ -125,7 +125,7 @@
.getname = box_getname,
};
-NBox*
+static NBox*
box_slot(Nelem* child)
{
if (child == nc_get()) {
--- a/n_hbox.c
+++ b/n_hbox.c
@@ -15,7 +15,7 @@
Image *screen;
};
-void
+static void
hbox_childsize(Nelem* nelem, int, void *aux)
{
csizep *p = (csizep*)aux;
@@ -42,7 +42,7 @@
return nelem->r;
}
-void
+static void
hbox_childdraw(Nelem* elem, int, void *aux)
{
@@ -49,7 +49,7 @@
ncalldraw(elem, (Image*)aux);
}
-void
+static void
hbox_draw(Nelem* nelem, Image* img)
{
NHBox* b = (NHBox*)nelem;
@@ -62,7 +62,7 @@
}
}
-void
+static void
hbox_free(Nelem* nelem)
{
NHBox* b = (NHBox*)nelem;
@@ -73,7 +73,7 @@
free(b);
}
-Nlist*
+static Nlist*
hbox_getchildren(Nelem* nelem)
{
NHBox* b = (NHBox*)nelem;
@@ -88,7 +88,7 @@
.getchildren = hbox_getchildren,
};
-NHBox*
+static NHBox*
hbox_slot(Nelem* child)
{
if (child == nc_get()) {
--- a/n_label.c
+++ b/n_label.c
@@ -53,7 +53,7 @@
}
}
-void
+static void
label_free(Nelem* nelem)
{
GUARD(nelem);
@@ -62,7 +62,7 @@
free(nelem);
}
-Nlist*
+static Nlist*
label_getchildren(Nelem* nelem)
{
return nil;
--- a/n_vbox.c
+++ b/n_vbox.c
@@ -15,7 +15,7 @@
Image *screen;
};
-void
+static void
vbox_childsize(Nelem* nelem, int, void *aux)
{
csizep *p = (csizep*)aux;
@@ -57,7 +57,7 @@
lforeach(&b->children, vbox_childdraw, img);
}
-void
+static void
vbox_free(Nelem* nelem)
{
NVBox* b = (NVBox*)nelem;
@@ -68,7 +68,7 @@
free(b);
}
-Nlist*
+static Nlist*
vbox_getchildren(Nelem* nelem)
{
NVBox* b = (NVBox*)nelem;
@@ -83,7 +83,7 @@
.getchildren = vbox_getchildren,
};
-NVBox*
+static NVBox*
vbox_slot(Nelem* child)
{
if (child == nc_get()) {
--- a/n_window.c
+++ b/n_window.c
@@ -8,7 +8,7 @@
#define N_TYPE NWindow_Type
char* NWindow_Type = "NWindow";
-Rectangle
+static Rectangle
wcalcsize(Nelem* nelem, Image* screen, Rectangle r)
{
Nelem *f;
@@ -32,7 +32,7 @@
ncalldraw(f, img);
}
-void
+static void
wfree(Nelem* nelem)
{
Nelem* f;
@@ -45,7 +45,7 @@
free(w);
}
-Nlist*
+static Nlist*
wgetchildren(Nelem* nelem)
{
NWindow* w = (NWindow*)nelem;
@@ -62,7 +62,7 @@
.getchildren = wgetchildren,
};
-NWindow*
+static NWindow*
slot(Nelem* child)
{
if (child == nc_get()) {
@@ -75,7 +75,7 @@
return w;
}
-NWindow*
+static NWindow*
makeroot(void)
{
NWindow* w = (NWindow*)nc_get();
--
⑨