23 |
/* Validate API. */ |
/* Validate API. */ |
24 |
#include "entries.h" |
#include "entries.h" |
25 |
|
|
26 |
|
/* GNULIB */ |
27 |
|
#include "getline.h" |
28 |
|
|
29 |
/* CVS */ |
/* CVS */ |
30 |
|
#include "base.h" |
31 |
|
|
32 |
#include "cvs.h" |
#include "cvs.h" |
|
#include "getline.h" |
|
33 |
|
|
34 |
static Node *AddEntryNode (List * list, Entnode *entnode); |
static Node *AddEntryNode (List * list, Entnode *entnode); |
35 |
|
|
168 |
|
|
169 |
/* |
/* |
170 |
* Removes the argument file from the Entries file if necessary. |
* Removes the argument file from the Entries file if necessary. |
171 |
|
* Deletes the base file, if it existed. |
172 |
*/ |
*/ |
173 |
void |
void |
174 |
Scratch_Entry (List *list, const char *fname) |
Scratch_Entry (List *list, const char *fname) |
182 |
{ |
{ |
183 |
if (!noexec) |
if (!noexec) |
184 |
{ |
{ |
185 |
|
Entnode *e = node->data; |
186 |
|
base_remove (fname, e->version); |
187 |
|
|
188 |
entfilename = CVSADM_ENTLOG; |
entfilename = CVSADM_ENTLOG; |
189 |
entfile = xfopen (entfilename, "a"); |
entfile = xfopen (entfilename, "a"); |
190 |
|
|
220 |
Entnode *entnode; |
Entnode *entnode; |
221 |
Node *node; |
Node *node; |
222 |
|
|
223 |
|
TRACE (TRACE_FUNCTION, "Register(%s, %s, %s%s%s, %s, %s %s)", |
224 |
|
fname, vn, ts ? ts : "", |
225 |
|
ts_conflict ? "+" : "", ts_conflict ? ts_conflict : "", |
226 |
|
options, tag ? tag : "", date ? date : ""); |
227 |
|
|
228 |
#ifdef SERVER_SUPPORT |
#ifdef SERVER_SUPPORT |
229 |
if (server_active) |
if (server_active) |
230 |
{ |
{ |
232 |
} |
} |
233 |
#endif |
#endif |
234 |
|
|
|
TRACE (TRACE_FUNCTION, "Register(%s, %s, %s%s%s, %s, %s %s)", |
|
|
fname, vn, ts ? ts : "", |
|
|
ts_conflict ? "+" : "", ts_conflict ? ts_conflict : "", |
|
|
options, tag ? tag : "", date ? date : ""); |
|
|
|
|
235 |
entnode = Entnode_Create (ENT_FILE, fname, vn, ts, options, tag, date, |
entnode = Entnode_Create (ENT_FILE, fname, vn, ts, options, tag, date, |
236 |
ts_conflict); |
ts_conflict); |
237 |
node = AddEntryNode (list, entnode); |
node = AddEntryNode (list, entnode); |