Mark variables and constant as static in source tools, examples and tests. Also replace some char pointers with char arrays.

This commit is contained in:
flameeyes
2008-06-19 15:44:10 +00:00
parent 5d2dc434e3
commit 3685c0d78e
13 changed files with 129 additions and 136 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: buffering_write.c,v 1.3 2008/04/11 15:44:00 karl Exp $
$Id: buffering_write.c,v 1.4 2008/06/19 15:44:28 flameeyes Exp $
Copyright (C) 2004, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 1998, 1999 Monty <xiphmont@mit.edu>
@@ -39,7 +39,7 @@ static char bw_outbuf[OUTBUFSZ];
long int
static long int
blocking_write(int outf, char *buffer, long num){
long int words=0,temp;

View File

@@ -1,5 +1,5 @@
/*
$Id: buffering_write.h,v 1.3 2008/04/11 15:44:00 karl Exp $
$Id: buffering_write.h,v 1.4 2008/06/19 15:44:30 flameeyes Exp $
Copyright (C) 2004, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 1998 Monty <xiphmont@mit.edu>
@@ -18,8 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
extern long blocking_write(int outf, char *buffer, long i_num);
/** buffering_write() - buffers data to a specified size before writing.
*
* Restrictions:

View File

@@ -1,5 +1,5 @@
/*
$Id: cd-paranoia.c,v 1.36 2008/04/11 15:44:00 karl Exp $
$Id: cd-paranoia.c,v 1.37 2008/06/19 15:44:30 flameeyes Exp $
Copyright (C) 2004, 2005, 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
(C) 1998 Monty <xiphmont@mit.edu>
@@ -282,13 +282,13 @@ static void usage(FILE *f)
fprintf( f, usage_help);
}
long callbegin;
long callend;
long callscript=0;
static long callbegin;
static long callend;
static long callscript=0;
static int skipped_flag=0;
static int abort_on_skip=0;
FILE *logfile = NULL;
static FILE *logfile = NULL;
#if TRACE_PARANOIA
static void
@@ -545,9 +545,9 @@ callback(long int inpos, paranoia_cb_mode_t function)
}
#endif /* !TRACE_PARANOIA */
const char *optstring = "aBcCd:efg:hi:l:m:n:o:O:pqQrRsS:Tt:VvwWx:XYZz::";
static const char optstring[] = "aBcCd:efg:hi:l:m:n:o:O:pqQrRsS:Tt:VvwWx:XYZz::";
struct option options [] = {
static const struct option options [] = {
{"abort-on-skip", no_argument, NULL, 'X'},
{"batch", no_argument, NULL, 'B'},
{"disable-extra-paranoia", no_argument, NULL, 'Y'},

View File

@@ -1,5 +1,5 @@
#!/usr/bin/perl
# $Id: pod2c.pl,v 1.3 2008/04/14 17:30:27 karl Exp $
# $Id: pod2c.pl,v 1.4 2008/06/19 15:44:31 flameeyes Exp $
# Utility to turn pieces of pod text to help text.
use File::Basename;
@@ -31,7 +31,7 @@ print "/*
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
const char ${name}_help[] =\n";
static const char ${name}_help[] =\n";
while(<STDIN>) {
s/["]/\\"/g;
# Change POD'ed items to quoted items, e.g. See L<y> and L<z> becomes