diff --git a/Makefile b/Makefile index b83c59d..c6a8933 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,11 @@ # # Variables and default configuration # -NAME = gophernicus -PACKAGE = $(NAME) -BINARY = in.$(NAME) -VERSION = 1.8.1 +NAME = gophernicus +PACKAGE = $(NAME) +BINARY = in.$(NAME) +VERSION = 2.0-beta +CODENAME = for Workgroups SOURCES = $(NAME).c file.c menu.c string.c platform.c session.c options.c HEADERS = functions.h files.h @@ -92,7 +93,7 @@ $(BINARY): $(OBJECTS) $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJECTS) -o $@ .c.o: - $(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DVERSION="\"$(VERSION)\"" -DDEFAULT_ROOT="\"$(ROOT)\"" $< -o $@ + $(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DVERSION="\"$(VERSION)\"" -DCODENAME="\"$(CODENAME)\"" -DDEFAULT_ROOT="\"$(ROOT)\"" $< -o $@ headers: $(HEADERS) diff --git a/file.c b/file.c index 70b9ed2..b168097 100644 --- a/file.c +++ b/file.c @@ -328,6 +328,8 @@ void setenv_cgi(state *st, char *script) setenv("GOPHER_REFERER", st->req_referrer, 1); snprintf(buf, sizeof(buf), "%i", st->out_width); setenv("COLUMNS", buf, 1); + snprintf(buf, sizeof(buf), CODENAME); + setenv("SERVER_CODENAME", buf, 1); /* Bucktooth extras */ if (*st->req_query_string) { diff --git a/gophermap b/gophermap index 56b8901..f2a7ac9 100644 --- a/gophermap +++ b/gophermap @@ -21,7 +21,7 @@ Generic information: =echo " your ip address: $REMOTE_ADDR" =echo " server time....: `date`" =echo " server uptime..: `uptime | sed 's/.*up *\([^,]*\), .*/\1/'`" -=echo " server version.: $SERVER_VERSION" +=echo " server version.: $SERVER_VERSION \"$SERVER_CODENAME\"" =echo " server platform: $SERVER_ARCH" =echo " description....: $SERVER_DESCRIPTION"