1 Star 0 Fork 61

yuanxiuming/third_party_e2fsprogs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
wordwrap.pl 681 Bytes
一键复制 编辑 原始数据 按行查看 历史
Theodore Ts'o 提交于 2012-09-22 00:31 +08:00 . Fix wordwrap.pl so it is more portable
#!/usr/bin/perl
#
# wordwrap.pl --- does word wrap
#
while (<>) {
if (/^#/) { # don't word wrap comments
print;
next;
}
next if (/^$/); # skip blank lines
$linelen = 0;
@words = split;
while (defined($word = shift @words)) {
$word =~ s#\$\(srcdir\)/\.\./version.h#\$\(top_srcdir\)/version.h#;
$word =~ s#\$\(srcdir\)/.\.\/\.\./version.h#\$\(top_srcdir\)/version.h#;
$word =~ s#\$\(srcdir\)/.\.\/et/com_err.h#\$\(top_srcdir\)/lib/et/com_err.h#;
if ($linelen > 0) {
printf(" ");
}
$len = length($word) + 1;
$linelen += $len;
if ($linelen > 78) {
printf("\\\n ");
$linelen = 1+$len;
}
printf("%s", $word);
}
printf("\n");
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/showmingcode/third_party_e2fsprogs.git
git@gitee.com:showmingcode/third_party_e2fsprogs.git
showmingcode
third_party_e2fsprogs
third_party_e2fsprogs
master

搜索帮助