Files
applets
arch
archival
console-tools
coreutils
debianutils
docs
e2fsprogs
editors
examples
findutils
include
init
libbb
Config.in
Kbuild
README
appletlib.c
ask_confirmation.c
bb_askpass.c
bb_basename.c
bb_do_delay.c
bb_pwd.c
bb_qsort.c
bb_strtod.c
bb_strtonum.c
change_identity.c
chomp.c
compare_string_array.c
concat_path_file.c
concat_subpath_file.c
copy_file.c
copyfd.c
correct_password.c
crc32.c
create_icmp6_socket.c
create_icmp_socket.c
crypt_make_salt.c
default_error_retval.c
device_open.c
die_if_bad_username.c
dump.c
error_msg.c
error_msg_and_die.c
execable.c
fclose_nonstdin.c
fflush_stdout_and_exit.c
fgets_str.c
find_mount_point.c
find_pid_by_name.c
find_root_device.c
full_write.c
get_console.c
get_last_path_component.c
get_line_from_file.c
getopt32.c
getpty.c
herror_msg.c
herror_msg_and_die.c
human_readable.c
inet_common.c
info_msg.c
inode_hash.c
isdirectory.c
kernel_version.c
last_char_is.c
lineedit.c
lineedit_ptr_hack.c
llist.c
login.c
loop.c
make_directory.c
makedev.c
match_fstype.c
md5.c
messages.c
mode_string.c
mtab.c
mtab_file.c
obscure.c
parse_config.c
parse_mode.c
perror_msg.c
perror_msg_and_die.c
perror_nomsg.c
perror_nomsg_and_die.c
pidfile.c
print_flags.c
printable.c
process_escape_sequence.c
procps.c
ptr_to_globals.c
pw_encrypt.c
pw_encrypt_des.c
pw_encrypt_md5.c
read.c
recursive_action.c
remove_file.c
restricted_shell.c
rtc.c
run_shell.c
safe_gethostname.c
safe_poll.c
safe_strncpy.c
safe_write.c
selinux_common.c
setup_environment.c
sha1.c
signals.c
simplify_path.c
skip_whitespace.c
speed_table.c
str_tolower.c
strrstr.c
time.c
trim.c
u_signal_names.c
udp_io.c
update_passwd.c
uuencode.c
vdprintf.c
verror_msg.c
vfork_daemon_rexec.c
warn_ignoring_args.c
wfopen.c
wfopen_input.c
write.c
xatonum.c
xatonum_template.c
xconnect.c
xfunc_die.c
xfuncs.c
xfuncs_printf.c
xgetcwd.c
xgethostbyname.c
xreadlink.c
xrealloc_vector.c
xregcomp.c
libpwdgrp
loginutils
miscutils
modutils
networking
printutils
procps
runit
scripts
selinux
shell
sysklogd
testsuite
util-linux
.indent.pro
AUTHORS
Config.in
INSTALL
LICENSE
Makefile
Makefile.custom
Makefile.flags
Makefile.help
README
TODO
TODO_config_nommu
busybox/libbb/chomp.c
Denis Vlasenko defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00

20 lines
345 B
C

/* vi: set sw=4 ts=4: */
/*
* Utility routines.
*
* Copyright (C) many different people.
* If you wrote this, please acknowledge your work.
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
#include "libbb.h"
void FAST_FUNC chomp(char *s)
{
char *lc = last_char_is(s, '\n');
if (lc)
*lc = '\0';
}