blob: 38bd9ec3cd890aa28fb7b34bc80a78aa4cdfbbb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
diff -Naurp src/build.c src/build.c
--- src/build.c 2003-03-05 11:43:59.000000000 +0100
+++ src/build.c 2004-11-17 15:01:01.000000000 +0100
@@ -333,7 +333,7 @@ build(void)
(void) fprintf(stderr, "cscope: cannot open file %s\n", reffile);
myexit(1);
}
- if (invertedindex == YES && (postings = myfopen(temp1, "wb")) == NULL) {
+ if (invertedindex == YES && (postings = myfopen(temp1, "w+xb")) == NULL) {
cannotwrite(temp1);
cannotindex();
}
diff -Naurp src_old/display.c src/display.c
--- src/display.c 2003-09-04 17:54:02.000000000 +0200
+++ src/display.c 2004-11-17 15:01:01.000000000 +0100
@@ -754,13 +754,13 @@ BOOL
writerefsfound(void)
{
if (refsfound == NULL) {
- if ((refsfound = myfopen(temp1, "wb")) == NULL) {
+ if ((refsfound = myfopen(temp1, "w+xb")) == NULL) {
cannotopen(temp1);
return(NO);
}
} else {
(void) fclose(refsfound);
- if ( (refsfound = myfopen(temp1, "wb")) == NULL) {
+ if ( (refsfound = myfopen(temp1, "w+xb")) == NULL) {
postmsg("Cannot reopen temporary file");
return(NO);
}
|