-/*
+/*
Unix SMB/CIFS implementation.
Utility functions for Samba
Copyright (C) Andrew Tridgell 1992-1999
Copyright (C) Jelmer Vernooij 2005
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
_PUBLIC_ void dump_core_setup(const char *progname, const char *logfile);
/**
- register a fault handler.
+ register a fault handler.
Should only be called once in the execution of smbd.
*/
_PUBLIC_ bool register_fault_handler(const char *name, void (*fault_handler)(int sig));
**/
_PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t strhex_len);
-/**
- * Parse a hex string and return a data blob.
+/**
+ * Parse a hex string and return a data blob.
*/
_PUBLIC_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ;
_PUBLIC_ char *rfc1738_unescape(char *buf);
/**
- * rfc1738_escape_part
+ * rfc1738_escape_part
* Returns a static buffer that contains the RFC
* 1738 compliant, escaped version of the given url segment. (escapes
* unsafe, reserved and % chars) It would mangle the :// in http://,
/**
Set a boolean variable from the text value stored in the passed string.
- Returns true in success, false if the passed string does not correctly
+ Returns true in success, false if the passed string does not correctly
represent a boolean.
**/
_PUBLIC_ bool set_boolean(const char *boolean_string, bool *boolean);
_PUBLIC_ bool conv_str_bool(const char * str, bool * val);
/**
- * Convert a size specification like 16K into an integral number of bytes.
+ * Convert a size specification like 16K into an integral number of bytes.
**/
_PUBLIC_ bool conv_str_size_error(const char * str, uint64_t * val);
/**
- * Read one line (data until next newline or eof) and allocate it
+ * Read one line (data until next newline or eof) and allocate it
*/
_PUBLIC_ char *afdgets(int fd, TALLOC_CTX *mem_ctx, size_t hint);
/**
load a file into memory and return an array of pointers to lines in the file
-must be freed with talloc_free().
+must be freed with talloc_free().
**/
_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
_PUBLIC_ bool file_save_mode(const char *fname, const void *packet,
size_t length, mode_t mode);
/**
- save a lump of data into a file. Mostly used for debugging
+ save a lump of data into a file. Mostly used for debugging
*/
_PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length);
_PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
/**
* Try to create the specified directory if it didn't exist.
*
- * @retval true if the directory already existed and has the right permissions
+ * @retval true if the directory already existed and has the right permissions
* or was successfully created.
*/
_PUBLIC_ bool directory_create_or_exist(const char *dname, mode_t dir_perms);
/**
* Write a password to the log file.
*
- * @note Only actually does something if DEBUG_PASSWORD was defined during
+ * @note Only actually does something if DEBUG_PASSWORD was defined during
* compile-time.
*/
_PUBLIC_ void dump_data_pw(const char *msg, const uint8_t * data, size_t len);
/**
* see if a range of memory is all zero. A NULL pointer is considered
- * to be all zero
+ * to be all zero
*/
_PUBLIC_ bool all_zero(const uint8_t *ptr, size_t size);
* Retrieve amount of free disk space.
* this does all of the system specific guff to get the free disk space.
* It is derived from code in the GNU fileutils package, but has been
- * considerably mangled for use here
+ * considerably mangled for use here
*
* results are returned in *dfree and *dsize, in 512 byte units
*/