Lines Matching +full:ext +full:- +full:gen
2 ** Copyright (c) 1999-2002 Proofpoint, Inc. and its suppliers.
10 #include <sm/gen.h>
11 SM_RCSID("@(#)$Id: smdb.c,v 8.59 2013-11-22 20:51:49 ca Exp $")
24 ** SMDB_MALLOC_DATABASE -- Allocates a database structure.
48 ** SMDB_FREE_DATABASE -- Unallocates a database structure.
51 ** database -- a SMDB_DATABASE pointer to deallocate.
66 ** SMDB_LOCKFILE -- lock a file using flock or (shudder) fcntl locking
69 ** fd -- the file descriptor of the file.
70 ** type -- type of the lock. Bits can be:
71 ** LOCK_EX -- exclusive lock.
72 ** LOCK_NB -- non-blocking.
110 ** On SunOS, if you are testing using -oQ/tmp/mqueue or
111 ** -oA/tmp/aliases or anything like that, and /tmp is mounted
129 filename, ext, fd, type, omode, euid);
149 filename, ext, fd, type, omode, euid);
160 ** SMDB_OPEN_DATABASE -- Opens a database.
167 ** database -- A pointer to a SMDB_DATABASE pointer where the
170 ** db_name -- The name of the database to open. Do not include
172 ** mode -- The mode to set on the database file or files.
173 ** mode_mask -- Mode bits that must match on an opened database.
174 ** sff -- Flags to safefile.
175 ** type -- The type of database to open. Supported types
177 ** user_info -- Information on the user to use for file
179 ** params -- Params specific to the database being opened.
184 ** SMDBE_OK -- Success.
252 ** SMDB_ADD_EXTENSION -- Adds an extension to a file name.
258 ** full_name -- The final file name.
259 ** max_full_name_len -- The max length for full_name.
260 ** db_name -- The name of the db.
261 ** extension -- The extension to add.
264 ** SMDBE_OK -- Success.
289 db_name[db_name_len - extension_len - 1] != '.' ||
290 strcmp(&db_name[db_name_len - extension_len], extension) != 0)
299 ** SMDB_LOCK_FILE -- Locks the database file.
304 ** lock_fd -- The resulting descriptor for the locked file.
305 ** db_name -- The name of the database without extension.
306 ** mode -- The open mode.
307 ** sff -- Flags to safefile.
308 ** extension -- The extension for the file.
311 ** SMDBE_OK -- Success, otherwise errno.
338 ** SMDB_UNLOCK_FILE -- Unlocks a file - via close()
341 ** lock_fd -- The descriptor for the locked file.
344 ** SMDBE_OK -- Success, otherwise errno.
360 ** SMDB_LOCK_MAP -- Locks a database.
363 ** database -- database description.
364 ** type -- type of the lock. Bits can be:
365 ** LOCK_EX -- exclusive lock.
366 ** LOCK_NB -- non-blocking.
369 ** SMDBE_OK -- Success, otherwise errno.
379 fd = database->smdb_lockfd(database);
387 ** SMDB_UNLOCK_MAP -- Unlocks a database
390 ** database -- database description.
393 ** SMDBE_OK -- Success, otherwise errno.
402 fd = database->smdb_lockfd(database);
410 ** SMDB_SETUP_FILE -- Gets db file ready for use.
416 ** db_name -- The name of the database without extension.
417 ** extension -- The extension.
418 ** sff -- Flags to safefile.
419 ** mode_mask -- Mode bits that must match.
420 ** user_info -- Information on the user to use for file
422 ** stat_info -- A place to put the stat info for the file.
424 ** SMDBE_OK -- Success, otherwise errno.
445 st = safefile(db_file_name, user_info->smdbu_id,
446 user_info->smdbu_group_id, user_info->smdbu_name,
454 ** SMDB_FILECHANGED -- Checks to see if a file changed.
461 ** db_name -- The name of the database without extension.
462 ** extension -- The extension.
463 ** db_fd -- A file descriptor for the database file.
464 ** stat_info -- An old stat_info.
466 ** SMDBE_OK -- Success, otherwise errno.
487 ** SMDB_PRINT_AVAILABLE_TYPES -- Prints the names of the available types.
490 ** ext - also show extension?
497 smdb_print_available_types(ext) in smdb_print_available_types() argument
498 bool ext; in smdb_print_available_types()
500 # define PEXT1 ((ext) ? ":" : "")
501 # define PEXT2(x) ((ext) ? x : "")
520 ** SMDB_IS_DB_TYPE -- Does a name match an available DB type?
523 ** type -- The name of the database type.
552 ** SMDB_DB_DEFINITION -- Given a database type, return database definition
559 ** type -- The name of the database type.
586 while (ptr != NULL && ptr->type != NULL)
588 if (strcmp(type, ptr->type) == 0)
589 return ptr->dbdef;