First version of automatic ID and COUNT columns, to discuss (for now,
columns created when NUC_SEQ views are closed if the columns don't already exist)
This commit is contained in:
30
src/utils.h
30
src/utils.h
@ -17,6 +17,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "obidms.h"
|
||||
#include "obitypes.h"
|
||||
|
||||
|
||||
#define FORMATTED_TIME_LENGTH (1024) /**< The length allocated for the character string containing a formatted date.
|
||||
@ -25,6 +26,35 @@
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Counts the number of digits of a number.
|
||||
*
|
||||
* @param i The number.
|
||||
*
|
||||
* @returns The number of digits of the number.
|
||||
*
|
||||
* @since July 2017
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
int digit_count(index_t i);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Builds a word from a prefix and an index, with the form prefix_index.
|
||||
*
|
||||
* @warning The returned pointer has to be freed by the caller.
|
||||
*
|
||||
* @param prefix The prefix for the word.
|
||||
* @param idx The index to use as suffix.
|
||||
*
|
||||
* @returns The built word.
|
||||
*
|
||||
* @since July 2017
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
char* build_word_with_idx(const char* prefix, index_t idx);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Counts the number of files and directories in a directory.
|
||||
*
|
||||
|
Reference in New Issue
Block a user