forked from github/server
- Fix usetprivate
This commit is contained in:
parent
2854c15075
commit
4c02ee9c20
|
@ -20,7 +20,7 @@ CTAGSFLAGS = --langmap=c:.c.h --c-types=-m
|
||||||
CFLAGS = -I$(ERESSEA) -Wall -Wwrite-strings -Wstrict-prototypes \
|
CFLAGS = -I$(ERESSEA) -Wall -Wwrite-strings -Wstrict-prototypes \
|
||||||
-Wpointer-arith -Werror-implicit-function-declaration \
|
-Wpointer-arith -Werror-implicit-function-declaration \
|
||||||
-Wno-char-subscripts \
|
-Wno-char-subscripts \
|
||||||
-march=pentiumpro -fPIC $(INCLUDES)
|
-march=pentiumpro $(INCLUDES)
|
||||||
LDFLAGS = $(LIBS)
|
LDFLAGS = $(LIBS)
|
||||||
|
|
||||||
LIBS = -L$(PUBLISH_DIR)
|
LIBS = -L$(PUBLISH_DIR)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: laws.c,v 1.24 2001/02/17 16:07:02 enno Exp $
|
* $Id: laws.c,v 1.25 2001/02/18 09:32:13 corwin Exp $
|
||||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -1864,6 +1864,7 @@ instant_orders(void)
|
||||||
|
|
||||||
for (r = regions; r; r = r->next)
|
for (r = regions; r; r = r->next)
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
|
printf("Unit: %s\n", itoa36(u->no));
|
||||||
#ifdef GROUPS
|
#ifdef GROUPS
|
||||||
for (S = u->orders; S; S = S->next)
|
for (S = u->orders; S; S = S->next)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: unit.c,v 1.5 2001/02/10 14:18:00 enno Exp $
|
* $Id: unit.c,v 1.6 2001/02/18 09:32:13 corwin Exp $
|
||||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -213,7 +213,11 @@ uprivate(const unit * u) {
|
||||||
void
|
void
|
||||||
usetprivate(unit * u, const char * str) {
|
usetprivate(unit * u, const char * str) {
|
||||||
attrib * a = a_find(u->attribs, &at_private);
|
attrib * a = a_find(u->attribs, &at_private);
|
||||||
if (!a && !str) return;
|
|
||||||
|
if(str == NULL) {
|
||||||
|
if(a) a_remove(&u->attribs, a);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!a) a = a_add(&u->attribs, a_new(&at_private));
|
if (!a) a = a_add(&u->attribs, a_new(&at_private));
|
||||||
if (a->data.v) free(a->data.v);
|
if (a->data.v) free(a->data.v);
|
||||||
a->data.v = strdup(str);
|
a->data.v = strdup(str);
|
||||||
|
|
Loading…
Reference in New Issue