summaryrefslogtreecommitdiff
path: root/src/nolocale.h
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-03-29 17:00:48 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2016-03-31 17:44:25 +0200
commitc5a62b5490c45995eb2192d0ca8d7acdb9ee35fe (patch)
tree35ca7b13a6fe7bb946d91d138e25d01dafc7e8a9 /src/nolocale.h
parentb58bd2842d411c60c574e8ac72be520f48a8cd92 (diff)
Reformatted minor headers
Diffstat (limited to 'src/nolocale.h')
-rw-r--r--src/nolocale.h49
1 files changed, 23 insertions, 26 deletions
diff --git a/src/nolocale.h b/src/nolocale.h
index 4d6fc75..ec49ec6 100644
--- a/src/nolocale.h
+++ b/src/nolocale.h
@@ -24,55 +24,52 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_NOLOCALE_H__
-#define __DRUMGIZMO_NOLOCALE_H__
+#pragma once
#include <locale.h>
#include <stdarg.h>
-static inline double atof_nol(const char *nptr)
+static inline double atof_nol(const char* nptr)
{
double res;
- const char *locale = setlocale(LC_NUMERIC, "C");
+ const char* locale = setlocale(LC_NUMERIC, "C");
- res = atof(nptr);
+ res = atof(nptr);
- setlocale(LC_NUMERIC, locale);
+ setlocale(LC_NUMERIC, locale);
return res;
}
-static inline int sprintf_nol(char *str, const char *format, ...)
+static inline int sprintf_nol(char* str, const char* format, ...)
{
- int ret;
+ int ret;
- const char *locale = setlocale(LC_NUMERIC, "C");
+ const char* locale = setlocale(LC_NUMERIC, "C");
- va_list vl;
- va_start(vl, format);
- ret = vsprintf(str, format, vl);
- va_end(vl);
+ va_list vl;
+ va_start(vl, format);
+ ret = vsprintf(str, format, vl);
+ va_end(vl);
- setlocale(LC_NUMERIC, locale);
+ setlocale(LC_NUMERIC, locale);
- return ret;
+ return ret;
}
-static inline int snprintf_nol(char *str, size_t size, const char *format, ...)
+static inline int snprintf_nol(char* str, size_t size, const char* format, ...)
{
- int ret;
+ int ret;
- const char *locale = setlocale(LC_NUMERIC, "C");
+ const char* locale = setlocale(LC_NUMERIC, "C");
- va_list vl;
- va_start(vl, format);
- ret = vsnprintf(str, size, format, vl);
- va_end(vl);
+ va_list vl;
+ va_start(vl, format);
+ ret = vsnprintf(str, size, format, vl);
+ va_end(vl);
- setlocale(LC_NUMERIC, locale);
+ setlocale(LC_NUMERIC, locale);
- return ret;
+ return ret;
}
-
-#endif/*__DRUMGIZMO_NOLOCALE_H__*/