can we commit across directories? src/detect.c and util/makedefs.c

This commit is contained in:
keni
2011-12-29 23:29:43 +00:00
parent 03b4813be3
commit 6120c3dd0b
2 changed files with 12 additions and 14 deletions
+2 -2
View File
@@ -867,7 +867,7 @@ struct obj *obj;
case 3 : if (!resists_blnd(&youmonst)) { case 3 : if (!resists_blnd(&youmonst)) {
pline("%s your vision!", Tobjnam(obj, "damage")); pline("%s your vision!", Tobjnam(obj, "damage"));
make_blinded((Blinded & TIMEOUT) + (long)rnd(100), FALSE); make_blinded((Blinded & TIMEOUT) + (long)rnd(100), FALSE);
if (!Blind) Your(vision_clears); if (!Blind) Your1(vision_clears);
} else { } else {
pline("%s your vision.", Tobjnam(obj, "assault")); pline("%s your vision.", Tobjnam(obj, "assault"));
You("are unaffected!"); You("are unaffected!");
@@ -919,7 +919,7 @@ struct obj *obj;
ch = yn_function("What do you look for?", (char *)0, '\0'); ch = yn_function("What do you look for?", (char *)0, '\0');
/* Don't filter out ' ' here; it has a use */ /* Don't filter out ' ' here; it has a use */
if ((ch != def_monsyms[S_GHOST].sym) && index(quitchars,ch)) { if ((ch != def_monsyms[S_GHOST].sym) && index(quitchars,ch)) {
if (flags.verbose) pline(Never_mind); if (flags.verbose) pline1(Never_mind);
return; return;
} }
You("peer into %s...", the(xname(obj))); You("peer into %s...", the(xname(obj)));
+10 -12
View File
@@ -1153,7 +1153,7 @@ do_date()
* won't get clobbered when downstream projects import * won't get clobbered when downstream projects import
* this file into something more modern. */ * this file into something more modern. */
Fprintf(ofp,"/*\tSCCS Id: @(#)date.h\t3.5\t2004/02/01 */\n\n"); Fprintf(ofp,"/*\tSCCS Id: @(#)date.h\t3.5\t2004/02/01 */\n\n");
Fprintf(ofp,Dont_Edit_Code); Fprintf(ofp,"%s",Dont_Edit_Code);
(void) time(&clocktim); (void) time(&clocktim);
Strcpy(cbuf, ctime(&clocktim)); Strcpy(cbuf, ctime(&clocktim));
@@ -1530,7 +1530,7 @@ do_options()
(winsyscnt == 2) ? ((i == 0) ? " and" : "") : (winsyscnt == 2) ? ((i == 0) ? " and" : "") :
(i < winsyscnt - 2) ? "," : (i < winsyscnt - 2) ? "," :
((i == winsyscnt - 2) ? ", and" : ""); ((i == winsyscnt - 2) ? ", and" : "");
Fprintf(ofp, sep), length += strlen(sep); Fprintf(ofp, "%s", sep), length += strlen(sep);
} }
if (winsyscnt > 1) if (winsyscnt > 1)
Fprintf(ofp, "\n%swith a default of %s.", Fprintf(ofp, "\n%swith a default of %s.",
@@ -1587,13 +1587,11 @@ do_data()
#endif #endif
Sprintf(eos(filename), DATA_TEMPLATE, DATA_FILE); Sprintf(eos(filename), DATA_TEMPLATE, DATA_FILE);
Sprintf(infile, DATA_IN_TEMPLATE, DATA_FILE); Sprintf(infile, DATA_IN_TEMPLATE, DATA_FILE);
Strcat(infile,
#ifdef SHORT_FILENAMES #ifdef SHORT_FILENAMES
".bas" Strcat(infile, ".bas");
#else #else
".base" Strcat(infile, ".base");
#endif #endif
);
if (!(ifp = fopen(infile, RDTMODE))) { /* data.base */ if (!(ifp = fopen(infile, RDTMODE))) { /* data.base */
perror(infile); perror(infile);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
@@ -1904,7 +1902,7 @@ do_dungeon()
perror(filename); perror(filename);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
Fprintf(ofp,Dont_Edit_Data); Fprintf(ofp,"%s",Dont_Edit_Data);
tfp = getfp(DATA_TEMPLATE, "grep.tmp", WRTMODE); tfp = getfp(DATA_TEMPLATE, "grep.tmp", WRTMODE);
grep0(ifp, tfp); grep0(ifp, tfp);
@@ -2031,7 +2029,7 @@ do_monstr()
perror(filename); perror(filename);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
Fprintf(ofp,Dont_Edit_Code); Fprintf(ofp,"%s",Dont_Edit_Code);
Fprintf(ofp,"#include \"config.h\"\n"); Fprintf(ofp,"#include \"config.h\"\n");
Fprintf(ofp,"\nconst int monstr[] = {\n"); Fprintf(ofp,"\nconst int monstr[] = {\n");
for (ptr = &mons[0], j = 0; ptr->mlet; ptr++) { for (ptr = &mons[0], j = 0; ptr->mlet; ptr++) {
@@ -2072,7 +2070,7 @@ do_permonst()
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
Fprintf(ofp,"/*\tSCCS Id: @(#)pm.h\t3.5\t2004/02/01 */\n\n"); Fprintf(ofp,"/*\tSCCS Id: @(#)pm.h\t3.5\t2004/02/01 */\n\n");
Fprintf(ofp,Dont_Edit_Code); Fprintf(ofp,"%s",Dont_Edit_Code);
Fprintf(ofp,"#ifndef PM_H\n#define PM_H\n"); Fprintf(ofp,"#ifndef PM_H\n#define PM_H\n");
if (strcmp(mons[0].mname, "playermon") != 0) if (strcmp(mons[0].mname, "playermon") != 0)
@@ -2457,7 +2455,7 @@ do_objs()
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
Fprintf(ofp,"/*\tSCCS Id: @(#)onames.h\t3.5\t2004/02/01 */\n\n"); Fprintf(ofp,"/*\tSCCS Id: @(#)onames.h\t3.5\t2004/02/01 */\n\n");
Fprintf(ofp,Dont_Edit_Code); Fprintf(ofp,"%s",Dont_Edit_Code);
Fprintf(ofp,"#ifndef ONAMES_H\n#define ONAMES_H\n\n"); Fprintf(ofp,"#ifndef ONAMES_H\n#define ONAMES_H\n\n");
for(i = 0; !i || objects[i].oc_class != ILLOBJ_CLASS; i++) { for(i = 0; !i || objects[i].oc_class != ILLOBJ_CLASS; i++) {
@@ -2612,7 +2610,7 @@ do_vision()
perror(filename); perror(filename);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
Fprintf(ofp,Dont_Edit_Code); Fprintf(ofp,"%s",Dont_Edit_Code);
Fprintf(ofp,"#ifdef VISION_TABLES\n"); Fprintf(ofp,"#ifdef VISION_TABLES\n");
#ifdef VISION_TABLES #ifdef VISION_TABLES
H_close_gen(); H_close_gen();
@@ -2637,7 +2635,7 @@ do_vision()
Unlink(filename); Unlink(filename);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
Fprintf(ofp,Dont_Edit_Code); Fprintf(ofp,"%s",Dont_Edit_Code);
Fprintf(ofp,"#include \"config.h\"\n"); Fprintf(ofp,"#include \"config.h\"\n");
Fprintf(ofp,"#ifdef VISION_TABLES\n"); Fprintf(ofp,"#ifdef VISION_TABLES\n");
Fprintf(ofp,"#include \"vis_tab.h\"\n"); Fprintf(ofp,"#include \"vis_tab.h\"\n");