[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri May 7 03:21:01 UTC 2021
The branch, master has been updated
via 24d574f7828 s3: utils: Remove debug2html utility. Not used, installed or tested.
from 249b9650a2c lib:cmdline: Align integer types
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 24d574f78281fcdbad1df1008cf8856e9e6db4d3
Author: Richard Sharpe <realrichardsharpe at gmail.com>
Date: Thu May 6 13:33:18 2021 -0700
s3: utils: Remove debug2html utility. Not used, installed or tested.
No reference to it on the web since the year 2000.
Signed-off-by: Richard Sharpe <realrichardsharpe at gmail.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri May 7 03:20:46 UTC 2021 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
source3/include/debugparse.h | 126 ------------------
source3/utils/debug2html.c | 256 -----------------------------------
source3/utils/debugparse.c | 308 -------------------------------------------
source3/utils/wscript_build | 5 -
4 files changed, 695 deletions(-)
delete mode 100644 source3/include/debugparse.h
delete mode 100644 source3/utils/debug2html.c
delete mode 100644 source3/utils/debugparse.c
Changeset truncated at 500 lines:
diff --git a/source3/include/debugparse.h b/source3/include/debugparse.h
deleted file mode 100644
index a66a82a8d88..00000000000
--- a/source3/include/debugparse.h
+++ /dev/null
@@ -1,126 +0,0 @@
-#ifndef DEBUGPARSE_H
-#define DEBUGPARSE_H
-/* ========================================================================== **
- * debugparse.c
- *
- * Copyright (C) 1998 by Christopher R. Hertel
- *
- * Email: crh at ubiqx.mn.org
- *
- * -------------------------------------------------------------------------- **
- * This module is a very simple parser for Samba debug log files.
- * -------------------------------------------------------------------------- **
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
- * -------------------------------------------------------------------------- **
- * The important function in this module is dbg_char2token(). The rest is
- * basically fluff. (Potentially useful fluff, but still fluff.)
- * ========================================================================== **
- */
-
-#include "includes.h"
-
-/* This module compiles quite nicely outside of the Samba environment.
- * You'll need the following headers:
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
- */
-
-/* -------------------------------------------------------------------------- **
- * These are the tokens returned by dbg_char2token().
- */
-
-typedef enum
- {
- dbg_null = 0,
- dbg_ignore,
- dbg_header,
- dbg_timestamp,
- dbg_level,
- dbg_sourcefile,
- dbg_function,
- dbg_lineno,
- dbg_message,
- dbg_eof
- } dbg_Token;
-
-/* -------------------------------------------------------------------------- **
- * Function prototypes...
- */
-
- const char *dbg_token2string( dbg_Token tok );
- /* ------------------------------------------------------------------------ **
- * Given a token, return a string describing the token.
- *
- * Input: tok - One of the set of dbg_Tokens defined in debugparse.h.
- *
- * Output: A string identifying the token. This is useful for debugging,
- * etc.
- *
- * Note: If the token is not known, this function will return the
- * string "<unknown>".
- *
- * ------------------------------------------------------------------------ **
- */
-
- dbg_Token dbg_char2token( dbg_Token *state, int c );
- /* ------------------------------------------------------------------------ **
- * Parse input one character at a time.
- *
- * Input: state - A pointer to a token variable. This is used to
- * maintain the parser state between calls. For
- * each input stream, you should set up a separate
- * state variable and initialize it to dbg_null.
- * Pass a pointer to it into this function with each
- * character in the input stream. See dbg_test()
- * for an example.
- * c - The "current" character in the input stream.
- *
- * Output: A token.
- * The token value will change when delimiters are found,
- * which indicate a transition between syntactical objects.
- * Possible return values are:
- *
- * dbg_null - The input character was an end-of-line.
- * This resets the parser to its initial state
- * in preparation for parsing the next line.
- * dbg_eof - Same as dbg_null, except that the character
- * was an end-of-file.
- * dbg_ignore - Returned for whitespace and delimiters.
- * These lexical tokens are only of interest
- * to the parser.
- * dbg_header - Indicates the start of a header line. The
- * input character was '[' and was the first on
- * the line.
- * dbg_timestamp - Indicates that the input character was part
- * of a header timestamp.
- * dbg_level - Indicates that the input character was part
- * of the debug-level value in the header.
- * dbg_sourcefile - Indicates that the input character was part
- * of the sourcefile name in the header.
- * dbg_function - Indicates that the input character was part
- * of the function name in the header.
- * dbg_lineno - Indicates that the input character was part
- * of the DEBUG call line number in the header.
- * dbg_message - Indicates that the input character was part
- * of the DEBUG message text.
- *
- * ------------------------------------------------------------------------ **
- */
-
-
-/* -------------------------------------------------------------------------- */
-#endif /* DEBUGPARSE_H */
diff --git a/source3/utils/debug2html.c b/source3/utils/debug2html.c
deleted file mode 100644
index 26096c9de4e..00000000000
--- a/source3/utils/debug2html.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/* ========================================================================== **
- * debug2html.c
- *
- * Copyright (C) 1998 by Christopher R. Hertel
- *
- * Email: crh at ubiqx.mn.org
- *
- * -------------------------------------------------------------------------- **
- * Parse Samba debug logs (2.0 & greater) and output the results as HTML.
- * -------------------------------------------------------------------------- **
- *
- * 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- * -------------------------------------------------------------------------- **
- * This program provides an example of the use of debugparse.c, and also
- * does a decent job of converting Samba logs into HTML.
- * -------------------------------------------------------------------------- **
- *
- * Revision 1.4 1998/11/13 03:37:01 tridge
- * fixes for OSF1 compilation
- *
- * Revision 1.3 1998/10/28 20:33:35 crh
- * I've moved the debugparse module files into the ubiqx directory because I
- * know that 'make proto' will ignore them there. The debugparse.h header
- * file is included in includes.h, and includes.h is included in debugparse.c,
- * so all of the pieces "see" each other. I've compiled and tested this,
- * and it does seem to work. It's the same compromise model I used when
- * adding the ubiqx modules into the system, which is why I put it all into
- * the same directory.
- *
- * Chris -)-----
- *
- * Revision 1.1 1998/10/26 23:21:37 crh
- * Here is the simple debug parser and the debug2html converter. Still to do:
- *
- * * Debug message filtering.
- * * I need to add all this to Makefile.in
- * (If it looks at all strange I'll ask for help.)
- *
- * If you want to compile debug2html, you'll need to do it by hand until I
- * make the changes to Makefile.in. Sorry.
- *
- * Chris -)-----
- *
- * ========================================================================== **
- */
-
-#include "debugparse.h"
-
-/* -------------------------------------------------------------------------- **
- * The size of the read buffer.
- */
-
-#define DBG_BSIZE 1024
-
-/* -------------------------------------------------------------------------- **
- * Functions...
- */
-
-static dbg_Token modechange( dbg_Token newmode, dbg_Token mode )
- /* ------------------------------------------------------------------------ **
- * Handle a switch between header and message printing.
- *
- * Input: new - The token value of the current token. This indicates
- * the lexical item currently being recognized.
- * mode - The current mode. This is either dbg_null or
- * dbg_message. It could really be any toggle
- * (true/false, etc.)
- *
- * Output: The new mode. This will be the same as the input mode unless
- * there was a transition in or out of message processing.
- *
- * Notes: The purpose of the mode value is to mark the beginning and end
- * of the message text block. In order to show the text in its
- * correct format, it must be included within a <PRE></PRE> block.
- *
- * ------------------------------------------------------------------------ **
- */
- {
- switch( newmode )
- {
- case dbg_null:
- case dbg_ignore:
- return( mode );
- case dbg_message:
- if( dbg_message != mode )
- {
- /* Switching to message mode. */
- (void)printf( "<PRE>\n" );
- return( dbg_message );
- }
- break;
- default:
- if( dbg_message == mode )
- {
- /* Switching out of message mode. */
- (void)printf( "</PRE>\n\n" );
- return( dbg_null );
- }
- }
-
- return( mode );
- } /* modechange */
-
-static void newblock( dbg_Token old, dbg_Token newtok )
- /* ------------------------------------------------------------------------ **
- * Handle the transition between tokens.
- *
- * Input: old - The previous token.
- * new - The current token.
- *
- * Output: none.
- *
- * Notes: This is called whenever there is a transition from one token
- * type to another. It first prints the markup tags that close
- * the previous token, and then the markup tags for the new
- * token.
- *
- * ------------------------------------------------------------------------ **
- */
- {
- switch( old )
- {
- case dbg_timestamp:
- (void)printf( ",</B>" );
- break;
- case dbg_level:
- (void)printf( "</FONT>]</B>\n " );
- break;
- case dbg_sourcefile:
- (void)printf( ":" );
- break;
- case dbg_lineno:
- (void)printf( ")" );
- break;
- default:
- break;
- }
-
- switch( newtok )
- {
- case dbg_timestamp:
- (void)printf( "<B>[" );
- break;
- case dbg_level:
- (void)printf( " <B><FONT COLOR=MAROON>" );
- break;
- case dbg_lineno:
- (void)printf( "(" );
- break;
- default:
- break;
- }
- } /* newblock */
-
-static void charprint( dbg_Token tok, int c )
- /* ------------------------------------------------------------------------ **
- * Filter the input characters to determine what goes to output.
- *
- * Input: tok - The token value of the current character.
- * c - The current character.
- *
- * Output: none.
- *
- * ------------------------------------------------------------------------ **
- */
- {
- switch( tok )
- {
- case dbg_ignore:
- case dbg_header:
- break;
- case dbg_null:
- case dbg_eof:
- (void)putchar( '\n' );
- break;
- default:
- switch( c )
- {
- case '<':
- (void)printf( "<" );
- break;
- case '>':
- (void)printf( ">" );
- break;
- case '&':
- (void)printf( "&" );
- break;
- case '\"':
- (void)printf( """ );
- break;
- default:
- (void)putchar( c );
- break;
- }
- }
- } /* charprint */
-
-int main( int argc, char *argv[] )
- /* ------------------------------------------------------------------------ **
- * This simple program scans and parses Samba debug logs, and produces HTML
- * output.
- *
- * Input: argc - Currently ignored.
- * argv - Currently ignored.
- *
- * Output: Always zero.
- *
- * Notes: The HTML output is sent to stdout.
- *
- * ------------------------------------------------------------------------ **
- */
- {
- int i;
- int len;
- char bufr[DBG_BSIZE];
- dbg_Token old = dbg_null,
- newtok = dbg_null,
- state = dbg_null,
- mode = dbg_null;
-
- (void)printf( "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n" );
- (void)printf( "<HTML>\n<HEAD>\n" );
- (void)printf( " <TITLE>Samba Debug Output</TITLE>\n</HEAD>\n\n<BODY>\n" );
-
- while( (!feof( stdin ))
- && ((len = fread( bufr, 1, DBG_BSIZE, stdin )) > 0) )
- {
- for( i = 0; i < len; i++ )
- {
- old = newtok;
- newtok = dbg_char2token( &state, bufr[i] );
- if( newtok != old )
- {
- mode = modechange( newtok, mode );
- newblock( old, newtok );
- }
- charprint( newtok, bufr[i] );
- }
- }
- (void)modechange( dbg_eof, mode );
-
- (void)printf( "</BODY>\n</HTML>\n" );
- return( 0 );
- } /* main */
diff --git a/source3/utils/debugparse.c b/source3/utils/debugparse.c
deleted file mode 100644
index 5835de1b8d7..00000000000
--- a/source3/utils/debugparse.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/* ========================================================================== **
- * debugparse.c
- *
- * Copyright (C) 1998 by Christopher R. Hertel
- *
- * Email: crh at ubiqx.mn.org
- *
- * -------------------------------------------------------------------------- **
- * This module is a very simple parser for Samba debug log files.
- * -------------------------------------------------------------------------- **
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
- * -------------------------------------------------------------------------- **
- * The important function in this module is dbg_char2token(). The rest is
- * basically fluff. (Potentially useful fluff, but still fluff.)
- * ========================================================================== **
- */
-
-#include "debugparse.h"
-
-/* -------------------------------------------------------------------------- **
- * Constants...
- *
- * DBG_BSIZE - This internal constant is used only by dbg_test(). It is the
- * size of the read buffer. I've tested the function using a
- * DBG_BSIZE value of 2.
- */
-
-#define DBG_BSIZE 128
-
-/* -------------------------------------------------------------------------- **
- * Functions...
- */
-
-const char *dbg_token2string( dbg_Token tok )
- /* ------------------------------------------------------------------------ **
- * Given a token, return a string describing the token.
- *
- * Input: tok - One of the set of dbg_Tokens defined in debugparse.h.
- *
- * Output: A string identifying the token. This is useful for debugging,
- * etc.
- *
- * Note: If the token is not known, this function will return the
- * string "<unknown>".
- *
- * ------------------------------------------------------------------------ **
- */
- {
- switch( tok )
- {
- case dbg_null:
- return( "null" );
- case dbg_ignore:
- return( "ignore" );
- case dbg_header:
- return( "header" );
- case dbg_timestamp:
- return( "time stamp" );
- case dbg_level:
- return( "level" );
- case dbg_sourcefile:
- return( "source file" );
- case dbg_function:
- return( "function" );
- case dbg_lineno:
- return( "line number" );
- case dbg_message:
- return( "message" );
- case dbg_eof:
- return( "[EOF]" );
- }
- return( "<unknown>" );
- } /* dbg_token2string */
-
-dbg_Token dbg_char2token( dbg_Token *state, int c )
- /* ------------------------------------------------------------------------ **
- * Parse input one character at a time.
- *
- * Input: state - A pointer to a token variable. This is used to
- * maintain the parser state between calls. For
- * each input stream, you should set up a separate
- * state variable and initialize it to dbg_null.
- * Pass a pointer to it into this function with each
- * character in the input stream. See dbg_test()
- * for an example.
- * c - The "current" character in the input stream.
- *
--
Samba Shared Repository
More information about the samba-cvs
mailing list