summaryrefslogtreecommitdiff
path: root/ccl.c
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1989-05-19 13:56:38 +0000
committerVern Paxson <vern@ee.lbl.gov>1989-05-19 13:56:38 +0000
commitc5af13dd429d71393f914df3a9b1444247a880d6 (patch)
treefb2e462b86bb5e0f027aa46e4d1255bf41518905 /ccl.c
parenta3d014f763f47eec1265a918a5f1a4c7cc014691 (diff)
list_character_set() modified to take a FILE to write to ...
Diffstat (limited to 'ccl.c')
-rw-r--r--ccl.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/ccl.c b/ccl.c
index 48addb3..7d1b552 100644
--- a/ccl.c
+++ b/ccl.c
@@ -71,7 +71,7 @@ int cclinit()
{
if ( ++lastccl >= current_maxccls )
{
- current_maxccls += MAXCCLS_INCREMENT;
+ current_maxccls += MAX_CCLS_INCREMENT;
++num_reallocs;
@@ -118,21 +118,23 @@ int cclp;
*
* synopsis
* int cset[CSIZE + 1];
+ * FILE *file;
* list_character_set( cset );
*
- * writes to stderr a character-class representation of those characters
- * present in the given set. A character is present if it has a non-zero
- * value in the set array.
+ * writes to the given file a character-class representation of those
+ * characters present in the given set. A character is present if it
+ * has a non-zero value in the set array.
*/
-list_character_set( cset )
+list_character_set( file, cset )
+FILE *file;
int cset[];
{
register int i;
char *readable_form();
- putc( '[', stderr );
+ putc( '[', file );
for ( i = 1; i <= CSIZE; ++i )
{
@@ -140,20 +142,20 @@ int cset[];
{
register int start_char = i;
- putc( ' ', stderr );
+ putc( ' ', file );
- fputs( readable_form( i ), stderr );
+ fputs( readable_form( i ), file );
while ( ++i <= CSIZE && cset[i] )
;
if ( i - 1 > start_char )
/* this was a run */
- fprintf( stderr, "-%s", readable_form( i - 1 ) );
+ fprintf( file, "-%s", readable_form( i - 1 ) );
- putc( ' ', stderr );
+ putc( ' ', file );
}
}
- putc( ']', stderr );
+ putc( ']', file );
}