#include <string.h>
#include "ccp4_types.h"
#include "library_file.h"
Go to the source code of this file.
Functions | |
size_t | ccp4_utils_flength (char *, int) |
int | ccp4_utils_translate_mode_float (float *, const void *, int, int) |
void | ccp4_utils_fatal (const char *) |
void | ccp4_utils_print (const char *message) |
int | ccp4_utils_setenv (char *) |
int | ccp4_utils_outbuf (void) |
int | ccp4_utils_noinpbuf (void) |
union float_uint_uchar | ccp4_nan () |
int | ccp4_utils_isnan (const union float_uint_uchar *) |
void | ccp4_utils_bml (int, union float_uint_uchar *) |
void | ccp4_utils_wrg (int, union float_uint_uchar *, float *) |
void | ccp4_utils_hgetlimits (int *, float *) |
int | ccp4_utils_mkdir (const char *, const char *) |
int | ccp4_utils_chmod (const char *, const char *) |
void * | ccp4_utils_malloc (size_t) |
void * | ccp4_utils_realloc (void *, size_t) |
void * | ccp4_utils_calloc (size_t, size_t) |
int | ccp4_file_size (const char *) |
char * | ccp4_utils_username (void) |
char * | ccp4_utils_basename (char *filename) |
char * | ccp4_utils_pathname (char *filename) |
char * | ccp4_utils_extension (char *filename) |
char * | ccp4_utils_joinfilenames (char *dir, char *file) |
void | ccp4_utils_idate (int *) |
char * | ccp4_utils_date (char *) |
void | ccp4_utils_itime (int *) |
char * | ccp4_utils_time (char *) |
float | ccp4_utils_etime (float *) |
union float_uint_uchar ccp4_nan | ( | ) | [write] |
Return floating point representation of NaN
References float_uint_uchar::i.
Referenced by ccp4_lrreff(), and MtzAddColumn().
char* ccp4_utils_basename | ( | char * | filename | ) |
Extracts the basename from a full file name. Separators for directories and extensions are OS-specific.
filename | full file name string. |
References ccp4_utils_malloc().
Referenced by ccp4fyp(), and ccp4setenv().
void* ccp4_utils_calloc | ( | size_t | nelem, | |
size_t | elsize | |||
) |
Wrapper for the calloc function, which adds some error trapping.
Referenced by MtzCallocHist().
int ccp4_utils_chmod | ( | const char * | path, | |
const char * | cmode | |||
) |
Change protection mode on a file.
char* ccp4_utils_date | ( | char * | date | ) |
Return day, month and year printed in a string.
date | string to receive the date information. The string must have size >= 11. |
References ccp4_utils_idate().
Referenced by ccp4_banner().
char* ccp4_utils_extension | ( | char * | filename | ) |
Extracts the extension from a full file name. Separators for directories and extensions are OS-specific.
filename | full file name string. |
References ccp4_utils_malloc().
Referenced by ccp4setenv().
size_t ccp4_utils_flength | ( | char * | s, | |
int | len | |||
) |
Gets the length of a Fortran string with trailing blanks removed.
void ccp4_utils_hgetlimits | ( | int * | IValueNotDet, | |
float * | ValueNotDet | |||
) |
Define numbers representing integer max and floating point max.
int ccp4_utils_isnan | ( | const union float_uint_uchar * | realnum | ) |
Check if a number is NaN
References ccp4_fatal(), and float_uint_uchar::i.
Referenced by ccp4_ismnf().
char* ccp4_utils_joinfilenames | ( | char * | dir, | |
char * | file | |||
) |
Joins a leading directory with a filename. Separators for directories and extensions are OS-specific.
dir | directory path. | |
file | file name string. |
References ccp4_utils_malloc().
Referenced by ccp4fyp().
void* ccp4_utils_malloc | ( | size_t | size | ) |
Wrapper for the malloc function, which adds some error trapping.
Referenced by ccp4_lrassn(), ccp4_lrreff(), ccp4_lrrefl(), ccp4_lwassn(), ccp4_parse(), ccp4_parse_comments(), ccp4_parse_delimiters(), ccp4_parse_start(), ccp4_parser(), ccp4_spgrp_equal(), ccp4_utils_basename(), ccp4_utils_extension(), ccp4_utils_joinfilenames(), ccp4_utils_pathname(), ccp4_utils_setenv(), ccp4fyp(), ccp4setenv(), ccp4spg_check_symm_cell(), ccp4spg_load_spacegroup(), ccpputenv(), mat4_to_recip_symop(), MtzAddDataset(), MtzAddXtal(), MtzColPath(), MtzGet(), MtzMalloc(), MtzMallocBatch(), MtzMallocCol(), MtzSetPath(), and MtzXtalPath().
int ccp4_utils_mkdir | ( | const char * | path, | |
const char * | cmode | |||
) |
Make a directory in the computer filesystem.
int ccp4_utils_noinpbuf | ( | void | ) |
Turn off buffering of input stream.
int ccp4_utils_outbuf | ( | void | ) |
Alter buffering behaviour of stdout.
char* ccp4_utils_pathname | ( | char * | filename | ) |
Extracts the pathname from a full file name. Separators for directories and extensions are OS-specific.
filename | full file name string. |
References ccp4_utils_malloc().
Referenced by ccp4fyp(), and ccp4setenv().
void ccp4_utils_print | ( | const char * | message | ) |
Print message on stdout.
void* ccp4_utils_realloc | ( | void * | ptr, | |
size_t | size | |||
) |
Wrapper for the realloc function, which adds some error trapping.
Referenced by ccp4fyp(), and ccp4setenv().
int ccp4_utils_setenv | ( | char * | str | ) |
Set variable in the environment
References ccp4_errno, and ccp4_utils_malloc().
Referenced by ccpputenv().
char* ccp4_utils_time | ( | char * | time | ) |
Alternative to ccp4_utils_itime with time as character string.
time | Character string of form HH:MM:SS |
References ccp4_utils_itime().
Referenced by ccp4_banner().
int ccp4_utils_translate_mode_float | ( | float * | out, | |
const void * | buffer, | |||
int | dim, | |||
int | mode | |||
) |
char* ccp4_utils_username | ( | void | ) |
Return the user's login name. Note that getlogin only works for processes attached to a terminal (and hence won't work from the GUI). In these instances use getpwuid instead.
Referenced by ccp4_banner().