/usr/include/bibutils/newstr.h is in libbibutils-dev 4.12-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | /*
* newstring.h
*
* Copyright (c) Chris Putnam 1999-2009
*
* Source code released under the GPL
*
*/
#ifndef NEWSTR_H
#define NEWSTR_H
#include <stdio.h>
typedef struct newstr {
char *data;
unsigned long dim;
unsigned long len;
} newstr;
newstr *newstr_new ( void );
void newstr_init ( newstr *s );
void newstr_empty ( newstr *s );
void newstr_free ( newstr *s );
void newstrs_init ( newstr *s, ... );
void newstrs_empty ( newstr *s, ... );
void newstrs_free ( newstr *s, ... );
newstr *newstr_strdup ( char *buf );
void newstr_addchar ( newstr *s, char newchar );
void newstr_strcat ( newstr *s, char *addstr );
void newstr_newstrcat ( newstr *s, newstr *old );
void newstr_segcat ( newstr *s, char *startat, char *endat );
void newstr_prepend ( newstr *s, char *addstr );
void newstr_strcpy ( newstr *s, char *addstr );
void newstr_newstrcpy ( newstr *s, newstr *old );
void newstr_segcpy ( newstr *s, char *startat, char *endat );
void newstr_segdel ( newstr *s, char *startat, char *endat );
void newstr_fprintf ( FILE *fp, newstr *s );
int newstr_fget ( FILE *fp, char *buf, int bufsize, int *pbufpos,
newstr *outs );
int newstr_findreplace ( newstr *s, char *find, char *replace );
void newstr_toupper ( newstr *s );
void newstr_trimendingws( newstr *s );
void newstr_swapstrings ( newstr *s1, newstr *s2 );
/* NEWSTR_PARANOIA
*
* set to clear memory before it is freed or reallocated
* note that this is slower...may be important if string
* contains sensitive information
*/
#undef NEWSTR_PARANOIA
#endif
|