diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2010-04-08 01:11:46 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2010-04-13 01:26:35 (GMT) |
commit | 74da141e618ef99959d509cb2e7be35a348a39db (patch) | |
tree | 88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/btowc.c | |
parent | c63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff) | |
download | monitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz |
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/btowc.c')
-rw-r--r-- | gl/btowc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* Convert unibyte character to wide character. | 1 | /* Convert unibyte character to wide character. |
2 | Copyright (C) 2008 Free Software Foundation, Inc. | 2 | Copyright (C) 2008, 2010 Free Software Foundation, Inc. |
3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
4 | 4 | ||
5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
@@ -21,6 +21,7 @@ | |||
21 | #include <wchar.h> | 21 | #include <wchar.h> |
22 | 22 | ||
23 | #include <stdio.h> | 23 | #include <stdio.h> |
24 | #include <stdlib.h> | ||
24 | 25 | ||
25 | wint_t | 26 | wint_t |
26 | btowc (int c) | 27 | btowc (int c) |
@@ -32,7 +33,7 @@ btowc (int c) | |||
32 | 33 | ||
33 | buf[0] = c; | 34 | buf[0] = c; |
34 | if (mbtowc (&wc, buf, 1) >= 0) | 35 | if (mbtowc (&wc, buf, 1) >= 0) |
35 | return wc; | 36 | return wc; |
36 | } | 37 | } |
37 | return WEOF; | 38 | return WEOF; |
38 | } | 39 | } |