aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdio/sscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/sscanf.c')
-rw-r--r--lib/libc/stdio/sscanf.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/libc/stdio/sscanf.c b/lib/libc/stdio/sscanf.c
index c793b86699cc..1c339eb5069b 100644
--- a/lib/libc/stdio/sscanf.c
+++ b/lib/libc/stdio/sscanf.c
@@ -5,6 +5,11 @@
* This code is derived from software contributed to Berkeley by
* Chris Torek.
*
+ * Copyright (c) 2011 The FreeBSD Foundation
+ * All rights reserved.
+ * Portions of this software were developed by David Chisnall
+ * under sponsorship from the FreeBSD Foundation.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -39,6 +44,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
+#include <xlocale.h>
#include "local.h"
int
@@ -52,3 +58,15 @@ sscanf(const char * __restrict str, char const * __restrict fmt, ...)
va_end(ap);
return (ret);
}
+int
+sscanf_l(const char * __restrict str, locale_t locale,
+ char const * __restrict fmt, ...)
+{
+ int ret;
+ va_list ap;
+
+ va_start(ap, fmt);
+ ret = vsscanf_l(str, locale, fmt, ap);
+ va_end(ap);
+ return (ret);
+}