Remove NULLs except in comments as some compilers/OS's give strange definitions.
This commit is contained in:
parent
bdbe78a8da
commit
95a3570c88
@ -41,7 +41,7 @@ static void createWidgets(void) {
|
|||||||
|
|
||||||
// create the first image widget
|
// create the first image widget
|
||||||
wi.g.x = 10; wi.g.y = 10; wi.g.width = 200; wi.g.height = 100;
|
wi.g.x = 10; wi.g.y = 10; wi.g.width = 200; wi.g.height = 100;
|
||||||
ghImage1 = gwinImageCreate(NULL, &wi.g);
|
ghImage1 = gwinImageCreate(0, &wi.g);
|
||||||
gwinImageOpenFile(ghImage1, "ugfx_logo_banner.bmp");
|
gwinImageOpenFile(ghImage1, "ugfx_logo_banner.bmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,13 +44,13 @@ static void createWidgets(void) {
|
|||||||
// Create the IP label
|
// Create the IP label
|
||||||
wi.g.width = 200; wi.g.height = 20; wi.g.x = 10, wi.g.y = 80;
|
wi.g.width = 200; wi.g.height = 20; wi.g.x = 10, wi.g.y = 80;
|
||||||
wi.text = "192.168.1.42";
|
wi.text = "192.168.1.42";
|
||||||
ghLabel1 = gwinLabelCreate(NULL, &wi);
|
ghLabel1 = gwinLabelCreate(0, &wi);
|
||||||
gwinLabelSetAttribute(ghLabel1, 100, "Current IP:");
|
gwinLabelSetAttribute(ghLabel1, 100, "Current IP:");
|
||||||
|
|
||||||
// Create the DHCP label
|
// Create the DHCP label
|
||||||
wi.g.width = 200; wi.g.height = 20; wi.g.x = 10, wi.g.y = 100;
|
wi.g.width = 200; wi.g.height = 20; wi.g.x = 10, wi.g.y = 100;
|
||||||
wi.text = "Off";
|
wi.text = "Off";
|
||||||
ghLabel2 = gwinLabelCreate(NULL, &wi);
|
ghLabel2 = gwinLabelCreate(0, &wi);
|
||||||
gwinLabelSetAttribute(ghLabel2, 100, "DHCP:");
|
gwinLabelSetAttribute(ghLabel2, 100, "DHCP:");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,12 +43,12 @@ static void createWidgets(void) {
|
|||||||
// Create the label for the first list
|
// Create the label for the first list
|
||||||
wi.g.width = 150; wi.g.height = 20; wi.g.x = 10, wi.g.y = 80;
|
wi.g.width = 150; wi.g.height = 20; wi.g.x = 10, wi.g.y = 80;
|
||||||
wi.text = "List 1: Default";
|
wi.text = "List 1: Default";
|
||||||
ghLabel1 = gwinLabelCreate(NULL, &wi);
|
ghLabel1 = gwinLabelCreate(0, &wi);
|
||||||
|
|
||||||
// Create the label for the second list
|
// Create the label for the second list
|
||||||
wi.g.width = 150; wi.g.height = 20; wi.g.x = 165, wi.g.y = 80;
|
wi.g.width = 150; wi.g.height = 20; wi.g.x = 165, wi.g.y = 80;
|
||||||
wi.text = "List 2: Smooth scrolling";
|
wi.text = "List 2: Smooth scrolling";
|
||||||
ghLabel1 = gwinLabelCreate(NULL, &wi);
|
ghLabel1 = gwinLabelCreate(0, &wi);
|
||||||
|
|
||||||
// The first list widget
|
// The first list widget
|
||||||
wi.g.width = 150;
|
wi.g.width = 150;
|
||||||
|
@ -9,7 +9,7 @@ static void _createWidget(void) {
|
|||||||
wi.g.show = TRUE;
|
wi.g.show = TRUE;
|
||||||
|
|
||||||
wi.g.y = 10; wi.g.x = 10; wi.g.width = 200; wi.g.height = 20; wi.text = "Progress 1";
|
wi.g.y = 10; wi.g.x = 10; wi.g.width = 200; wi.g.height = 20; wi.text = "Progress 1";
|
||||||
ghProgressbar = gwinProgressbarCreate(NULL, &wi);
|
ghProgressbar = gwinProgressbarCreate(0, &wi);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
@ -168,7 +168,7 @@ size_t i;
|
|||||||
if (opt_inputfile)
|
if (opt_inputfile)
|
||||||
opt_arrayname = basenameof(strcpy(tname, opt_inputfile));
|
opt_arrayname = basenameof(strcpy(tname, opt_inputfile));
|
||||||
if (!opt_arrayname || !opt_arrayname[0]) {
|
if (!opt_arrayname || !opt_arrayname[0]) {
|
||||||
srand(time(NULL));
|
srand(time(0));
|
||||||
sprintf(tname, "filearray%u", rand());
|
sprintf(tname, "filearray%u", rand());
|
||||||
opt_arrayname = tname;
|
opt_arrayname = tname;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user