MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / copy_terminate

Function copy_terminate

src/msgs/build_file.cpp:192–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190
191
192static char* copy_terminate(char* dest, const char* src, size_t bufsize)
193{
194/**************************************
195 *
196 * c o p y _ t e r m i n a t e
197 *
198 **************************************
199 *
200 * Functional description
201 * Do the same as strncpy but ensure the null terminator is written.
202 * To avoid putting here #include "../common/utils_proto.h"
203 *
204 **************************************/
205 if (!bufsize) // Was it a joke?
206 return dest;
207
208 --bufsize;
209 strncpy(dest, src, bufsize);
210 dest[bufsize] = 0;
211 return dest;
212}
213
214
215static void do_codes(const TEXT* gen_c_filename, const TEXT* gen_pas_filename)

Callers 1

CLIB_ROUTINE mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected