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
32
33
34
35
36
37
38
39
40
41
|
$NetBSD: patch-ac,v 1.1 2001/10/15 17:09:44 tron Exp $
--- cal_tcl.C.orig Fri Jun 30 15:23:29 2000
+++ cal_tcl.C Mon Oct 15 19:04:22 2001
@@ -16,6 +16,9 @@
#include "calfile.h"
#include "uid.h"
+static char One[2] = "1";
+static char Zero[2] = "0";
+
implementArray(FileList,CalFile*)
Calendar_Tcl::Calendar_Tcl(Tcl_Interp* tcl, char const* h, char const* f)
@@ -517,7 +520,7 @@
TCL_Error(tcl, "no such calendar");
}
- TCL_Return(tcl, file->GetCalendar()->ReadOnly() ? "1" : "0");
+ TCL_Return(tcl, file->GetCalendar()->ReadOnly() ? One : Zero);
}
static int cal_dirty(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]){
@@ -528,7 +531,7 @@
TCL_Error(tcl, "no such calendar");
}
- TCL_Return(tcl, (file->IsModified() ? "1" : "0"));
+ TCL_Return(tcl, (file->IsModified() ? One : Zero));
}
static int cal_stale(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]){
@@ -539,7 +542,7 @@
TCL_Error(tcl, "no such calendar");
}
- TCL_Return(tcl, (file->FileHasChanged() ? "1" : "0"));
+ TCL_Return(tcl, (file->FileHasChanged() ? One : Zero));
}
static int cal_save(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]){
|