Files
applets
archival
console-tools
coreutils
debian
debianutils
docs
editors
examples
findutils
include
init
libbb
.cvsignore
Makefile
README
arith.c
ask_confirmation.c
chomp.c
concat_path_file.c
copy_file.c
copy_file_chunk.c
copyfd.c
create_icmp_socket.c
device_open.c
dirname.c
dump.c
error_msg.c
error_msg_and_die.c
fgets_str.c
find_mount_point.c
find_pid_by_name.c
find_root_device.c
full_read.c
full_write.c
get_console.c
get_last_path_component.c
get_line_from_file.c
gz_open.c
herror_msg.c
herror_msg_and_die.c
human_readable.c
inet_common.c
inode_hash.c
interface.c
isdirectory.c
kernel_version.c
last_char_is.c
libc5.c
loop.c
make_directory.c
messages.c
mk_loop_h.sh
mode_string.c
module_syscalls.c
mtab.c
mtab_file.c
my_getgrgid.c
my_getgrnam.c
my_getpwnam.c
my_getpwnamegid.c
my_getpwuid.c
parse_mode.c
parse_number.c
perror_msg.c
perror_msg_and_die.c
print_file.c
process_escape_sequence.c
read_package_field.c
real_loop.h
recursive_action.c
remove_file.c
safe_read.c
safe_strncpy.c
simplify_path.c
syscalls.c
syslog_msg_with_name.c
time_string.c
trim.c
u_signal_names.c
unzip.c
vdprintf.c
verror_msg.c
vherror_msg.c
vperror_msg.c
wfopen.c
xfuncs.c
xgetcwd.c
xgethostbyname.c
xreadlink.c
xregcomp.c
miscutils
modutils
networking
procps
scripts
shell
sysdeps
sysklogd
tests
testsuite
util-linux
.cvsignore
.indent.pro
AUTHORS
Changelog
INSTALL
LICENSE
Makefile
README
Rules.mak
TODO
busybox/libbb/chomp.c
2001-10-24 05:00:29 +00:00

46 lines
1.1 KiB
C

/* vi: set sw=4 ts=4: */
/*
* Utility routines.
*
* Copyright (C) many different people. If you wrote this, please
* acknowledge your work.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#include <stdio.h>
#include <string.h>
#include "libbb.h"
void chomp(char *s)
{
char *lc = last_char_is(s, '\n');
if(lc)
*lc = 0;
}
/* END CODE */
/*
Local Variables:
c-file-style: "linux"
c-basic-offset: 4
tab-width: 4
End:
*/