forked from github/server
basepath() ausgiebiger benutzen
This commit is contained in:
parent
4e802f83bb
commit
d35ec83eb6
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: creport.c,v 1.2 2001/01/26 16:19:39 enno Exp $
|
* $Id: creport.c,v 1.3 2001/01/28 08:50:45 enno 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)
|
||||||
|
@ -793,7 +793,7 @@ report_computer(FILE * F, faction * f)
|
||||||
/* traverse all regions */
|
/* traverse all regions */
|
||||||
for (sd = seen; sd!=NULL; sd = sd->next) {
|
for (sd = seen; sd!=NULL; sd = sd->next) {
|
||||||
int modifier = 0;
|
int modifier = 0;
|
||||||
char * tname;
|
const char * tname;
|
||||||
|
|
||||||
r = sd->r;
|
r = sd->r;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: monster.c,v 1.2 2001/01/26 16:19:39 enno Exp $
|
* $Id: monster.c,v 1.3 2001/01/28 08:50:45 enno 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)
|
||||||
|
@ -837,12 +837,16 @@ plan_monsters(void)
|
||||||
strlist *S;
|
strlist *S;
|
||||||
|
|
||||||
if (!dragonlog) {
|
if (!dragonlog) {
|
||||||
|
char zText[MAX_PATH];
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
dragonlog = gzopen("dragonlog.gz", "w");
|
sprintf(zText, "%s/dragonlog.gz", basepath());
|
||||||
|
dragonlog = gzopen(zText, "w");
|
||||||
#elif HAVE_BZ2LIB
|
#elif HAVE_BZ2LIB
|
||||||
dragonlog = BZ2_bzopen("dragonlog.bz2","w");
|
sprintf(zText, "%s/dragonlog.bz2", basepath());
|
||||||
|
dragonlog = BZ2_bzopen(zText,"w");
|
||||||
#else
|
#else
|
||||||
dragonlog = fopen("dragonlog", "w");
|
sprintf(zText, "%s/dragonlog", basepath());
|
||||||
|
dragonlog = fopen(zText, "w");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
u = findunitg(atoi36("ponn"), NULL);
|
u = findunitg(atoi36("ponn"), NULL);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: report.c,v 1.3 2001/01/27 18:15:32 enno Exp $
|
* $Id: report.c,v 1.4 2001/01/28 08:50:46 enno 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)
|
||||||
|
@ -2992,10 +2992,12 @@ writemonument(void)
|
||||||
for(i=0; i <= 6; i++) if(buildings[i]) {
|
for(i=0; i <= 6; i++) if(buildings[i]) {
|
||||||
fset(buildings[i], FL_DH);
|
fset(buildings[i], FL_DH);
|
||||||
}
|
}
|
||||||
|
{
|
||||||
F = cfopen("news-monument", "w");
|
char zText[MAX_PATH];
|
||||||
|
sprintf(zText, "%s/news-monument", basepath());
|
||||||
|
F = cfopen(zText, "w");
|
||||||
if (!F) return;
|
if (!F) return;
|
||||||
|
}
|
||||||
fprintf(F, "\n--- maintitle ---\n\n");
|
fprintf(F, "\n--- maintitle ---\n\n");
|
||||||
for(i = 0; i<=6; i++) {
|
for(i = 0; i<=6; i++) {
|
||||||
if (buildings[i] != NULL) {
|
if (buildings[i] != NULL) {
|
||||||
|
@ -3035,7 +3037,12 @@ writemonument(void)
|
||||||
fclose(F);
|
fclose(F);
|
||||||
|
|
||||||
#ifdef OLD_ITEMS
|
#ifdef OLD_ITEMS
|
||||||
if (!(F = cfopen("news-silly", "w"))) return;
|
{
|
||||||
|
char zText[MAX_PATH];
|
||||||
|
sprintf(zText, "%s/news-silly", basepath());
|
||||||
|
F = cfopen(zText, "w");
|
||||||
|
if (!F) return;
|
||||||
|
}
|
||||||
for (f=factions;f;f=f->next) {
|
for (f=factions;f;f=f->next) {
|
||||||
unit * u;
|
unit * u;
|
||||||
int k;
|
int k;
|
||||||
|
@ -3067,7 +3074,12 @@ writeforward(void)
|
||||||
region *r;
|
region *r;
|
||||||
unit *u;
|
unit *u;
|
||||||
|
|
||||||
forwardFile = fopen("aliases", "w");
|
{
|
||||||
|
char zText[MAX_PATH];
|
||||||
|
sprintf(zText, "%s/aliases", basepath());
|
||||||
|
forwardFile = cfopen(zText, "w");
|
||||||
|
if (!forwardFile) return;
|
||||||
|
}
|
||||||
|
|
||||||
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) {
|
||||||
|
@ -3088,13 +3100,16 @@ report_summary(summary * s, summary * o, boolean full)
|
||||||
faction * f;
|
faction * f;
|
||||||
int nmrs[ORDERGAP];
|
int nmrs[ORDERGAP];
|
||||||
|
|
||||||
|
{
|
||||||
|
char zText[MAX_PATH];
|
||||||
if (full) {
|
if (full) {
|
||||||
F = cfopen("parteien.full", "w");
|
sprintf(zText, "%s/parteien.full", basepath());
|
||||||
} else {
|
} else {
|
||||||
F = cfopen("parteien", "w");
|
sprintf(zText, "%s/parteien.full", basepath());
|
||||||
}
|
}
|
||||||
|
F = cfopen(zText, "w");
|
||||||
if (!F) return;
|
if (!F) return;
|
||||||
|
}
|
||||||
printf("Schreibe Zusammenfassung (parteien)...\n");
|
printf("Schreibe Zusammenfassung (parteien)...\n");
|
||||||
fprintf(F, "%s\n%s\n\n", global.gamename, gamedate2());
|
fprintf(F, "%s\n%s\n\n", global.gamename, gamedate2());
|
||||||
fprintf(F, "Auswertung Nr: %d\n", turn);
|
fprintf(F, "Auswertung Nr: %d\n", turn);
|
||||||
|
@ -3199,21 +3214,31 @@ report_summary(summary * s, summary * o, boolean full)
|
||||||
#ifdef PLAYER_CSV
|
#ifdef PLAYER_CSV
|
||||||
region * r;
|
region * r;
|
||||||
#endif
|
#endif
|
||||||
FILE * F = cfopen("adressen", "w");
|
FILE * F;
|
||||||
|
char zText[MAX_PATH];
|
||||||
|
if (full) {
|
||||||
|
sprintf(zText, "%s/adressen", basepath());
|
||||||
|
F = cfopen(zText, "w");
|
||||||
|
}
|
||||||
if (!F) return;
|
if (!F) return;
|
||||||
printf("Schreibe Liste der Adressen (adressen)...\n");
|
printf("Schreibe Liste der Adressen (adressen)...\n");
|
||||||
writeadresses("adressen");
|
writeadresses("adressen");
|
||||||
writeforward();
|
writeforward();
|
||||||
fclose(F);
|
fclose(F);
|
||||||
|
|
||||||
F = cfopen("datum", "w");
|
{
|
||||||
|
sprintf(zText, "%s/datum", basepath());
|
||||||
|
F = cfopen(zText, "w");
|
||||||
|
}
|
||||||
if (!F) return;
|
if (!F) return;
|
||||||
printf("Schreibe Datum (datum)...\n");
|
printf("Schreibe Datum (datum)...\n");
|
||||||
fputs(gamedate2(), F);
|
fputs(gamedate2(), F);
|
||||||
fclose(F);
|
fclose(F);
|
||||||
#ifdef PLAYER_CSV
|
#ifdef PLAYER_CSV
|
||||||
F = cfopen("players", "w");
|
{
|
||||||
|
strcpy(zText, "%s/players", basepath());
|
||||||
|
F = cfopen(zText, "w");
|
||||||
|
}
|
||||||
if (!F) return;
|
if (!F) return;
|
||||||
printf("Schreibe Spielerliste (players)...\n");
|
printf("Schreibe Spielerliste (players)...\n");
|
||||||
r = findregion(0, 0);
|
r = findregion(0, 0);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: eressea.c,v 1.3 2001/01/27 18:15:32 enno Exp $
|
* $Id: eressea.c,v 1.4 2001/01/28 08:50:46 enno 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)
|
||||||
|
@ -1940,8 +1940,11 @@ remove_empty_factions(void)
|
||||||
{
|
{
|
||||||
faction **fp, *f3;
|
faction **fp, *f3;
|
||||||
FILE *dofp;
|
FILE *dofp;
|
||||||
|
char zText[MAX_PATH];
|
||||||
|
|
||||||
dofp = fopen("dropouts", "a");
|
sprintf(zText, "%s/dropouts", basepath());
|
||||||
|
|
||||||
|
dofp = fopen(zText, "a");
|
||||||
|
|
||||||
for (fp = &factions; *fp;) {
|
for (fp = &factions; *fp;) {
|
||||||
faction * f = *fp;
|
faction * f = *fp;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: config.h,v 1.2 2001/01/26 16:19:38 enno Exp $
|
* $Id: config.h,v 1.3 2001/01/28 08:50:45 enno 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,9 +213,9 @@ extern char * strdup(const char *s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# define PATH_MAX _MAX_PATH
|
# define MAX_PATH _MAX_PATH
|
||||||
#elif !defined(PATH_MAX)
|
#elif !defined(MAX_PATH)
|
||||||
# define PATH_MAX 1024
|
# define MAX_PATH 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**** ****
|
/**** ****
|
||||||
|
|
Loading…
Reference in New Issue