From Graeme Lunt
[obnox/wireshark/wip.git] / rdps.c
diff --git a/rdps.c b/rdps.c
index 6df44a932456438422641c2df02263ec34a5ccaa..25e4e62c79ccc3c37f955e8bc40b52432c338312 100644 (file)
--- a/rdps.c
+++ b/rdps.c
@@ -1,22 +1,21 @@
 /* rdps.c
  *
- *
- * $Id: rdps.c,v 1.3 1999/07/21 17:40:34 gram Exp $
+ * $Id$
+ * 
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
  *
- * 
  * 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 2
  * 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, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -24,9 +23,8 @@
 
 /* takes the file listed as the first argument and creates the file listed
 as the second argument. It takes a PostScript file and creates a C program
-with 3 functions:
+with 2 functions:
        print_ps_preamble()
-       print_ps_hex()
        print_ps_finale()
 
 */
@@ -41,10 +39,10 @@ with 3 functions:
 
 #define BUFFER_SIZE 1024
 
-void start_code(FILE *fd, char *func);
+void start_code(FILE *fd, const char *func);
 void write_code(FILE *fd, char *string);
 void end_code(FILE *fd);
-void ps_clean_string(unsigned char *out, const unsigned char *in,
+void ps_clean_string(char *out, const char *in,
                        int outbuf_size);
 
 enum ps_state { null, preamble, hex, finale };
@@ -83,11 +81,6 @@ int main(int argc, char **argv)
                                start_code(output, "preamble");
                                continue;
                        }
-                       else if (strcmp(buf, "% ---- ethereal hex start ---- %\n") == 0) {
-                               state = hex;
-                               start_code(output, "hex");
-                               continue;
-                       }
                        else if (strcmp(buf, "% ---- ethereal finale start ---- %\n") == 0) {
                                state = finale;
                                start_code(output, "finale");
@@ -132,7 +125,7 @@ int main(int argc, char **argv)
         exit(0);
 }
 
-void start_code(FILE *fd, char *func)
+void start_code(FILE *fd, const char *func)
 {
        fprintf(fd, "/* Created by rdps.c. Do not edit! */\n");
        fprintf(fd, "void print_ps_%s(FILE *fd) {\n", func);
@@ -150,7 +143,7 @@ void end_code(FILE *fd)
        fprintf(fd, "}\n\n\n");
 }
 
-void ps_clean_string(unsigned char *out, const unsigned char *in,
+void ps_clean_string(char *out, const char *in,
                        int outbuf_size)
 {
        int rd, wr;