summaryrefslogtreecommitdiff
path: root/parted/strlist.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: Update copyright statements to 2022Brian C. Lane2023-03-241-1/+1
| | | | By running make update-copyright
* strlist: Handle realloc error in wchar_to_strBrian C. Lane2023-02-151-0/+2
| | | | | | It could return a NULL if the realloc fails. This handles the failure in the same way as other failures in wchar_to_str, it exits immediately with an error message.
* maint: Update copyright statements to 2022Brian C. Lane2022-03-231-1/+1
| | | | By running make update-copyright
* maint: Update copyright statements to 2021Brian C. Lane2021-01-181-1/+1
| | | | By running make update-copyright
* maint: Update copyright statements to 2020Brian C. Lane2020-12-111-2/+2
| | | | By running make update-copyright
* maint: Update copyright statements to 2019Brian C. Lane2019-08-121-1/+2
| | | | By running make update-copyright
* maint: run "make update-copyright"Jim Meyering2014-05-251-1/+1
|
* maint: update all copyright year number rangesJim Meyering2013-01-061-1/+1
| | | | Run "make update-copyright".
* maint: remove unnecessary wcslen useJim Meyering2012-09-121-2/+2
| | | | | * parted/strlist.c (gettext_to_wchar): Tighten up test for mbsrtowcs failure and remove unnecessary wcslen use.
* build: appease gcc's -Werror=suggest-attribute=pureJim Meyering2012-01-091-3/+3
| | | | | | * parted/strlist.c (wchar_strcasecmp): Add pure attribute; make static. (wchar_strncasecmp): Likewise. (wchar_strdup): Likewise.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* build: mark functions with "const" or "pure" attribute, per gcc warningsJim Meyering2011-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use _GL_ATTRIBUTE_PURE or _GL_ATTRIBUTE_CONST. Mark static functions at point of definition; extern ones at point of declaration. * include/parted/crc32.h: * include/parted/device.h: Likewise. * include/parted/disk.h: Likewise. * include/parted/exception.h: Likewise. * include/parted/filesys.h: Likewise. * include/parted/geom.h: Likewise. * include/parted/natmath.h: Likewise. * include/parted/parted.h: Likewise. * include/parted/unit.h: Likewise. * libparted/arch/linux.c: Likewise. * libparted/disk.c: Likewise. * libparted/exception.c: Likewise. * libparted/fs/amiga/amiga.h: Likewise. * libparted/labels/aix.c: Likewise. * libparted/labels/bsd.c: Likewise. * libparted/labels/dos.c: Likewise. * libparted/labels/dvh.c: Likewise. * libparted/labels/efi_crc32.c: Likewise. * libparted/labels/gpt.c: Likewise. * libparted/labels/mac.c: Likewise. * libparted/labels/pc98.c: Likewise. * libparted/labels/rdb.c: Likewise. * libparted/labels/sun.c: Likewise. * libparted/unit.c: Likewise. * parted/ui.c: Likewise. * parted/strlist.c: Likewise. * parted/strlist.h: Likewise. * libparted/tests/common.h (_implemented_disk_label): Mark as pure. * libparted/cs/natmath.c (extended_euclid): Mark as pure.
* parted: write a few errors and warnings to stderr instead of stdoutRichard W.M. Jones2011-10-141-2/+2
|
* parted: strlist print functions can now send output to any FILE *Richard W.M. Jones2011-10-141-9/+9
| | | | | | This changes the two strlist print functions so that instead of just sending output to stdout, they can send it to any FILE *. Now the caller can send errors to stderr instead of stdout.
* Remove PED_ASSERT action argumentBrian C. Lane2011-03-051-1/+1
| | | | | | The action argument was a leftover from when the PED_ASSERT macro was last changed. This removes that argument from the macro and from all occurrences of it.
* maint: update copyright year ranges to include 2011Jim Meyering2011-02-221-2/+1
| | | | Run "make update-copyright".
* maint: remove useless definitionsJim Meyering2010-05-261-8/+0
| | | | | | | | | | * libparted/fs/xfs/platform_defs.h [__sparc__] (O_DIRECT): Remove now-unneeded definition. * parted/table.c (wchar_t): Remove definition. * parted/strlist.c (wchar_t): Likewise. * .x-sc_prohibit_always-defined_macros: New file. Exempt two files from this syntax-check rule. * Makefile.am (EXTRA_DIST): Add it here.
* maint: update all FSF copyright year lists to include 2010Jim Meyering2010-01-081-1/+2
| | | | Run this command: make update-copyright
* maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exitJim Meyering2009-11-071-2/+2
| | | | | | | | | | | | | | | | | Convert all uses automatically, via these two commands: git grep -l '\<exit *(1)'|xargs --no-run-if-empty \ perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/' git grep -l '\<exit *(0)'|xargs --no-run-if-empty \ perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/' * libparted/fs/fat/table.c (fat_table_get): Use symbolic exit codes. * libparted/labels/vtoc.c (vtoc_update_format5_label_add): Likewise. (vtoc_update_format5_label_del): Likewise. (vtoc_update_format7_label_add): Likewise. (vtoc_update_format7_label_del): Likewise. * m4/parted.m4 (PARTED_CHECK_LIBPARTED): Likewise. * parted/parted.c (do_quit): Likewise. * parted/strlist.c (gettext_to_wchar, wchar_to_str): Likewise. * parted/ui.c (reset_env, help_msg, non_interactive_mode): Likewise.
* maint: update most copyright year lists to include 2009Jim Meyering2009-09-291-1/+1
| | | | | | I used this command: make update-copyright \ UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
* tests: enable a few syntax-checksJim Meyering2009-09-291-1/+2
| | | | | | | | * cfg.mk (local-checks-to-skip): Remove a few useless exclusions and enable a few syntax checks. * libparted/arch/linux.c (linux_destroy): Avoid triggering the sc_cast_of_argument_to_free check. * parted/strlist.c (str_list_destroy_node): Likewise.
* ui: avoid NULL dereference on realloc failureJim Meyering2009-07-111-2/+2
| | | | | * parted/strlist.c (gettext_to_wchar) [ENABLE_NLS]: Use xrealloc, so we never return NULL, which could then be dereferenced.
* remove all trailing blanksJim Meyering2009-03-051-1/+1
| | | | | | ...by running these commands: t=$'\t' git grep -l "[ $t]\$"|xargs perl -pi -e 's/[ \t]+$//'
* Updated GPL license boilerplate.David Cantrell2007-07-231-3/+2
|
* Let "make distcheck" pass once again.Jim Meyering2007-07-061-2/+1
| | | | | * parted/strlist.c (str_list_alloc): Remove unnecessary cast of xmalloc return value.
* Replace some malloc and strdup by xmalloc and xstrdup respectivelyDavid Vazquez2007-06-121-5/+6
| | | | | | I replace some malloc and strdup by xmalloc and xstrdup respectively. Signed-off-by: David Vazquez <xeos@gmail.com>
* Fix off-by-one error in previous change.Jim Meyering2007-05-251-1/+1
| | | | * parted/strlist.c (str_list_print_wrap): Don't output a space unconditionally.
* Remove a silly (and dangerous) function.Jim Meyering2007-05-251-20/+2
| | | | | | | | | | | This change has no effect, except in a low-memory condition, where the old code would dereference NULL, the new code no longer performs that malloc. * parted/strlist.c (get_spaces): Remove this function. Not only is it useless, but it also has an unchecked malloc. (str_list_print_wrap): Don't allocate and initialize a string just to print a sequence of N spaces.
* Replaced [f]printf with fput[c|s] globally.Debarshi Ray2007-03-081-1/+1
|
* Use <config.h> consistently, not "config.h".Jim Meyering2007-03-071-1/+1
| | | | | * Makefile.cfg (local-checks-to-skip): Remove sc_require_config_h, to enable the "make distcheck" test for this.
* Fix ChangeLogAnant Narayanan2006-09-141-0/+605
git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@820 2d424fd7-7fe2-0310-af74-8bc65edeb173