aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/iconv
Commit message (Collapse)AuthorAgeFilesLines
* usr.bin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-161-1/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+1
|
* iconv: only conditionally use ICONV_SET_DISCARD_ILSEQKyle Evans2022-08-111-3/+10
| | | | | | | | | | | If the -c flag is used, then we can set it with ICONV_SET_DISCARD_ILSEQ; otherwise, leave it alone. The user may have specified //IGNORE in the 'to' codeset specification, there's no reason we can't allow that but we'll currently turn it off. Reviewed by: thj Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D34342
* iconv(1): Add EXAMPLEFernando ApesteguĂ­a2020-11-291-0/+7
| | | | | | | | | | | Just a small example to show simple usage. Approved by: manpages (0mp@) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27385 Notes: svn path=/head/; revision=368160
* Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.Mariusz Zaborski2018-06-191-2/+2
| | | | | | | No functional change intended. Notes: svn path=/head/; revision=335395
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-05-091-0/+1
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=318000
* iconv(1): CapsicumifyConrad Meyer2016-12-161-17/+39
| | | | | | | | | | | | | | | | | | This takes the usual shortcut of only sandboxing the last input file. It's a first cut and this program will be easy to adapt to sandbox all files in the future. iconv(1) has been changed to only open the conversion descriptor once, since the input and output encodings are fixed over all inputs. Instead, the descriptor is simply reset after each use (documented in iconv(3) API). Reviewed by: no one, unfortunately Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7917 Notes: svn path=/head/; revision=310144
* META MODE: Update dependencies with 'the-lot' and add missing directories.Bryan Drewery2015-12-011-0/+18
| | | | | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291563
* Constify opt_f and opt_t and eliminate unneeded copying. This fixesXin LI2015-08-311-4/+4
| | | | | | | | | | memory leaks. Reported by: clang static analyzer MFC after: 2 weeks Notes: svn path=/head/; revision=287319
* Remove the const qualifier from iconv(3) to comply with POSIX:Tijl Coosemans2015-04-151-2/+1
| | | | | | | | | | | | | http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html Adjust all code that calls iconv. PR: 199099 Exp-run by: antoine MFC after: 2 weeks Notes: svn path=/head/; revision=281550
* Nothing in iconv(1) uses symbols from libcryptBaptiste Daroussin2014-11-051-3/+0
| | | | Notes: svn path=/head/; revision=274135
* - Make invalids variable local to do_conv such that it prints the numberTijl Coosemans2014-06-131-13/+14
| | | | | | | | | | | | | of invalid characters of the current file instead of an accumulated value. - Make do_conv return an error when invalid characters have been found. Return EXIT_FAILURE from main if any file contained invalid characters. This matches the behaviour of GNU iconv. - Mark usage with __dead2 attribute. - Make the long_options array const. Notes: svn path=/head/; revision=267439
* As a followup to r252547, propate const down the call stack.Peter Wemm2013-07-031-1/+1
| | | | Notes: svn path=/head/; revision=252583
* Let iconv build on -HEAD properly.Ed Schouten2013-05-231-2/+1
| | | | | | | | | - Add NO_WMISSING_VARIABLE_DECLARATIONS where we use Yacc/Lex. - Add variable declarations where possible. - Add missing static keyword. Notes: svn path=/head/; revision=250938
* Remove redundant assignments to WARNS.Ed Schouten2011-06-061-2/+0
| | | | | | | For these directories, WARNS is already implied to be 6. Notes: svn path=/head/; revision=222772
* Add the BSD-licensed Citrus iconv to the base system with default offGabor Kovesdan2011-02-253-0/+354
setting. It can be built by setting the WITH_ICONV knob. While this knob is unset, the library part, the binaries, the header file and the metadata files will not be built or installed so it makes no impact on the system if left turned off. This work is based on the iconv implementation in NetBSD but a great number of improvements and feature additions have been included: - Some utilities have been added. There is a conversion table generator, which can compare conversion tables to reference data generated by GNU libiconv. This helps ensuring conversion compatibility. - UTF-16 surrogate support and some endianness issues have been fixed. - The rather chaotic Makefiles to build metadata have been refactored and cleaned up, now it is easy to read and it is also easier to add support for new encodings. - A bunch of new encodings and encoding aliases have been added. - Support for 1->2, 1->3 and 1->4 mappings, which is needed for transliterating with flying accents as GNU does, like "u. - Lots of warnings have been fixed, the major part of the code is now WARNS=6 clean. - New section 1 and section 5 manual pages have been added. - Some GNU-specific calls have been implemented: iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into() - Support for GNU's //IGNORE suffix has been added. - The "-" argument for stdin is now recognized in iconv(1) as per POSIX. - The Big5 conversion module has been fixed. - The iconv.h header files is supposed to be compatible with the GNU version, i.e. sources should build with base iconv.h and GNU libiconv. It also includes a macro magic to deal with the char ** and const char ** incompatibility. - GNU compatibility: "" or "char" means the current local encoding in use - Various cleanups and style(9) fixes. Approved by: delphij (mentor) Obtained from: The NetBSD Project Sponsored by: Google Summer of Code 2009 Notes: svn path=/head/; revision=219019