Lines Matching defs:file

4  * The contents of this file are subject to the terms of the
6 * You may not use this file except in compliance with the License.
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
75 char *file;
107 add_msg(int setid, int msgid, char *msg, char *file, int line, int no_write)
112 if (lookup_msgid(si, msgid, msg, file, line)) {
115 add_msgid(si, msgid, msg, file, line, no_write);
118 add_setid(setid, msgid, msg, file, line, no_write);
123 is_writable(char *file)
127 if (stat(file, &buf) == -1)
130 if (access(file, W_OK) == 0)
137 write_msgfile(char *file)
144 if (is_writable(file) == FALSE) {
146 file);
154 if ((fp = fopen(file, mode)) == NULL) {
155 prg_err(gettext("cannot create \"%s\""), file);
166 /* AppendMode is already turned off if the file doesn't exist. */
208 if (mi->line && mi->file &&
212 basename(mi->file), mi->line);
228 if (mi->line && mi->file &&
232 basename(mi->file), mi->line);
269 lookup_msgid(SetID si, int msgid, char *msg, char *file, int line)
276 src_err(file, line, gettext(
282 mi->msg, mi->file, mi->line);
292 add_msgid(SetID si, int msgid, char *msg, char *file, int line, int no_write)
298 src_err(file, line, gettext("improper message number: %d"),
304 src_err(file, line, gettext("too large message number: %d"),
310 src_err(file, line, gettext("too long message text"));
330 newmi->file = ustrdup(file);
350 add_setid(int setid, int msgid, char *msg, char *file, int line, int no_write)
385 add_msgid(newsi, msgid, msg, file, line, no_write);
410 read_projfile(char *file)
415 if (file == NULL) {
419 if ((fp = fopen(file, "r")) == NULL) {
438 file, setid);
444 "warning: %s: missing or invalid entry"), file);
454 write_projfile(char *file)
459 if (is_writable(file) == FALSE) {
461 file);
465 if ((fp = fopen(file, "w")) == NULL) {
466 prg_err(gettext("cannot create \"%s\""), file);
496 get_msgid(char *file, int line, int setid, char *str)
517 src_err(file, line,
553 read_msgfile(char *file)
562 if ((fp = fopen(file, "r")) == NULL) {
563 prg_err(gettext("cannot open \"%s\""), file);
568 if (stat(file, &buf) == -1 && buf.st_size == 0) {
635 add_msg(setid, msgid, msg, file, line, TRUE);
666 add_msg(setid, msgid, ptr, file, line, TRUE);
818 src_err(char *file, int line, char *fmt, ...)
828 (void) fprintf(stderr, gettext("\"%s\", line %d: "), file, line);