From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/common_8h.html | 197 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 docs/doxygen/nel/common_8h.html (limited to 'docs/doxygen/nel/common_8h.html') diff --git a/docs/doxygen/nel/common_8h.html b/docs/doxygen/nel/common_8h.html new file mode 100644 index 00000000..77529a57 --- /dev/null +++ b/docs/doxygen/nel/common_8h.html @@ -0,0 +1,197 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

common.h File Reference

common algorithms, constants and functions. +More... +

+#include "nel/misc/types_nl.h"
+#include <ctype.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <math.h>
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <sstream>
+#include <unistd.h>
+#include <sys/types.h>
+ +

+Go to the source code of this file. + + + + + + +

Namespaces

namespace  NLMISC

Defines

#define NLMISC_CONVERT_VARGS(_dest, _format, _size)
 This macro converts variable arguments into C string (zero terminated string). More...

#define new   NL_NEW
+


Detailed Description

+common algorithms, constants and functions. +

+

+Id:
+ common.h,v 1.51 2002/11/15 16:54:18 lecroart Exp
+

+ +

+Definition in file common.h.


Define Documentation

+

+ + + + +
+ + +
#define new   NL_NEW +
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + +
#define NLMISC_CONVERT_VARGS_dest,
_format,
_size   +
+
+ + + + + +
+   + + +

+Value:

char _cstring[_size]; \
+va_list _args; \
+va_start (_args, _format); \
+int _res = vsnprintf (_cstring, _size-1, _format, _args); \
+if (_res == -1 || _res == _size-1) \
+{ \
+        _cstring[_size-1] = '\0'; \
+} \
+va_end (_args); \
+_dest = _cstring
This macro converts variable arguments into C string (zero terminated string). +

+This function takes care to avoid buffer overflow. +

+Example:

        void MyFunction(const char *format, ...)
+        {
+                string str;
+                NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize);
+                // str contains the result of the conversion
+        }
+ *
+
+Parameters:
+ + + +
_dest  +string or char* that contains the result of the convertion
_format  +format of the string, it must be the last argument before the '...' + \param _size size of the buffer that will contain the C string
+
+

+Definition at line 94 of file common.h. +

+Referenced by NLMISC::CLog::display, NLMISC::CLog::displayNL, NLMISC::CLog::displayRaw, NLMISC::CLog::displayRawNL, NLMISC::Exception::Exception, NLMISC::CLog::forceDisplayRaw, NL3D::CTextContextUser::printfAt, NL3D::CTextContext::printfAt, NL3D::CTextContextUser::render3D, NL3D::CTextContextUser::textPush, and NL3D::CTextContext::textPush.

+ + + +
                                                                                                                                                                    +

+ + -- cgit v1.2.1