Utilities & Miscellaneous

Utility functions (mostly string).

Author
Stephen Brennan
Date
Created Friday, 10 July 2015
Copyright
Copyright (c) 2015-2016, Stephen Brennan. Released under the Revised BSD License. See LICENSE.txt for details.

Functions

wchar_t* smb_read_linew(FILE * file, smb_status * status)

Read a line of wide character input from the given file.

Read a line of input into a dynamically allocated buffer. The buffer is allocated by this function. It will contain the line, WITHOUT newline or EOF characters. The size of the buffer will not be the same size as the string.

Return
A buffer containing the line.
Parameters
  • file: The stream to read from, typically stdin.
  • status: Status variable.

char* smb_read_line(FILE * file, smb_status * status)

Read a line of character input from the given file.

Read a line of input into a dynamically allocated buffer. The buffer is allocated by this function. It will contain the line, WITHOUT newline or EOF characters. The size of the buffer will not be the same size as the string.

Return
A buffer containing the line.
Parameters
  • file: The stream to read from, typically stdin.
  • status: Status variable.