==============================================================================
-src/mk-string-arrays.pl:
-
-# Author: Max Okumoto <okumoto@ucsd.edu>
-
-==============================================================================
-
src/repl/heap/store_heap_replacement.cc:
* AUTHOR: John Dilley
noinst_HEADERS = \
client_side_request.cci \
MemBuf.h \
- StoreEntryStream.h \
String.cci \
SquidString.h \
SquidTime.h
cf.data.depend \
mk-globals-c.pl \
mk-globals-c.awk \
- mk-string-arrays.pl \
mk-string-arrays.awk \
repl_modules.sh \
$(STUB_SOURCE) \
Transients.cc \
tests/stub_tools.cc \
tests/stub_UdsOp.cc \
+ tests/testPackableStream.cc \
+ tests/testPackableStream.h \
tests/testStore.cc \
tests/testStore.h \
- tests/testStoreEntryStream.cc \
- tests/testStoreEntryStream.h \
tests/testStoreController.cc \
tests/testStoreController.h \
tests/testStoreHashIndex.cc \
##
# tested with gawk, mawk, and nawk.
-# drop-in replacement for mk-string-arrays.pl.
# creates "enum.c" (on stdout) from "enum.h".
-# invoke similarly: perl -f mk-string-arrays.pl enum.h
-# --> awk -f mk-string-arrays.awk enum.h
+# when invoked: awk -f mk-string-arrays.awk enum.h
#
# 2006 by Christopher Kerr.
#
+++ /dev/null
-#
-## Copyright (C) 1996-2015 The Squid Software Foundation and contributors
-##
-## Squid software is distributed under GPLv2+ license and includes
-## contributions from numerous individuals and organizations.
-## Please see the COPYING and CONTRIBUTORS files for details.
-##
-
-#******************************************************************************
-# File: mk-strs.pl
-#
-# Author: Max Okumoto <okumoto@ucsd.edu>
-#
-# Abstract: This perl script parses enums and builds an array of
-# printable strings.
-#
-# Warning: The parser is very simplistic, and will prob not work for
-# things other than squid.
-#******************************************************************************
-
-$pat{'err_type'} = "err_type_str";
-$pat{'icp_opcode'} = "icp_opcode_str";
-$pat{'swap_log_op'} = "swap_log_op_str";
-$pat{'lookup_t'} = "lookup_t_str";
-
-$state = 0; # start state
-while (<>) {
- if ($state == 0) {
- # Looking for start of typedef
- if (/^typedef enum /) {
- $count = 0; # enum index
- $state = 1;
- }
- next;
-
- } elsif ($state == 1) {
- # Looking for end of typedef
- if (/^} /) {
- ($b, $t) = split(/[ \t;]/, $_);
- if (defined($pat{$t})) {
- print "const char *$pat{$t}\[\] = \n";
- print "{\n";
- for ($i = 0; $i < $count; $i++) {
- printf "\t\"%s\"%s\n",
- $ea[$i],
- $i == $count - 1 ? '' : ',';
- }
- print "};\n";
- print "\n";
- }
- $state = 0;
- } else {
- ($e) = split(' ', $_);
- $e =~ s/,//;
- $ea[$count] = $e;
- $count++;
- }
- next;
- }
-}
-
-exit 0;