New script to help add continuation marks to the ends of lines.

Estimated hours taken: 0.1
Branches: main

tools/add_cont_lines:
	New script to help add continuation marks to the ends of lines.
	This is useful e.g. when converting C functions to macros.
This commit is contained in:
Zoltan Somogyi
2005-08-03 23:38:03 +00:00
parent 5fdad10a93
commit 2af05e4079
2 changed files with 16 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
README
add_cont_lines
alias_sync
appears
assemble

15
tools/add_cont_lines Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
# This script add a backslash to the end of every line in its input.
# The input can come either from a list of files named on the command line
# or from standard input.
#
# This script assumes that there are no tabs in the input.
awk '
{
printf "%s", $0;
for (i = length($0); i < 78; i++)
printf " ";
printf "\\\n";
}' "$@"