diff options
Diffstat (limited to 'bin')
63 files changed, 0 insertions, 12552 deletions
diff --git a/bin/ACEutils.pm b/bin/ACEutils.pm deleted file mode 100644 index dd6474e7a0f..00000000000 --- a/bin/ACEutils.pm +++ /dev/null @@ -1,57 +0,0 @@ -# $Id$ - -require Process; -$EXEPREFIX = ".".$DIR_SEPARATOR; - -package ACE; - -# Returns a unique id, uid for unix, last digit of IP for NT -sub uniqueid -{ - if ($^O eq "MSWin32") - { - my $uid = 1; - - open (IPNUM, "ipconfig|") || die "Can't run ipconfig: $!\n"; - - while (<IPNUM>) - { - if (/Address/) - { - $uid = (split (/: (\d+)\.(\d+)\.(\d+)\.(\d+)/))[4]; - } - } - - close IPNUM; - - return $uid; - } - else - { - return getpwnam (getlogin ()); - } -} - -# Waits until a file exists -sub waitforfile -{ - local($file) = @_; - sleep 1 while (!(-e $file && -s $file)); -} - -sub waitforfile_timed -{ - my $file = shift; - my $maxtime = shift; - while ($maxtime-- != 0) { - if (-e $file && -s $file) { - return 0; - } - sleep 1; - } - return -1; -} - -$sleeptime = 5; - -1; diff --git a/bin/ADDIDL.DSM b/bin/ADDIDL.DSM deleted file mode 100644 index b53ea3eb636..00000000000 --- a/bin/ADDIDL.DSM +++ /dev/null @@ -1,150 +0,0 @@ -' -'********************************************************************** -' $Header$ -' $NoKeywords: $ -' -' @doc AddIDL -' -' Macros for Microsoft Visual Studio. -' -' @comm To install this file go to Tools->Customize->Macro Files->Browse... -' -'********************************************************************** -' - - -'@bsub Add an IDL file into all build projects in the current workspace. -'@comm This routine also sets up the custom build options require for the TAO -'CORBA implementation. The use can select to create a new file or just add a reference -'to the project (e.g. if a file already exists).If a new file is created, then a -'basic outline for an OMG module or interface declaration is inserted. Note that the inline -'file extension is defined by INLINE_EXTENSION. -' -Sub AddIDLFile() -'DESCRIPTION: Add new IDL File with TAO custom build entries to all build projects in the workspace. - - On Error Resume Next - - 'Define the extension used for inline files here - INLINE_EXTENSION = "inl" - - WkSpaceDir = Application.CurrentDirectory - ModuleName = InputBox("module (namespace or extensionless IDL filename):") - FileName = ModuleName - WkSpaceDir=InputBox("Directory for IDL file: ","Output Directory",WkSpaceDir) - - if WkSpaceDir="" then - Exit Sub - end if - - if Right(WkSpaceDir,1) <> "\" then - WkSpaceDir=WkSpaceDir+"\" - end if - - IDLFile = WkSpaceDir+FileName +".idl" - - 'Try to a file with this path/name - Documents.Open IDLFile - - 'If such a file already exists then it should now be the active doc - if ActiveDocument.Fullname = IDLFile then - - if msgbox("Overwrite the existing file ?",vbYesNo) = vbNo then - NewFile = 0 - else - 'Close the file before we modify it - ActiveDocument.Close - NewFile = 1 - end if - else - NewFile =1 - end if - - 'If NewFile is set to 1 then create the outline for a OMG IDL module - if NewFile = 1 then - InterfaceName = InputBox("interface:") - - if msgbox("Include a module ("+ ModuleName+") declaration",vbYesNo) = vbYes then - Descr = vbLF + vbLF + "#if !defined (_" + UCase(ModuleName) + "_IDL)" + vbLF + _ - "#define _" + UCase(ModuleName) + "_IDL" + vbLF +vbLF + _ - "//"+vbLF+"//" +vbLF + "module " + ModuleName + " {" +vbLF + _ - " //" + vbLF + _ - " interface " + InterfaceName + "{"+vbLF + _ - " //Definitions"+ vbLF + vbLF+ vbLF + _ - " //Operations"+ vbLF + vbLF+ vbLF + _ - " //Properties"+ vbLF+ vbLF + _ - " };"+vbLF + "};"+vbLF +vbLF + _ - "#endif /* _"+ UCase(ModuleName) +"_IDL */"+vbLF - else - Descr = vbLF + vbLF + "#if !defined (_" + UCase(ModuleName) + "_IDL)" + vbLF + _ - "#define _" + UCase(ModuleName) + "_IDL" + vbLF +vbLF + _ - " //" + vbLF + _ - " //" + vbLF + _ - " interface " + InterfaceName + "{"+vbLF + _ - " //Definitions"+ vbLF + vbLF+ vbLF + _ - " //Operations"+ vbLF + vbLF+ vbLF + _ - " //Properties"+ vbLF+ vbLF + _ - " };"+vbLF +vbLF + _ - "#endif /* _"+ UCase(ModuleName) +"_IDL */"+vbLF - end if - - CreateCppFile IDLFile, Descr - end if - - Dim proj - ' Add the files to each project - 'Note that the inline files do not need to be added - for each proj in Projects - if msgbox("Add "+ IDLFile +" and the IDL compiler output files to "+ proj +" ?",vbYesNo) = vbYes then - ProjectPath= Left(proj.FullName,InStrRev(proj.FullName,"\")-1) - - proj.AddFile IDLFile - proj.AddFile WkSpaceDir+ModuleName + "C.cpp" - proj.AddFile WkSpaceDir+ModuleName + "C.h" - proj.AddFile WkSpaceDir+ModuleName + "S.cpp" - proj.AddFile WkSpaceDir+ModuleName + "S.h" - proj.AddFile WkSpaceDir+ModuleName + "S_T.cpp" - proj.AddFile WkSpaceDir+ModuleName + "S_T.h" - - Dim cfg - ' Add the custom build for each configuration in each project - If proj.Type = "Build" Then - Commands="%ACE_ROOT%\bin\tao_idl.exe -ci C."+ INLINE_EXTENSION +" -si S.inl -st S_T."+ INLINE_EXTENSION +" " + IDLFile - Output = "$(InputName)C.cpp" + vbLF + _ - "$(InputName)C.h" + vbLF + _ - "$(InputName)C."+ INLINE_EXTENSION +"" + vbLF + _ - "$(InputName)S.cpp" + vbLF + _ - "$(InputName)S.h" + vbLF + _ - "$(InputName)S."+ INLINE_EXTENSION +"" + vbLF + _ - "$(InputName)S_T.cpp" + vbLF + _ - "$(InputName)S_T.h" + vbLF + _ - "$(InputName)S_T."+ INLINE_EXTENSION +"" - - for each cfg in proj.Configurations - cfg.AddCustomBuildStepToFile IDLFile, Commands, Output, "Running the TAO IDL Compiler on $(InputPath)..." - next - End If - end if - next -End Sub - - - - - -'@bsub Creates a C/C++ file. -'@comm This routine will create a C or C++ source file f, with content c. -'The new file will become the active doc. -' -Function CreateCppFile(byval f, byval c) -'DESCRIPTION: Creates a .cpp file. - - On Error Resume Next - Documents.Add "Text" - ActiveDocument.Language = "C/C++" - ActiveDocument.Selection = c - ActiveDocument.Selection.NewLine - ActiveDocument.Save f - -End Function - diff --git a/bin/Array.pl b/bin/Array.pl deleted file mode 100755 index 7f9bf393e15..00000000000 --- a/bin/Array.pl +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -- # -*- perl -*- -eval 'exec perl -pi.Array.$$ -S $0 ${1+"$@"}' - if 0; - -# $Id$ - -# -# After the 4.6.10 release the template instantiations for ACE_Array -# have changed, the class is implemented in terms of ACE_Array_Base; -# this script fixes the template instantiations if needed. -# -# It changes instantiations of: -# -# ACE_Array<T> -# -# into: -# -# ACE_Array<T> -# ACE_Array_Base<T> -# - -# Notice the use of the -pi options: the while(<>) loop is implicit, -# printing the current line is also implicit as well as fixing the -# file in place. - -if (m/template class\s+ACE_Array\s*<(.*)>\s*;\s*/) { - print "template class ACE_Array_Base<", $1, ">;\n"; -} elsif (m/#pragma instantiate\s+ACE_Array\s*<(.*)>\s*$/) { - print "#pragma instantiate ACE_Array_Base<", $1, ">\n"; -} - diff --git a/bin/Array_Helper b/bin/Array_Helper deleted file mode 100755 index 6ffce3b799e..00000000000 --- a/bin/Array_Helper +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -# Finds all files that instantiate ACE_Array and runs the Array.pl -# perl script on them, please check $ACE_ROOT/bin/Array.pl for more -# details. - -find $* -type f -a \( -name '*.h' \ - -o -name '*.i' \ - -o -name '*.cpp' \) | - xargs egrep -l 'template[ \t]*class[ \t]*ACE_Array[ \t]*\<' | - xargs perl -pi $ACE_ROOT/bin/Hash_Map_Manager.pl - - diff --git a/bin/GenExportH.BAT b/bin/GenExportH.BAT deleted file mode 100755 index 31b36858328..00000000000 --- a/bin/GenExportH.BAT +++ /dev/null @@ -1,51 +0,0 @@ -@Echo off -REM -REM $Id$ -REM -REM Usage: -REM GenExportH.BAT <EXPORT_TAG> > <export_file.h> -REM -REM Author: Nanbor Wang <nanbor@cs.wustl.edu> -REM - -if "%1" == "" goto emptyexport -Echo // -*- C++ -*- -Echo // $Id$ -Echo // Definition for Win32 Export directives. -Echo // This file is generated automatically by -Echo // ${ACE_ROOT}/GenExportH.BAT -Echo // ------------------------------ -Echo #if !defined (%1_EXPORT_H) -Echo #define %1_EXPORT_H -Echo. -Echo #include "ace/OS.h" -Echo. -Echo #if !defined (%1_HAS_DLL) -Echo #define %1_HAS_DLL 1 -Echo #endif /* ! %1_HAS_DLL */ -Echo. -Echo #if defined (%1_HAS_DLL) -Echo # if (%1_HAS_DLL == 1) -Echo # if defined (%1_BUILD_DLL) -Echo # define %1_Export ACE_Proper_Export_Flag -Echo # define %1_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -Echo # else -Echo # define %1_Export ACE_Proper_Import_Flag -Echo # define %1_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -Echo # endif /* %1_BUILD_DLL */ -Echo # else -Echo # define %1_Export -Echo # define %1_SINGLETON_DECLARATION(T) -Echo # endif /* ! %1_HAS_DLL == 1 */ -Echo #else -Echo # define %1_Export -Echo # define %1_SINGLETON_DECLARATION(T) -Echo #endif /* %1_HAS_DLL */ -Echo. -Echo #endif /* %1_EXPORT_H */ -Echo. -Echo // End of auto generated file. -goto endrun -:emptyexport -Echo #error usage: GenExportH.BAT EXPORT_TAG (Remember to redirect the output to a file.) -:endrun
\ No newline at end of file diff --git a/bin/Hash_Map_Manager.pl b/bin/Hash_Map_Manager.pl deleted file mode 100755 index cf37f69b6a4..00000000000 --- a/bin/Hash_Map_Manager.pl +++ /dev/null @@ -1,146 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' - & eval 'exec perl -pi -S $0 $argv:q' - if 0; - -# $Id$ - -# -# This script is used by Hash_Map_Manager_Helper. -# - -# -# This script helps in fixing the template instantiations changes -# required by the new design of ACE_Hash_Map_Manager. -# -# Note that this script is not a 100% fool proof: -# -# (a) It uses commas to delimit the types in ACE_Hash_Map_Manager<X, -# Y, Z>. If X, Y, or Z are complicated types containing commas (e.g., -# T<a, b>), this script will not work. Also, all template parameters -# are assumed to be on the same line. -# -# In the case where this script will not work, here are the cookbook, -# do-it-yourself instructions: -# -# ACE_Hash_Map_Entry<X, Y> -# -# changes to: -# -# ACE_Hash_Map_Entry<X, Y> -# ACE_Hash<X> -# ACE_Equal_To<X> -# -# -# ACE_Hash_Map_Iterator_Base<X, Y, Z> -# -# changes to: -# -# ACE_Hash_Map_Iterator_Base_Ex<X, Y, ACE_Hash<X>, ACE_Equal_To<X>, Z> -# -# -# ACE_Hash_Map_Manager<X, Y, Z> -# -# changes to: -# -# ACE_Hash_Map_Manager<X, Y, Z> -# ACE_Hash_Map_Manager_Ex<X, Y, ACE_Hash<X>, ACE_Equal_To<X>, Z> -# -# -# ACE_Hash_Map_Iterator<X, Y, Z> -# -# changes to: -# -# ACE_Hash_Map_Iterator<X, Y, Z> -# ACE_Hash_Map_Iterator_Ex<X, Y, ACE_Hash<X>, ACE_Equal_To<X>, Z> -# -# -# ACE_Hash_Map_Reverse_Iterator<X, Y, Z> -# -# changes to: -# -# ACE_Hash_Map_Reverse_Iterator<X, Y, Z> -# ACE_Hash_Map_Reverse_Iterator_Ex<X, Y, ACE_Hash<X>, ACE_Equal_To<X>, Z> - - -# (b) The second problem is for g++ users (version lower than -# 2.8). g++ is broken such that if you explicitly instantiate -# templates, it will ignore template specialization. Therefore if you -# are using the template instantiation provided in ACE for ACE_Hash -# and ACE_Equal_To, don't instantiate those templates. - -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -$template_instantiation = "template class"; -$end_of_template_instantiation = ";"; - -$pragma_instantiation = "#pragma instantiate"; -$end_of_pragma_instantiation = ""; - -while ($line = <>) -{ - find_match ("ACE_Hash_Map_Entry"); - if ($match) - { - $template_parameters =~ /(.*),\s*(.*)/; - $X = $1; - $Y = $2; - - print "$instantiation ACE_Hash_Map_Entry<$template_parameters>$end_of_instantiation\n"; - print "$instantiation ACE_Hash<$X>$end_of_instantiation\n"; - print "$instantiation ACE_Equal_To<$X>$end_of_instantiation\n"; - next; - } - - add_ex ("ACE_Hash_Map_Manager", 1); - add_ex ("ACE_Hash_Map_Iterator", 1); - add_ex ("ACE_Hash_Map_Reverse_Iterator", 1); - add_ex ("ACE_Hash_Map_Iterator_Base", 0); - - print $line; -} - -sub find_match -{ - $key = $_[0].'\s*<\s*(.*)>\s*'; - if ($line =~ /$template_instantiation \s*$key$end_of_template_instantiation$/) - { - $match = 1; - $template_parameters = $1; - $instantiation = $template_instantiation; - $end_of_instantiation = $end_of_template_instantiation; - } - elsif ($line =~ /$pragma_instantiation \s*$key$end_of_pragma_instantiation$/) - { - $match = 1; - $template_parameters = $1; - $instantiation = $pragma_instantiation; - $end_of_instantiation = $end_of_pragma_instantiation; - } - else - { - $match = 0; - } -} - -sub add_ex -{ - $add_original_line = $_[1]; - find_match ($_[0]); - if ($match) - { - $template_parameters =~ /(.*),\s*(.*),\s*(.*)/; - $X = $1; - $Y = $2; - $Z = $3; - - if ($add_original_line) - { - print "$instantiation $_[0]<$template_parameters>$end_of_instantiation\n"; - } - - print "$instantiation $_[0]_Ex<$X, $Y, ACE_Hash<$X>, ACE_Equal_To<$X>, $Z>$end_of_instantiation\n"; - next; - } -} diff --git a/bin/Hash_Map_Manager_Helper b/bin/Hash_Map_Manager_Helper deleted file mode 100755 index f65cd584684..00000000000 --- a/bin/Hash_Map_Manager_Helper +++ /dev/null @@ -1,76 +0,0 @@ -#! /bin/sh - -# -# $Id$ -# - -# -# This script uses Hash_Map_Manager.pl. -# - -# -# This script helps in fixing the template instantiations changes -# required by the new design of ACE_Hash_Map_Manager. -# -# Note that this script is not a 100% fool proof: -# -# (a) It uses commas to delimit the types in ACE_Hash_Map_Manager<X, -# Y, Z>. If X, Y, or Z are complicated types containing commas (e.g., -# T<a, b>), this script will not work. Also, all template parameters -# are assumed to be on the same line. -# -# In the case where this script will not work, here are the cookbook, -# do-it-yourself instructions: -# -# ACE_Hash_Map_Entry<X, Y> -# -# changes to: -# -# ACE_Hash_Map_Entry<X, Y> -# ACE_Hash<X> -# ACE_Equal_To<X> -# -# -# ACE_Hash_Map_Iterator_Base<X, Y, Z> -# -# changes to: -# -# ACE_Hash_Map_Iterator_Base_Ex<X, Y, ACE_Hash<X>, ACE_Equal_To<X>, Z> -# -# -# ACE_Hash_Map_Manager<X, Y, Z> -# -# changes to: -# -# ACE_Hash_Map_Manager<X, Y, Z> -# ACE_Hash_Map_Manager_Ex<X, Y, ACE_Hash<X>, ACE_Equal_To<X>, Z> -# -# -# ACE_Hash_Map_Iterator<X, Y, Z> -# -# changes to: -# -# ACE_Hash_Map_Iterator<X, Y, Z> -# ACE_Hash_Map_Iterator_Ex<X, Y, ACE_Hash<X>, ACE_Equal_To<X>, Z> -# -# -# ACE_Hash_Map_Reverse_Iterator<X, Y, Z> -# -# changes to: -# -# ACE_Hash_Map_Reverse_Iterator<X, Y, Z> -# ACE_Hash_Map_Reverse_Iterator_Ex<X, Y, ACE_Hash<X>, ACE_Equal_To<X>, Z> - - -# (b) The second problem is for g++ users (version lower than -# 2.8). g++ is broken such that if you explicitly instantiate -# templates, it will ignore template specialization. Therefore if you -# are using the template instantiation provided in ACE for ACE_Hash -# and ACE_Equal_To, don't instantiate those templates. - -for file in `find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.cpp" \) -print | xargs egrep -l "template[ \t]*class[ \t]*ACE_Hash_Map_Manager"` -do - echo Fixing template instantiations in $file - perl $ACE_ROOT/bin/Hash_Map_Manager.pl $file > $file.new - mv $file.new $file -done diff --git a/bin/Makefile b/bin/Makefile deleted file mode 100644 index fb69b34ef03..00000000000 --- a/bin/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -# Makefile for all the ACE binaries -# -# This Makefile can build clone and envinfo, but not both at the same time. -# clone must not use any ACE pieces, since it's building a clone of the source -# tree and it can't have done a build yet. envinfo, on the other hand, -# requires a built ACE to build correctly. -# This Makefile is distributed so as to be able to build clone without -# changes. To build envinfo, first build ACE, then come back and do a -# make envinfo=1 -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifdef envinfo -BIN = envinfo - -LSRC = $(addsuffix .cpp,$(BIN)) -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -# To build multiple executables in the same directory on AIX, it works -# best to wipe out any previously-created tempinc directory. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -COMPILE.cc := $(RM) -rf tempinc; $(COMPILE.cc) -endif - -else # Not building envinfo - -include $(ACE_ROOT)/include/makeinclude/platform_macros.GNU - -CFILES = clone.cpp -OFILES = clone.o -DFLAGS = -b elf -CCFLAGS += -I$(ACE_ROOT) - -############################################################################# -# C++ directives - -.SUFFIXES: .cpp -.cpp.o: - $(CXX) $(CCFLAGS) -c $< -############################################################################# - -clone: $(OFILES) - $(CXX) $(CCFLAGS) -o $@ $(OFILES) - -realclean: clean - -$(RM) clone - -endif # envinfo - - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/clone.o .obj/clone.so .shobj/clone.o .shobj/clone.so: clone.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/envinfo.o .obj/envinfo.so .shobj/envinfo.o .shobj/envinfo.so: envinfo.cpp \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/bin/Process.pm b/bin/Process.pm deleted file mode 100644 index d669325a132..00000000000 --- a/bin/Process.pm +++ /dev/null @@ -1,18 +0,0 @@ -# $Id$ - -$inc = "Process_Unix.pm"; -$DIR_SEPARATOR = "/"; -$EXE_EXT = ""; -$newwindow = ""; - -if ($^O eq "MSWin32") -{ - $inc = "Process_Win32.pm"; - $DIR_SEPARATOR = "\\"; - $EXE_EXT = ".exe"; - $newwindow = "no"; -} - -require $inc; - -1; diff --git a/bin/Process_Unix.pm b/bin/Process_Unix.pm deleted file mode 100644 index af1041616ea..00000000000 --- a/bin/Process_Unix.pm +++ /dev/null @@ -1,73 +0,0 @@ -# $Id$ -package Process; - -use POSIX "sys_wait_h"; - -sub Create -{ - my $name = shift; - my $args = shift; - my $self = []; - - FORK: - { - if ($self->[0] = fork) - { - #parent here - bless $self; - } - elsif (defined $self->[0]) - { - #child here - exec $name." ".$args; - die "ERROR: exec failed for <$name> <$args>"; - } - elsif ($! =~ /No more process/) - { - #EAGAIN, supposedly recoverable fork error - sleep 5; - redo FORK; - } - else - { - # weird fork error - print STDERR "ERROR: Can't fork: $!\n"; - } - } -} - -sub Terminate -{ - my $self = shift; - kill ('TERM', $self->[0]); - # print STDERR "Process_Unix::Kill 'TERM' $self->[0]\n"; -} - -sub Kill -{ - my $self = shift; - kill ('KILL', $self->[0]); - # print STDERR "Process_Unix::Kill 'TERM' $self->[0]\n"; -} - -sub Wait -{ - my $self = shift; - waitpid ($self->[0], 0); -} - -sub TimedWait -{ - my $self = shift; - my $maxtime = shift; - while ($maxtime-- != 0) { - my $pid = waitpid ($self->[0], &WNOHANG); - if ($pid != 0 && $? != -1) { - return $?; - } - sleep 1; - } - return -1; -} - -1; diff --git a/bin/Process_Win32.pm b/bin/Process_Win32.pm deleted file mode 100644 index 7caca7c494b..00000000000 --- a/bin/Process_Win32.pm +++ /dev/null @@ -1,56 +0,0 @@ -# $Id$ -package Process; - -use Win32::Process; - -sub Create -{ - my $name = shift; - my $args = shift; - my $self = []; - - my $console = 0; - - if ($newwindow eq "yes") - { - $console = CREATE_NEW_CONSOLE; - } - else - { - $console = 0; - } - - Win32::Process::Create ($self->[0], $name, $name." ".$args, 0, - $console, "."); - bless $self; -} - -sub Kill -{ - my $self = shift; - Win32::Process::Kill ($self->[0], -1); -} - -sub Terminate -{ - my $self = shift; - Win32::Process::Kill ($self->[0], -1); -} - -sub Wait -{ - my $self = shift; - Win32::Process::Wait ($self->[0], INFINITE); -} - -sub TimedWait -{ - my $self = shift; - my $maxtime = shift; - Win32::Process::Wait ($self->[0], $maxtime * 1000); - $status = 0; - Win32::Process::GetExitCode ($self->[0], $status); - return $status; -} - -1; diff --git a/bin/README.html b/bin/README.html deleted file mode 100644 index 8deb59d4462..00000000000 --- a/bin/README.html +++ /dev/null @@ -1,171 +0,0 @@ -<!-- $Id$ --> -<HTML> - -<HEAD> -<TITLE>ACE Documentation Tools</TITLE> - -<BODY text = "#000000" -link="#000fff" -vlink="#ff0f0f" -bgcolor="#ffffff"> - -<HR> -<H3>ACE Documentation Tools</H3> - -This <A HREF="http://www.cs.wustl.edu/~schmidt/ACE-bin/">directory</A> -contains versions of the freely available <A -HREF="http://www.dscpl.com.au/">OSE</A> tools used to generate the ACE -<A -HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/man/man3/">man</A> -and <A -HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/man/acewindex.html">HTML</A> -documentation. These tools were originally written by <A -HREF="mailto:grahamd@nms.otc.com.au"> Graham Dumpleton</A> and later -modified by <A HREF="mailto:kdorn@erlh.siemens.de">Karlheinz Dorn</A>. -<A HREF="http://www.cs.wustl.edu/~schmidt/ACE-members.html">We</A> are -very grateful to Graham and Karlheinz for these tools. You can obtain -the ACE documentation-generation tools in the <A -HREF="http://www.cs.wustl.edu/~schmidt/ACE-obtain.html">ACE</A> -release. <P> - -<H3>Modified Version of the OSE Documentation Tools</H3> - -The primary goal of Karlheinz's modifications was to create a -<EM>class</EM>.hxx and <EM>class</EM>.cxx file (for each class, -struct, union included within the original ACE header file) from the -ACE *.h header files by collecting the comments from that file and -feeding them into the newly created files, but keeping the ACE *.h -file untouched. <P> - -This helps when making product documentation using commercial -documentation tools (e.g., <A HREF="http://www.k2.co.uk">George</A>, -<A -HREF="http://www.zib.de/Visual/software/doc++/index.html">doc++</a>, -etc.) by feeding in these newly created files with a customizable -layout. The modifications are an upgrade to the original OSE-tools, -but many bug-fixes are also done for the OSE-tool files (some are -listed below). <P> - -Incidentally, the classinfo tools in OSE have evolved independently -since the copies in ACE were made and they support new features not -supported in the ACE version of the tools. Certain subtle changes -were also made in the ACE copies for indicating sections, -<em>etc.</em>, which makes them different from the OSE documentation. -For more information please contact <A -HREF="mailto:grahamd@nms.otc.com.au">Graham Dumpleton</A>, who heads -the <A HREF="http://www.dscpl.com.au/">OSE</A> project. <P> - -Karlheinz's extensions make it easy to include new ACE versions into -commercial documentations without doing any painful modifications of -the deltas within a frozen ACE-version or directly within ACE source -files when a new release arises. <P> - -The following changes were made to the original OSE tools: - -<UL> - -<LI> The vendor headers can be suppressed within the hiding.fmt file, -so it is possible to generate <EM>class</EM>.cxx and -<EM>class</EM>.hxx files consisting only of pure class description -(hxx) and pure prototypes (cxx). Look at the vendor.fmt file and -change the field <EM>vendor</EM> in replacing it with your company -identifying line. <P> - -<LI> Added a new script class2hxxcxx for making a <EM>class</EM>.hxx file for each - class, struct, union included in an ACE *.h file as well as a *.cxx - file that includes the correct prototypes for all classes within that - *.h file. <P> - -<LI> Added new script info2headsrc for creating a <EM>class</EM>.hxx file for each - class, struct, union included in an ACE *.h file as well as a <EM>class</EM>.cxx - file that includes the correct prototypes for that class. <P> - -<LI> added a new script class2hxxcxxsingle for the feature listed above. <P> - -<LI> added a new format file named "hiding.fmt" to control more fine grained output - of a class in separating/suppressing PUBLIC, PROTECTED, PRIVATE parts of a - class, struct, union for output explicitly. <P> - -<LI> added a new format file named "vendor.fmt" to control vendor specific - compilation-unit headers as well as class and method headers for the newly - created <EM>class</EM>.hxx and <EM>class</EM>.cxx files. The information for these headers - is collected from the headers and comments of the according ACE *.h files. <P> - -<LI> changed info2doc and info2src for the features listed above. <P> - -<LI> added the ability for handling multiline ENUMs properly (class2info,info2doc). <P> - -<LI> added the ability for handling operator functions properly (info2src). <P> - -<LI> added the ability for handling template functions properly (info2src). <P> - -<LI> added the ability for handling nested classes, structs, unions properly - by introducing gawk-function recursion within info2doc (class2info, - info2doc, info2src). <P> - -<LI> added the ability for handling default values properly (info2src). <P> - -</UL> - -<HR><P> -<H3>Known Bugs</H3> - -Some bugs inherited from the original OSE-tools are remaining. So the -developer of the *.h files should the following keep in mind: - -- do not write multiline inheritance! <P> - -INCORRECT: <P> - -<pre><code> - class x : - public y - { - } -</pre></code> - -CORRECT: <P> - -<pre><code> - class x : public y - { - } -</pre></code> - -- do not write multiline templates!<P> - -INCORRECT: <P> - -<pre><code> - template <class t, - class> - class x - { - } -</pre></code> - -CORRECT: <P> - -<pre><code> - template <class t, class u> - class x - { - } -</pre></code> - -<P> -<HR><P> - -Other documentation tools are available at the following URLs: <P> - -<UL> -<A HREF="http://www.dscpl.com.au/">OSE documentation tools</A> -<LI> <A HREF="http://www.zib.de/Vishal/software/doc++/index.html">doc++</a> -<LI> <A HREF="http://www.k2.co.uk">George</A> -</UL> - -<P><HR><P> -Back to the <A HREF="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</A> home page. - -</BODY> -</HTML> diff --git a/bin/Service_Config.perl b/bin/Service_Config.perl deleted file mode 100755 index 2699881eee7..00000000000 --- a/bin/Service_Config.perl +++ /dev/null @@ -1,31 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' - & eval 'exec perl -pi -S $0 $argv:q' - if 0; - -# $Id$ -# -# You may want to run the "find" command with this script, which maybe -# something like this: -# -# find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.C" -o -name "*.cc" -o -name "*.c" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.ipp" \) -print | xargs $ACE_ROOT/bin/Service_Config.perl - -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -s/ACE_Service_Config::run_reactor_event_loop/ACE_Reactor::run_event_loop/g; -s/ACE_Service_Config::end_reactor_event_loop/ACE_Reactor::end_event_loop/g; -s/ACE_Service_Config::reactor_event_loop_done/ACE_Reactor::event_loop_done/g; -s/ACE_Service_Config::run_proactor_event_loop/ACE_Proactor::run_proactor_event_loop/g; -s/ACE_Service_Config::end_proactor_event_loop/ACE_Proactor::end_proactor_event_loop/g; -s/ACE_Service_Config::proactor_event_loop_done/ACE_Proactor::event_loop_done/g; -s/ACE_Service_Config::run_reactorEx_event_loop/ACE_ReactorEx::run_event_loop/g; -s/ACE_Service_Config::end_reactorEx_event_loop/ACE_ReactorEx::end_event_loop/g; -s/ACE_Service_Config::reactorEx_event_loop_done/ACE_ReactorEx::event_loop_done/g; -s/ACE_Service_Config::reactor/ACE_Reactor::instance/g; -s/ACE_Service_Config::proactor/ACE_Proactor::instance/g; -s/ACE_Service_Config::reactorEx/ACE_ReactorEx::instance/g; -s/ACE_Service_Config::svc_rep/ACE_Service_Repository::instance/g; -s/ACE_Service_Config::thr_mgr/ACE_Thread_Manager::instance/g; -s/ACE_Service_Config::alloc/ACE_Allocator::instance/g; - diff --git a/bin/Uniqueid.pm b/bin/Uniqueid.pm deleted file mode 100644 index f1367caa6e4..00000000000 --- a/bin/Uniqueid.pm +++ /dev/null @@ -1,28 +0,0 @@ -# $Id$ -sub uniqueid -{ - if ($^O eq "MSWin32") - { - my $uid = 1; - - open (IPNUM, "ipconfig|") || die "Can't run ipconfig: $!\n"; - - while (<IPNUM>) - { - if (/Address/) - { - $uid = (split (/: (\d+)\.(\d+)\.(\d+)\.(\d+)/))[4]; - } - } - - close IPNUM; - - return $uid; - } - else - { - return getpwnam (getlogin ()); - } -} - -1;
\ No newline at end of file diff --git a/bin/ace_components b/bin/ace_components deleted file mode 100755 index 0d8a1a086a9..00000000000 --- a/bin/ace_components +++ /dev/null @@ -1,80 +0,0 @@ -#! /bin/sh -# $Id$ -# -# Encapsulates set/access of a components file, which records set of -# components that were built in a library. Intended to be used by -# Makefiles and scripts. See ACE_wrappers/ace/Makefile for an example. -# -usage="usage: $0 --ace | --orbsvcs | --tao \ - [--remove | --set \" <components list> \"]" - -#### -#### Make sure that ACE_ROOT and TAO_ROOT are set. -#### -if [ ! "$ACE_ROOT" ]; then - echo $0': your ACE_ROOT environment variable is not set!' 1>&2 - exit -1 -fi -if [ ! "$TAO_ROOT" ]; then - TAO_ROOT=$ACE_ROOT/TAO - export TAO_ROOT -fi - -#### -#### Process command line arguments. -#### -if [ $# -ge 1 ]; then - case $1 in - --ace) components_file=$ACE_ROOT/ace/ACE_COMPONENTS.list ;; - --orbsvcs) - components_file=$TAO_ROOT/orbsvcs/orbsvcs/ORBSVCS_COMPONENTS.list ;; - --tao) components_file=$TAO_ROOT/tao/TAO_COMPONENTS.list ;; - *) echo $usage; exit -1 ;; - esac - shift -else - echo $usage - exit -1 -fi - -set_components=0 -if [ $# -ge 1 ]; then - if [ $1 = '--set' ]; then - set_components=1 - shift - if [ $# -eq 1 ]; then - components=$1 - shift - else - echo $usage - exit -1 - fi - elif [ $1 = '--remove' ]; then - rm -f $components_file - else - echo $usage - exit -1 - fi -fi - -if [ $set_components -eq 1 ]; then - #### - #### Update the components file, if it has changed since last set. - #### - if [ -f $components_file ]; then - if echo "$components" | diff - $components_file > /dev/null; then - : - else - echo "$components" > $components_file - fi - else - echo "$components" > $components_file - fi -else - #### - #### Access the contents of the components file, if it exists. - #### - if [ -f $components_file ]; then - cat $components_file - fi -fi diff --git a/bin/ace_ld b/bin/ace_ld deleted file mode 100755 index 2879512b225..00000000000 --- a/bin/ace_ld +++ /dev/null @@ -1,185 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -# Drop-in replacement for "ld" that supports munching. -# -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -$usage = - "usage: $0 [-? | [[-C <compile> --] [-m <munch>] [-n <nm>]] [-f]]] " . - "<ld command>\n"; - -#### To avoid quoting problems on the command line, all arguments -#### between -C and -- are combined into the single compile command. -$compile_option = 0; - -#### -#### process command line args -#### -while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) { - if ( $ARGV[0] eq '-C' ) { - $compile_option = 1; - if ( $ARGV[1] !~ /^[-].+$/ ) { - $compile = $ARGV[1]; shift; - } else { - print STDERR "$0: must provide argument for -c option\n"; - die $usage; - } - } elsif ( $ARGV[0] eq '--' ) { - $compile_option = 0; - } elsif ( $ARGV[0] eq '-m' ) { - if ( $ARGV[1] !~ /^[-].+$/ ) { - $munch = $ARGV[1]; shift; - } else { - print STDERR "$0: must provide argument for -m option\n"; - die $usage; - } - } elsif ( $ARGV[0] eq '-n' ) { - if ( $ARGV[1] !~ /^[-].+$/ ) { - $nm = $ARGV[1]; shift; - } else { - print STDERR "$0: must provide argument for -n option\n"; - die $usage; - } - } elsif ( $ARGV[0] eq '-?' ) { - print "$usage"; - exit; - } else { - if ($compile_option) { - $compile .= " $ARGV[0]"; - } else { - warn "$0: unknown option $ARGV[0]\n"; - die $usage; - } - } - shift; -} - - -#### -#### Save link command, i.e., current @ARGV, for use below. -#### -@args = @ARGV; - - -#### -#### Find full path to each library. -#### -@libDirs = (); -$current_dir_in_libDirs = 0; -@libs = (); -@objs = ''; - -foreach $arg (@ARGV) { - if ($arg =~ /^['"]?-L([\S]+)/) { - ($dir = $1) =~ s%/+$%%; #### trim any trailing slashes - push (@libDirs, $dir); - $current_dir_in_libDirs = 1 if $dir eq '.'; - } elsif ($arg =~ /^['"]?-l([\S]+)/) { - push (@libs, $1); - } elsif ($arg =~ /\.o$/) { - push (@objs, $arg); - } -} - -#### Add . to libDirs if it doesn't already have it. -push (@libDirs, ".") unless $current_dir_in_libDirs; - -foreach $lib (@libs) { - foreach $libDir (@libDirs) { - if (-e "$libDir/lib$lib.a") { - $full_path{$lib} = "$libDir/lib$lib.a"; - last; - } - } -} - - -#### -#### Set up signal handler. -#### -$done = 0; -$SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup'; - - -#### -#### Munch, if $munch is non-null. -#### -if ($munch) { - $munch_objs = join (' ', @objs); - $munch_libs = join (' ', values %full_path); - - open (MUNCH, "$nm $munch_objs $munch_libs | $munch |") || - &fail ("$0: unable to run \"$nm\" or \"$munch\"\n"); - - open (CTORDTOR, "> __ctordtor.c") || - &fail ("$0: unable to open \"__ctordtor.c\"\n"); - - while (<MUNCH>) { - #### Filter out munch output that contains '.cpp'. It results from - #### .cpp files that have no text or data, e.g., .cpp files that - #### only contain template instantiations. These lines confuse g++. - print CTORDTOR unless /\.cpp/; - } - - close CTORDTOR || &fail ("$0: unable to write \"__ctordtor.c\"\n"); - close MUNCH; - - system ("$compile -o .obj/__ctordtor.o __ctordtor.c") && - &fail ("$0: \"$compile\" failed\n"); -} - - -#### -#### Construct the link command from @args and perform the link. -#### -if ($munch) { - #### Insert ctordtor object file before first library in link command. - $arg_lib = 0; - foreach $arg (@ARGV) { - if ($arg =~ /^['"]?-l/) { - last; - } - ++$arg_lib; - } - splice (@args, $arg_lib, 0, ".obj/__ctordtor.o"); -} - -$link_command = join (' ', @args); - -system ("$link_command") && &fail ("$0: $link_command failed\n"); - - -$done = 1; -&cleanup; - - -#### -#### -#### -sub fail { - local ($message) = @_; - - warn $message; - &cleanup; -} - - -#### -#### clean up when done or on signal -#### -sub cleanup { - unlink "__ctordtor.c", ".obj/__ctordtor.o"; - if ($done) { - exit 0; - } else { - exit 1; - } -} - -#### EOF diff --git a/bin/auto_compile b/bin/auto_compile deleted file mode 100755 index 7fa07f0e947..00000000000 --- a/bin/auto_compile +++ /dev/null @@ -1,324 +0,0 @@ -# -*- perl -*- -# $Id$ -# -# This script checkouts ACE from CVS, updates the "clone" directory, -# compiles $ACE_ROOT/ace and $ACE_ROOT/tests and finally runs -# $ACE_ROOT/tests/run_tests.sh. -# -# If it detects any problem it send email. -# -# DO NOT invoke this script from your crontab, use -# auto_compile_wrapper for that. -# -# This script requires Perl5. -# -# TODO: Modify the script or split it in such a way that the main copy -# can be obtained either using cvs or downloading the lastest beta -# from the WWW. -# - -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -use File::Basename; -use FileHandle; -require POSIX; - -# This is the module we will checkout, someday someone could define a -# smaller module. -$MODULE='ACE_wrappers'; - -# This are the sub-directories (in the module) we really compile. - -@BUILD_LIST= - ('ace', - 'netsvcs', - 'tests', - 'apps/gperf', - 'websvcs', -# 'TAO/tao', -# 'TAO/TAO_IDL', -# 'TAO/orbsvcs', -# 'TAO/tests', -# 'TAO/examples/POA', -# 'TAO/performance-tests'); - 'TAO'); - -# This are the pairs "sub-directory , script" we run; the separator -# *must* be a space followed by a comma and then another space. - -@RUN_LIST = - ( 'tests , run_tests.sh', - 'TAO/tests/Param_Test , run_test.pl', - 'TAO/tests/Param_Test , run_test.pl -i dii', - 'TAO/performance-tests/Cubit/TAO/IDL_Cubit , run_test.pl', - 'TAO/tests/OctetSeq , run_test.pl', - 'TAO/tests/Multiple_Inheritance , run_test.pl', - 'TAO/tests/MT_Client , run_test.pl', - 'TAO/tests/MT_Server , run_test.pl', - 'TAO/tests/Faults , run_test.pl', - 'TAO/tests/NestedUpcall/Simple , run_test.pl', - 'TAO/tests/NestedUpcall/MT_Client_Test , run_test.pl', - 'TAO/tests/NestedUpcall/Triangle_Test , run_test.pl', - 'TAO/tests/POA/Identity , run_test.pl', - 'TAO/tests/POA/Deactivation , run_test.pl', - 'TAO/tests/POA/Destruction , run_test.pl', - 'TAO/tests/IORManipulation , run_test.pl', - 'TAO/tests/Timeout , run_test.pl', - 'TAO/examples/POA/Adapter_Activator , run_test.pl', - 'TAO/examples/POA/DSI , run_test.pl', - 'TAO/examples/POA/Default_Servant , run_test.pl', - 'TAO/examples/POA/Explicit_Activation , run_test.pl', - 'TAO/examples/POA/FindPOA , run_test.pl', - 'TAO/examples/POA/Forwarding , run_test.pl', - 'TAO/examples/POA/NewPOA , run_test.pl', - 'TAO/examples/POA/On_Demand_Activation , run_test.pl', - 'TAO/examples/POA/On_Demand_Loading , run_test.pl', - 'TAO/examples/POA/Reference_Counted_Servant , run_test.pl', - 'TAO/examples/POA/Loader , run_test.pl', - 'TAO/examples/POA/RootPOA , run_test.pl', - 'TAO/examples/POA/Adapter_Activator , run_test.pl', - 'TAO/examples/Simple/bank , run_test.pl', - 'TAO/examples/Simple/grid , run_test.pl', - 'TAO/examples/Simple/time-date , run_test.pl', - 'TAO/examples/Simple/time , run_test.pl', - 'TAO/orbsvcs/tests/Simple_Naming , run_test.pl', - 'TAO/orbsvcs/tests/Trading , run_test.pl', - 'TAO/orbsvcs/tests/Event/Basic , run_test.pl', - 'TAO/orbsvcs/tests/Event/Performance , run_test.pl', - 'TAO/orbsvcs/tests/EC_Basic , run_test.pl', - 'TAO/orbsvcs/tests/EC_Custom_Marshal , run_test.pl', - 'TAO/orbsvcs/tests/EC_Throughput , run_test.pl', -# 'TAO/orbsvcs/tests/EC_Mcast , run_test.pl', -# 'TAO/orbsvcs/tests/EC_Multiple , run_test.pl', - 'TAO/orbsvcs/tests/Event_Latency , run_test.pl', - 'TAO/examples/Simple/echo , run_test.pl < Echo.idl', -# 'TAO/examples/Simple/chat , run_test.pl', - 'TAO/orbsvcs/tests/Property , run_test.pl', - 'TAO/performance-tests/POA/Object_Creation_And_Registration , run_test.pl', - 'TAO/performance-tests/Cubit/TAO/MT_Cubit , run_test.pl -n 100' -# 'TAO/orbsvcs/tests/ImplRepo , run_test.pl airplane', -# 'TAO/orbsvcs/tests/ImplRepo , run_test.pl airplane_ir', - ); - - -# We obtain our revision to report errors. -$REVISION='$Revision$ '; - -# Find out the command name. -$CMD = basename($0); - -# Extract configuration information from command line. -# TODO: Some validation and checking should be done here. -$CHECKOUT = $ARGV[0]; -$BUILD = $ARGV[1]; -$LOGDIR = $ARGV[2]; -$ADMIN = $ARGV[3]; -$MAKEFLAGS = $ARGV[4]; - -# When an error is found we try to die gracefully and send some email -# to ADMIN. - -$disable_file = $LOGDIR . '/.disable'; - -sub mywarn { - local @msg = @_; - open(MAIL, "|mail $ADMIN") - || die "cannot open email pipe on error: $msg\n"; - print MAIL 'The following message is brought to you by: ', "\n"; - print MAIL $CMD, ' [', $REVISION, "] for $BUILD on $CHECKOUT\n"; - print MAIL "\n"; - local $m; - foreach $m (@msg) { - print MAIL $m, "\n"; - } - print MAIL "\nPlease check log files for more info\n"; - close(MAIL) - || die "cannot close email pipe on error: $msg\n"; -} - -sub mydie { - mywarn @_; - print HIST 'FAILED', "\n"; - unlink $disable_file - || die "cannot unlink disable file"; - exit 0; -} - -### MAIN FUNCTION - -$histfile = $LOGDIR . '/history'; -open(HIST, '>>' . $histfile) - # Do not use 'mydie' to report the problem, it tries to use HIST.... - || die "cannot open history file \"$histfile\"\n"; - -$date = localtime; - -print HIST $CMD, ': running at ', $date, ' '; - -if (-f $disable_file) { - print HIST "DISABLED\n"; - exit 0; -} - -open (DISABLE, '>' . $disable_file) - || mydie "cannot open disable file"; -print DISABLE "auto_compile <$date> is running\n"; -close (DISABLE) - || mydie "cannot close disable file"; - -$LOGFILE = $LOGDIR . '/' . POSIX::strftime("%b%d_%Y.log", localtime); -open(LOG, '>' . $LOGFILE) - || mydie "cannot open log file"; - -LOG->autoflush (); - -# The following lines are useful when debugging the script or wrapper. -# print LOG $CHECKOUT, " ", $BUILD, " ", $LOGDIR, " ", $ADMIN, "\n"; -#while (($key,$value) = each %ENV) { -# print LOG $key, " = ", $value, "\n"; -#} - -chdir($CHECKOUT) - || mydie "Cannot chdir to $CHECKOUT"; - -$date = localtime; -print LOG "$CMD: starting checkout at ", $date, "\n"; -open(CVS, "cvs checkout -P $MODULE 2>&1 |") - || mydie "cannot start checkout of $MODULE"; - -$conflicts = 0; -while (<CVS>) { - if (m/^C /) { - $conflicts = 1; - } - print LOG $_; -} -close(CVS) - || mydie "error while checking out $MODULE"; -$date = localtime; -print LOG "$CMD: checkout finished at ", $date, "\n"; - -if ($conflicts != 0) { - mydie "conflicts on checkout"; -} - -chdir($MODULE) - || mydie "cannot chdir to $MODULE"; - -$date = localtime; -print LOG "$CMD: starting clone at ", $date, "\n"; -open(MAKE, "bin/create_ace_build -a -v $BUILD 2>&1 |") - || mydie "cannot clone directory"; -while(<MAKE>) { - print LOG $_; -} -close(MAKE) - || mydie "error while cloning ACE_ROOT"; -$date = localtime; -print LOG "$CMD: clone finished at ", $date, "\n"; - -chdir('build/' . $BUILD) - || mydie "cannot chdir to $BUILD"; - -# This is needed for real make run.... -$ENV{'ACE_ROOT'} = $CHECKOUT . '/' . $MODULE . '/build/' . $BUILD; -$ENV{'TAO_ROOT'} = $CHECKOUT . '/' . $MODULE . '/build/' . $BUILD . '/TAO'; - -@failures = (); -$MAKEFLAGS .= ""; -foreach $i (@BUILD_LIST) { - $date = localtime; - print LOG "$CMD: =============================================\n"; - print LOG "$CMD: make for $i started at ", $date, "\n"; - open(MAKE, "make -k $MAKEFLAGS -C $i 2>&1 |") - || mydie "cannot start make for $i"; - - local $current_dir = $i; - local $last_error = ""; - while (<MAKE>) { - print LOG $_; - chop; - if (m/^make(\[[0-9]+\])?: Entering directory /) { - s/^make(\[[0-9]+\])?: Entering directory //; - s%^$ENV{'ACE_ROOT'}/%%; - $current_dir = $_; - } - if (m/^make(\[[0-9]+\])?: \*\*\*/) { - if ($last_error ne $current_dir) { - push @failures, "Error while compiling in $current_dir \n"; - $last_error = $current_dir; - } - } - if (m/Warning:/ || m/warning:/) { - if ($last_error ne $current_dir) { - push @failures, "Warning while compiling in $current_dir\n"; - $last_error = $current_dir; - } - } - } - if (close(MAKE) == 0) { - push @failures, "errors while running make in $i"; - } - $date = localtime; - print LOG "$CMD: make for $i finished at ", $date, "\n"; - print LOG "$CMD: =============================================\n\n"; -} - -foreach $i (@RUN_LIST) { - local @test_info = split (/\ \,\ /, $i); - local $directory = $test_info[0]; - local $program = $test_info[1]; - - $date = localtime; - print LOG "$CMD: =============================================\n"; - print LOG "$CMD: running $program in $directory at ", $date, "\n"; - local $subdir = - $CHECKOUT .'/'. $MODULE .'/build/'. $BUILD .'/'. $directory; - chdir ($subdir) - || mydie "cannot chdir to $subdir"; - - $run_error = 0; - if (open(RUN, "$program 2>&1 |") == 0) { - push @failures, "cannot run $program in $directory"; - next; - } - while (<RUN>) { - print LOG $_; - if (m/Error/ || m/FAILED/ || m/EXCEPTION/) { - $run_error = 1; - } - } - if (close(RUN) == 0) { - push @failures, "Error when closing pipe for $program in $directory"; - next; - } - $date = localtime; - print LOG "$CMD: $program finished ", $date, "\n"; - - if ($run_error != 0) { - push @failures, - "errors detected while running $program in $directory"; - } -} - -if ($#failures >= 0) { - mydie @failures; -} - -close(LOG) - || mydie "cannot close LOGFILE"; - -print HIST "OK\n"; -close(HIST) - || mydie "cannot close history file"; - -unlink $disable_file - || mydie "cannot unlink disable file"; - -exit 0; diff --git a/bin/auto_compile_win32.pl b/bin/auto_compile_win32.pl deleted file mode 100755 index 47731fff8d5..00000000000 --- a/bin/auto_compile_win32.pl +++ /dev/null @@ -1,331 +0,0 @@ - -# $Id$ -# Win32 autobuild helper. - -# use lib "$ENV{ACE_ROOT}/bin"; - -## TO-DO -## * Added command line options to selective compile library, et.al. -## * Added cvs update. Also controllable from command line. -## * Added building an running version_tests/. It uses a different -## naming scheme. -## * Selectively build some specific configs from command line. - -## Available command line switches -## * -k : Ignore error. Compile all projects in a collection regardless -## of errors. -## * -a : Build Alpha collections. -## * -D : Build DLLs only. -## * -L : Build LIBs only. -## * -d : Debug the script. No compilation will occur. -## * -v : Verbose mode. -## * -r : Rebuild all. (Default is Build.) - -@Win32_Lists= ("Win32 Debug", - "Win32 Release", - "Win32 Unicode Debug", - "Win32 Unicode Release"); - -@Win32_DLL_Version_Tests_Configs= ("Win32 DLL Debug", - "Win32 DLL Release", - "Win32 DLL Unicode Debug", - "Win32 DLL Unicode Release"); - -@Win32_LIB_Version_Tests_Configs = ("Win32 static Debug", - "Win32 static Release", - "Win32 static Unicode Debug", - "Win32 static Unicode Release"); - -@Alpha_Lists= ("Win32 Alpha Debug", - "Win32 Alpha Release", - "Win32 Alpha Unicode Debug", - "Win32 Alpha Unicode Release"); - -%Win32_DLL_Collections = ( "$Win32_Lists[0]" => <<EOD , # Debug -ace/ace.dsw, ACE DLL: -apps/gperf/src/gperf.dsw, gperf: -TAO/tao/TAO.dsw, TAO DLL: -TAO/TAO_IDL/tao_idl.dsw, TAO_IDL Compiler: -TAO/orbsvcs/orbsvcs/orbsvcs.dsw, ORB Services DLL: -TAO/orbsvcs/Naming_Service/Naming_Service.dsw, Naming_Service: -TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsw, Scheduling_Service: -TAO/orbsvcs/Event_Service/Event_Service.dsw, Event_Service: -TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsw, Dump_Schedule: -TAO/orbsvcs/Concurrency_Service/Concurrency_Service.dsw, Concurrency_Service: -TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.dsw, LifeCycle_Service: -TAO/orbsvcs/Trading_Service/Trading_Service.dsw, Trading_Service: -TAO/orbsvcs/Time_Service/Time_Service.dsw, Time_Service_Server: -TAO/orbsvcs/Time_Service/Time_Service.dsw, Time_Service_Clerk: -TAO/orbsvcs/ImplRepo_Service/ImplRepo_Service.dsw, ImplRepo_Service: -TAO/performance-tests/Cubit/TAO/IDL_Cubit/IDL_Cubit.dsw, IDL_Cubit Server: -TAO/performance-tests/Cubit/TAO/IDL_Cubit/IDL_Cubit.dsw, IDL_Cubit Client: -TAO/tests/Param_Test/Param_Test.dsw, Param_Test Server: -TAO/tests/Param_Test/Param_Test.dsw, Param_Test Client: -netsvcs/lib/netsvcs.dsw, NETSVCS Library: -netsvcs/servers/servers.dsw, NETSVCS Servers: -EOD - "$Win32_Lists[1]" => <<EOD , # Release -ace/ace.dsw, ACE DLL: -apps/gperf/src/gperf.dsw, gperf: -TAO/tao/TAO.dsw, TAO DLL: -TAO/TAO_IDL/tao_idl.dsw, TAO_IDL Compiler: -TAO/orbsvcs/orbsvcs/orbsvcs.dsw, ORB Services DLL: -TAO/orbsvcs/Naming_Service/Naming_Service.dsw, Naming_Service: -TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsw, Scheduling_Service: -TAO/orbsvcs/Event_Service/Event_Service.dsw, Event_Service: -TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsw, Dump_Schedule: -TAO/orbsvcs/Concurrency_Service/Concurrency_Service.dsw, Concurrency_Service: -TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.dsw, LifeCycle_Service: -TAO/orbsvcs/Trading_Service/Trading_Service.dsw, Trading_Service: -TAO/orbsvcs/Time_Service/Time_Service.dsw, Time_Service_Server: -TAO/orbsvcs/Time_Service/Time_Service.dsw, Time_Service_Clerk: -TAO/orbsvcs/ImplRepo_Service/ImplRepo_Service.dsw, ImplRepo_Service: -TAO/performance-tests/Cubit/TAO/IDL_Cubit/IDL_Cubit.dsw, IDL_Cubit Server: -TAO/performance-tests/Cubit/TAO/IDL_Cubit/IDL_Cubit.dsw, IDL_Cubit Client: -TAO/tests/Param_Test/Param_Test.dsw, Param_Test Server: -TAO/tests/Param_Test/Param_Test.dsw, Param_Test Client: -netsvcs/lib/netsvcs.dsw, NETSVCS Library: -netsvcs/servers/servers.dsw, NETSVCS Servers: -EOD - "$Win32_Lists[2]" => <<EOD , # Unicode Debug -ace/ace.dsw, ACE DLL: -EOD - "$Win32_Lists[3]" => <<EOD # Unicode Release -ace/ace.dsw, ACE DLL: -EOD - ); - -%Alpha_DLL_Collections = ( "$Alpha_Lists[0]" => <<EOD , # Debug -ace/ace.dsw, ACE DLL: -apps/gperf/src/gperf.dsw, gperf: -TAO/tao/TAO.dsw, TAO DLL: -TAO/TAO_IDL/tao_idl.dsw, TAO_IDL Compiler: -TAO/orbsvcs/orbsvcs/orbsvcs.dsw, ORB Services DLL: -TAO/orbsvcs/Naming_Service/Naming_Service.dsw, Naming_Service: -netsvcs/lib/netsvcs.dsw, NETSVCS Library: -netsvcs/servers/servers.dsw, NETSVCS Servers: -tests/tests.dsw, ALL: -EOD - "$Alpha_Lists[1]" => <<EOD , # Release -ace/ace.dsw, ACE DLL: -apps/gperf/src/gperf.dsw, gperf: -TAO/tao/TAO.dsw, TAO DLL: -TAO/TAO_IDL/tao_idl.dsw, TAO_IDL Compiler: -TAO/orbsvcs/orbsvcs/orbsvcs.dsw, ORB Services DLL: -TAO/orbsvcs/Naming_Service/Naming_Service.dsw, Naming_Service: -netsvcs/lib/netsvcs.dsw, NETSVCS Library: -netsvcs/servers/servers.dsw, NETSVCS Servers: -EOD - "$Alpha_Lists[2]" => <<EOD , # Unicode Debug -ace/ace.dsw, ACE DLL: -EOD - "$Alpha_Lists[3]" => <<EOD # Unicode Release -ace/ace.dsw, ACE DLL: -EOD - ); - -%Win32_Lib_Collections = ( "$Win32_Lists[0]" => <<EOD , # Debug -ace/ace.dsw, ACE LIB: -TAO/tao/TAO.dsw, TAO LIB: -TAO/TAO_IDL/tao_idl.dsw, TAO_IDL Compiler Static: -TAO/orbsvcs/orbsvcs/orbsvcs.dsw, ORB Services Static: -EOD - "$Win32_Lists[1]" => <<EOD , # Release -ace/ace.dsw, ACE LIB: -TAO/tao/TAO.dsw, TAO LIB: -TAO/TAO_IDL/tao_idl.dsw, TAO_IDL Compiler Static: -TAO/orbsvcs/orbsvcs/orbsvcs.dsw, ORB Services Static: -EOD - "$Win32_Lists[2]" => <<EOD , # Unicode Debug -ace/ace.dsw, ACE LIB: -EOD - "$Win32_Lists[3]" => <<EOD # Unicode Release -ace/ace.dsw, ACE LIB: -EOD - ); - -%Alpha_Lib_Collections = ( "$Alpha_Lists[0]" => <<EOD , # Debug -ace/ace.dsw, ACE LIB: -EOD - "$Alpha_Lists[1]" => <<EOD , # Release -ace/ace.dsw, ACE LIB: -EOD - "$Alpha_Lists[2]" => <<EOD , # Unicode Debug -ace/ace.dsw, ACE LIB: -EOD - "$Alpha_Lists[3]" => <<EOD # Unicode Release -ace/ace.dsw, ACE LIB: -EOD - ); - - - -sub Build_Config -{ - my $Config = shift; - my $Collection = shift; - my $Bname = ""; - my $Project_File = ""; - my $Project_Name = ""; - my $Status = -1; - my $Cntr = 0; - my $Command_Line = ""; - - @Collection = split /:\s*/, $Collection; - for ($Cntr = 0; $Cntr < scalar (@Collection); $Cntr++) - { - $Project_Dir = $Collection[$Cntr]; - $Project_Dir =~ s/(.*)\/[^\/]*/$1/; - $Bname = $Collection[$Cntr]; - $Bname =~ s/.*\/([^\/]*)/$1/; - ($Project_File, $Project_Name) = split /,\s*/, $Bname; - chdir ("$ENV{ACE_ROOT}/$Project_Dir"); - $Command_Line = "msdev.com $Project_File /MAKE \"$Project_Name - $Config\" /USEENV $Build_Cmd /Y3"; - if ( $Debug == 0 ) - { - $Status = - system "$Command_Line"; - } - else - { - $Status = 0; - print "*****************************************\n"; - print "Project_Dir: $Project_Dir -- Project_Name: $Project_Name\n"; - print "chdir (\"$ENV{ACE_ROOT}/$Project_Dir\");\n"; - print "$Status = $Command_Line\n\n"; - } - - if ($Ignore_error == 0) - { - return if $Status != 0; - } - } -} - -sub Build_Version_Test -{ - my $Cntr = shift; - - print "Building Version Test $Version_Test_Target[$Cntr]\n" if ($Verbose == 1); - - chdir ("$ENV{ACE_ROOT}/tests/version_tests"); - $Command_Line = "msdev.com version_tests.dsw /MAKE \"ALL - $Version_Test_Target[$Cntr]\" /USEENV $Build_Cmd /Y3"; - if ( $Debug == 0 ) - { - $Status = - system "$Command_Line"; - } - else - { - $Status = 0; - print "$Status = $Command_Line\n"; - } - - if ($Ignore_error == 0) - { - return if $Status != 0; - } -} - -sub Build_Collection -{ - print "Build_Collection\n" if ( $Verbose ); - my $Cntr = 0; - for (; $Cntr < scalar(@Lists); $Cntr ++) - { - $Config = $Lists[$Cntr]; - print "Building $Config of: \n$Target{$Config}\n" if ( $Debug ); - Build_Config ($Config, $Target{$Config}); - if ($Build_Alpha == 0) - { - Build_Version_Test ($Cntr); - } - } -} - - -$Verbose = 0; -$Debug = 0; -$Ignore_error = 0; # By default, bail out if an error occurs. -$Build_Alpha = 0; -$Build_DLL = 1; -$Build_LIB = 1; -$Build_Cmd = "/BUILD"; -@Lists = @Win32_Lists; -%DLL_Collections = %Win32_DLL_Collections; -%Lib_Collections = %Win32_Lib_Collections; - -## Parse command line argument -while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) -{ - if ( $ARGV[0] eq '-k' ) # Ignore error. Compile the whole thing - { - print "Ignore errors\n" if ( $Verbose ); - $Ignore_error = 1; # in the same configuration. - } - elsif ( $ARGV[0] eq '-a' ) # Use Alpha - { - print "Build Alpha\n" if ( $Verbose ); - $Build_Alpha = 1; - @Lists = @Alpha_Lists; - %DLL_Collections = %Alpha_DLL_Collections; - %Lib_Collections = %Alpha_Lib_Collections; - } - elsif ( $ARGV[0] eq '-d') # Script debugging mode - { - print "Debug mode on\nVerbose mode on\n"; - $Debug = 1; - $Verbose = 1; - } - elsif ( $ARGV[0] eq '-D' ) # Build DLL only - { - print "Build DLL only\n" if ( $Verbose ); - $Build_LIB = 0; - } - elsif ( $ARGV[0] eq '-L' ) # Build LIB only - { - print "Build LIB only\n" if ( $Verbose ); - $Build_DLL = 0; - } - elsif ( $ARGV[0] eq '-v' ) # Verbose mode - { - $Verbose = 1; - } - elsif ( $ARGV[0] eq '-r' ) # Rebuild all - { - print "Rebuild all\n" if ( $Verbose ); - $Build_Cmd = "/REBUILD"; - } - else - { - warn "$0: unknown option $ARGV[0]\n"; - die $usage; - } - shift; -} - -if ( $Verbose ) -{ - for ($II = 0; $II < scalar (@Lists); $II++) - { - printf "$Lists[$II]\n"; - } -} - -if ( $Build_DLL ) -{ - print "Building DLL\n" if ( $Verbose ); - %Target = %DLL_Collections; - @Version_Test_Target = @Win32_DLL_Version_Tests_Configs; - Build_Collection; -} - -if ( $Build_LIB ) -{ - print "Building LIB\n" if ( $Verbose ); - %Target = %Lib_Collections; - @Version_Test_Target = @Win32_LIB_Version_Tests_Configs; - Build_Collection; -} - -print "End\n"; diff --git a/bin/auto_compile_wrapper b/bin/auto_compile_wrapper deleted file mode 100755 index bae86226d48..00000000000 --- a/bin/auto_compile_wrapper +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# $Id$ -# -# Usually cron setups a really miserable enviroment, this script -# serves two purposes: -# 1. Setup a good enviroment for auto_compile. -# 2. Invoke auto_compile with the proper arguments for each site. -# -# The idea is to modify this script on a per-site basis and leave -# auto_compile unmodified. -# - -# Setup a proper path, remember that cvs, GNU make, perl5 and your -# compiler must be there. -PATH=.:$HOME/bin:/pkg/gnu/bin:/opt/SUNWspro/bin:$PATH -export PATH - -# Obvious enough. -CVSROOT=/project/cvs-repository -export CVSROOT - -# It could be a good idea to set CVSREAD this will make the staging -# area read-only, but our staging areas are public. -# CVSREAD=Y -# export CVSREAD - -# Here we define the cvs working copy for our staging area. -CHECKOUT=$HOME/head - -# In some sites the building directory differs from the cvs working -# copy. The directory is updated running -# $ACE_ROOT/bin/create_ace_build; but it must be setup manually the -# first time. -# TODO: Arrange for automatic creation of platform_macros.GNU & -# config.h. -BUILD=SUNCC - -# Here is where we store auto_compile output and keep a history of -# each run. -LOGDIR=$HOME/head/ACE_wrappers/build/$BUILD/auto_compile - -# Who do we send email when compilation (or anything else) fails. -ADMIN=PUT_YOUR_ADDRESS_HERE ; echo "You must edit this file" ; exit 0 - -exec /pkg/gnu/bin/perl $HOME/bin/auto_compile $CHECKOUT $BUILD $LOGDIR $ADMIN diff --git a/bin/auto_ptr.perl b/bin/auto_ptr.perl deleted file mode 100755 index ca75bb8b4c1..00000000000 --- a/bin/auto_ptr.perl +++ /dev/null @@ -1,16 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' - & eval 'exec perl -pi -S $0 $argv:q' - if 0; - -# $Id$ -# -# You may want to run the "find" command with this script, which maybe -# something like this: -# -# find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.C" -o -name "*.cc" -o -name "*.c" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.ipp" \) -print | xargs $ACE_ROOT/bin/auto_ptr.perl - -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -s/__TEXT/ACE_TEXT/g; diff --git a/bin/bootstrap b/bin/bootstrap deleted file mode 100755 index c8157c058ec..00000000000 --- a/bin/bootstrap +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh - -# ------------------------------------------------------------------------- -# $Id$ -# -# Bootstrap ACE/TAO configuration tools when checked out from CVS. -# Requires GNU autoconf, GNU automake and GNU libtool. -# -# This script is only meant to be run by ACE/TAO maintainers. -# -# ------------------------------------------------------------------------- - -# Copyright (C) 1999 Ossama Othman -# -# All Rights Reserved -# -# This library is free software; you can redistribute it and/or -# modify it under the current ACE distribution terms. -# -# 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. - - -# Generate an `aclocal.m4' file from all existing m4 macro files -# including those in the `m4' directory. -aclocal -I m4 - -# Generate a `config.h.in' configuration header template from `acconfig.h'. -autoheader - -# Generate the `configure' script from the `configure.in'. -autoconf - -# Generate all `Makefile.in' templates in the directories listed in -# `configure.in' and add any missing files that GNU Automake needs so -# that the distribution and configuration processes will run properly. -automake --add-missing #--verbose - -# Update the NEWS file -# For now just copy the contents of the `VERSION' file to make automake -# happy. Eventually, we should start putting real news in to it. -cp VERSION NEWS - diff --git a/bin/check_build_logs b/bin/check_build_logs deleted file mode 100755 index eb1b166605d..00000000000 --- a/bin/check_build_logs +++ /dev/null @@ -1,99 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -# Reviews build logs and reports problems, via stdout or mail. - -$usage="$0 [-l log directory] [-m mail recipient(s)]\n"; - -#### -#### Configuration parameters. -#### -$subject = 'ACE+TAO build results'; -$find = 'find'; -$mail = "mail -s '$subject'"; - -$ostype = $ENV{'OSTYPE'} || `/bin/uname -s`; -if ( "$ostype" =~ /(solaris)|(SunOS)/i ) { - $find = '/pkg/gnu/bin/find'; - $mail = "/pkg/mh/bin/mhmail -subject '$subject'"; -} - - -$log_directory = '/project/danzontmp/levine/build-logs'; -$mail_recipients = ''; - -#### -#### Process command line args. -#### -while ($#ARGV >= $[) { - if ($ARGV[0] eq '-l') { - if ($ARGV[1] =~ /^\w+$/) { - $log_directory = $ARGV[1]; - shift; - } else { - print STDERR "$0: must provide argument for -l option\n"; - die $usage; - } - } elsif ($ARGV[0] eq '-m') { - if ($ARGV[1] =~ /^[\w@\.]+$/) { - $mail_recipients = $ARGV[1]; - shift; - } else { - print STDERR "$0: must provide argument for -m option\n"; - die $usage; - } - } elsif ($ARGV[0] eq '-?') { - print "$usage"; - exit; - } else { - print "$0: unknown arg: $ARGV[0]\n"; - print "$usage"; - exit 1; - } - shift; -} - - -#### -#### Find the log files. -#### -chdir $log_directory || - die "$0: unable to cd to \"$log_directory\"\n"; - -($log_files = ( `$find . -name '*.log' -daystart -ctime 0 -print` )) =~ - tr [\n] [ ]; - - -#### -#### Grep the log files for problems. -#### -@output = (); -open (EGREP, "egrep -n \'Error|errors|[^a][Ss]top|No rule to make|\(undefined symb\)|[Ww]arn|not exist|core dumped|: #[0-9]|cxx:\' $log_files |") || - die "$0: unable to open egrep\n"; -while (<EGREP>) { - push @output, $_ unless /calls, 0 errors$/ || /Found non-pic R_SPARC/; -} -close EGREP; - - -#### -#### Produce output, if there were any problems. -#### -if ($#output > -1) { - - if ("$mail_recipients") { - open (MAIL, "| $mail $mail_recipients") || - die "$0: unable to open pipe to $mail\n"; - select MAIL; - } - - print "This is an automatically generated message.\n\n"; - print "Log files are in $log_directory.\n\n"; - - print @output; - - close MAIL if "$mail_recipients"; -} diff --git a/bin/class2hxxcxx b/bin/class2hxxcxx deleted file mode 100755 index 85d3444c47a..00000000000 --- a/bin/class2hxxcxx +++ /dev/null @@ -1,80 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Script to combine class2info and info2head and info2src. -# -# = AUTHOR(S) -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT/$OSE_RELEASE_NAME -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/lib"} - -CLASS2INFO="$BINDIR/class2info" -INFO2HEAD="$BINDIR/info2head" -INFO2SRC="$BINDIR/info2src" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` files" -} - -# -# Check usage. -# -if test "$#" = "0" -then - USAGE -fi - -while test "$#" != "0" -do - $CLASS2INFO $1 - if test "$?" != "0" - then - exit 1 - fi - file=`basename $1` - base="`echo $file | sed -e 's/\..*$//'`" - if test -f "$base.ci" - then - $INFO2SRC $base.ci - $INFO2HEAD $base.ci -# rm -f $base.ci - fi - shift -done diff --git a/bin/class2hxxcxxsingle b/bin/class2hxxcxxsingle deleted file mode 100755 index 6e049a2ec15..00000000000 --- a/bin/class2hxxcxxsingle +++ /dev/null @@ -1,80 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Script to combine class2info and info2head and info2src. -# -# = AUTHOR(S) -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT/$OSE_RELEASE_NAME -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/lib"} - -CLASS2INFO="$BINDIR/class2info" -INFO2HEADSRC="$BINDIR/info2headsrc" -INFO2SRC="$BINDIR/info2src" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` files" -} - -# -# Check usage. -# -if test "$#" = "0" -then - USAGE -fi - -while test "$#" != "0" -do - $CLASS2INFO $1 - if test "$?" != "0" - then - exit 1 - fi - file=`basename $1` - base="`echo $file | sed -e 's/\..*$//'`" - if test -f "$base.ci" - then -# $INFO2SRC $base.ci - $INFO2HEADSRC $base.ci -# rm -f $base.ci - fi - shift -done diff --git a/bin/class2info b/bin/class2info deleted file mode 100755 index 6a3300fbb7e..00000000000 --- a/bin/class2info +++ /dev/null @@ -1,197 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Converts a C++ class header file into a classinfo description file. -# -# = AUTHOR(S) -# Graham Dumpleton -# K. Dorn -# -# = COPYRIGHT -# Copyright - OTC LIMITED (1991) -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/bin"} - -INFO2INFO="$BINDIR/info2info" - -AWK="gawk" - -if test "$AWK" = "gawk" -then - VARG="-v" -fi - - -FILES= -V2= - -trap 'rm -f /tmp/ci.$$; exit' 1 2 3 13 15 - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` file.h ..." -} - -# -# Check usage. -# -if test $# = 0 -then - USAGE -fi - -# -# Parse command line. -# -while test $# != 0 -do - case $1 in -# -v2) -# V2=YES -# shift -# ;; - *.h|*.hh|*.H|*.hxx|*.hpp|*.h++) - FILES="$FILES $1" - shift - ;; - *) - USAGE - ;; - esac -done - -# -# Check usage again. -# -if test -z "$FILES" -then - USAGE -fi - -# -# Check for awk file. -# -CLASS2INFO=$LIBDIR/class2info.awk -HIDINGFMT=$LIBDIR/hiding.fmt - -if test ! -f $HIDINGFMT -then - ERROR "Can't find $HIDINGFMT" -fi - - -if ( test ! -f $CLASS2INFO ) -then - ERROR "Can't find $CLASS2INFO" -fi - - - -VCSA=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^CSAHEADER$" { - if ( $2 ~ "on" ) - printf("%s","csaprintheader=on"); - else - printf("%s","csaprintheader="); -}' $HIDINGFMT` - -VPUBL=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PUBLIC$" { - if ( $2 ~ "on" ) - printf("%s","publ=on"); - else - printf("%s","publ="); -}' $HIDINGFMT` - -VPROT=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PROTECTED$" { - if ( $2 ~ "on" ) - printf("%s","prot=on"); - else - printf("%s","prot="); -}' $HIDINGFMT` - -VPRIV=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PRIVATE$" { - if ( $2 ~ "on" ) - printf("%s","priv=on"); - else - printf("%s","priv="); -}' $HIDINGFMT` - -#echo " $VPUBL $VPROT $VPRIV " - - -# -# Parse each file. -# -# $VARG publ=on $VARG prot=off $VARG priv=off \ -for i in $FILES -do - if test ! -f $i - then - ERROR "$i doesn't exist." - fi - FILENAME=`basename $i` - INFOFILE=`echo $FILENAME | sed -e 's/\..*$//'`.ci - rm -f $INFOFILE - if test "$?" != 0 - then - ERROR "Couldn't remove info file $INFOFILE." - fi - expand $i > /tmp/ci.$$ - $AWK \ - -f $CLASS2INFO $VARG filename=$i \ - $VARG $VPUBL $VARG $VPROT $VARG $VPRIV \ - /tmp/ci.$$ > $INFOFILE - rm -f /tmp/ci.$$ -# if test ! -z "$V2" -# then -# $INFO2INFO $INFOFILE -# fi -done diff --git a/bin/class2info.awk b/bin/class2info.awk deleted file mode 100644 index b2f58ce736d..00000000000 --- a/bin/class2info.awk +++ /dev/null @@ -1,1594 +0,0 @@ -# ============================================================================= -# -# = DESCRIPTION -# Awk script for converting C++ class header file to classinfo file. -# Requires gawk or gawk. -# comments like /* ... */ with ... goes over multiple lines are not ok -# and will be not printed as comments! -# class xxx -# : public yyyy is not allowed but : class xxx : public yyyy -# -# = AUTHOR(S) -# Graham Dumpleton -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# -# ============================================================================= - -BEGIN { - initialised = 0 - accpubl = "on" - accprot = "on" - accpriv = "on" - accpubl = publ - accprot = prot - accpriv = priv - accpubl = "on" - accprot = "off" - accpriv = "off" -} -{ - if ( initialised == 0 ) - { - initialised = 1 - "date" | getline line - printf( "CLASS2INFO\n%s\n%s\n\n", line, filename ) - anonenum = 1 - } - doParse(); - next -} - - - -{ - print "error" | "cat 1>&2" - exit -} - -# -# If a comment starts with '// ==', discard lines until the end of the -# comment or a line of the form '// = NAME' is found. This is special -# case to deal with comment headers in files. e.g: -# -# // ========== ... -# // -# // = LIBRARY -# // ... -# -# lines up to '// = LIBRARY' would be discarded. -# -# /^[\t ]*\/\/[\t ]*==+[\t ]*$/ { -# handleHeader() -# } - -function handleHeader() -{ - getline - while ( \ - ( $0 ~ "^[\t ]*//" ) \ - && \ - ( $0 !~ "^[\t ]*//[\t ]*= [a-zA-Z0-9]+[^<>]*[\t ]*$" ) \ - ) - { - getline - } -} - -# -# Extract labelled comments. These are denoted by '// = NAME', where the word -# NAME is actually replaced by the some identifying label. -# A labelled section is terminated by the end of the comment block, another -# labelled comment, or a comment line of the form '// =='. e.g: -# Note: a label cannot contain the characters '<>', these are identified -# as being special commands and are simply passed through. -# -# // = LIBRARY -# // C++ -# // -# // = VERSION -# // ... -# // -# // ========== ... -# -# the LIBRARY section would be terminated by '// = VERSION', and the VERSION -# section by '// =====...'. -# -# /^[\t ]*\/\/[\t ]*= [a-zA-Z0-9]+[^<>]*[\t ]*$/ { -# handleInfo() -# } - -function handleInfo( label ) -{ - sub( "^[\t ]*//", "", $0 ) - while ( $0 ~ "^[\t ]*= [a-zA-Z0-9]+[^<>]*[\t ]*$" ) - { - match( $0, " [a-zA-Z0-9]+[^<>]*$" ) - label = substr( $0, RSTART, RLENGTH ) - sub( "^[\t ]*", "", label ) - if ( name ~ "^$" ) - printf( "INFO\nGLOBAL\n%s\n", label ) - else if ( hiding ~ "^$" ) - printf( "INFO\nHDR\n%s\n%s\n", label, name ) - else - printf( "INFO\nBODY\n%s\n%s\n%s\n", label, name, hiding ) - $0 = outputComment() - } -} - -function SetCommentClrComment( line, comment) -{ - if ( match( line, "(\/\\*.*\\*\/)?$" ) > 0) - { - comment = substr( line, RSTART, RLENGTH ) - sub( "//.*$", "", line ) - } - else - if ( match( line, "(//.*)?$" ) > 0) - { - comment = substr( line, RSTART, RLENGTH ) - sub( "\/\\*.*$", "", line ) - } -} - - -function check_print_first() -{ - if ( ((hiding == "private") && (accpriv == "on") ) || ((hiding == "public") && (accpubl == "on") ) || ((hiding == "protected") && (accprot == "on") ) ) - pra = 1 - else - { - pra = 0 - $0 = "" - } - return pra -} - -function check_print() -{ - if ( ( type ~ "class" ) && ( hiding ~ "^$" ) ) - { - if (accpriv == "on") - { - pra = 1 - return pra - } - else - { - pra = 0 - $0 = "" - return pra - } - } - else - { - - if ((accpubl == "on") || ( hiding ~ "^$" )) - { - pra = 1 - return pra - } - else - { - pra = 0 - $0 = "" - return pra - } - } - - if ( ((hiding == "private") && (accpriv == "on") ) || ((hiding == "public") && (accpubl == "on") ) || ((hiding == "protected") && (accprot == "on") ) ) - { - pra = 1 - } - else - { - pra = 0 - $0 = "" - } - return pra -} - -# -# transfer a c comment /* ... */ to a C++ // ... comment -# the comment comes in feld and goes back in feld -# - -function Set_c_Comment_to_CPP_Comment( feld) -{ - if ( match( feld, "\/\\*.*\\*\/$" ) > 0) - { -# printf("\n----feldb=|%s|----\n",feld); - sub( "\/\\*", "\/\/", feld ) - sub( "\\*\/", "", feld ) -# printf("\n----felda=|%s|----\n",feld); - } - return feld -} - - - -# -# Gather up unlabelled comments. -# -# /^[\t ]*\/\/.*$/ { -# handleComment() -# } - -function handleComment() -{ - if ( name ~ "^$" ) - printf( "COMMENT\nGLOBAL\n" ) - else if ( hiding ~ "^$" ) - printf( "COMMENT\nHDR\n%s\n", name ) - else - printf( "COMMENT\nBODY\n%s\n%s\n", name, hiding ) - $0 = outputComment( $0 ) -} - -# -# Skip past '#define's. Leave it up to programmers to document important -# definitions with a section. -# -# /^[\t ]*#[\t ]*define/ { -# handleDefine() -# } - -function handleDefine( line ) -{ - if ( $0 ~ ".*\\\\$" ) - { - end = 0 - while ( end == 0 ) - { - getline line - if ( line !~ ".*\\\\$" ) - end = 1 - } - } - # next - $0 = "" -} - -# -# Record name of files which are included. -# Note: Since we do not process '#if's we will get all includes, even if -# some are particular to some systems etc. -# -# /^[\t ]*#[\t ]*include[\t ]*<.+>/ { -# () -# } - -function handleInclude() -{ - match( $0, "<.+>" ) - $0 = substr( $0, RSTART, RLENGTH ) - printf( "INCLUDE\n%s\n\n", $0 ) - # next - $0 = "" -} - -# /^[\t ]*#[\t ]*include[\t ]*".+"/ { -# handleLocalInclude() -# } - -function handleLocalInclude() -{ - match( $0, "\".+\"" ) - $0 = substr( $0, RSTART, RLENGTH ) - printf( "INCLUDE\n%s\n\n", $0 ) - # next - $0 = "" -} - -# -# Skip any other pre-processor directives. -# -# /^[\t ]*#.*$/ { -# handlePreprocessor() -# } - -function handlePreprocessor_alt() -{ - # next - $0 = "" -} - -function handlePreprocessor() -{ - printf( "PREPROC\n%s\n\n", $0 ) - # next - $0 = "" -} - -# -# Trap typedefs. -# -# /^typedef[\t ]+/ { -# handleTypedef() -# } - -function handleTypedef( comment, line ) -{ - line = $0 - while ( line !~ ";[\t ]*(//.*)?$" ) - { - line = uncomment( line ) - getline - sub( "^[\t ]*", "", $0 ) - line = line " " $0 - sub( "\\) \\(", ")(", line ) - } - match( line, "(//.*)?$" ) - comment = substr( line, RSTART, RLENGTH ) - sub( "//.*$", "", line ) - sub( "^[\t ]*typedef[\t ]*", "typedef ", line ) - if ( name ~ "^$" ) - printf( "TYPEDEF\n%s\n%s\n%s\n", "::", "public", line ) - else - printf( "TYPEDEF\n%s\n%s\n%s\n", name, hiding, line ) - $0 = outputComment( comment ) -} - -# -# Trap externs. -# -# /^extern[\t ]+/ { -# handleExtern() -# } - -function handleExtern( lang, comment ) -{ - if ( $0 ~ "\"C\"[\t ]*$" || $0 ~ "\"C\"[\t ]*\{[\t ]*$" ) - { - # Bracketed includes (??). Skip them for now. - while ( $0 !~ "}[\t]*$" && $0 !~ "}[\t ]*;[\t]*$" ) - getline - getline - } - else - { - if ( $0 !~ ";[\t ]*(//.*)?$" ) - $0 = handleArgs( $0 ) - match( $0, "(//.*)?$" ) - comment = substr( $0, RSTART, RLENGTH ) - sub( "//.*$", "", $0 ) - sub( "^extern[\t ]*", "", $0 ) - if ( match( $0, "\"[^\"]*\"" ) != 0 ) - { - lang = substr( $0, RSTART, RLENGTH ) - sub( "^\"[\t ]*", "", lang ) - sub( "[\t ]*\"$", "", lang ) - } - else - lang = "C++" - sub( "\"[^\"]*\"[\t ]*", "", $0 ) - printf( "EXTERN\n%s\n%s\n", lang , $0 ) - $0 = outputComment( comment ) - } -} - -# -# Trap class, struct, union and template definitions. -# Note: handleADT() does the hard work of determining if the particular -# use is in a definition, declaration or other. -# -# /^[\t ]*class/ { -# handleClass() -# } - -function handleClass() -{ - class = 1 - sub( "^[\t ]*class[\t ]+(ACE_[.]*Export[\t ]+)?", "", $0 ) - if ( handleADT( $0 ) == 1 ) - { - if ( topName ~ "^$" ) - printf( "CLASS\n%s\n", name ) - else - printf( "CLASS\n%s::%s\n", topName, name ) - outputSuperClasses( bases ) - bases = "" - } - class = 0 - # next - $0 = "" -} - -# /^[\t ]*enum/ { -# handleEnumCsa() -# } - -function handleEnumCsa() -{ - enum = 1 - sub( "^[\t ]*enum[\t ]+", "", $0 ) - if ( handleADT( $0 ) == 1 ) - { - if ( topName ~ "^$" ) - printf( "ENUM\n%s\n", name ) - else - printf( "ENUM\n%s::%s\n", topName, name ) - bases = "" - } - enum = 0 - # next - $0 = "" -} - -# /^[\t ]*struct/ { -# handleStruct() -# } - -function handleStruct() -{ - struct = 1 - sub( "^[\t ]*struct[\t ]+", "", $0 ) - if ( handleADT( $0 ) == 1 ) - { - if ( topName ~ "^$" ) - printf( "STRUCT\n%s\n", name ) - else - printf( "STRUCT\n%s::%s\n", topName, name ) - outputSuperClasses( bases ) - bases = "" - } - struct = 0 - # next - $0 = "" -} - -# /^[\t ]*union/ { -# handleUnion() -# } - -function handleUnion() -{ - union = 1 - sub( "^[\t ]*union[\t ]+", "", $0 ) - if ( handleADT( $0 ) == 1 ) - { - if ( topName ~ "^$" ) - printf( "UNION\n%s\n", name ) - else - printf( "UNION\n%s::%s\n", topName, name ) - outputSuperClasses( bases ) - bases = "" - } - union = 0 - # next - $0 = "" -} - -# /^[\t ]*template[\t ]*<.+>[\t ]+class/ { -# handleTemplate() -# } - -function handleTemplate() -{ - template = 1 - - match( $0, "^[\t ]*template[\t ]*<.+>[\t ]+(class|struct|union)[\t ]+" ) -# nested template error!!! match( $0, "^template[\t ]*<.+>[\t ]+(class|struct|union)[\t ]+" ) - - line = substr( $0, RSTART, RLENGTH ) - match( line, "[\t ]+(class|struct|union)[\t ]+$" ) - adttype = substr( line, RSTART, RLENGTH ) - sub( "^[\t ]*", "", adttype ) - sub( "[\t ]*$", "", adttype ) - match( line, "<.+>" ) - targs = substr( line, RSTART, RLENGTH ) - sub( "^[\t ]*template[\t ]*<.+>[\t ]+(class|struct|union)[\t ]+", "", $0 ) - if ( handleADT( $0 ) == 1 ) - { -# printf( "TEMPLATE\n%s\n%s\n%s\n", adttype, name, targs ) - if ( topName !~ "^$" ) - printf( "TEMPLATE\n%s\n%s::%s\n%s\n", adttype, topName, name, targs ) - else - printf( "TEMPLATE\n%s\n%s\n%s\n", adttype, name, targs ) - outputSuperClasses( bases ) - bases = "" - } - template = 0 - # next - $0 = "" -} - -# -# Trap enumerated types. -# - -# This handles enums where there is potentially more than one entry on -# a line. We throw away all comments in this case. - -function handleLineEnum() -{ - enum = 1 - sub( "^[\t ]*enum[\t ]*", "", $0 ) - line = $0 - sub( "[\t ]*\{.*", "", line ) - pushLevel() - name = line - if ( name != "" ) - { - if ( topName ~ "^$" ) - printf( "ENUM\n%s\n\n", name ) - else - printf( "ENUM\n%s::%s\n\n", topName, name ) - } - else - { - name = anonenum - anonenum++ - if ( topName ~ "^$" ) - printf( "ANONENUM\n%s\n\n", name ) - else - printf( "ANONENUM\n%s::%s\n\n", topName, name ) - } - line = $0 - sub( "^.*\{[\t ]*", "", line ) - sub( "[\t ]*//.*$", "", line ) - while ( line !~ "}.*" ) - { - getline - line = line $0 - sub( "[\t ]*//.*$", "", line ) - } - # Forget about variables for now. - sub( "[\t ]*}.*", "", line ) - gsub( "[\t ]+", "", line ) - num = split( line, item, "," ) - for ( i=1; i<=num; i++ ) - { - if ( topName ~ "^$" ) - printf( "ENUMITEM\n%s\n%s\n\n", name, item[i] ) - else - printf( "ENUMITEM\n%s::%s\n%s\n\n", topName, name, item[i] ) - } - $0 = "" - popLevel( $0 ) - enum = 0 -} - -# This handles enums which are formatted to preferred style. -# Can collect comments meaningfully in this format. - -function handleEnum() -{ - enum = 1 - sub( "^[\t ]*enum[\t ]*", "", $0 ) - sub( "([\t ]*\{)?[\t ]*$", "", $0 ) - sub( "^[\t ]*", "", $0 ) - pushLevel() - name = $0 - if ( name != "" ) - { - if ( topName ~ "^$" ) - printf( "ENUM\n%s\n\n", name ) - else - printf( "ENUM\n%s::%s\n\n", topName, name ) - } - else - { - name = anonenum - anonenum++ - if ( topName ~ "^$" ) - printf( "ANONENUM\n%s\n\n", name ) - else - printf( "ANONENUM\n%s::%s\n\n", topName, name ) - } - getline - while ( $0 ~ /^[\t ]*\/\/[\t ]*=/ ) - handleInfo() - while ( 1 ) - { - while ( $0 ~ /^[\t ]*$/ || $0 ~ /^[\t ]*\{/ ) - getline - - if ( $0 ~ /,[^\/]*,/ ) - { - line = $0 - sub( "[,\t ]*//.*", " ", line ) - gsub( "[\t ]+", "", line ) - num = split( line, item, "," ) - for ( i=1; i<=num; i++ ) - { - if ( topName ~ "^$" ) - printf( "ENUMITEM\n%s\n%s\n", name, item[i] ) - else - printf( "ENUMITEM\n%s::%s\n%s\n", topName, name, item[i] ) - if ( i != num ) - printf( "\n" ) - } - sub( "^.*//", "//", $0 ) - currentlevel = level - $0 = outputComment( $0 ) -# if ( $0 ~ /^$/ ) - if ( currentlevel != level ) - { - enum = 0 - return - } - } - else if ( $0 ~ /^.*,[\t ]*(\/\/.*)?$/ ) - { - match( $0, ".*,([\t ]*//)?" ) - enumval = substr( $0, RSTART, RLENGTH ) - sub( "[\t ]*,.*$", "", enumval ) - sub( "^[\t ]*", "", enumval ) - if ( topName ~ "^$" ) - printf( "ENUMITEM\n%s\n%s\n", name, enumval ) - else - printf( "ENUMITEM\n%s::%s\n%s\n", topName, name, enumval ) - sub( "^.*//", "//", $0 ) - currentlevel = level - $0 = outputComment( $0 ) -# if ( $0 ~ /^$/ ) - if ( currentlevel != level ) - { - enum = 0 - return - } - } - else if ( $0 ~ /^.*(\/\/.*)?$/ ) - { - match( $0, ".*([\t ]*//)?" ) - enumval = substr( $0, RSTART, RLENGTH ) - sub( "[\t ]*([\t ]*//.*)?$", "", enumval ) - sub( "^[\t ]*", "", enumval ) - if ( topName ~ "^$" ) - printf( "ENUMITEM\n%s\n%s\n", name, enumval ) - else - printf( "ENUMITEM\n%s::%s\n%s\n", topName, name, enumval ) - sub( "^.*//", "//", $0 ) - currentlevel = level - $0 = outputComment( $0 ) -# if ( $0 ~ /^$/ ) - if ( currentlevel != level ) - { - enum = 0 - return - } - $0 = "" - } - else if ( $0 ~ /^[\t ]*}[\t ]*;/ ) - { - # Shouldn't happen, but just in case. - popLevel( $0 ) - enum = 0 - return - } - } - enum = 0 -} - -# -# Trap the end of a abstract data type or enumerated type. -# Note: arrays are going to cause a problem here. e.g: -# -# int foo[] = -# { -# }; -# -# so this needs to be cleaned up a bit. -# -# /^[\t ]*}.*;[\t ]*/ { -# handleEndADT() -# } - -function handleEndADT() -{ - popLevel( $0 ) - # next - $0 = "" -} - -# -# Trap private, protected and public keywords in class, struct or union. -# -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /^[\t ]*private[\t ]*:[\t ]*(\/\/.*)?$/ { -# handlePrivate() -# } - -function handlePrivate() -{ -#if (accpriv == "on" ) - printf( "ACCESS\n%s\nprivate\n\n", name ) - hiding = "private" - # next - $0 = "" -} - -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /^[\t ]*protected[\t ]*:[\t ]*(\/\/.*)?$/ { -# handleProtected() -# } - -function handleProtected() -{ -#if (accprot == "on" ) - printf( "ACCESS\n%s\nprotected\n\n", name ) - hiding = "protected" - # next - $0 = "" -} - -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /^[\t ]*public[\t ]*:[\t ]*(\/\/.*)?$/ { -# handlePublic() -# } - -function handlePublic() -{ -#if (accpubl == "on" ) - printf( "ACCESS\n%s\npublic\n\n", name ) - hiding = "public" - # next - $0 = "" -} - -# -# Handle friend declaration. -# -function handleFriend( comment, line ) -{ - line = $0 - if ( $0 ~ /[,(][\t ]*(\/\/.*)?$/ ) - { - line = uncomment( line ) - line = handleArgs( line ) - } - if ( line !~ /;[\t ]*(\/\/.*)?$/ ) - { - line = uncomment( line ) - comment = handleInline() - line = line ";" - } - else - { - match( line, "//.*$" ) - comment = substr( line, RSTART, RLENGTH ) - } - gsub( "\t", " ", line ) - gsub( " +", " ", line ) - sub( "^ *", "", line ) - if ( name ~ "^$" ) - printf( "FRIEND\n%s\n%s\n%s\n", "::", "public", line ) - else - if ( hiding ~ "^$" ) - printf( "FRIEND\n%s\n%s\n%s\n", name, "public", line ) - else - printf( "FRIEND\n%s\n%s\n%s\n", name, hiding, line ) - $0 = outputComment( comment ) -} - -# -# Trap inline constructors with an initialiser list. -# -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /\)[\t ]*:[\t ]*.*\(.*\)[\t ]*({(.*})?[\t ]*)?(\/\/.*)?$/ { -# handleInlineCtor() -# } - -function handleInlineCtor() -{ - sub( "[\t ]*//.*", "", $0 ) - match( $0, ".*\\)[\t ]*:[\t ]*" ) - prototype = substr( $0, RSTART, RLENGTH ) - sub( "[\t ]*:[\t ]*$", "", prototype ) - outputFunction( prototype ) - if ( $0 !~ "}[\t ]*$" ) - { - $0 = handleInline() - if ( $0 ~ "^[\t ]*//.*$" ) - $0 = outputComment( $0 ) - } - else - $0 = outputComment( "" ) -} - -# -# Trap any inline functions, including constructors/destructors, with -# a complete prototype on the first line. -# -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /\)[\t ]*(const[\t ]*)?({(.*})?[\t ]*)?(\/\/.*)?$/ { -# handleInlineFunction() -# } - -function handleInlineFunction() -{ - sub( "[\t ]*//.*$", "", $0 ) - -# XXXX v1 match( $0, ".*\\)[\t ]*(const[\t ]*)?([^{]*{)?[\t ]*" ) -# XXXX v2 match( $0, ".*\\)[\t ]*(const)?([\t ]*\{)?[\t ]*" ) -# XXXX v2 prototype = substr( $0, RSTART, RLENGTH ) - - pos = index($0,"{") - if ( pos != 0 ) - prototype = substr( $0, 1, pos-1 ) - else - prototype = $0 - - sub( "[\t ]*\{[\t ]*$", "", prototype ) - outputFunction( prototype ) - if ( $0 !~ "}[\t ]*$" ) - { - savename = name - $0 = handleInline() - if ( $0 ~ "^[\t ]*//.*$" ) - $0 = outputComment( $0 ) - else - { - if ( savename == name ) - printf( "\n" ) - } - } - else - $0 = outputComment() -} - -# -# Trap normal Enum declaration. -# -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /\)[\t ]*(enum[\t ]*)?(=[\t ]*0[\t ]*)?,[\t ]*(\/\/.*)?$/ { -# handleenum() -# } - -function handleEnumFun() -{ - $0 = Set_c_Comment_to_CPP_Comment( $0) - match( $0, "//.*" ) - comment = substr( $0, RSTART, RLENGTH ) - $0 = uncomment( $0 ) - outputEnum( $0 ) - $0 = outputComment( comment ) -} - -# -# Trap normal function declaration. -# -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /\)[\t ]*(const[\t ]*)?(=[\t ]*0[\t ]*)?;[\t ]*(\/\/.*)?$/ { -# handleFunction() -# } - -function handleFunction() -{ - $0 = Set_c_Comment_to_CPP_Comment( $0) - match( $0, "//.*" ) - comment = substr( $0, RSTART, RLENGTH ) - $0 = uncomment( $0 ) - outputFunction( $0 ) - $0 = outputComment( comment ) -} - -# -# Trap member variables. -# -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /[\t ]*;[\t ]*(\/\/.*)?$/ { -# handleMember() -# } - -function handleMember() -{ - $0 = Set_c_Comment_to_CPP_Comment( $0) - match( $0, "//.*" ) - comment = substr( $0, RSTART, RLENGTH ) - sub( "[\t ]*//.*", "", $0 ) - outputMember( $0 ) - $0 = outputComment( comment ) -} - -function handleMember_orig() -{ - match( $0, "//.*" ) - comment = substr( $0, RSTART, RLENGTH ) - sub( "[\t ]*//.*", "", $0 ) - outputMember( $0 ) - $0 = outputComment( comment ) -} - -function handleMember_neu() -{ - match( $0, "/\\*.*\\*/" ) - comment = substr( $0, RSTART, RLENGTH ) - if ( length(comment) == 0 ) - { - match( $0, "//.*" ) - comment = substr( $0, RSTART, RLENGTH ) - } -# else -# sub( "[\t ]*//.*", "", $0 ) - $0 = uncomment( $0 ) - outputMember( $0 ) - $0 = outputComment( comment ) -} - -# -# Trap remainder of functions and constructors, where prototypes go -# over more than one line. -# -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /((\((.*,)?)|([_a-zA-Z0-9_]+))[\t ]*(\/\/.*)?$/ { -# handleMultilineEnums() -# } - -function handleMultilineEnums( prototype ) -{ - $0 = uncomment( $0 ) - prototype = handleEnumArgs( $0 ) - prototype = uncomment( prototype ) - sub( "\{.*}[\t ]*$", "", prototype ) - outputEnum( prototype ) - if ( prototype !~ ";[\t ]*" ) - { - savename = name - $0 = handleInline() - if ( line ~ "^[\t ]*//.*$" ) - $0 = outputComment( $0 ) - else - { - if ( savename == name ) - printf( "\n" ) - } - } - else - $0 = outputComment() -} - -# -# Trap remainder of functions and constructors, where prototypes go -# over more than one line. -# -# ( name !~ "^$" ) && -# ( type !~ "enum" ) && -# /((\((.*,)?)|([_a-zA-Z0-9_]+))[\t ]*(\/\/.*)?$/ { -# handleMultilineFunctions() -# } - -function handleMultilineFunctions( prototype ) -{ - $0 = uncomment( $0 ) - prototype = handleArgs( $0 ) - prototype = uncomment( prototype ) - sub( "\{.*}[\t ]*$", "", prototype ) - outputFunction( prototype ) - if ( prototype !~ ";[\t ]*" ) - { - savename = name - $0 = handleInline() - if ( line ~ "^[\t ]*//.*$" ) - $0 = outputComment( $0 ) - else - { - if ( savename == name ) - printf( "\n" ) - } - } - else - $0 = outputComment() -} - -# -# pushLevel() and popLevel() implement a stack for classes encountered. -# This is to handle class definitions local to classes. -# pushLevel() is invoked when entering a abstract data type, and -# popLevel() is executed when leaving. -# -function pushLevel() -{ - level++ - names[level] = name - types[level] = type - hidings[level] = hiding - topName = name - -# 3.11.95 evtl auskommentieren! - hiding = "" - - if ( class == 1 ) - { - type = "class" -# hiding = "private" - } - else if ( struct == 1 ) - { - type = "struct" -# hiding = "public" - } - else if ( union == 1 ) - { - type = "union" -# hiding = "public" - } - else if ( enum == 1 ) - type = "enum" -} - -function popLevel( line ) -{ - if ( name !~ "^$" ) - { - printf( "END\n%s\n\n", name ) - oldname = name - name = names[level] - type = types[level] - hiding = hidings[level] - level-- - topName = names[level] - if ( line ~ "^[\t ]*}.*[_a-zA-Z0-9]+.*;[\t ]*(//.*)?$" ) - { - line = uncomment( line ) - sub( "^[\t ]*}[\t ]*", "", line ) - if ( line ~ "^[_a-zA-Z0-9]+" ) - line = oldname " " line - else - line = oldname line - outputMember( line ) - return outputComment() - } - return "" - } -} - -# -# Removes comments from a line. -# -function uncomment( line ) -{ - sub( "/\\*.*\\*/", "", line ) - sub( "[\t ]*//.*$", "" , line ) - return line -} - -# -# Accumulates comment blocks and outputs them, followed by a blank line. -# -function outputComment( line ) -{ - if ( line !~ "^[\t ]*//" ) - getline line - - num = 0 - while ( line ~ "^[\t ]*//" ) - { - sub( "^[\t ]*//", "", line ) - if ( line ~ "^[\t ]*=(( [a-zA-Z0-9]+[^<>]*)|(=+))[\t ]*$" ) - break - else - lines[num++] = line - - getline line - } - indent = -1 - for ( i=0; i<num; i++ ) - { - if ( lines[i] !~ "^[\t ]*=.*" ) - { - if ( match( lines[i], "^ *[^ ]" ) != 0 ) - { - if ( indent == -1 ) - indent = RLENGTH-1 - else - { - if ( RLENGTH-1 < indent ) - indent = RLENGTH-1 - } - } - } - } - blank = 0 - for ( i=0; i<num; i++ ) - { - if ( lines[i] ~ "^[\t ]*$" ) - blank++ - else - { - for ( j=0; j<blank; j++ ) - printf( "//\n" ) - blank = 0 - if ( lines[i] !~ "^[\t ]*=( <.+>)?[\t ]*" ) - { - printf( "// %s\n", substr( lines[i], indent+1 ) ) - } - else - { - sub( "^[\t ]*", "", lines[i] ) - printf( "// %s\n", lines[i] ) - } - } - } - printf( "\n" ) - if ( line ~ "^[\t ]*}.*;[\t ]*$" ) - line = popLevel( line ) - - return line -} - -# -# Checks occurences of ADT and determines if they are in fact a definition -# or a declaration. If they are definition, it will generate any superclasses -# for the ADT. -# -function handleADT( line ) -{ - # - # Check for class declaration: - # class Foo; - # - if ( line ~ "[_a-zA-Z][ <,>_0-9a-zA-Z]*[\t ]*;" ) - { - # Do nothing, this is a declaration. - return 0 - } - # - # Check for derived classes: - # class Foo : Foobar - # - else if ( line ~ "[^:]:[^:]*" ) - { - pushLevel() - match( line, ".*[^:]:[^:]?" ) - name = substr( line, RSTART, RLENGTH-1 ) - sub( ":.*", "", name ) - sub( "[\t ]*$", "", name ) - if ( template == 1) - { - if ( name ~ "<.+>" ) - { - match( name, "<.+>" ) - args = substr( name, RSTART, RLENGTH ) - sub( "[\t ]*<.+>[\t ]*", "", name ) - } - } - match( line, ":.*" ) - bases = substr( line, RSTART, RLENGTH ) - sub( ":[\t ]*", "", bases ) - sub( "[\t ]*$", "", bases ) - if ( bases !~ ",$" && bases !~ "^$" ) - { - sub( "[\t ]*\{[\t ]*$", "", bases ) - } - else - { - while ( bases ~ ".*,[\t ]*$" || bases ~ "^$" ) - { - getline contbases - contbases = uncomment( contbases ) - while ( length( contbases ) == 0 ) - { - getline contbases - contbases = uncomment( contbases ) - } - bases = bases " " contbases - } - sub( "[\t ]*\{[\t ]*$", "", bases ) - } - } - # - # Check for non-derived classes: - # class Foo - # - # else if ( line ~ "[_a-zA-Z][ <>,_0-9a-zA-Z]*(<.+>)?[\t ]*\{*$" ) - else if ( line ~ "[_a-zA-Z][ <>,_0-9a-zA-Z]*(<.+>)?[\t ]*(\{[\t ]*)?$" ) - { - pushLevel() - if ( template == 1) - match( line, "[_a-zA-Z][_0-9a-zA-Z]*" ) - else - match( line, "[_a-zA-Z][ <>,_0-9a-zA-Z]*" ) - name = substr( line, RSTART, RLENGTH ) - sub( "[\t ]*$", "", name ) - if ( template == 1) - { - sub( "[_a-zA-Z][_0-9a-zA-Z]*", "", line ) - if ( line ~ "^<" ) - { - match( line, "<.+>" ) - args = substr( line, RSTART, RLENGTH ) - } - } - } - else - { - # Discard anything else. - return 0 - } - return 1 -} - -# -# Generates the actual list of superclasses. -# -function outputSuperClasses( line ) -{ - if ( line ~ /^[\t ]*$/ ) - printf( "\n" ) - else - { - gsub( "(\t| )+", " ", line ) - narg = 0 - while ( match( line, "[^<>,# ]*<[^<>]*>" ) ) - { - narg++ - arg = substr( line, RSTART, RLENGTH ) - sub( "[^<>,# ]*<[^<>]*>", "#" narg, line ) - bargs["#" narg] = arg - # Need the following to stop resubstitution of the pattern matched - # back into the string. - gsub( "&", "\\\\&", bargs["#" narg] ) - } - num = split( line, item, "," ) - i = 1 - while ( i<=num ) - { - access = "private" - inherit = "" - - if ( item[i] ~ "[\t ]*public[\t ]*" ) - { - access = "public" - sub( "[\t ]*public[\t ]*", "", item[i] ) - } - else if ( item[i] ~ "[\t ]*protected[\t ]*" ) - { - access = "protected" - sub( "[\t ]*protected[\t ]*", "", item[i] ) - } - sub( "[\t ]*private[\t ]*", "", item[i] ) - - if ( item[i] ~ "[\t ]*virtual[\t ]*" ) - { - inherit = " virtual" - sub( "[\t ]*virtual[\t ]*", "", item[i] ) - } - - while ( match( item[i], "#[0-9]+" ) ) - { - arg = substr( item[i], RSTART, RLENGTH ) - sub( arg, bargs[arg], item[i] ) - } - sub( "^[\t ]*", "", item[i] ) - sub( "[\t ]*$", "", item[i] ) - - printf( "%s%s %s\n", access, inherit, item[i] ) - - ++i - } - printf( "\n" ) - } -} - -# -# Outputs enum prototypes. -# -function outputEnum( line ) -{ - if ( line !~ ";[\t ]*$" ) - { - sub( "[\t ]*$", ";", line ) - if ( line !~ /^[\t ]*inline[\t ]+/ ) - sub( "^[\t ]*", "inline ", line ) - } - if ( ( type ~ "class" ) && ( hiding ~ "^$" ) ) - hide = "private" - else - hide = "public" - printf( "ENUM\n%s\n%s\n", name, hiding ~ "^$" ? hide : hiding ) - gsub( "\t", " ", line ) - gsub( " +", " ", line ) - sub( "^ *", "", line ) - sub( " *$", "", line ) - sub( "( ?;)*$", ";", line ) - printf( "%s\n", line ) -} - -# -# Outputs function prototypes. -# -function outputFunction( line ) -{ - if ( line !~ ";[\t ]*$" ) - { - sub( "[\t ]*$", ";", line ) - if ( line !~ /^[\t ]*inline[\t ]+/ ) - sub( "^[\t ]*", "inline ", line ) - } - if ( ( type ~ "class" ) && ( hiding ~ "^$" ) ) - hide = "private" - else - hide = "public" - printf( "FUNC\n%s\n%s\n", name, hiding ~ "^$" ? hide : hiding ) - gsub( "\t", " ", line ) - gsub( " +", " ", line ) - sub( "^ *", "", line ) - sub( " *$", "", line ) - sub( "( ?;)*$", ";", line ) - printf( "%s\n", line ) -} - -# -# Output member variables. -# -function outputMember( line ) -{ - if ( ( type ~ "class" ) && ( hiding ~ "^$" ) ) - hide = "private" - else - hide = "public" - printf( "MEMBER\n%s\n%s\n", name, hiding ~ "^$" ? hide : hiding ) - gsub( "\t", " ", line ) - gsub( " +", " ", line ) - sub( "^ *", "", line ) - sub( " *$", "", line ) - sub( "( ?;)*$", ";", line ) - printf( "%s\n", line ) -} - -# -# Output member variables. -# -function outputMemberEnum( line ) -{ - if ( ( type ~ "class" ) && ( hiding ~ "^$" ) ) - hide = "private" - else - hide = "public" - printf( "ENUM\n%s\n%s\n", name, hiding ~ "^$" ? hide : hiding ) - gsub( "\t", " ", line ) - gsub( " +", " ", line ) - sub( "^ *", "", line ) - sub( " *$", "", line ) - sub( "( ?;)*$", ";", line ) - printf( "%s\n", line ) -} - -# -# Gathers up argument lists which cover more than one line. -# -function handleArgs( prototype ) -{ - getline line - line = uncomment( line ) - sub( "^[\t ]*", "", line ) - sub( "[\t ]*$", "", line ) - - # 3.11.95 supress preproc in fuctions args - sub( "#.*$", "", line ) - - if ( ( prototype ~ "\\($" || line ~ "^\\(" || line ~ "^\\)" ) && \ - prototype !~ ",$" ) - prototype = prototype line - else - prototype = prototype " " line - while ( \ - ( prototype !~ "\\)[\t ]*(const[\t ]*)?((\{.*)|(//.*))?$" ) \ - && \ - ( prototype !~ "\\)[\t ]*(const[\t ]*)?(=[\t ]*0[\t ]*)?;[\t ]*(//.*)?$" ) \ - && \ - ( prototype !~ "\\)[\t ]*:.*$" ) \ - ) - { - getline line - line = uncomment( line ) - sub( "^[\t ]*", "", line ) - sub( "[\t ]*$", "", line ) - - # 3.11.95 supress preproc in fuctions args - sub( "#.*$", "", line ) - - if ( ( prototype ~ "\\($" || line ~ "^\\(" || line ~ "^\\)" ) && \ - prototype !~ ",$" ) - prototype = prototype line - else - prototype = prototype " " line - } - if ( prototype ~ "\\)[\t ]*:.*$" ) - sub( "\\)[\t ]*:.*$", ")", prototype ) - else if ( prototype ~ "\\)[\t ]*\{.*$" ) - sub( "\\)[\t ]*\{.*$", ")", prototype ) - return prototype -} - -# -# Gathers up enum argument lists which cover more than one line. -# -function handleEnumArgs( prototype ) -{ - getline line - line = uncomment( line ) - sub( "^[\t ]*", "", line ) - sub( "[\t ]*$", "", line ) - if ( ( prototype ~ "\\{$" || line ~ "^\\{" || line ~ "^\\}" ) && \ - prototype !~ ",$" ) - prototype = prototype line - else - prototype = prototype " " line - while ( \ - ( prototype !~ "\\}[\t ]*(const[\t ]*)?((\{.*)|(//.*))?$" ) \ - && \ - ( prototype !~ "\\}[\t ]*(const[\t ]*)?(=[\t ]*0[\t ]*)?;[\t ]*(//.*)?$" ) \ - && \ - ( prototype !~ "\\}[\t ]*:.*$" ) \ - ) - { - getline line - line = uncomment( line ) - sub( "^[\t ]*", "", line ) - sub( "[\t ]*$", "", line ) - if ( ( prototype ~ "\\($" || line ~ "^\\(" || line ~ "^\\)" ) && \ - prototype !~ ",$" ) - prototype = prototype line - else - prototype = prototype " " line - } - if ( prototype ~ "\\}[\t ]*:.*$" ) - sub( "\\}[\t ]*:.*$", "}", prototype ) - else if ( prototype ~ "\\}[\t ]*\{.*$" ) - sub( "\\}[\t ]*\{.*$", "}", prototype ) - return prototype -} - -# -# Skips inline code. End of such code is determined when either a blank line, -# comment, or end of ADT is encountered. -# -function handleInline() -{ - getline line - while (line !~ "^[\t ]*(}.*;[\t ]*)?(//.*)?$" ) - getline line - - if ( line ~ "[\t ]*}[\t ]*[_a-zA-Z0-9]*[\t ]*;[\t ]*$" ) - { - printf( "\n" ) - popLevel( line ) - } - - if ( line ~ "^[\t ]*//.*" ) - return line - else - return "" -} - -# -# The main parsing loop. -# This implements a recursive descent parser of sorts. -# -function doParse() -{ - while ( $0 !~ "^$" ) - { - if ( $0 ~ /^[\t ]*template[\t ]*<[^:]+>[\t ]*$/ ) - { - getline line - $0 = $0 " " line - } - - if ( $0 ~ /^[\t ]*\/\/[\t ]*==+[\t ]*$/ ) - { - handleHeader() - } - else if ( $0 ~ /^[\t ]*\/\/[\t ]*= [a-zA-Z0-9]+[^<>]*[\t ]*$/ ) - { - handleInfo() - } - else if ( $0 ~ /^[\t ]*\/\/.*$/ ) - { - handleComment() - } - else if ( $0 ~ /^[\t ]*#[\t ]*define/ ) - { - handleDefine() - } - else if ( $0 ~ /^[\t ]*#[\t ]*include[\t ]*<.+>/ ) - { - handleInclude() - } - else if ( $0 ~ /^[\t ]*#[\t ]*include[\t ]*".+"/ ) - { - handleLocalInclude() - } - else if ( $0 ~ /^[\t ]*#.*$/ ) - { - handlePreprocessor() - } - else if ( $0 ~ /^[\t ]*typedef[\t ]+/ ) - { - handleTypedef() - } - else if ( $0 ~ /^extern[\t ]+/ ) - { - handleExtern() - } - else if ( $0 ~ /^[\t ]*class[\t ]/ ) - { - handleClass() - } - else if ( $0 ~ /^[\t ]*struct[\t ]/ ) - { - handleStruct() - } - else if ( $0 ~ /^[\t ]*union[\t ]/ ) - { - handleUnion() - } - else if ( $0 ~ /^[\t ]*template[\t ]*<.+>[\t ]+class[\t ]/ ) - { - handleTemplate() - } - else if ( $0 ~ /^[\t ]*enum[\t ]*.*;[\t ]*(\/\/.*)?$/ ) - { -#printf("\ntype=%s-------single------\n",type); - handleEnumFun() - } - else if ( ($0 ~ /((\((.*,)?)|([_a-zA-Z0-9_]+))[\t ]*(\/\/.*)?$/) && ( name !~ "^$" ) && ( $0 ~ /^[\t ]*enum/ ) ) - { -#printf("\ntype=%s-------multi------\n",type); - handleMultilineEnums() - } - else if ( $0 ~ /^[\t ]*}.*;[\t ]*/ ) - { - handleEndADT() - } - else if ( ( name !~ "^$" ) && ( type !~ "enum" ) ) - { - if ( $0 ~ /^[\t ]*private[\t ]*:[\t ]*(\/\/.*)?$/ ) - { - handlePrivate() - } - else if ( $0 ~ /^[\t ]*protected[\t ]*:[\t ]*(\/\/.*)?$/ ) - { - handleProtected() - } - else if ( $0 ~ /^[\t ]*public[\t ]*:[\t ]*(\/\/.*)?$/ ) - { - handlePublic() - } - else if ( $0 ~ /^[\t ]*friend[\t ]+/ ) - { - handleFriend() - } - else if ( $0 ~ /\)[\t ]*:[\t ]*.*\(.*\)[\t ]*(\{(.*})?[\t ]*)(\/\/.*)?$/ ) - { - handleInlineCtor() - } - else if ( $0 ~ /\)[\t ]*(const[\t ]*)?(\{(.*})?[\t ]*)?(\/\/.*)?$/ && - $0 !~ /^.*operator[\t ]*\(\)[\t ]*(\/\/.*)?$/ ) - { - handleInlineFunction() - } - else if ( $0 ~ /\)[\t ]*(const[\t ]*)?(=[\t ]*0[\t ]*)?;?[\t ]*(\/\/.*)?$/ && - $0 !~ /^.*operator[\t ]*\(\)[\t ]*(\/\/.*)?$/ ) - { - handleFunction() - } - else if ( $0 ~ /[\t ]*;[\t ]*(\/\/.*)?(\/\\*.*\\*\/)?$/ ) - { - handleMember() - } - else if ( $0 ~ /((\((.*,)?)|([_a-zA-Z0-9_>)]+[*&]?))[\t ]*(\/\/.*)?$/ ) - { - handleMultilineFunctions() - } - else - $0 = "" - } - else - $0 = "" - } -} diff --git a/bin/class2man b/bin/class2man deleted file mode 100755 index c81543d64b2..00000000000 --- a/bin/class2man +++ /dev/null @@ -1,78 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Script to combine class2info and info2man. -# -# = AUTHOR(S) -# Graham Dumpleton -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT/$OSE_RELEASE_NAME -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/lib"} - -CLASS2INFO="$BINDIR/class2info" -INFO2MAN="$BINDIR/info2man" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` files" -} - -# -# Check usage. -# -if test "$#" = "0" -then - USAGE -fi - -while test "$#" != "0" -do - $CLASS2INFO $1 - if test "$?" != "0" - then - exit 1 - fi - file=`basename $1` - base="`echo $file | sed -e 's/\..*$//'`" - if test -f "$base.ci" - then - $INFO2MAN $base.ci - rm -f $base.ci - fi - shift -done diff --git a/bin/class2mml b/bin/class2mml deleted file mode 100755 index bb7ab030976..00000000000 --- a/bin/class2mml +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Script to combine class2info and info2mml. -# -# = AUTHOR(S) -# Graham Dumpleton -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT/$OSE_RELEASE_NAME -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/lib"} - -CLASS2INFO="$BINDIR/class2info" -INFO2MAN="$BINDIR/info2mml" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` files" -} - -# -# Check usage. -# -if test "$#" = "0" -then - USAGE -fi - -while test "$#" != "0" -do - $CLASS2INFO $1 - if test "$?" != "0" - then - exit 1 - fi - file=`basename $1` - base="`echo $file | sed -e 's/\..*$//'`" - if test -f "$base.ci" - then - $INFO2MAN $base.ci - rm -f $base.ci - fi - shift -done diff --git a/bin/class2src b/bin/class2src deleted file mode 100755 index 5bc63fedc68..00000000000 --- a/bin/class2src +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Generates member function stubs for the src file to standard output. -# -# = AUTHOR(S) -# Graham Dumpleton -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT/$OSE_RELEASE_NAME -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/lib"} - -CLASS2INFO="$BINDIR/class2info" -INFO2SRC="$BINDIR/info2src" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` files" -} - -# -# Check usage. -# -if test "$#" = "0" -then - USAGE -fi - -while test "$#" != "0" -do - $CLASS2INFO $1 - if test "$?" != "0" - then - exit 1 - fi - file=`basename $1` - base="`echo $file | sed -e 's/\..*$//'`" - if test -f "$base.ci" - then - $INFO2SRC $base.ci $2 $3 $4 - rm -f $base.ci - fi - shift -done diff --git a/bin/classinfo.ps b/bin/classinfo.ps deleted file mode 100755 index 950535ed86e..00000000000 --- a/bin/classinfo.ps +++ /dev/null @@ -1,868 +0,0 @@ -%!PS-Adobe-3.0 -%%BoundingBox: 54 72 558 720 -%%Creator: Mozilla (NetScape) HTML->PS -%%DocumentData: Clean7Bit -%%Orientation: Portrait -%%Pages: 9 -%%PageOrder: Ascend -%%Title: Classinfo Tools -%%EndComments -%%BeginProlog -[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright - /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one - /two /three /four /five /six /seven /eight /nine /colon /semicolon - /less /equal /greater /question /at /A /B /C /D /E - /F /G /H /I /J /K /L /M /N /O - /P /Q /R /S /T /U /V /W /X /Y - /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c - /d /e /f /g /h /i /j /k /l /m - /n /o /p /q /r /s /t /u /v /w - /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright - /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior - /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf - /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla - /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde - /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex - /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring - /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis - /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave - /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def -/c { matrix currentmatrix currentpoint translate - 3 1 roll scale newpath 0 0 1 0 360 arc setmatrix } bind def -/F0 - /Times-Roman findfont - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding isolatin1encoding def - currentdict end -definefont pop -/f0 { /F0 findfont exch scalefont setfont } bind def -/F1 - /Times-Bold findfont - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding isolatin1encoding def - currentdict end -definefont pop -/f1 { /F1 findfont exch scalefont setfont } bind def -/F2 - /Times-Italic findfont - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding isolatin1encoding def - currentdict end -definefont pop -/f2 { /F2 findfont exch scalefont setfont } bind def -/F3 - /Times-BoldItalic findfont - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding isolatin1encoding def - currentdict end -definefont pop -/f3 { /F3 findfont exch scalefont setfont } bind def -/F4 - /Courier findfont - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding isolatin1encoding def - currentdict end -definefont pop -/f4 { /F4 findfont exch scalefont setfont } bind def -/F5 - /Courier-Bold findfont - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding isolatin1encoding def - currentdict end -definefont pop -/f5 { /F5 findfont exch scalefont setfont } bind def -/F6 - /Courier-Oblique findfont - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding isolatin1encoding def - currentdict end -definefont pop -/f6 { /F6 findfont exch scalefont setfont } bind def -/F7 - /Courier-BoldOblique findfont - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding isolatin1encoding def - currentdict end -definefont pop -/f7 { /F7 findfont exch scalefont setfont } bind def -/rhc { - { - currentfile read { - dup 97 ge - { 87 sub true exit } - { dup 48 ge { 48 sub true exit } { pop } ifelse } - ifelse - } { - false - exit - } ifelse - } loop -} bind def - -/cvgray { % xtra_char npix cvgray - (string npix long) - dup string - 0 - { - rhc { cvr 4.784 mul } { exit } ifelse - rhc { cvr 9.392 mul } { exit } ifelse - rhc { cvr 1.824 mul } { exit } ifelse - add add cvi 3 copy put pop - 1 add - dup 3 index ge { exit } if - } loop - pop - 3 -1 roll 0 ne { rhc { pop } if } if - exch pop -} bind def - -/smartimage12rgb { % w h b [matrix] smartimage12rgb - - /colorimage where { - pop - { currentfile rowdata readhexstring pop } - false 3 - colorimage - } { - exch pop 8 exch - 3 index 12 mul 8 mod 0 ne { 1 } { 0 } ifelse - 4 index - 6 2 roll - { 2 copy cvgray } - image - pop pop - } ifelse -} def -/cshow { dup stringwidth pop 2 div neg 0 rmoveto show } bind def -/rshow { dup stringwidth pop neg 0 rmoveto show } bind def -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -24 f1 0 697.5 moveto -(OSE - Tools User Guide) show -12 f2 0 668.5 moveto -(Graham Dumpleton) show -12 f2 0 655.4 moveto -(Dumpleton Software Consulting Pty Limited) show -12 f2 0 642.3 moveto -(PO BOX 3150) show -12 f2 0 629.2 moveto -(Parramatta, 2124) show -12 f2 0.2 616.1 moveto -(N.S.W, Australia) show -12 f2 0 603 moveto -(email: grahamd@nms.otc.com.au) show -0 593.9 moveto -504 0 rlineto 0 -1.4 rlineto -504 0 rlineto closepath fill -18 f1 0 557.2 moveto -(Table of Contents) show -12 f1 0 528.8 moveto -(Classinfo Tools) show -12 f0 78.3 528.8 moveto -( ) show -12 f1 28 501.7 moveto -(1 Available Programs) show -12 f0 139.3 501.7 moveto -( ) show -12 f1 28 487.9 moveto -(2 Global Sections) show -12 f0 116.6 487.9 moveto -( ) show -12 f1 28 474.1 moveto -(3 Block Formatting) show -12 f0 127.9 474.1 moveto -( ) show -12 f1 28 460.3 moveto -(4 Inline Formatting) show -12 f0 128.6 460.3 moveto -( ) show -12 f1 28 446.5 moveto -(5 Class Sections) show -12 f0 109.3 446.5 moveto -( ) show -12 f1 28 432.7 moveto -(6 Member Documentation) show -12 f0 162.6 432.7 moveto -( ) show -12 f1 28 418.9 moveto -(7 Contract Section) show -12 f0 123.3 418.9 moveto -( ) show -0 396.5 moveto -504 0 rlineto 0 -1.4 rlineto -504 0 rlineto closepath fill -24 f1 0 354 moveto -(Classinfo Tools) show -18 f1 0 318.7 moveto -(1 Available Programs) show -12 f0 0 290.8 moveto -(The documentation tools provided with the OSE build environment, allow comments in your code files,) show -12 f0 0 277.5 moveto -(to be extracted and formatted into end user documentation. To enable the tools to do this in a predictable) show -12 f0 0 264.2 moveto -(manner, the comments must be formatted according to a small set of rules. At present, the tools can) show -12 f0 0 250.9 moveto -(extract comments from C++ class header files and produce either UNIX style manual pages, of Frame) show -12 f0 0 237.6 moveto -(mml files. The tools provided are described below.) show -10 f4 0 213.7 moveto -(-------------------------------------------------------------------------------) show -10 f5 0 203.2 moveto -(Program) show -10 f4 42.2 203.2 moveto -( ) show -10 f5 72.2 203.2 moveto -(Purpose) show -10 f4 114.2 203.2 moveto -( ) show -10 f4 0 192.7 moveto -(-------------------------------------------------------------------------------) show -10 f4 0 182.2 moveto -(class2info Parses a C++ header file and produces a file which contains infor ) show -10 f4 0 171.7 moveto -( mation about the class in the header file, in a form which is more ) show -10 f4 0 161.2 moveto -( easily parsed by other tools. ) show -10 f4 0 150.7 moveto -(info2man Takes the output file from class2info and produces a UNIX ) show -10 f4 0 140.2 moveto -( style manual page for each class described in the input file. ) show -10 f4 0 129.7 moveto -(class2man Combines the programs class2info and info2man, to pro ) show -10 f4 0 119.2 moveto -( duce a UNIX style manual page for each class declaration in a ) show -10 f4 0 108.7 moveto -( header file. ) show -10 f4 0 98.2 moveto -(info2mml Takes the output file from class2info and produces a Frame ) show -10 f4 0 87.7 moveto -( mml file for each class described in the inout file. ) show -10 f4 0 77.2 moveto -(class2mml Combines the programs class2info and info2mml, to pro ) show -pagelevel restore -showpage -%%Page: 2 2 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -10 f4 0 711.9 moveto -( duce a Frame mml file for each class declaration in a header file. ) show -10 f4 0 701.4 moveto -(-------------------------------------------------------------------------------) show -12 f0 0 677.7 moveto -(Using the same front end parser as the documentation extraction tools, are the following tools:) show -10 f4 0 653.8 moveto -(----------------------------------------------------------------------------) show -10 f5 0 643.3 moveto -(Program) show -10 f4 42.2 643.3 moveto -( ) show -10 f5 66.2 643.3 moveto -(Purpose) show -10 f4 108.2 643.3 moveto -( ) show -10 f4 0 632.8 moveto -(----------------------------------------------------------------------------) show -10 f4 0 622.3 moveto -(info2src Takes the output file from class2info and produces on stan ) show -10 f4 0 611.8 moveto -( dard output, empty stub functions for each of the member func ) show -10 f4 0 601.3 moveto -( tions listed in the class declarations described in the file. ) show -10 f4 0 590.8 moveto -(class2src Combines the programs class2info and info2src, to pro ) show -10 f4 0 580.3 moveto -( duce on standard output, empty stub functions for each of the ) show -10 f4 0 569.8 moveto -( member functions listed in the class declarations described in a ) show -10 f4 0 559.3 moveto -( header file. ) show -10 f4 0 548.8 moveto -(----------------------------------------------------------------------------) show -12 f0 0 525.1 moveto -(These use information contained in a C++ class header file, to produce code stubs suitable for the) show -12 f0 0 511.8 moveto -(corresponding implementation file for that class.) show -12 f0 0 485.2 moveto -(The format which C++ class header files must adhere to is the subject of the remainder of this document.) show -18 f1 0 452.5 moveto -(2 Global Sections) show -12 f0 0 424.6 moveto -(To include a section in the manual page of each class in a header file, the comment containing the body) show -12 f0 0 411.3 moveto -(text of the section, must appear at global scope within the header file. The title of the section must) show -12 f0 0 398 moveto -(appear on a separate line, immediately prior to the body text of the section. To distinguish the title of the) show -12 f0 0 384.7 moveto -(section from the body text, you must precede it with a tag, consisting of the character `='. There must be) show -12 f0 0 371.4 moveto -(a single space only, before and after the tag. For example:) show -10 f4 0 347.5 moveto -( // = SECTION TITLE) show -10 f4 0 326.5 moveto -( // Body text.) show -12 f0 0 302.8 moveto -(Any text following the title of the section, up till the end of the comment, the start of another section, or) show -12 f0 0 289.5 moveto -(a line commencing with `==', is interpreted to be the body text for that section. Multiple sections may be) show -12 f0 0 276.2 moveto -(documented in a single comment block. Any leading, or trailing blank lines will be discarded in the) show -12 f0 0 262.9 moveto -(output. An example of a comment block containing multiple sections is given below.) show -10 f4 0 239 moveto -( // =====================================================) show -10 f4 0 218 moveto -( //) show -10 f4 0 197 moveto -( // = SECTION TITLE1) show -10 f4 0 176 moveto -( // Body text.) show -10 f4 0 155 moveto -( //) show -10 f4 0 134 moveto -( // = SECTION TITLE2) show -10 f4 0 113 moveto -( // Body text.) show -10 f4 0 92 moveto -( //) show -pagelevel restore -showpage -%%Page: 3 3 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -10 f4 0 711.9 moveto -( // =====================================================) show -12 f0 0 688.2 moveto -(Certain sections, appearing at global scope, are given special treatment in the generated manual pages.) show -12 f0 0 674.9 moveto -(These are:) show -10 f4 0 651 moveto -(-------------------------------------------------------------------------------) show -10 f5 0 640.5 moveto -(Section) show -10 f4 42 640.5 moveto -( ) show -10 f5 90 640.5 moveto -(Description) show -10 f4 156 640.5 moveto -( ) show -10 f4 0 630 moveto -(-------------------------------------------------------------------------------) show -10 f4 0 619.5 moveto -(LIBRARY The name of the library, of which the file is a part. This will ) show -10 f4 0 609 moveto -( appear in the header of each manual page. ) show -10 f4 0 598.5 moveto -(FILENAME The name of the file. This will be used in conjunction with ) show -10 f4 0 588 moveto -( the library name, to produce an include line in the synopsis. ) show -10 f4 0 577.5 moveto -(AUTHOR\(S\) The names of the authors. If the authors are placed on sepa ) show -10 f4 0 567 moveto -( rate lines, commas should not be used to terminate each line. ) show -10 f4 0 556.5 moveto -( If more than one author is placed on a single line, a comma ) show -10 f4 0 546 moveto -( should be used to separate each. ) show -10 f4 0 535.5 moveto -(COPYRIGHT The copyright applying to the contents of the file. ) show -10 f4 0 525 moveto -(VERSION The version number of the file. If using RCS, this would be ) show -10 f4 0 514.5 moveto -( set to `$Revision$'. ) show -10 f4 0 504 moveto -(DATE RELEASED The date that the current version of the file was released. If ) show -10 f4 0 493.5 moveto -( using RCS, this would be set to `$Date$'. ) show -10 f4 0 483 moveto -(RCSID The raw ID produced by RCS. Normally set to `$Id$'. ) show -10 f4 0 472.5 moveto -(SCCSID The raw ID produced by SCCS. Normally set to `%W%'. ) show -10 f4 0 462 moveto -(-------------------------------------------------------------------------------) show -12 f0 0 438.3 moveto -(Using these tags, you can construct a comment block at the start of each file, which describes the file,) show -12 f0 0 425 moveto -(authors and version of the file. For example:) show -10 f4 0 401.1 moveto -( /*) show -10 f4 0 380.1 moveto -( // ========================================================) show -10 f4 0 359.1 moveto -( //) show -10 f4 0 338.1 moveto -( // = LIBRARY) show -10 f4 0 317.1 moveto -( // OTC) show -10 f4 0 296.1 moveto -( //) show -10 f4 0 275.1 moveto -( // = FILENAME) show -10 f4 0 254.1 moveto -( // collctn/list.hh) show -10 f4 0 233.1 moveto -( //) show -10 f4 0 212.1 moveto -( // = RCSID) show -10 f4 0 191.1 moveto -( // $Id$) show -10 f4 0 170.1 moveto -( //) show -10 f4 0 149.1 moveto -( // = AUTHOR\(S\)) show -10 f4 0 128.1 moveto -( // Graham Dumpleton) show -10 f4 0 107.1 moveto -( //) show -10 f4 0 86.1 moveto -( // = COPYRIGHT) show -pagelevel restore -showpage -%%Page: 4 4 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -10 f4 0 711.9 moveto -( // Copyright 1991 1992 1993 OTC LIMITED) show -10 f4 0 690.9 moveto -( //) show -10 f4 0 669.9 moveto -( // =====================================================) show -10 f4 0 648.9 moveto -( */) show -18 f1 0 619.1 moveto -(3 Block Formatting) show -12 f0 0 591.2 moveto -(When the text of your comments appear in the manual page, they will be reformatted. If you need to) show -12 f0 0 577.9 moveto -(include an excerpt of code in the manual page, for example:) show -10 f4 0 554 moveto -( // = EXAMPLE) show -10 f4 0 533 moveto -( // void dump\(Class* theClass\)) show -10 f4 0 512 moveto -( // {) show -10 f4 0 491 moveto -( // cout << theClass->name\(\) << endl;) show -10 f4 0 470 moveto -( // }) show -12 f0 0 446.3 moveto -(it will appear as:) show -10 f4 0 422.4 moveto -( void dump\(Class* theClass\) { cout << *theClass << endl; }) show -12 f0 0 398.7 moveto -(If the example is complicated, the result will be unreadable.) show -12 f0 0 372.1 moveto -(To let the documentation tools know that the text you have included is special and should not be) show -12 f0 0 358.8 moveto -(reformatted, you can mark it as being a code example. For example:) show -10 f4 0 334.9 moveto -( // = EXAMPLE) show -10 f4 0 313.9 moveto -( // = BEGIN<CODE>) show -10 f4 0 292.9 moveto -( // void dump\(Class* theClass\)) show -10 f4 0 271.9 moveto -( // {) show -10 f4 0 250.9 moveto -( // cout << *theClass << endl;) show -10 f4 0 229.9 moveto -( // }) show -10 f4 0 208.9 moveto -( // = END<CODE>) show -12 f0 0 185.2 moveto -(The commands in this example are, `BEGIN<CODE>'and `END<CODE>'. In all cases, the format of) show -12 f0 0 171.9 moveto -(commands used to change the formatting of a block of text is:) show -10 f4 0 148 moveto -( // = BEGIN<COMMAND>) show -10 f4 0 127 moveto -( // ....) show -10 f4 0 106 moveto -( // = END<COMMAND>) show -12 f0 0 82.3 moveto -(The `BEGIN' for a command, must always have a matching `END'. The commands which are currently) show -pagelevel restore -showpage -%%Page: 5 5 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -12 f0 0 709.2 moveto -(understood by the documentation tools are:) show -10 f4 0 685.3 moveto -(--------------------------------------------------------------------) show -10 f5 0 674.8 moveto -(Command) show -10 f4 42 674.8 moveto -( ) show -10 f5 54 674.8 moveto -(Description) show -10 f4 120 674.8 moveto -( ) show -10 f4 0 664.3 moveto -(--------------------------------------------------------------------) show -10 f4 0 653.8 moveto -(INDENT Text will be indented with respect to the surrounding text. ) show -10 f4 0 643.3 moveto -(NOFILL Text will be output with indentation and formatting as it ) show -10 f4 0 632.8 moveto -( appears. ) show -10 f4 0 622.3 moveto -(CODE Text is output in `NOFILL' mode using a fixed width font. ) show -10 f4 0 611.8 moveto -(COMMENT Text will not be output. This command would be used to sur ) show -10 f4 0 601.3 moveto -( round comments about the implementation, which should not ) show -10 f4 0 590.8 moveto -( appear in the user documentation. ) show -10 f4 0 580.3 moveto -(--------------------------------------------------------------------) show -12 f0 0 556.6 moveto -(Commands may be nested, with the exception that no commands should be nested within a `CODE') show -12 f0 0 543.3 moveto -(block.) show -18 f1 0 510.6 moveto -(4 Inline Formatting) show -12 f0 0 482.7 moveto -(As well as changing the formatting of a block of text, you can change the font style used. This is done) show -12 f0 0 469.4 moveto -(by placing special sequences of characters in the body of the text. Inline formatting commands come in) show -12 f0 0 456.1 moveto -(the following three forms:) show -10 f4 0 432.2 moveto -(----------------------------------------------------------------------------------) show -10 f5 0 421.7 moveto -(Command) show -10 f4 42 421.7 moveto -( ) show -10 f5 96 421.7 moveto -(Description) show -10 f4 162 421.7 moveto -( ) show -10 f4 0 411.2 moveto -(----------------------------------------------------------------------------------) show -10 f4 0 400.7 moveto -(<text> Text between `<` and `>', is displayed in a fixed with font. ) show -10 f4 0 390.2 moveto -(<{text}> Text between `<{` and `}>', is displayed in an italic font. ) show -10 f4 0 379.7 moveto -(<[text]> Text between `<[` and `]>', is displayed in a bold font. ) show -10 f4 0 369.2 moveto -(----------------------------------------------------------------------------------) show -12 f0 0 345.5 moveto -(`<text>' should be used for all C++ keywords, function names, variable names, class names, expressions) show -12 f0 0 332.2 moveto -(etc. The others can be used to highlight text. An example of how inline formatting commands may be) show -12 f0 0 318.9 moveto -(used, follows:) show -10 f4 0 295 moveto -( // = ASSERTIONS) show -10 f4 0 274 moveto -( // Assertion checks can be placed into code using) show -10 f4 0 253 moveto -( // the <OTCLIB_ASSERT\(\)> macro. Note that you should) show -10 f4 0 232 moveto -( // <[NOT]> use an expression in the condition check,) show -10 f4 0 211 moveto -( // which has a side effect, the result of which is) show -10 f4 0 190 moveto -( // necessary for the correct operation of the) show -10 f4 0 169 moveto -( // program. The reason for this, is that assertions) show -10 f4 0 148 moveto -( // can be compiled out of your code by defining the) show -10 f4 0 127 moveto -( // <NDEBUG> symbol.) show -12 f0 0 103.3 moveto -(Since `<`, and `>' are special characters, you must prefix them with a `\\' if the actual character needs to) show -12 f0 0 90 moveto -(printed. For example:) show -pagelevel restore -showpage -%%Page: 6 6 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -10 f4 0 711.9 moveto -( <operator\\<\(\)>) show -12 f0 0 688.2 moveto -(If `{`, `}', `[` or `]' appear adjacent to either `<` or `>' in the forms described above, they will also need) show -12 f0 0 674.9 moveto -(to be prefixed with a `\\'. For example:) show -10 f4 0 651 moveto -( <\\[A-Za-z_]*>) show -18 f1 0 621.2 moveto -(5 Class Sections) show -12 f0 0 593.3 moveto -(Sections pertaining to a class, are placed in the class declaration before the initial opening brace. For) show -12 f0 0 580 moveto -(example:) show -10 f4 0 556.1 moveto -( template<class T>) show -10 f4 0 535.1 moveto -( class OTC_List : public OTC_Collection<T>) show -10 f4 0 514.1 moveto -( // = SECTION NAME) show -10 f4 0 493.1 moveto -( // Body text.) show -10 f4 0 472.1 moveto -( {) show -10 f4 0 451.1 moveto -( ...) show -10 f4 0 430.1 moveto -( };) show -12 f0 0 406.4 moveto -(These sections will only appear in the manual page for that class. Sections appearing with a class, which) show -12 f0 0 393.1 moveto -(are given special treatment in the manual page are:) show -10 f4 0 369.2 moveto -(-----------------------------------------------------------------------------) show -10 f5 0 358.7 moveto -(Section) show -10 f4 42 358.7 moveto -( ) show -10 f5 78 358.7 moveto -(Description) show -10 f4 144 358.7 moveto -( ) show -10 f4 0 348.2 moveto -(-----------------------------------------------------------------------------) show -10 f4 0 337.7 moveto -(TITLE A one line description of the class. This will be used in the ) show -10 f4 0 327.2 moveto -( `NAME' section of the manual page. ) show -10 f4 0 316.7 moveto -(CLASS TYPE The type of class. For example: Abstract or Concrete. ) show -10 f4 0 306.2 moveto -(AUDIENCE Who may use the class. For example, the class may only be ) show -10 f4 0 295.7 moveto -( of interest to the class librarian. ) show -10 f4 0 285.2 moveto -(DESCRIPTION A description of the class. ) show -10 f4 0 274.7 moveto -(NOTES Any special features, unimplemented but desirable features, ) show -10 f4 0 264.2 moveto -( side effects, or known bugs. ) show -10 f4 0 253.7 moveto -(SEE ALSO References to any associated documents, systems or classes. ) show -10 f4 0 243.2 moveto -( If listed separately on each line, no comma should be used at ) show -10 f4 0 232.7 moveto -( the end of the line. If more than one appears on a single line, ) show -10 f4 0 222.2 moveto -( a comma should be used to separate them. ) show -10 f4 0 211.7 moveto -(EXAMPLE If realistic, a brief example of how the class may be used. ) show -10 f4 0 201.2 moveto -( Copious examples should not be included here, but should be ) show -10 f4 0 190.7 moveto -( described in a separate user guide. ) show -10 f4 0 180.2 moveto -(-----------------------------------------------------------------------------) show -18 f1 0 150.4 moveto -(6 Member Documentation) show -12 f0 0 122.5 moveto -(Documentation for member variables and member functions do not have to be tagged, as has been the) show -12 f0 0 109.2 moveto -(case so far. It does however have to be put in a certain place with respect to the member variable or) show -12 f0 0 95.9 moveto -(function declaration. The locations, where comments related to a member function or variable can be) show -12 f0 0 82.6 moveto -(placed, are on the same line as the declaration following the semi-colon,) show -pagelevel restore -showpage -%%Page: 7 7 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -10 f4 0 706.7 moveto -( void func1\(\); // Comment) show -10 f4 0 685.7 moveto -( void func2\(\); // Comment) show -12 f0 0 662 moveto -(or on the line immediately following the declaration.) show -10 f4 0 638.1 moveto -( void func1\(\);) show -10 f4 0 617.1 moveto -( // Comment) show -10 f4 0 585.6 moveto -( void func2\(\);) show -10 f4 0 564.6 moveto -( // Comment) show -12 f0 0 540.9 moveto -(The comment may extend over more than one line. A comment for a particular member variable or) show -12 f0 0 527.6 moveto -(function will be terminated by any line which doesn't contain only a comment. A comment will only be) show -12 f0 0 514.3 moveto -(associated with the declaration which immediately preceeds it. For example:) show -10 f4 0 490.4 moveto -( void func1\(\);) show -10 f4 0 469.4 moveto -( void func2\(\);) show -10 f4 0 448.4 moveto -( // Comment) show -12 f0 0 424.7 moveto -(the comment is associated with func2\(\) only and not func1\(\).) show -12 f0 0 398.1 moveto -(If a member function is defined inline, the comment must be placed after the code. For example:) show -10 f4 0 374.2 moveto -( void func1\(\) { ... }) show -10 f4 0 353.2 moveto -( // Comment) show -10 f4 0 321.7 moveto -( void func2\(\)) show -10 f4 0 300.7 moveto -( { ... }) show -10 f4 0 279.7 moveto -( // Comment) show -12 f0 0 256 moveto -(A limitation of the extraction tools, currently requires that you do not place comments, or blank lines,) show -12 f0 0 242.7 moveto -(within the body of the inline code.) show -18 f1 0 210 moveto -(7 Contract Section) show -12 f0 0 182.1 moveto -(Contracts allow grouping of related member functions and variables. This) show -12 f0 0 155.5 moveto -(makes it easier to find a function which serves the purpose you require.) show -12 f0 0 128.9 moveto -(A contract is a grouping of operations which fulfill a responsibility of the class. Contracts could include:) show -18.1 106.4 moveto -3.3 3.3 c fill -12 f0 28 102.3 moveto -(Initialisation of the class.) show -18.1 93.1 moveto -3.3 3.3 c fill -12 f0 28 89 moveto -(Destruction of the class.) show -18.1 79.8 moveto -3.3 3.3 c fill -12 f0 28 75.7 moveto -(The ability to insert items into, or modify a particular aspect of a class.) show -pagelevel restore -showpage -%%Page: 8 8 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -18.1 713.3 moveto -3.3 3.3 c fill -12 f0 28 709.2 moveto -(The ability to make queries about a class or iterate over data it contains.) show -12 f0 0 682.6 moveto -(A contract section is started by placing a comment containing the section title, prior to the functions in) show -12 f0 0 669.3 moveto -(the class that are being grouped together. The list of functions in a contract is terminated by the) show -12 f0 0 656 moveto -(commencement of another contract, a new public, protected, or private section, or the end of the class.) show -12 f0 0 629.4 moveto -(If contract sections are used, only functions which appear under a contract section will appear in the) show -12 f0 0 616.1 moveto -(manual page. Functions which are not in a contract section are not displayed. If no contract sections are) show -12 f0 0 602.8 moveto -(used, two default contract sections, with labels `PROTECTED MEMBERS' and `PUBLIC) show -12 f0 0 589.5 moveto -(MEMBERS', will be created.) show -12 f0 0 562.9 moveto -(An example of a class using contracts is:) show -10 f4 0 539 moveto -( class Class) show -10 f4 0 518 moveto -( // ...) show -10 f4 0 497 moveto -( {) show -10 f4 0 476 moveto -( public:) show -10 f4 0 444.5 moveto -( ~Class\(\);) show -10 f4 0 423.5 moveto -( // This will not appear in the) show -10 f4 0 402.5 moveto -( // manual page.) show -10 f4 0 371 moveto -( // = INITIALISATION) show -10 f4 0 339.5 moveto -( Class\(char const* theString\);) show -10 f4 0 318.5 moveto -( // This will appear in the manual) show -10 f4 0 297.5 moveto -( // page in section INITIALISATION.) show -10 f4 0 276.5 moveto -( //) show -10 f4 0 255.5 moveto -( // Inline formatting, for example:) show -10 f4 0 234.5 moveto -( // <theString>, may be used, as may) show -10 f4 0 213.5 moveto -( // block formatting commands.) show -10 f4 0 182 moveto -( // = QUERY) show -10 f4 0 161 moveto -( // As with all other sections, a contract) show -10 f4 0 140 moveto -( // section can have body text. This will appear) show -10 f4 0 119 moveto -( // in the manual page after the section name and) show -10 f4 0 98 moveto -( // before the functions are listed.) show -pagelevel restore -showpage -%%Page: 9 9 -%%BeginPageSetup -/pagelevel save def -54 0 translate -%%EndPageSetup -newpath 0 72 moveto 504 0 rlineto 0 648 rlineto -504 0 rlineto closepath clip newpath -10 f4 0 711.9 moveto -( char const* string\(\);) show -10 f4 0 680.4 moveto -( // Extra information for the current contract may) show -10 f4 0 659.4 moveto -( // also be included between members. This is) show -10 f4 0 638.4 moveto -( // generally used where it is necessary to make a) show -10 f4 0 617.4 moveto -( // comment about a specific set of members in a) show -10 f4 0 596.4 moveto -( // contract.) show -10 f4 0 564.9 moveto -( OTC_Boolean isValid\(\) const;) show -10 f4 0 543.9 moveto -( };) show -10 f4 0 522.9 moveto -( ) show -pagelevel restore -showpage -%%EOF diff --git a/bin/clone.1 b/bin/clone.1 deleted file mode 100644 index 7c36d90fd85..00000000000 --- a/bin/clone.1 +++ /dev/null @@ -1,297 +0,0 @@ -.TH CLONE 1 "6 June 1989" "" -.SH NAME -clone \- make a clone of an entire directory tree -.SH SYNOPSIS -.B clone -[ -.B -q -] [ -.B -v -] [ -.B -f -] [ -.B -c | -s -] [ -.B -S -] -.I "dir1 dir2" -.SH DESCRIPTION -.I Clone -makes an identical copy of an entire (source) directory tree rooted at -the directory named -.I dir1 -into the (target) directory tree -rooted at -.I dir2. -The target directory -.I dir2 -will be created if it does not already exist. -On the other hand, if the directory -.I dir2 -exists, or if the -.I dir2 -directory has any existing subdirectories, then these -directories will -.B not -be deleted or replaced by -.I clone. -.PP -.I Clone -normally creates the clone -directory tree by creating any new directories needed -beneath -.I dir2 -(possibly including -.I dir2 -itself). -.I Clone -then fills in the new directories with hard links -to all of the files in the original (source) directory tree -.I dir1 -such that the new (target) directory tree appears to also contain -all of the files and subdirectories contained in the original (source) -directory tree. -Hard links are normally used when creating -.I clones -of the files in the source directory tree -inside the new (target) directory tree. -This insures that the cost (in disk space) of -.I cloning -a given source directory tree will be very low. -If desired, the new (clone) directory tree can be filled in with -symbolic links or with actual copies of the original files (instead of -using hard links). -.PP -.I Clone -may be particularly useful for maintaining multiple versions -of nearly identical source trees. -.PP -An important feature of -.I clone -is that the -.I dir2 -argument may already exist and may already contain some -files and subdirectories. In such cases, -.I clone -does not disturb these existing files or subdirectories. -Rather, it simply adds the material from the source directory, -.I dir1, -to the material already present within -.I dir2. -In cases where -there are conflicts between files or directories which -already exist in -.I dir2 -but which also exist in -.I dir1, -.I clone -(by default) leaves the files or directories in the target directory -.I dir2 -untouched unless the -.B -f -(force) flag is used, in which case, -.I clone -will override (i.e. delete) the conflicting entries -from the target directory -.I dir2 -and replace them with clones from the source directory -.I dir1. -.SH OPTIONS -.I Clone -recognizes the following options: -.TP -.BI \-q -Quite mode. Suppress all warnings and non-fatal error messages. -.TP -.BI \-v -Verbose mode. Print verbose messages which describe each individual -linking (or copying) action, as well as all -.I mkdir -actions that -.I clone -executes. -.TP -.BI \-f -Force mode. In cases where an item (i.e. either a file or a directory) -exists in the source directory tree -.I dir1, -and also already exists in the target directory tree -.I dir2, -delete the item (ether a file or a directory) in -the target directory tree and then replace it with a clone -of the corresponding item from the source directory tree. -All such deletions causes warning to be issued to -.I stderr -unless the -.B \-q -(quite mode) -option is also specified. -Note that if a given item already exists in the target directory tree, -and if it also exists in the source directory tree, and if both the -(existing) source and target items are themselves directories, then the -.B \-f -option has no effect for these items. Existing directories in the -target directory tree are never deleted by -.I clone -unless there is a corresponding item in the source directory tree which is -.B not -a directory (i.e. is a regular file) and the -.B \-f -option is in effect. -.TP -.BI \-s -Symbolic link mode (not available on System V). When used, this -option causes all non-directory files to be -.I cloned -by making symbolic links from the target directory tree into the source -directory tree. This mode overrides the default mode in which -hard links are used to clone all non-directory files. -.TP -.BI \-c -Copy mode. -In this mode, a physical copy of each non-directory file in the source directory -tree is created in the target directory tree. Note that when this mode is used, -it is an error for the source directory tree to contain any block or character -device files, or any named pipe files. -.TP -.BI \-S -SCCS mode. -In this mode, only the source tree structure is cloned, not its contents. -Symbolic links are created within the destination tree to subdirectories -in the source tree named -.B SCCS. -This mode is useful when multiple developers work from a common SCCS project -tree. To accomplish this, each developer creates a local project tree by -.I cloning -the common SCCS project directory, specifying the -.B \-S -option. -Individual developers are then able to work within their local project tree while -ensuring that all SCCS operations are applied to the common SCCS project tree. -Use of the -.B \-S -option implies the use of the -.B \-s -option and is thus not available on System V. -.SH EXAMPLES -Assume that you have -two directory trees called -.I src1 -and -.I src2 -and that you wish to combine the contents of these -two directories into a new directory named -.I dst -such that if there are any files with duplicate names in both -.I src1 -and in -.I src2 -the files from the -.I src2 -directory tree will take precedence -over the corresponding files in the directory tree -.I src1. -The following commands would accomplish this task: -.sp 1 -.in +0.4i -.ft B -clone src1 dst -.br -clone -f src2 dst -.sp 1 -.in -0.4i -.ft R -Or alternatively, for this simple case, you could have said: -.ft B -.in +0.4i -.sp 1 -clone src2 dst -.br -clone src1 dst -.br -.sp 1 -.in -04.i -.ft R -.PP -To clone an SCCS project tree, such as -.B /pub/EOS_client_server, -one might use the following command, shown with the resulting output: -.sp 1 -.in +0.4i -.ft B -doc% clone -S -v /pub/EOS_client_server ~/EOS_CS -.br -clone: created new output directory: /home/ebupsn/EOS_CS -.br -clone: created new output directory: /home/ebupsn/EOS_CS/bin -.br -clone: created new output directory: /home/ebupsn/EOS_CS/lib -.br -clone: created new output directory: /home/ebupsn/EOS_CS/include -.br -clone: created new output directory: /home/ebupsn/EOS_CS/cmd -.br -clone: created new output directory: /home/ebupsn/EOS_CS/cmd/clone -.br -clone: created symlink /home/ebupsn/EOS_CS/cmd/clone/SCCS -> /pub/EOS_client_server/cmd/clone/SCCS -.br -clone: created symlink /home/ebupsn/EOS_CS/cmd/SCCS -> /pub/EOS_client_server/cmd/SCCS -.br -clone: created new output directory: /home/ebupsn/EOS_CS/man -.br -clone: created new output directory: /home/ebupsn/EOS_CS/man/man1 -.br -clone: created new output directory: /home/ebupsn/EOS_CS/man/man3 -.br -clone: created new output directory: /home/ebupsn/EOS_CS/man/cat1 -.br -clone: created new output directory: /home/ebupsn/EOS_CS/man/cat3 -.br -clone: created symlink /home/ebupsn/EOS_CS/SCCS -> /pub/EOS_client_server/SCCS -.br -.sp 1 -.in -0.4i -.ft R -.SH CAVEATS -On BSD systems, if there are symbolic links in the source tree, -the effects of -.I cloning -may not be what you expect. -A symbolic link within the source tree results in the creation of an -identical symbolic link within the destination tree. -A warning is issued if the symbolic link is either absolute and points -into the source directory or if the symbolic link is relative and -points out of the source tree. -.PP -If the -.B \-S -option is in effect and the source directory is itself a symbolic link -to a directory, the contents of the symbolic link are cloned in the -destination directory rather than setting the destination directory -to be an identical symbolic link. -The rational for this is as follows. -In networked environments, SCCS project directories are often configured -as NFS file systems managed by an NFS auto-mount daemon. -The NFS auto-mount daemon mounts NFS file systems in a temporary locations -and then creates symbolic links to the temporary locations. -Accesses to this symbolic links trigger the NFS auto-mount daemon. -It is therefore necessary that symbolic links in the destination tree -refer to the NFS auto-mount point symbolic link rather than to the NFS -auto-mount point itself. -Symbolic links within the source tree are ignored. -.SH WARNINGS -There are numerous possible warning and/or error messages which -.I clone -will issue for strange circumstances. -These should all be self-explanatory. -.SH FILES -.ta 1.7i -/usr/local/bin/clone The clone program -.SH "SEE ALSO" -ln(1), link(2), symlink(2), readlink(2), mkdir (1), mkdir (2) -.SH AUTHORS -Written by Ron Guilmette at the Microelectronics and Computer Technology -Corporation. Current E-mail address is rfg@ics.uci.edu. -.PP -SCCS mode added 07-April-1993 by Paul Stephenson at Ericsson Business -Communications. Current E-mail address is paul.stephenson@ebu.ericsson.se. diff --git a/bin/clone.cpp b/bin/clone.cpp deleted file mode 100644 index 62ab5e7b7bc..00000000000 --- a/bin/clone.cpp +++ /dev/null @@ -1,957 +0,0 @@ -// $Id$ - -#include "ace/OS.h" - -ACE_RCSID(bin, clone, "$Id$") - -#if 0 -#if defined (USG) -#define lstat stat -#else -extern "C" char *getwd (char *); -#define getcwd(str,len) (getwd(str)) -#endif -#endif - -#ifndef MAXPATHLEN -#define MAXPATHLEN 1024 -#endif - -#ifndef BLKDEV_IOSIZE -#define BLKDEV_IOSIZE 1024 -#endif - -extern char *sys_errlist[]; -static void clone (char* s_path, char* d_path, int sroot_flag); - -static char *pname; -static int errors = 0; - -static char* src_path = 0; -static char* dst_path = 0; - -static int quiet_flag = 0; -static int verbose_flag = 0; -static int force_flag = 0; -#ifndef USG -static int symlink_flag = 0; -#endif -static int copy_flag = 0; -static int sccs_flag = 0; - -static void -usage (void) -{ -#ifdef USG - fprintf (stderr, "%s: usage: '%s [-q][-v][-f][-c] pathname1 pathname2'\n", pname, pname); -#else - fprintf (stderr, "%s: usage: '%s [-q][-v][-f][-S][-c | -s | -S] pathname1 pathname2'\n", pname, pname); -#endif - exit (1); -} - -/* abspath(): return the absolutized pathname for the given relative - pathname. Note that if that pathname is already absolute, it may - still be returned in a modified form because this routine also - eliminates redundant slashes and single dots and eliminates double - dots to get a shortest possible pathname from the given input - pathname. The absolutization of relative pathnames is made by - assuming that the given pathname is to be taken as relative to the - first argument (cwd) or to the current directory if cwd is null. */ - -static char * -abspath (char *cwd, char *rel_pathname) -{ - static char cwd_buffer[MAXPATHLEN + 1]; - char abs_buffer[MAXPATHLEN + 1]; - register char *endp; - register char *p; - register char *inp = abs_buffer; - register char *outp = abs_buffer; - - /* Setup the current working directory as needed. */ - - if (!cwd) - { - if (!cwd_buffer[0]) - getcwd (cwd_buffer, MAXPATHLEN); - cwd = cwd_buffer; - } - else if (*cwd != '/') - abort (); /* base path must be absolute */ - - /* Copy the pathname (possibly preceeded by the current working - directory name) into the absolutization buffer. */ - - endp = abs_buffer; - if (rel_pathname[0] != '/') - { - p = cwd; - while (*endp++ = *p++) - continue; - *(endp-1) = '/'; /* overwrite null */ - } - p = rel_pathname; - while (*endp++ = *p++) - continue; - if (endp[-1] == '/') - *endp = (char) 0; - - /* Now make a copy of abs_buffer into abs_buffer, shortening the - pathname (by taking out slashes and dots) as we go. */ - - *outp++ = *inp++; /* copy first slash */ - for (;;) - { - if (!inp[0]) - break; - else if (inp[0] == '/' && outp[-1] == '/') - { - inp++; - continue; - } - else if (inp[0] == '.' && outp[-1] == '/') - { - if (!inp[1]) - break; - else if (inp[1] == '/') - { - inp += 2; - continue; - } - else if ((inp[1] == '.') && (inp[2] == 0 || inp[2] == '/')) - { - inp += (inp[2] == '/') ? 3 : 2; - outp -= 2; - while (outp >= abs_buffer && *outp != '/') - outp--; - if (outp < abs_buffer) - { - /* Catch cases like /.. where we try to backup to a - point above the absolute root of the logical file - system. */ - - fprintf (stderr, "%s: fatal: invalid pathname: %s\n", - pname, rel_pathname); - exit (1); - } - *++outp = (char) 0; - continue; - } - } - *outp++ = *inp++; - } - - /* On exit, make sure that there is a trailing null, and make sure that - the last character of the returned string is *not* a slash. */ - - *outp = (char) 0; - if (outp[-1] == '/') - *--outp = (char) 0; - - /* Make a copy (in the heap) of the stuff left in the absolutization - buffer and return a pointer to the copy. */ - - return strcpy ((char *) malloc (outp - abs_buffer + 1), abs_buffer); -} - -static char* -path_concat (char* s1, char* s2) -{ - int s1_len; - char* ret_val = (char *) malloc ((s1_len = strlen (s1)) + strlen (s2) + 2); - - strcpy (ret_val, s1); - ret_val[s1_len] = '/'; - strcpy (&ret_val[s1_len+1], s2); - return ret_val; -} - -/* Decide if the given path (which may be relative to . or absolute) designa -tes - a point within the original "src_path" directory, and return non-zero if -it - does, or zero otherwise. */ - -static int -in_original_tree (char* other_path) -{ - char* abs_src_path = abspath (NULL, src_path); - char* abs_src_path_slash = path_concat (abs_src_path, ""); - char* abs_other_path = abspath (NULL, other_path); - int ret_val = !strncmp (abs_src_path_slash, abs_other_path, strlen (abs_src_path_slash)); - - free (abs_src_path); - free (abs_src_path_slash); - free (abs_other_path); - return ret_val; -} - -static void -fix_mode (int new_mode, char* d_path) -{ - if (chmod (d_path, new_mode)) - { - if (!quiet_flag) - fprintf (stderr, "%s: warning: can't chmod on output entity %s: %s\n", - pname, d_path, sys_errlist[errno]); - } -} - -static int -remove_item (char* s_path, char* d_path) -{ - struct stat dst_stat_buf; - DIR* dirp; - char containing_dir[MAXPATHLEN + 1]; - - if (lstat (d_path, &dst_stat_buf) == -1) - { - if (!quiet_flag) - fprintf (stderr, "%s: error: cannot get status of %s: %s\n", - pname, d_path, sys_errlist[errno]); - return -1; - } - - /* Before wasting a lot of time sniffing at the thing we are trying to - delete, first make sure that we have write permission into the - directory that contains this thing. Otherwise, it is all a waste - of time. */ - - if (*d_path == '/') - strcpy(containing_dir, d_path); - else - { - containing_dir[0] = '.'; - containing_dir[1] = '/'; - strcpy(containing_dir+2, d_path); - } - *(strrchr (containing_dir, '/')) = '\0'; - if (containing_dir[0] == '\0') - { - containing_dir[0] = '/'; - containing_dir[1] = '\0'; - } - if (access (containing_dir, W_OK)) - { - if (!quiet_flag) - fprintf (stderr, "%s: error: don't have write access to %s: %s\n", - pname, containing_dir, sys_errlist[errno]); - return -1; - } - - switch (dst_stat_buf.st_mode & S_IFMT) - { - case S_IFDIR: - if (access (d_path, R_OK) != 0) - { - if (!quiet_flag) - fprintf (stderr, "%s: error: don't have read permission for directory %s\n", - pname, d_path); - return -1; - } - if (access (d_path, X_OK) != 0) - { - if (!quiet_flag) - fprintf (stderr, - "%s: error: don't have search permission for directory %s\n", - pname, d_path); - return -1; - } - if (access (d_path, W_OK) != 0) - { - if (!quiet_flag) - fprintf (stderr, - "%s: error: don't have write permission for directory %s\n", - pname, d_path); - return -1; - } - if ((dirp = opendir (d_path)) == NULL) - { - if (!quiet_flag) - fprintf (stderr, - "%s: error: can't open directory %s for reading: %s\n", - pname, d_path, sys_errlist[errno]); - return -1; - } - for (;;) - { - struct dirent* dir_entry_p; - char* new_s_path; - char* new_d_path; - - if ((dir_entry_p = readdir (dirp)) == NULL) - break; - if (!strcmp (dir_entry_p->d_name, ".")) - continue; - if (!strcmp (dir_entry_p->d_name, "..")) - continue; - new_s_path = path_concat (s_path, dir_entry_p->d_name); - new_d_path = path_concat (d_path, dir_entry_p->d_name); - if (remove_item (new_s_path, new_d_path)) - { - closedir (dirp); - return -1; - } - free (new_s_path); - free (new_d_path); - } - closedir (dirp); - if (rmdir (d_path)) - { - if (!quiet_flag) - fprintf (stderr, "%s: error: can't delete existing directory %s: %s\n", - pname, d_path, sys_errlist[errno]); - return -1; - } - if (!quiet_flag) - fprintf (stderr, "%s: removed directory %s\n", - pname, d_path); - break; - - /* Note that symbolic links can be treated just like normal files - when the time comes for deleting them. Unlinking a symbolic link - just deletes the link and *not* the thing it points to. */ - - default: - if (unlink (d_path)) - { - if (!quiet_flag) - fprintf (stderr, "%s: error: can't delete existing file %s: %s\n", - pname, d_path, sys_errlist[errno]); - return -1; - } - if (!quiet_flag) - fprintf (stderr, "%s: removed file %s\n", - pname, d_path); - break; - } - return 0; -} - -#ifndef USG -static void -mk_symbolic_link (char *s_path, char *d_path) -{ - if (symlink (s_path, d_path)) - { - if (!quiet_flag) - fprintf (stderr, "%s: error: can't symlink %s to %s: %s\n", - pname, s_path, d_path, sys_errlist[errno]); - } - else - { - if (verbose_flag) - fprintf (stderr, "%s: created symlink %s -> %s\n", - pname, d_path, s_path); - } -} -#endif - -static void -mk_hard_link (char *s_path, char *d_path) -{ - if (link (s_path, d_path)) - { - if (!quiet_flag) - fprintf (stderr, "%s: error: can't link %s to %s: %s\n", - pname, s_path, d_path, sys_errlist[errno]); - } - else - { - if (verbose_flag) - fprintf (stderr, "%s: created hard link %s = %s\n", - pname, d_path, s_path); - } -} - -static void -copy_file (char *s_path, char *d_path) -{ - int input, output; - struct stat src_stat_buf; - - if (lstat (s_path, &src_stat_buf) == -1) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't get status of %s: %s\n", - pname, s_path, sys_errlist[errno]); - fprintf (stderr, "%s: input entity %s will be ignored\n", - pname, s_path); - } - return; - } - - if ((input = open (s_path, O_RDONLY, 0)) == -1) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't open input file %s: %s\n", - pname, d_path, sys_errlist[errno]); - fprintf (stderr, "%s: input file %s will be ignored\n", - pname, s_path); - } - return; - } - - if ((output = open (d_path, O_CREAT | O_WRONLY, src_stat_buf.st_mode & 07777)) == -1) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't create output file %s: %s\n", - pname, d_path, sys_errlist[errno]); - fprintf (stderr, "%s: input file %s will be ignored\n", - pname, s_path); - } - return; - } - - for (;;) - { - int rlen, wlen; - char block_buf[BLKDEV_IOSIZE]; - - if ((rlen = read (input, block_buf, BLKDEV_IOSIZE)) == -1) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: bad read from input file %s: %s\n", - pname, s_path, sys_errlist[errno]); - fprintf (stderr, "%s: input file %s was not fully copied\n", - pname, s_path); - } - break; - } - - if (rlen == 0) - break; - - if ((wlen = write (output, block_buf, rlen)) == -1 || wlen != rlen) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: bad write to output file %s: %s\n", - pname, s_path, sys_errlist[errno]); - fprintf (stderr, "%s: input file %s not fully copied\n", - pname, s_path); - } - break; - } - } - - close (output); - close (input); - - fix_mode (src_stat_buf.st_mode & 07777, d_path); - - if (verbose_flag) - fprintf (stderr, "%s: created file copy %s = %s\n", - pname, d_path, s_path); -} - -static void -symlink_SCCS (char* s_path, char* d_path) -{ - struct stat dst_stat_buf; - char symlink_buf[MAXPATHLEN + 1]; - int count; - - if (access (d_path, F_OK)) /* Does d_path exit? */ - { - if (errno != ENOENT) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't check accessability of %s: %s\n", - pname, d_path, sys_errlist[errno]); - fprintf (stderr, "%s: input %s will be ignored\n", - pname, s_path); - } - return; - } - } - else /* d_path exists. What is it? */ - { - if (lstat (d_path, &dst_stat_buf) == -1) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: unable to get status of %s: %s\n", - pname, d_path, sys_errlist[errno]); - fprintf (stderr, "%s: input %s will be ignored\n", - pname, s_path); - } - return; - } - - if (S_ISLNK(dst_stat_buf.st_mode)) /* d_path is a symbolic link */ - { - if ((count = readlink (d_path, symlink_buf, MAXPATHLEN)) == -1) - { - fprintf (stderr, "%s: error: can't read symlink %s: %s\n", - pname, d_path, sys_errlist[errno]); - fprintf (stderr, "%s: input file %s will be ignored\n", - pname, s_path); - return; - } - symlink_buf[count] = '\0'; - - if (!strcmp(s_path, symlink_buf)) /* symlink = s_path. Done */ - { - return; - } - else /* symlink != s_path */ - { - if (force_flag) - { - if (remove_item (s_path, d_path) != 0) - return; - } - else - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: Symbolic link %s already exists \ - but does not point to %s\n", - pname, d_path, s_path); - fprintf (stderr, "%s: input s %s will be ignored\n", - pname, s_path); - } - return; - } - } - } - else /* d_path is NOT a symbolic link */ - { - if (force_flag) - { - if (remove_item (s_path, d_path)) - return; - } - else - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: output already exists: %s\n", - pname, d_path); - fprintf (stderr, "%s: input %s will be ignored\n", - pname, s_path); - } - return; - } - } - } - - if (symlink (s_path, d_path)) - { - if (!quiet_flag) - fprintf (stderr, "%s: error: can't symlink %s to %s: %s\n", - pname, s_path, d_path, sys_errlist[errno]); - } - else - { - if (verbose_flag) - fprintf (stderr, "%s: created symlink %s -> %s\n", - pname, d_path, s_path); - } -} - -static void -clone_dir (char* s_path, char* d_path) -{ - DIR* dirp; - - if (access (s_path, R_OK) != 0) - { - if (!quiet_flag) - { - fprintf (stderr, - "%s: error: don't have read permission for input directory %s\n" -, - pname, s_path); - fprintf (stderr, "%s: input directory %s will be ignored\n", - pname, s_path); - } - return; - } - - if (access (s_path, X_OK) != 0) - { - if (!quiet_flag) - { - fprintf (stderr, - "%s: error: don't have search permission for input directory %s\n", - pname, s_path); - fprintf (stderr, "%s: input directory %s will be ignored\n", - pname, s_path); - } - return; - } - - if ((dirp = opendir (s_path)) == NULL) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't open directory %s for reading: %s\n", - pname, s_path, sys_errlist[errno]); - fprintf (stderr, "%s: input directory %s will be ignored\n", - pname, s_path); - } - return; - } - - for (;;) - { - struct dirent* dir_entry_p; - char* new_s_path; - char* new_d_path; - char symlink_buf[MAXPATHLEN + 1]; - int len; - - if ((dir_entry_p = readdir (dirp)) == NULL) - break; - if (!strcmp (dir_entry_p->d_name, ".")) - continue; - if (!strcmp (dir_entry_p->d_name, "..")) - continue; - - new_s_path = path_concat (s_path, dir_entry_p->d_name); - new_d_path = path_concat (d_path, dir_entry_p->d_name); - - if (sccs_flag && !strcmp (dir_entry_p->d_name, "SCCS")) - symlink_SCCS(new_s_path, new_d_path); - else - clone (new_s_path, new_d_path, 0); - - free (new_s_path); - free (new_d_path); - } - - closedir (dirp); -} - -static void -clone_symbolic_link (char* s_path,char* d_path) -{ - char symlink_buf[MAXPATHLEN + 1]; - int count; - - if ((count = readlink (s_path, symlink_buf, MAXPATHLEN)) == -1) - { - fprintf (stderr, "%s: error: can't read symlink %s: %s\n", - pname, s_path, sys_errlist[errno]); - fprintf (stderr, "%s: input file %s will be ignored\n", - pname, s_path); - return; - } - symlink_buf[count] = '\0'; - - if (symlink_buf[0] == '/') /* symlink is absolute */ - { - if (in_original_tree (symlink_buf)) - { - if (!quiet_flag) - fprintf (stderr, - "%s: warning: absolute symlink points into source tree %s -> %s\n", - pname, s_path, symlink_buf); - } - } - else /* symlink is relative */ - { - char* src_root_relative = path_concat (s_path, symlink_buf); - int in_orig = in_original_tree (src_root_relative); - - free (src_root_relative); - if (!in_orig) - { - if (!quiet_flag) - fprintf (stderr, - "%s: warning: relative symlink points out of source tree %s -> %s\n", - pname, s_path, symlink_buf); - } - } - - mk_symbolic_link(symlink_buf, d_path); /* Make an identical symlink. */ -} - - -/* clone: clone the item designated by s_path as the new item d_path. */ - -#define IS_DIR(STAT_BUF) (((STAT_BUF).st_mode & S_IFMT) == S_IFDIR) - -static void -clone (char* s_path, char* d_path, int sroot_flag) -{ - struct stat src_stat_buf; - struct stat dst_stat_buf; - int dir_already_exists = 0; - char* intype = "file"; - - if (lstat (s_path, &src_stat_buf) == -1) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't get status of %s: %s\n", - pname, s_path, sys_errlist[errno]); - fprintf (stderr, "%s: input entity %s will be ignored\n", - pname, s_path); - } - return; - } - if (sccs_flag && sroot_flag && S_ISLNK (src_stat_buf.st_mode)) - { - - /* If root of the source path is a symbolic link and - SCCS cloning is enabled, clone the target of the link */ - - if (stat(s_path, &src_stat_buf) == -1) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't get status of %s: %s\n", - pname, s_path, sys_errlist[errno]); - fprintf (stderr, "%s: input entity %s will be ignored\n", - pname, s_path); - } - return; - } - } - if (IS_DIR (src_stat_buf)) - intype = "directory"; - if (access (d_path, 0)) - { - if (errno != ENOENT) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't check accessability of %s: %s\n", - pname, d_path, sys_errlist[errno]); - fprintf (stderr, "%s: input %s %s will be ignored\n", - pname, intype, s_path); - } - return; - } - } - else - { - char* outtype = "file"; - - if (lstat (d_path, &dst_stat_buf) == -1) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: unable to get status of %s: %s\n" -, - pname, d_path, sys_errlist[errno]); - fprintf (stderr, "%s: input %s %s will be ignored\n", - pname, intype, s_path); - } - return; - } - if (IS_DIR (dst_stat_buf)) - outtype = "directory"; - if (IS_DIR (src_stat_buf) && IS_DIR (dst_stat_buf)) - { - dir_already_exists = -1; - - /* Have to make sure that we have full access to the output - directory (at least temporarily). */ - - chmod (d_path, (dst_stat_buf.st_mode & 07777) | 0700); - if (access (d_path, R_OK | W_OK | X_OK) != 0) - { - if (!quiet_flag) - { - fprintf (stderr, - "%s: error: too few permissions for existing directory %s\n", - pname, d_path); - fprintf (stderr, "%s: input directory %s will be ignored\n", - pname, s_path); - } - return; - } - } - else - { - if (force_flag) - { - if (remove_item (s_path, d_path)) - return; - } - else - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: output %s already exists: %s\n", - pname, outtype, d_path); - fprintf (stderr, "%s: input %s %s will be ignored\n", - pname, intype, s_path); - } - return; - } - } - } - - switch (src_stat_buf.st_mode & S_IFMT) - { - case S_IFDIR: /* Clone a directory */ - - if (!dir_already_exists) - { - /* Don't let others sneak in. - Only we can write the new directory (for now). */ - - if (mkdir (d_path, 0700)) - { - if (!quiet_flag) - { - fprintf (stderr, "%s: error: can't create output directory %s: %s\n", - pname, d_path, sys_errlist[errno]); - fprintf (stderr, "%s: input directory %s will be ignored\n", - pname, s_path); - } - return; - } - if (verbose_flag) - fprintf (stderr, "%s: created new output directory: %s\n", - pname, d_path); - } - - clone_dir(s_path, d_path); - - /* By default, output directories which existed before this - program was executed are reset back to their original - permissions (when we are done adding things to them). For - output directories which are actually created by this program - however, these have their permissions set so that they are - essentially the same as the permissions for their corresponding - input directories, except that the owner is given full - permissions. */ - - if (dir_already_exists) - fix_mode (dst_stat_buf.st_mode & 07777, d_path); - else - fix_mode ((src_stat_buf.st_mode & 07777) | 0700, d_path); - break; - -#ifndef USG - case S_IFLNK: /* Clone a symbolic link */ - - if (!sccs_flag) - clone_symbolic_link (s_path, d_path); - break; -#endif - - default: /* Clone a normal file */ - - if (sccs_flag) - break; - -#ifndef USG - if (symlink_flag) - mk_symbolic_link(s_path, d_path); - else -#endif - if (copy_flag) - copy_file(s_path, d_path); - else - mk_hard_link(s_path, d_path); - - break; - } /* switch */ -} - -int -main (int argc, char *argv[]) -{ - char **argn; - - pname = (pname = strrchr (argv[0], '/')) ? pname+1 : argv[0]; - for (argn = argv+1; *argn; argn++) - { - if (**argn != '-') - { - if (!src_path) - src_path = *argn; - else if (!dst_path) - dst_path = *argn; - else - usage (); - } - else - { - switch (* ((*argn)+1)) - { - case 0: - fprintf (stderr, "%s: invalid option: -\n", pname); - errors = -1; - break; - - case 'q': - quiet_flag = -1; - break; - - case 'v': - verbose_flag = -1; - break; - - case 'f': - force_flag = -1; - break; - -#ifndef USG - case 'S': - sccs_flag = -1; - - if (copy_flag) - errors++; - break; -#endif - -#ifndef USG - case 's': - symlink_flag = -1; - if (copy_flag) - errors++; - break; -#endif - - case 'c': - copy_flag = -1; -#ifndef USG - if (symlink_flag) - errors++; - - if (sccs_flag) - errors++; -#endif - break; - - default: - fprintf (stderr, "%s: invalid option: -%c\n", - pname, *((*argn)+1)); - errors = -1; - } - } - } - if (errors || src_path == 0 || dst_path == 0) - usage (); -#if 0 // ndef USG - if (symlink_flag && *src_path != '/') - { - fprintf (stderr, "%s: error: source root pathname must be absolute when using -s\n", - pname); - exit (1); - } -#endif - if (access (src_path, 0) == -1) - { - fprintf (stderr, "%s: error: accessing source root entity %s: %s\n", - pname, src_path, sys_errlist[errno]); - exit (1); - } - umask (0); /* disable all masking */ - clone (src_path, dst_path, 1); - return 0; -} diff --git a/bin/clone.csh b/bin/clone.csh deleted file mode 100644 index 1c14e912d64..00000000000 --- a/bin/clone.csh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/csh - -set src_root=`pwd` -set dst_root=`abspath $1` - -set subdirs=`find * -type d -print` - -mkdir $dst_root -set files=`find * \( -type d -prune \) -o -type f -print` - -if ($#files) then - ln $files $dst_root -endif - -if ($#subdirs) then - foreach subdir ($subdirs) - cd $src_root - mkdir $dst_root/$subdir - cd $src_root/$subdir - set files=`find * \( -type d -prune \) -o -type f -print` - if ($#files) then - ln $files $dst_root/$subdir - endif - end -endif -exit 0 diff --git a/bin/corba-boolean.perl b/bin/corba-boolean.perl deleted file mode 100755 index 92e793fc941..00000000000 --- a/bin/corba-boolean.perl +++ /dev/null @@ -1,19 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' - & eval 'exec perl -pi -S $0 $argv:q' - if 0; - -# $Id$ -# -# You may want to run the "find" command with this script, which maybe -# something like this: -# -# find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.C" -o -name "*.cc" -o -name "*.c" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.ipp" \) -print | xargs $ACE_ROOT/bin/corba-boolean.perl - -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -s/CORBA::B_FALSE/0/g; -s/CORBA::B_TRUE/1/g; -s/CORBA_B_FALSE/0/g; -s/CORBA_B_TRUE/1/g; diff --git a/bin/count_lines b/bin/count_lines deleted file mode 100755 index 49c541094df..00000000000 --- a/bin/count_lines +++ /dev/null @@ -1,224 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# -*- perl -*- -# $Id$ -# - -use File::Basename; - -$cmd= basename($0); - -if ($#ARGV < 0) { - die "Usage: $cmd module...\n"; -} - -@match_order = (); -%typeRE = (); - -&initfiletypes; - -foreach $module (@ARGV) { - if ( ! -d $module ) { - warn "$cmd: no such directory $module\n"; - next; - } - - open(DIRS, "find $module -type d|"); - @dirs = grep {if(!/CVS/) {chop;}} <DIRS>; - close(DIRS); - - open(FIND, "find $module -type f|"); - @files = grep {if (!/build/ - && !/CVS/ - && !/rpc\+\+/ - && !/\.bpr$/ - && !/\.mdp$/ - && !/\.MDP$/ - && !/\.dsp$/ - && !/\.DSP$/ - && !/\.dsw$/ - && !/\.DSW$/ - && !/\.mak$/ - && !/\.MAK$/ - && !/\.o$/ - && !/\.sl$/ - && !/\.a$/) {chop;}} <FIND>; - close(FIND); - - $totdirs = $#dirs; - $totfiles = $#files; - $totlines = 0; - %lines = (); - - foreach $file (@files) { - $n = 0; - if (!open(IN, $file)) { - warn "$cmd: cannot open '$file' for reading\n"; - next; - } - while(<IN>) { - $n++; - } - close(IN); - $lines{$file} = $n; - $totlines += $n; - } - - - # Define two associative arrays to keep the results for each kind - # of file. - %linespertype = (); - %filespertype = (); - foreach $type (keys %typeRE) { - $linespertype{$type} = 0; - $filespertype{$type} = 0; - } - # The file is classified and added to the corresponding variable. - FILE: while (($file, $l) = each %lines) { - foreach $type (@match_order) { - $re = $typeRE{$type}; - if($file =~ m/$re/) { - $linespertype{$type} += $l; - $filespertype{$type}++; - next FILE; - } - } - print STDERR "Unmatched file: $file\n"; - } - - format STDOUT_TOP= - @||| - $% - - Lines of code in module @<<<<<<<<<<<<<<<<<<<< - $module - -Files: @>>>>>>>> - $totfiles -Directories: @>>>>>>>> - $totdirs -Lines: @>>>>>>>> - $totlines - -File type lines files ----------------------------- ------------------ ----------------- -. - format STDOUT= -@<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>>>>>>>>>>>>>>> @>>>>>>>>>>>>>>>> -$type, $typelines, $typefiles -. - - - foreach $type (@match_order) { - $typelines = $linespertype{$type}; - $typefiles = $filespertype{$type}; - if ($typefiles != 0) { - write; - } - } - # Forzamos un newpage para cada modulo. - $- = 0; -} - -sub updateRE { - local $desc = shift; - local $re = shift; - - if (exists $typeRE{$desc}) { - local $mix = $typeRE{$desc} . '|(' . $re . ')'; - $typeRE{$desc} = $mix; - } else { - $typeRE{$desc} = '(' . $re . ')'; - push @match_order, $desc; - } -} - -sub initfiletypes { - # Here we define the regular expressions for each kind of file. - # This RE must be mutually exclusive, a file will not be counted - # twice, but it could be unproperly classified. - - local %filenames = - ('Makefile' => 'Makefile', - 'README' => 'README files', - 'COPYING' => 'Licenses', - 'LICENSE.*' => 'Licenses', - 'ChangeLog.*' => 'ChangeLog', - 'ChangeLog-.*' => 'ChangeLog', - '.cvsignore' => 'Control CVS', - 'run_test.pl' => 'Test driver', - 'run_test' => 'Test driver', - 'run_tests' => 'Test driver', - 'run_test.sh' => 'Test driver'); - local %fileexts = - ('cc' => 'C++ sources', - 'cpp' => 'C++ sources', - 'i' => 'C++ sources', - 'h' => 'Headers', - 'hh' => 'Headers', - 'c' => 'C/C++ sources', - 'idl' => 'IDL sources', - 'IDL' => 'IDL sources', - 'pidl' => 'IDL sources', - 'y' => 'yacc source', - 'yy' => 'yacc source', - 'l' => 'lex source', - 'll' => 'lex source', - 'pl' => 'perl script', - 'perl' => 'perl script', - 'GNU' => 'GNU make config', - 'tex' => '(La)TeX', - 'txt' => 'Text files', - '1' => 'man pages', - '3' => 'man pages', - 'html' => 'HTML', - 'bib' => 'BibTeX', - 'sty' => 'TeX styles', - 'bld' => 'VxWorks build file', - 'bpr' => 'Borland project files', - 'dsp' => 'DevStudio project files', - 'DSP' => 'DevStudio project files', - 'mdp' => 'MSVC project files', - 'MDP' => 'MSVC project files', - 'dsw' => 'MSVC workspaces', - 'DSW' => 'MSVC workspaces', - 'mak' => 'MSVC MAK files', - 'MAK' => 'MSVC MAK files', - 'java' => 'JAVA source', - 'class' => 'JAVA class', - 'cccc' => 'codecount output', - 'gif' => 'GIF images', - 'conf' => 'Svc_Config files', - 'diff' => 'patches', - 'zip' => 'Compressed files', - 'gz' => 'Compressed files', - 'EXE' => 'Win32 executable', - 'shar' => 'Shar archive', - 'mib' => 'MIB definition files', - 'gperf' => 'GPERF input', - 'phil.*'=> 'Test driver' - ); - local %paths = (); - - local ($desc, $reseed); - while (($reseed, $desc) = each %filenames) { - local $re = '/' . $reseed . '$'; - updateRE($desc, $re); - } - while (($reseed, $desc) = each %fileexts) { - local $re = '/[^/]*\.' . $reseed . '$'; - updateRE($desc, $re); - } - while (($reseed, $desc) = each %paths) { - local $re = $reseed; - updateRE($desc, $re); - } - - updateRE('Others', '.*'); - -# while (($desc, $reseed) = each %typeRE) { -# print STDERR $desc, " ==> ", $reseed, "\n"; -# } -} diff --git a/bin/create_ace_build b/bin/create_ace_build deleted file mode 100755 index 3a92ec0088c..00000000000 --- a/bin/create_ace_build +++ /dev/null @@ -1,183 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -# Creates an ACE build tree in directory "build/<build name>" below the current -# directory, which must be an ACE "top level" directory (such as -# $ACE_ROOT). The build tree directory structure mirrors that of the ACE -# top level directory structure, except that instead of containing any plain -# files, it contains only symlinks to the files in the ACE top level structure. -# -# This program has a similar purpose to "clone", but in addition to -# only creating symlinks (clone creates hard links, by default), this -# script: -# 1) uses relative rather than absolute symlinks, -# 2) tries not to put junk files into the build tree, -# 3) only creates a new tree in a build/ directory below the current, -# top level ACE directory (it's a feature :-), but it does enforce -# consistency). -# -# This program can be re-run on a build tree at any time in order to -# update it. It will only add new symlinks, it won't remove any that -# are no longer valid. If you want to do that, it's easiest just to -# remove the build completely and start from scratch. -# -# If the <build name> starts with "build/", that part will be removed -# from it. -# -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -$usage = "usage: $0 -? | [-a] [-d <directory mode>] [-v] <build name>\n"; -$directory_mode = 042755; #### fine on Suns, but maybe not all Unix platforms -$verbose = 0; - -$source='.'; -$absolute= 0; - -$perl_version = $] + 0; -if ($perl_version >= 5) { - #### Use an eval so that this script will compile with perl4. - eval <<'PERL5_CWD' - require Cwd; - sub cwd { - Cwd::getcwd (); - } -PERL5_CWD -} else { - sub cwd { - local ($pwd); - - chop ($pwd = `pwd`); - $pwd; - } -} - -#### -#### Process command line args. -#### -while ($#ARGV >= 0 && $ARGV[0] =~ /^-/) { - if ($ARGV[0] eq '-v') { - $verbose = 1; - } elsif ($ARGV[0] eq '-d') { - if ($ARGV[1] =~ /^\d+$/) { - $directory_mode = eval ($ARGV[1]); shift; - } else { - warn "$0: must provide argument for -d option\n"; - die $usage; - } - } elsif ($ARGV[0] eq '-a') { - $source = &cwd (); - $absolute = 1; - } elsif ($ARGV[0] eq '-?') { - print "$usage"; - exit; - } else { - warn "$0: unknown option $ARGV[0]\n"; - die $usage; - } - shift; -} - -die $usage unless $#ARGV == 0; -$build = $ARGV[0]; -$build =~ s%^build/%%; #### remove leading "build/", if any -$build = "build/$build"; - -if (-e '/usr/bin/find') { - $find = '/usr/bin/find'; -} elsif (-e '/bin/find') { - $find = '/bin/find'; -} else { - $find = '/find'; -} - -#### -#### Check that we're in an ACE "top level" directory. -#### -(-d 'ace' && -d 'include') || - die "$0: must be in an ACE top level (ACE_ROOT) directory!\n"; - -#### -#### Create build directories, if needed. -#### --d 'build' || mkdir ('build', $directory_mode); --d "$build" || mkdir ("$build", $directory_mode); - -#### -#### Get all ACE plain file and directory names. -#### -@files = (`$find . -name CVS -prune \\\ - -o -name build -prune -o \\\ - -name '.*obj' -prune -o -name Templates.DB -prune -o \\\ - \\( ! -type l ! -name core ! -name '*.state' ! -name '*.so' \\\ - ! -name '*.[oa]' ! -name '*~' ! -name '.' ! -name '.#*' \\\ - ! -name '*.log' \\) \\\ - -print`); - -#### -#### Create directories and symlinks to files. -#### -foreach $file (@files) { - chop $file; #### remove trailing newline (from find command above) - $file =~ s%^./%%g; #### excise leading ./ directory component - - if (-d $file) { - unless (-d "$build/$file") { - print "mkdir $build/$file, $directory_mode\n" if $verbose; - mkdir ("$build/$file", $directory_mode); - } - } else { - unless (-e "$build/$file") { - if (!$absolute) { - $up = '../..'; - while ($file =~ m%/%g) { - $up .= '/..'; - } - - print "symlink $up/$file $build/$file\n" if $verbose; - symlink ("$up/$file", "$build/$file") || - warn "$0: symlink to $build/$file failed\n"; - } else { - $path = $source . '/' . $file; - print "symlink $path $build/$file\n" if $verbose; - symlink ("$path", "$build/$file") || - warn "$0: symlink to $build/$file failed\n"; - } - } - } -} - -#### -#### Find all the symlinks in the build directory, and remove ones -#### that are no longer actually linked to a file. -#### -open (LINKS, "$find $build -type l |") || - die "$0: cannot find symlinks in $build\n"; - -while (<LINKS>) { - chop; - local @s = stat $_; - if ($#s == -1) { - print "Removing $_ \n" if $verbose; - unlink $_ || warn "$0: unlink of $_ failed\n"; - } -} -close (LINKS) || - die "$0: cannot close symlinks pipe\n"; - -#### -#### Done: print message. -#### -print "\nCompleted creation of $build/.\n"; - -unless (-e "$build/ace/config.h" && - -e "$build/include/makeinclude/platform_macros.GNU") { - print "Be sure to setup $build/ace/config.h and\n" . - "$build/include/makeinclude/platform_macros.GNU symlinks.\n"; -} - -#### EOF diff --git a/bin/dsp2dsp.pl b/bin/dsp2dsp.pl deleted file mode 100755 index 962127a8f11..00000000000 --- a/bin/dsp2dsp.pl +++ /dev/null @@ -1,29 +0,0 @@ -# $Id$ -# -# File: dsp2dsp.pl -# Description: This perl script is used to "create" new dsp files -# by modifying an existing dsp file. -# Requirement: perl for Win32. -# Usage: perl dsp2dsp.pl Basic_Types_Test Atomic_Op_Test -# This will create Atomic_Op_Test.dsp by using -# Basic_Types_Test.dsp as a template. -# -# Author: Nanbor Wang <nanbor@cs.wustl.edu> - -die "$0 requires two arguments.\n" if $#ARGV < 1; -$TOFILE="$ARGV[1].dsp" ; -die "$TOFILE already exists. Remove it first.\n" if -e $TOFILE; - -$FROM = $ARGV[0]; -$TO = $ARGV[1]; - -open (FROM, "<$FROM.dsp"); -open (TO, ">$TO.dsp"); - -while (<FROM>) -{ - s/$FROM/$TO/g; - print TO ; -} - -close (TO); diff --git a/bin/envinfo.cpp b/bin/envinfo.cpp deleted file mode 100644 index 8d25afd91a7..00000000000 --- a/bin/envinfo.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// $Id$ - -#include "ace/ACE.h" - -ACE_RCSID(bin, envinfo, "$Id$") - -int -main (int, ASYS_TCHAR *[]) -{ - cerr << "ACE: " - << ACE::major_version() << "." - << ACE::minor_version() << "." - << ACE::beta_version() << "\n"; - - struct utsname uname; - ACE_OS::uname(&uname); - cerr << "OS: " - << uname.sysname << " " - << uname.release << "\n"; - - cerr << "Compiler: " - << ACE::compiler_name() << " " - << ACE::compiler_major_version() << "." - << ACE::compiler_minor_version() << "." - << ACE::compiler_beta_version() << "\n"; - - return 0; -} - diff --git a/bin/g++dep b/bin/g++dep deleted file mode 100755 index 2e1dffa3027..00000000000 --- a/bin/g++dep +++ /dev/null @@ -1,83 +0,0 @@ -#! /bin/sh -# $Id$ - -# This utility is a lightly editted version of the freed Berkeley -# script `mkdep'. The current script is intended to work for GNU G++. - -# Here is the original BSD header: -# @(#)mkdep.sh 1.7 (Berkeley) 10/13/87 -# - -if [ `uname -r` = 5.7 ]; then - PATH=/project/danzon/pkg/egcs/bin:/usr/local/bin:/bin:/usr/bin:/usr/ucb:\ -/usr/gnu:/usr/gnu/bin:/opt/gnu/bin:/pkg/gnu/bin:$PATH -else - PATH=/usr/local/bin:/bin:/usr/bin:/usr/ucb:\ -/usr/gnu:/usr/gnu/bin:/opt/gnu/bin:/pkg/gnu/bin:$PATH -fi -export PATH - -if [ $# = 0 ] ; then - echo 'usage: g++dep [-p] [-f makefile] [flags] file ...' - exit 1 -fi - -MAKE=Makefile -case $1 in - # -f allows you to select a makefile name - -f) MAKE=$2 - shift; shift ;; - - # the -p flag produces "program: program.c" style dependencies - # so .o's don't get produced - -p) SED='-e s;\.o;;' - shift ;; - - # -r allows the use of relative pathnames... - -r) REL="-e s;$ACE_ROOT;\$(ACE_ROOT);g " - if [ ${TAO_ROOT:-no_tao_root} = "no_tao_root" ]; then - echo no TAO_ROOT - else - REL="-e s;$TAO_ROOT;\$(TAO_ROOT);g "$REL - echo REL=$REL - fi - shift ;; -esac - -if [ ! -w $MAKE ]; then - echo "g++dep: no writeable file \"$MAKE\"" - exit 1 -fi - -TMP=/tmp/g++dep$$ - -trap 'rm -f $TMP; exit 1' 1 2 3 13 15 - -cp $MAKE ${MAKE}.bak - -sed -e '/DO NOT DELETE THIS LINE/,$d' < $MAKE > $TMP - -cat << _EOF_ >> $TMP -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -_EOF_ - -g++ -MM -DACE_LACKS_PRAGMA_ONCE $* | \ - sed -e "s; \./; ;g" $SED $REL | \ - awk '{ if ($1 != prev) \ - { if (rec != "") print rec; rec = $0; prev = $1; } \ - else \ - { if (length(rec $2) > 78) { print rec; rec = $0; } \ - else rec = rec " " $2 } } \ - END { print rec }' >> $TMP - -cat << _EOF_ >> $TMP - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY -_EOF_ - -# copy to preserve permissions -cp $TMP $MAKE -rm -f ${MAKE}.bak $TMP -exit 0 diff --git a/bin/generate_man_pages b/bin/generate_man_pages deleted file mode 100755 index c3c400e9a9c..00000000000 --- a/bin/generate_man_pages +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# $Id$ -# -# Generates ACE man and html pages from ACE headers. -# -# Author: David L. Levine, based on instructions from Douglas C. Schmidt. - -umask 022 - -# 2. I then move all the *.3 man files to $ACE_ROOT/man/man3. -# [cd to man/man3 now so we don't have to move the files later.] -if [ -d man/man3 -a -d man/html ]; then - /bin/rm -f man/man3/*.3 man/html/*.html man/windex man/acewindex.html - cd man/man3 -else - echo $0': ERROR, man directories not found!' >&2 - echo 'Are you in an ACE_wrappers directory?' >&2 - exit 1 -fi - -# 1. I use "class2man" to convert the *.h files in $ACE_ROOT/ace -# to nroff man files. -ACE_HEADERS=`find ../../ace -name CLASSIX -prune -o \ - -name '*.h' ! -name 'config*.h' ! -name 'ws2tcpip.h' -print` -../../bin/class2man $ACE_HEADERS > /dev/null - -# 3. Then I run "man2html" on the *.3 files to produce the *.html files. -../../bin/man2html *.3 > /dev/null - -# 4. I copy [move] the *.html files into $ACE_ROOT/man/html. -mv -f *.html ../html - -# 5. Then I run "catman -w -M ." on $ACE_ROOT/man/ -# to produce the windex file. -cd .. -catman -w -M . - -# 6. Finally, I run "html-windex < windex > acewindex.html" -# to produce the final HTML index. -../bin/html-windex < windex > acewindex.html diff --git a/bin/hiding.fmt b/bin/hiding.fmt deleted file mode 100644 index e77a719aee2..00000000000 --- a/bin/hiding.fmt +++ /dev/null @@ -1,20 +0,0 @@ -# -# access control file for ADTs -# -# K. Dorn -# - -CSAMERGECXXHXX -off - -CSAHEADER -on - -PUBLIC -on - -PROTECTED -on - -PRIVATE -on diff --git a/bin/html-windex b/bin/html-windex deleted file mode 100755 index 8047593ade5..00000000000 --- a/bin/html-windex +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/sh -# $Id$ -# -# This script generates automatically to its stdout a windex.html file; -# this file is useful just after running man2html. -# All the html man pages must be located under an html directory at the -# same level as the generated windex.html file. - -WINDEX=$1 - -cat <<EOF - <!-- This is an automatically generated file. Do Not Edit! - Use html-windex to generate it --> - <center><h1>ACE Manual Page Index</h1></center> -<BODY text = "#000000" -link="#000fff" -vlink="#ff0f0f" -bgcolor="#ffffff"> - <p> - - This file has been generated from the <A - HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/man/windex">windex</A> - file from the <A - HREF="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</A> package and - it contains a list of pointers to the manual pages generated by the - <A HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/bin/README.html">OSE - documentation tools</A>. - - <p> - <HR> - <UL> -EOF - -cat $WINDEX | \ - sed -e 's/ / /g' \ - -e 's%\(3\).*-%3\)</a>%g' \ - -e 's/^[a-zA-Z_]*/&\.html">/g' \ - -e 's/\.PP/<BR>/g' \ - -e 's%^%<li><a HREF="html/%g' \ - -e 's%\\f(CO[a-zA-Z_]*%<CODE>&</B></I></CODE>%g' \ - -e 's%\\f(CO%%g' - -echo "</UL>" diff --git a/bin/indent_macros.perl b/bin/indent_macros.perl deleted file mode 100755 index 3429d746dba..00000000000 --- a/bin/indent_macros.perl +++ /dev/null @@ -1,59 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -i -S $0 ${1+"$@"}' - & eval 'exec perl -i -S $0 $argv:q' - if 0; - -# $Id$ - -# This perl script re-arrange the macro indentation so it's easier to -# see the layering relationship. - -$lineno = 0; -$indent = 0; - -sub inc_indent -{ - $indent += 2; -} - -sub dec_indent -{ - $indent -= 2; -} - -sub get_indent -{ - $retv = 0; - print STDERR "$0 (", $lineno, "): Unbalanced macro pairs\n" if ($indent < 0); - $retv = $indent - 1 if ($indent > 0); - $retv; -} - -while (<>) { - $lineno++; - if (/^[ \t]*\#[ \t]*((if|el|en|).*)/) - { - $cont = $1; - $temp = $2; - if ($temp =~ /if/) { - print "#", " " x &get_indent (), $cont,"\n"; - inc_indent (); - } - elsif ($temp =~ /el/) { - dec_indent (); - print "#", " " x &get_indent (), $cont,"\n"; - inc_indent (); - } - elsif ($temp =~ /en/) { - dec_indent (); - print "#", " " x &get_indent (), $cont,"\n"; - } - else { - print "#", " " x &get_indent (), $cont,"\n"; - } - } - else { - print $_; - } -} - -die ("$0 (EOF): Unbalanced macro pairs\n") if ($indent != 0); diff --git a/bin/info2doc.awk b/bin/info2doc.awk deleted file mode 100755 index 6e0451fef3f..00000000000 --- a/bin/info2doc.awk +++ /dev/null @@ -1,2182 +0,0 @@ -# ============================================================================= -# -# = DESCRIPTION -# Awk script which performs the actual conversion from classinfo file -# to various types of documentation. -# -# = AUTHOR(S) -# Graham Dumpleton -# K.Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED -# -# ============================================================================= - -BEGIN { - # - # Set some defaults. - # - #device = "text" -# access["public"] = "on" -# access["protected"] = "on" -# access["private"] = "on" - access["public"] = publ - access["protected"] = prot - access["private"] = priv - - lower["CLASS"] = "class" - lower["STRUCT"] = "struct" - lower["UNION"] = "union" - lower["class"] = "class" - lower["struct"] = "struct" - lower["union"] = "union" - upper["public"] = "PUBLIC" - upper["protected"] = "PROTECTED" - upper["private"] = "PRIVATE" - - classfunc = "" - rettyp = "" - classname="" - classtitle="" - filedate="" - filename="" - filename1="" - origfile="" - author="" - classdescription="" - firsttime = "first" - nesting_level = 0 - -# csaprintheader=1 - - # - # Check that info file, class have been specified. - # - # if ( infile ~ /^$/ || class ~ /^$/ ) - # exit - - # - # Read in info file. - # - # FS="\n"; RS="" - # while ( getline < infile > 0 ) - # lines[++num] = $0 - - # - # Prepare for format file. - # - FS=" "; RS="\n" - - # - # Find some defaults in info file. - # - # findLibrary() - # findFilename() -} -# end of Begin section!!!!! - - -# -# -# -function csa_print_compilation_header_alt() -{ - if (csaprintheader == "on") - { - if ( length( firsttime ) > 3 ) - { - - csa_compilation_header=sprintf("\n/*[ Compilation unit "\ - "----------------------------------------------------------\n"\ - "\n"\ - " Component\ \ \ \ \ \ \ : CSA - OSC\n"\ - "\n"\ - " Name\ \ \ \ \ \ \ \ \ \ \ \ : %s.h\n"\ - "\n"\ - " Author : %s\n"\ - "\n"\ - " Language : C++\n"\ - "\n"\ - " Creation Date : %s\n"\ - "\n"\ - " Test State : %%Q%%\n"\ - "\n"\ - " Description : %s\n"\ - " %s\n"\ - "\n"\ - "\n"\ - " Copyright (C) Siemens AG 1995 All Rights Reserved\n"\ - "\n"\ - "--------------------------------------"\ - "---------------------------------------*/\n"\ - "/*] END */\n"\ - "#pragma ident \"%%Z%% %%M%% %%I%% (%%G%%), %%Y%% %%Q%%:"\ - " implementation file for class \n"\ - "%s\"\n"\ - "\n"\ - "#undef __STDC__\n"\ - "#undef __GNUG__\n"\ - "\n",filename1,author,filedate,classtitle,classdescription,classname); - printf("%s",csa_compilation_header); - firsttime = "" - } - } -} -# -# -# -function csa_print_compilation_header() -{ - if ((csaprintheader == "on" && merge != "on") || (merge == "on" && loop == "1")) - { - if ( length( firsttime ) > 3 ) - { - for ( i=0; i<=num; i++ ) - { - n = split( lines[i], line, "\n" ) - if (line[1] == "INCLUDE" && line[2] !~ /^.*\.\i/) - printf( "#include %s\n", line[2]) - } - - - csa_compilation_header=sprintf(vcohxx,filename1,author,filedate,classtitle,classdescription,classname); - printf("%s",csa_compilation_header); - firsttime = "" - } - } -} - -# -# -# -function csa_print_class_header_alt() -{ - if (csaprintheader == "on") - { - csa_class_header=sprintf("\n/*[ Class ---------------------"\ - "-------------------------------------------\n"\ - "\n"\ - " Name : %s\n"\ - "\n"\ - " Description : %s\n"\ - " %s\n"\ - "\n"\ - "--------------------------------------------"\ - "------------------------------*/\n\n",class,classtitle,classdescription) - - if ( device != "text" ) - print( ".nf\n" ) - printf("%s",csa_class_header); - } -} -# -# -# -function csa_print_class_header() -{ - if (csaprintheader == "on") - { - csa_class_header=sprintf(vclhxx,class,classtitle,classdescription) - - if ( device != "text" ) - print( ".nf\n" ) - printf("%s",csa_class_header); - } -} - -# -# -# -function csa_print_class_end() -{ - if (csaprintheader == "on") - { - csa_class_end=sprintf("\n/*] END Class */\n\n") - - if ( device != "text" ) - print( ".nf\n" ) - printf("%s",csa_class_end); - } -} - -# -# -# -function csa_collect_info() -{ - classdescription = "" - classtitle = "" - found = 0 - for ( i=0; i<=num; i++ ) - { - - n = split( lines[i], line, "\n" ) - - csa_get_filedate_and_name() - csa_get_class_name_and_title(n) - csa_get_library() - csa_get_author() - - - - if ( line[1] == "INFO" && - line[2] == "HDR" && - line[3] == "DESCRIPTION" && - line[4] == class ) - { - found = 1 - break - } - - } - if ( found == 1 ) - { - for ( i=5; i<=n; i++ ) - { - len = length(line[i]) - comm = substr(line[i],4,len) - classdescription = classdescription comm "\n " - } - } - - found = 0 - - csa_get_origfile_name() -} - -# -# -# -function csa_get_origfile_name() -{ - len=length(infile) - origfile=substr(infile,1,len-2) - origfile = origfile "h" -} - -# -# -# -function csa_get_author() -{ - if ( line[1] == "INFO" && - line[2] == "GLOBAL" && - line[3] == "AUTHOR" ) - { - len=length(line[4]) - author=substr(line[4],4,len) - } -} - -# -# -# -function csa_get_library() -{ - if ( line[1] == "INFO" && - line[2] == "GLOBAL" && - line[3] == "LIBRARY" ) - { - #library=line[4] - } -} - -# -# -# -function csa_get_class_name_and_title(n) -{ - if ( line[1] == "INFO" && - line[2] == "HDR" && - line[3] == "TITLE" && - line[4] == class ) - { - classname=line[4] -# classtitle=line[5] -# len = length(line[5]) -# classtitle = substr(line[5],4,len) - for ( j=5; j<=n; j++ ) - { - len = length(line[j]) - comm = substr(line[j],4,len) - classtitle = classtitle comm "\n " - } - } -} - -# -# -# -function csa_get_filedate_and_name() -{ - if ( line[1] == "CLASS2INFO" ) - { - filedate=line[2] - filename=line[3] - len=length(line[3]) - filename1=substr(line[3],1,(len-2)) - } -} - -# -# -# -function csa_get_() -{ - ; -} - -# -# -# -function read_ci_file() -{ - while ( getline < infile > 0 ) - lines[++num] = $0 -} - -function read_fvclhxx_file() -{ - vclhxx1 = "\n" - while ( getline < fvclhxx > 0 ) - vclhxx1 = vclhxx1 $0 "\n" - vclhxx = vclhxx1 -} - -function read_fvcohxx_file() -{ - vcohxx1 = "\n" - while ( getline < fvcohxx > 0 ) - vcohxx1 = vcohxx1 $0 "\n" - vcohxx = vcohxx1 -} - -# -# currently not used because not necessary (in recursion properly handled!) -# -function read_ci_file_and_modify() -{ - while ( getline < infile > 0 ) - { - if ($1 ~ "^(CLASS|STRUCT|UNION)$" && $2 ~ "(::|<)") - { -#printf("\n----old=|%s|-----\n",$2) - n = split( $0, line, "\n" ) - len = length($2) - match( $2, "(::|<).*$") - $2 = substr( $2,RSTART+2,RLENGTH) -#printf("\n----new=|%s|-----\n",$2) - - line[1] = $1 "\n" - line[2] = $2 - new = "" - for (i=1; i<=(n+1) ;i++) - new = new line[i] - lines[++num] = new "\n" - } - else - lines[++num] = $0 "\n" - - } - -# for (i=1; i<=num ;i++) -# print lines[i] -} - -# -# Start next pass. -# -$1 == "start" { - - if ( pass == 0) - { - # - # Check that info file, class have been specified. - # - if ( infile ~ /^$/ || class ~ /^$/ ) - exit - - # - # Read in info file. - # - FS="\n"; RS="" - - read_ci_file() - FS=" "; RS="\n" - if (csaprintheader == "on") - { - read_fvclhxx_file() - read_fvcohxx_file() - } - # - # Prepare for format file. - # - FS=" "; RS="\n" - - # - # Find some defaults in info file. - # - findLibrary() - findFilename() - } - - pass++ -} - -# -# Sets the output device to use. -# -# $1 == "set" && $2 == "device" { -# device = $3 -# } - -# -# Prevents a section from being printed. -# -$1 == "hide" && $2 == "section" { - section = $3 - for ( i=4; i<=NF; i++ ) - section = " " section - sections[section] = "" -} - -# -# Prevents a contract from being printed. -# -# Note: a contract will not be displayed if it occurs in a part of the class -# which has been disabled. For instance, if anything occuring in the private -# section of a class is being hidden, the no contracts from that section will -# be displayed either. -# -$1 == "hide" && $2 == "contract" { - contract = $3 - for ( i=4; i<=NF; i++ ) - contract = " " contract - contracts[contract] = "" -} - -# -# Specification of whether a part of a class is hidden or not. -# -$1 == "set" && $2 in access { - access[$2] = $3 -} - -# -# Print a prelude. This should produce any stuff necessary to initialise -# the document. -# -pass == "2" && $1 == "print" && $2 == "prelude" { - "date" | getline date - split ( date, d, " " ) - date = d[2] " " d[3] ", " d[6] - if ( device == "text" ) - { - } - else if ( device == "troff" ) - { - print( ".\\\" troff -man %" ) - print( ".\\\"" ) - print( ".\\\" DO NOT EDIT" ) - print( ".\\\"" ) - print( ".\\\" This manual page is automatically generated by class2man." ) - print( ".\\\"" ) - print( ".ds sL " library ) - print( ".ds sV " date ) - print( ".ds sC " class ) - print( ".ds sS 3" ) - print( ".TH \"\\*(sC\" \"\\*(sS\" \"\\*(sV\" \"\\*(sL Library\" \"\\*(sL Reference Manual\"" ) - } - else if ( device == "mml" ) - { - print( "<MML>" ) - print( "<Comment *** This file is automatically generated by class2mml.>" ) - print( "<!DefineTag Body>" ) - print( "<!DefineTag Heading1>" ) - print( "<!DefineTag Heading2>" ) - print( "" ) - } -} - -# -# Print out a title. -# The title should be generated from the class name and any information -# in the section labelled 'TITLE" which occurs in the hdr of a class. -# On pass 1 we simply note that we intend using the 'TITLE' section so -# that it doesn't get printed out as a seperate section. -# -pass == "1" && $1 == "print" && $2 == "title" { - sections["TITLE"] = "" -} - -# -# On pass 2 we actually print the title. -# Note: even if a 'TITLE' section is not found for the class, then the class -# name at least should be output. -# -pass == "2" && $1 == "print" && $2 == "title" { - found = 0 - for ( i=0; i<=num; i++ ) - { - n = split( lines[i], line, "\n" ) - if ( line[1] == "INFO" && - line[2] == "HDR" && - line[3] == "TITLE" && - line[4] == class ) - { - found = 1 - break - } - } - if ( device == "text" ) - { - if ( found == 1 ) - { - print( class " " ) - for ( i=5; i<=n; i++ ) - outputLine( line[i] ) - } - else - print( class ) - } - else if ( device == "troff" ) - { - print( ".PP" ) - print( ".SH \"NAME\"" ) - if ( found == 1 ) - { - print( class " \\- " ) - for ( i=5; i<=n; i++ ) - outputLine( line[i] ) - } - else - print( class ) - } - else if ( device == "mml" ) - { - print( "<Heading1>" ) - print( class ) - if ( found == 1 ) - { - print( "<Body>" ) - for ( i=5; i<=n; i++ ) - outputLine( line[i] ) - } - } -} - -# -# On pass 1 we actually store the class description for csa. -# -pass == "1" { - if (csaprintheader == "on") - csa_collect_info() -} - -# -# Print a synopsis. -# This should include a line indicating which header file needs to be included -# and a description of the members variables and functions in the class. -# A section of the class should not be output if access["section"] == "off". -# e.g.: Don't print private stuff if access["private"] == "off". -# -# -# das ist die standard ausgabe! (nur hier!) -# -pass == 2 && $1 == "print" && $2 == "synopsis" { - - - if (csaprintheader == "on") - csa_print_compilation_header() - - if ( device == "text" ) - { - print( "\ "SYNOPSIS"\ " ) - print( "\n" ) - } - else if ( device == "troff" ) - { - print( ".PP" ) - print( ".SH \"SYNOPSIS\"" ) - print( ".nf\n" ) - } - else if ( device == "mml" ) - { - print( "" ) - print( "<Heading2>") - print( "SYNOPSIS" ) - printf( "<Body>" ) - printf( "<Plain>" ) - printf( "<LeftIndent 0.1in>" ) - printf( "<FirstIndent 0.1in>" ) - printf( "<Alignment l>" ) - } - - # - # check for includes - # - if ( filename != "" && library != "C++" ) - { - if ( device == "text" ) - { - if ( merge != "on") - { -# printf( "\n#include <%s/%s>\n", library,filename) -# printf( "\n#include <%s/%s>\n", library,origfile) -# print( "\n" ) - } - else - { - if ( loop == "1") - { -# printf( "\n#include <%s/%s>\n", library,filename) -# printf( "\n#include <%s/%s>\n", library,origfile) -# print( "\n" ) - } - } - } - else if ( device == "troff" ) - { - print( "\\f(CO#include <" library "/" filename ">" ) - print( "" ) - } - else if ( device == "mml" ) - { - print( "<Family Courier>#include \\<" library "/" filename "\\>" ) - print( "<HardReturn>" ) - } - - if (csaprintheader == "on") - csa_print_class_header() - - } - - bases = "" - baseindex = 0 - numfields = 0 - - # - # start searching for loop for output 1 ADTs - # - for ( i=0; i<=num; i++ ) - { - numfields = split( lines[i], line, "\n" ) - if ( line[1] ~ /(CLASS|UNION|STRUCT)/ && line[2] == class ) - { - type = lower[line[1]] - baseindex = 3 - # - # - # break heisst, jetzt ist richtige klasse gefunden, die von aussen mitgegeben wurde!!!!!! - # - - break - } - else if ( \ - line[1] == "TEMPLATE" && \ - line[2] ~ /(class|union|struct)/ && \ - line[3] == class \ - ) - { - baseindex = 5 - type = "template" - break - } - } - - # - # end of searching for loop for output 1 ADTs - # ab hier function eingesetzt! - # - -#printf("\nvor parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - class = parse_and_print_adt(class,class,class,baseindex,type) -#printf("\nafter parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - - -# -# bis hier geht parse function -# - -#till end csa_print_class_end() - - if (csaprintheader == "on") - csa_print_class_end() - -} - -# -# Print copyright holders. This must break the line before each copyright -# holder. -# -# wird im moment nicht gerufen -# -pass == "2" && $1 == "print" && $2 == "copyright" { - for ( i=0; i<=num; i++ ) - { - n = split( lines[i], line, "\n" ) - if ( line[1] == "INFO" && - line[2] == "GLOBAL" && - line[3] == "COPYRIGHT" ) - { - if ( device == "text" ) - { - print( "COPYRIGHT" ) - } - else if ( device == "troff" ) - { - print( ".PP" ) - print( ".SH COPYRIGHT" ) - } - else if ( device == "mml" ) - { - print( "" ) - print( "<Heading2>" ) - print( "COPYRIGHT" ) - printf( "<Body>" ) - printf( "<Plain>" ) - printf( "<LeftIndent 0in>" ) - printf( "<FirstIndent 0in>" ) - printf( "<SpaceAfter 8pt>" ) - } - start = 4 - for ( k=start; k<=n; k++ ) - { - if ( k != start && line[k] ~ "[\t ]*Copyright" ) - { - if ( device == "text" ) - print( "\n" ) - else if ( device == "troff" ) - print( ".br" ) - else if ( device == "mml" ) - printf( "<HardReturn>" ) - } - outputLine( line[k] ) - } - break - } - } -} - -# -# Print out any sections which have not been previously printed out and -# which are not hidden. -# -pass == "1" && $1 == "print" && $2 == "section" && $3 == "*" { - next -} - -pass == "2" && $1 == "print" && $2 == "section" && $3 == "*" { - for ( i=0; i<=num; i++ ) - { - n = split( lines[i], line, "\n" ) - if ( line[1] == "INFO" && - ( line[2] == "GLOBAL" || - ( line[2] == "HDR" && line[4] == class ) ) ) - { - if ( line[3] in sections ) - continue - else - { - section = line[3] - sections[section] = "" -#printf("\noutputSection() - 1 - called!!!!!!!!!!!!"); - outputSection() - } - } - } -} - -# -# Print out a section. -# On pass 1 only record the fact that this section will be printed. -# -pass == "1" && $1 == "print" && $2 == "section" { - section = $3 - for ( i=4; i<=NF; i++ ) - section = section " " $i - sections[section] = "" -} - -# -# Print out a section. -# On pass 2 actually print it out. -# -pass == "2" && $1 == "print" && $2 == "section" { - section = $3 - for ( i=4; i<=NF; i++ ) - section = section " " $i - found = 0 - for ( i=0; i<=num; i++ ) - { - n = split( lines[i], line, "\n" ) - if ( line[1] == "INFO" && - ( line[2] == "GLOBAL" || - ( line[2] == "HDR" && line[4] == class ) ) && - line[3] == section ) - { - found = 1 - break - } - } - if ( found == 1 ) - { -#printf("\noutputSection() - 2 - called!!!!!!!!!!!!"); - outputSection() - } -} - -# -# Print out any contracts which have not previously been printed, and -# which are not hidden. -# -# If there are no contracts in the class, then print out sections for the -# private, protected and public members; thats if they are not being hidden. -# -pass == "1" && $1 == "print" && $2 == "contract" && $3 == "\*" { - next -} - -pass == "2" && $1 == "print" && $2 == "contract" && $3 == "\*" { - for ( i=0; i<=num; i++ ) - { - n = split( lines[i], line, "\n" ) - - if ( line[1] == "INFO" && - line[2] == "BODY" && - line[4] == class ) - { - if ( line[3] in contracts ) - continue - else if ( access[line[5]] == "on" ) - { - contract = line[3] - contracts[contract] = "" - -#printf("\noutputContract() called!!!!!"); - outputContract() - } - } - } - i = 0 - for ( j in contracts ) - i++ - if ( i == 0 ) - { -#printf("\noutputClassSection() -2- called!!!!!!!\n"); - if ( access["public"] == "on" ) - outputClassSection( "public" ) - if ( access["protected"] == "on" ) - outputClassSection( "protected" ) - if ( access["private"] == "on" ) - outputClassSection( "private" ) - } -} - -# -# Print out a particular contract, regardless of whether it is hidden or -# not. -# On pass 1 we only note that the contract will be printed. -# -pass == "1" && $1 == "print" && $2 == "contract" { - contract = $3 - for ( i=4; i<=NF; i++ ) - contract = contract " " $i - contracts[contract] = "" -} - -pass == "2" && $1 == "print" && $2 == "contract" { - contract = $3 - for ( i=4; i<=NF; i++ ) - contract = contract " " $i - found = 0 - for ( i=0; i<=num; i++ ) - { - n = split( lines[i], line, "\n" ) - if ( line[1] == "INFO" && - line[2] == "BODY" && - line[4] == class && - line[3] == section ) - { - found = 1 - break - } - } - if ( found == 1 ) - { -#printf("\noutputContract() called!!!!!"); - outputContract() - } -} - -# -# Output a particular section of a class. -# This ignores whether that part is hidden. -# -pass == "2" && $1 == "print" && $3 in access { -#printf("\noutputClassSection() -1- called!!!!!!!\n"); - outputClassSection( $3 ) -} - -# -# Actually prints out a particular section of a class. -# -# -# wird nie gerufen -# -function outputClassSection( part ) -{ - start = 0 - for ( i=0; i<=num; i++ ) - { - n = split( lines[i], line, "\n" ) - if ( ( line[1] == "FUNC" || - line[1] == "MEMBER" || - line[1] == "TYPEDEF" || - line[1] == "FRIEND" ) && - line[2] == class && - line[3] == part ) - { - if ( start == 0 ) - { - start = 1 - if ( device == "text" ) - { - printf( "\n %s MEMBERS\n" ,upper[line[3]]) - } - else if ( device == "troff" ) - { - print( ".PP" ) - print( ".SH \"" upper[line[3]] " MEMBERS\"" ) - } - else if ( device == "mml" ) - { - print( "" ) - print( "<Heading2>" ) - print( upper[line[3]] " MEMBERS" ) - printf( "<Body>" ) - printf( "<Plain>" ) - printf( "<LeftIndent 0in>" ) - printf( "<FirstIndent 0in>" ) - printf( "<SpaceAfter 8pt>" ) - } - } - if ( device == "text" ) - { - print( "\n" ) - } - else if ( device == "troff" ) - { - print( ".nf" ) - } - else if ( device == "mml" ) - { - printf( "<Alignment l>" ) - } - outputPrototype( line[4] ) - if ( device == "text" ) - { - } - else if ( device == "troff" ) - { - print( ".fi" ) - print( ".RS 0.25i" ) - } - else if ( device == "mml" ) - { - printf( "<Alignment lr>" ) - printf( "<LeftIndent 0.1in>" ) - printf( "<FirstIndent 0.1in>" ) - } - for ( l=5; l<=n; l++ ) - outputLine( line[l] ) - if ( device == "text" ) - { - print( "" ) - } - else if ( device == "troff" ) - { - print( ".RE" ) - print( "" ) - } - else if ( device == "mml" ) - { - printf( "<LeftIndent 0in>" ) - printf( "<FirstIndent 0in>" ) - } - } - } -} - -# -# Once a contract has been found, this prints it out. -# -# -# wird nie gerufen -# -function outputContract() { - if ( device == "text" ) - { - print( "\ " contract "\ " ) - } - else if ( device == "troff" ) - { - print( ".PP" ) - print( ".SH \"" contract "\"" ) - } - else if ( device == "mml" ) - { - print( "" ) - print( "<Heading2>" ) - print( contract ) - printf( "<Body>" ) - printf( "<Plain>" ) - printf( "<LeftIndent 0in>" ) - printf( "<FirstIndent 0in>" ) - printf( "<SpaceAfter 8pt>" ) - } - - for ( k=6; k<=n; k++ ) - outputLine( line[k] ) - - # print( "" ) - for ( k=i+1; k<=num; k++ ) - { - n = split( lines[k], line, "\n" ) - if ( ( line[1] == "INFO" && - line[2] == "BODY" && - line[4] == class ) || - ( line[1] == "END" && - line[2] == class ) || - ( line[1] == "ACCESS" && - line[2] == class ) ) - { - break - } - else - if ( ( line[1] == "FUNC" || - line[1] == "MEMBER" || - line[1] == "TYPEDEF" || - line[1] == "FRIEND" ) && - line[2] == class ) - { - if ( device == "text" ) - { - print( "\n" ) - } - else if ( device == "troff" ) - { - print( ".nf" ) - } - else if ( device == "mml" ) - { - printf( "<Alignment l>" ) - } - outputPrototype( line[4] ) - if ( device == "text" ) - { - } - else if ( device == "troff" ) - { - print( ".fi" ) - print( ".RS 0.25i" ) - } - else if ( device == "mml" ) - { - printf( "<Alignment lr>" ) - printf( "<LeftIndent 0.1in>" ) - printf( "<FirstIndent 0.1in>" ) - } - for ( l=5; l<=n; l++ ) - outputLine( line[l] ) - if ( device == "text" ) - { - print( "" ) - } - else if ( device == "troff" ) - { - print( ".RE" ) - print( "" ) - } - else if ( device == "mml" ) - { - printf( "<LeftIndent 0in>" ) - printf( "<FirstIndent 0in>" ) - } - } - else if ( line[1] == "COMMENT" && - line[2] == "BODY" && - line[3] == class ) - { - for ( l=5; l<=n; l++ ) - outputLine( line[l] ) - # print( "" ) - } - } -} - -# -# Once a section has been found, this prints it out. -# -# -# wird nie gerufen -# -function outputSection() -{ - - if ( line[2] == "GLOBAL" ) - start = 4 - else - start = 5 - - if ( device == "text" ) - { - print( "\ " section "\ " ) - } - else if ( device == "troff" ) - { - print( ".PP" ) - print( ".SH \"" section "\"" ) - } - else if ( device == "mml" ) - { - print( "" ) - print( "<Heading2>" ) - print( section ) - if ( line[start] != "" ) - { - printf( "<Body>" ) - printf( "<Plain>" ) - printf( "<LeftIndent 0in>" ) - printf( "<FirstIndent 0in>" ) - printf( "<Alignment lr>" ) - printf( "<SpaceAfter 8pt>" ) - printf( "<Family Times>" ) - } - } - - blankLine = 0 - for ( k=start; k<=n; k++ ) - outputLine( line[k] ) -} - -# -# Removes comment delimiter from start of line. -# -function removeComment( line ) -{ - sub( "^// ?", "", line ) - return line -} - -# -# Output a line. This checks for various formatting requests and will -# appropriately expand them. -# -function outputLine( line ) -{ - line = removeComment( line ) - if ( inComment == 0 ) - { - if ( line ~ "^= BEGIN<CODE>" ) - { - inCode = 1 - if ( device == "text" ) - { - print( "\n" ) - } - else if ( device == "troff" ) - { - print( ".RS 0.25i" ) - print( ".nf\n\\f(CO" ) - } - else if ( device == "mml" ) - { - printf( "<Plain>" ) - printf( "<LeftIndent 0.2in>" ) - printf( "<FirstIndent 0.2in>" ) - printf( "<Alignment l>" ) - printf( "<Family Courier>" ) - } - } - else if ( line ~ "^= END<CODE>" ) - { - inCode = -1 - if ( device == "text" ) - { - print( "\n" ) - } - else if ( device == "troff" ) - { - print( "\\fP\n.fi" ) - print( ".RE" ) - } - else if ( device == "mml" ) - { - printf( "<LeftIndent 0in>" ) - printf( "<FirstIndent 0in>" ) - printf( "<Alignment lr>" ) - printf( "<Family Times>") - } - } - else if ( line ~ "^= BEGIN<COMMENT>" ) - inComment = 1 - else if ( line ~ "^= BEGIN<INDENT>" ) - { - if ( device == "text" ) - { - } - else if ( device == "troff" ) - print( ".RS 0.25i" ) - else if ( device == "mml" ) - { - printf( "<LeftIndent 0.2in>" ) - printf( "<FirstIndent 0.2in>" ) - } - } - else if ( line ~ "^= END<INDENT>" ) - { - if ( device == "text" ) - { - } - else if ( device == "troff" ) - print( ".RE" ) - else if ( device == "mml" ) - { - printf( "<LeftIndent 0in>" ) - printf( "<FirstIndent 0in>" ) - } - } - else if ( line ~ "^= BEGIN<NOFILL>" ) - { - inNoFill = 1 - if ( device == "text" ) - { - } - else if ( device == "troff" ) - print( ".nf" ) - else if ( device == "mml" ) - printf( "<Alignment l>" ) - } - else if ( line ~ "^= END<NOFILL>" ) - { - inNoFill = 0 - if ( device == "text" ) - { - } - else if ( device == "troff" ) - print( ".fi" ) - else if ( device == "mml" ) - printf( "<Alignment lr>" ) - } - else - { - if ( inCode > 0 ) - { - if ( device == "mml" ) - { - gsub( " ", "\\ ", line ) - gsub( "<", "\\<", line ) - gsub( ">", "\\>", line ) - if ( inCode > 1 ) - line = "<HardReturn>" line - } - print( line ) - inCode = inCode + 1 - } - else - { - gsub( "\\\\]>", "]\\fP", line ) - gsub( "\\\\}>", "]\\fP", line ) - gsub( "([^\\\\]|^)<\\[", "&<\\fB", line ) - gsub( "[^\\\\]\\]>", "&>\\fP", line ) - gsub( "<\\[<", "", line ) - gsub( "\\]>>", "", line ) - gsub( "([^\\\\]|^)<\{", "&<\\fI", line ) - gsub( "[^\\\\]}>", "&>\\fP", line ) - gsub( "<\{<", "", line ) - gsub( "}>>", "", line ) - gsub( "([^\\\\]|^)<", "&<\\f(CO", line ) - gsub( "[^\\\\]>", "&>\\fP", line ) - gsub( "<<", "", line ) - gsub( ">>", "", line ) - gsub( "\\\\<", "<", line ) - gsub( "\\\\>", ">", line ) - gsub( "\\\\", "\\\\", line ) - gsub( "\\\\fB", "fB", line ) - gsub( "\\\\fI", "fI", line ) - gsub( "\\\\fP", "fP", line ) - gsub( "\\\\f\\(CO", "f(CO", line ) - - if ( device == "mml" ) - { - if ( inNoFill > 0 ) - gsub( " ", "\\ ", line ) - - gsub( "<", "\\<", line ) - gsub( ">", "\\>", line ) - gsub( "\\\\fP", "<Family Times><Plain>", line ) - gsub( "\\\\fB", "<Bold>", line ) - gsub( "\\\\fI", "<Italic>", line ) - gsub( "\\\\f\\(CO", "<Family Courier>", line ) - - if ( inNoFill > 0 ) - { - if ( inNoFill > 1 ) - line = "<HardReturn>" line - inNoFill = inNoFill + 1 - } - } - - if ( line == "" ) - { - blankLine = 1 - } - else - { - if ( blankLine == 1 ) - { - if ( inCode == 0 ) - print( "" ) - blankLine = 0 - if ( inCode == -1 ) - inCode = 0 - } - print( line ) - } - } - } - } - else - { - if ( line ~ "^= END<COMMENT>" ) - inComment = 0 - } -} - -# -# Searches for the 'LIBRARY' section and sets 'library' to the value found. -# -function findLibrary() -{ - for ( i=0; i<=num; i++ ) - { - split( lines[i], line, "\n" ) - if ( line[1] == "INFO" && - line[2] == "GLOBAL" && - line[3] == "LIBRARY" ) - { - len=length(line[4]) - libr = substr(line[4],4,len) - library = removeComment( libr ) - break - } - } - if ( library == "" ) - library = "C++" -} - -# -# Searches for the 'FILENAME' section and sets 'filename' to the value found. -# -function findFilename() -{ - for ( i=0; i<=num; i++ ) - { - split( lines[i], line, "\n" ) - if ( line[1] == "INFO" && - line[2] == "GLOBAL" && - ( line[3] == "FILENAME" || - line[3] == "RCSID" || - line[3] == "SCCSID" ) ) - { - filename = removeComment( line[4] ) - if ( line[3] == "RCSID" ) - { - sub( "^.*\\$Id:[\t ]*", "", filename ) - sub( ",v.*$", "", filename ) - } - else if ( line[3] == "SCCSID" ) - { - sub( "^.*@\\(#\\)", "", filename ) - sub( "[\t ]+.*$", "", filename ) - } - break - } - } -} - -# -# Outputs a prototype, wrapping it if required. -# -function outputPrototype( prototype ) -{ - sub( "[\t ]*$", "", prototype ) - if ( prototype !~ "^.*;$" ) - prototype = prototype ";" - - if ( device == "text" ) - width = 70 - else if ( device == "troff" ) - width = 70 - else if ( device == "mml" ) - width = 60 - - if ( length(prototype) > width ) - { - # multiline enums,functions have no spaces at the beginning, insert it! - if ( device == "mml" ) - { - gsub( ">", "\\>", prototype ) - gsub( "<", "\\<", prototype ) - } - if ( ( funcptr = match( prototype, "^[^(]*\\([^)]*\\)\\(" ) ) !~ "0" ) - match( prototype, "^[^(]*\\([^)]*\\)" ) - else - match( prototype, "^[^(]*\\(" ) - funcname = substr( prototype, RSTART, RLENGTH ) - if ( prototype ~ "^[^(]*\\(\\)[\t ]*\\(" ) - { - funcname = funcname ")(" - sub( "^[^(]*\\(\\)[\t ]*\\(", "", prototype ) - } - else - { - if ( funcptr ~ "0" ) - sub( "^[^(]*\\(", "", prototype ) - else - sub( "^[^(]*\\([^)]*\\)\\(", "", prototype ) - } - match( prototype, "\\)([\t ]*)?(=[\t ]*0|const[\t ]*(=[\t ]*0)?)?;[\t ]*" ) - functail = substr( prototype, RSTART, RLENGTH ) - sub( "\\)([\t ]*)?(=[\t ]*0|const[\t ]*(=[\t ]*0)?)?;.*$", "", prototype ) - sub( "\\($", "", funcname ) - match( funcname, "^[\t ]*" ) - space = substr( funcname, RSTART, RLENGTH ) - if (funcname != "") - { - # multiline enums or long typedefs have no funcname, so do not print it! - if ( device == "text" ) - { - printf( funcname ) - printf( "(\n" ) -#printf("\n---funcname=|%s|----\n",funcname); - } - else if ( device == "troff" ) - { - printf( "\\f(CO" funcname ) - printf( "(\n" ) - } - else if ( device = "mml" ) - { - gsub( " ", "\\ ", space ) - gsub( " ", "\\ ", funcname ) - printf( "<Family Courier>%s(\n<HardReturn>", funcname ) - } - } - narg = 0 - while ( match( prototype, "[^<>,#]*<[^<>]*>" ) ) - { - # collect the multiple line arguments - narg++ - arg = substr( prototype, RSTART, RLENGTH ) - sub( "[^<>,#]*<[^<>]*>", "#" narg, prototype ) - fargs["#" narg] = arg - # Need the following to stop resubstitution of the pattern matched - # back into the string. - gsub( "&", "\\\\&", fargs["#" narg] ) - } - numargs = split( prototype, args, "," ) -#------ - space = "" - for (z=1; z<=(nesting_level+1); z++) - space = space " " -# printf( "%s",outspace) -#------ - - for ( m=1; m<=numargs; m++ ) - { - while ( match( args[m], "#[0-9]+" ) ) - { - arg = substr( args[m], RSTART, RLENGTH ) - sub( arg, fargs[arg], args[m] ) - } - sub( "[\t ]*", "", args[m] ) - - # print one argument - -# printf( "%s %s", space, args[m] ) - printf( "%s%s", space, args[m] ) - if ( m == numargs ) - { - # print after the last argument - - if ( device == "text" ) - print( "" ) - else if ( device == "troff" ) - print( "" ) - else if ( device == "mml" ) - printf( "\n<HardReturn>" ) - } - else - { - # print after each argument of a line - - if ( device == "text" ) - print( "," ) - else if ( device == "troff" ) - print( "," ) - else if ( device == "mml" ) - printf( ",\n<HardReturn>" ) - } - } - # print after all arguments of a multiline are printed - - if ( device == "text" ) - print( space functail "\ " ) - else if ( device == "troff" ) - print( space functail "\\fP" ) - else if ( device == "mml" ) - print( space functail "<Family Times>" ) - - } - else # prototype < width - { - # not multiline enums,functions have spaces at the beginning already! - if ( device == "mml" ) - { - gsub( ">", "\\>", prototype ) - gsub( "<", "\\<", prototype ) - } - if ( device == "text" ) - print( prototype "\ " ) - else if ( device == "troff" ) - print( "\\f(CO" prototype "\\fP" ) - else if ( device == "mml" ) - { - gsub( " ", "\\ ", prototype ) - print( "<Family Courier>" prototype "<Family Times>" ) - } - } -} - -#============================================================= -# neue rkursive parse function fuer nested ADTs -#============================================================= -function parse_and_print_adt (baseandsubclass, class, oldclass, baseindex, type) -{ - # 3.11.95 - bases = "" - - nesting_level++ - printf( "\n") -# printf("\nclass=%s oldclass=%s nesting_level=%s\n",class,oldclass,nesting_level); - if ( baseindex != 0 ) - { - for ( i=baseindex; i<=numfields; i++ ) - { - if ( bases == "" ) - bases = line[i] - else - bases = bases ", " line[i] - } - } - - outspace = "" - for (z=1; z<nesting_level; z++) - outspace = outspace " " - printf( "%s",outspace) - - if ( type == "template" ) - { - # - # ADT == template - # - for ( i=0; i<=num; i++ ) - { - split( lines[i], line, "\n" ) - -# if ( line[1] == "TEMPLATE" && line[3] == class ) - if ( line[1] == "TEMPLATE" && (line[3] == class || line[3] == baseandsubclass) ) - break - } - if ( device == "text" ) - printf( "template%s\n",line[4] ) - else if ( device == "troff" ) - printf( "template%s\n",line[4] ) - else if ( device == "mml" ) - { - sub( "<", "\\<", line[4] ) - sub( ">", "\\>", line[4] ) - printf( "<HardReturn>template%s\n",line[4] ) - } -# typestat = line[2] " " line[3] - typestat = line[2] " " class - - outspace = "" - for (z=1; z<nesting_level; z++) - outspace = outspace " " - printf( "%s",outspace) - - if ( device == "text" ) - printf( "%s", typestat ) - else if ( device == "troff" ) - printf( "%s", typestat ) - else if ( device == "mml" ) - printf( "<HardReturn>%s", typestat ) - } - else - { - # - # ADT != template - # - typestat = type " " class - if ( device == "mml" ) - printf( "<HardReturn>" ) - printf( "%s", typestat ) - } - - if ( bases != "" ) - { - # - # analyse if ADT has base classes - # - typestat = typestat " : " - printf( " : " ) - if ( length(typestat) + length(bases) > 70 ) - { - print( "" ) - if ( device == "mml" ) - printf( "<HardReturn>" ) - narg = 0 - while ( match( bases, "[^<>,# ]*<[^<>]*>" ) ) - { - narg++ - arg = substr( bases, RSTART, RLENGTH ) - sub( "[^<>,# ]*<[^<>]*>", "#" narg, bases ) - bargs["#" narg] = arg - # Need the following to stop resubstitution of the pattern matched - # back into the string. - gsub( "&", "\\\\&", bargs["#" narg] ) - } - numbases = split( bases, base, "," ) - for ( m=1; m<=numbases; m++ ) - { - while ( match( base[m], "#[0-9]+" ) ) - { - arg = substr( base[m], RSTART, RLENGTH ) - sub( arg, bargs[arg], base[m] ) - } - sub( "^[\t ]*", "", base[m] ) - if ( device == "mml" ) - { - gsub( "<", "\\<", base[m] ) - gsub( ">", "\\>", base[m] ) - } - if ( device == "text" ) - printf( " %s", base[m] ) - else if ( device == "troff" ) - printf( " %s", base[m] ) - else - printf( "\\ \\ %s", base[m] ) - if ( m == numbases ) - print( "" ) - else - { - print( "," ) - if ( device == "mml" ) - printf( "<HardReturn>" ) - } - } - } - else - { - if ( device == "mml" ) - { - gsub( "<", "\\<", bases ) - gsub( ">", "\\>", bases ) - } - print( bases ) - } - } - else - { - # - # ADT has no base classes - # - printf( "\n" ) - } - -#till start if (csaprintheader == "on") csa_print_class_end() - - outspace = "" - for (z=1; z<nesting_level; z++) - outspace = outspace " " - if ( device == "text" ) - print( outspace "{\ " ) - else if ( device == "troff" ) - print( outspace "{\\fP" ) - else if ( device == "mml" ) - print( outspace "<HardReturn>{<Family Times>") - if ( access["public"] == "on" ) - { - # - # collecting loop over the public lines of 1 ADT - # - start = 0 - for ( i=0; i<=num; i++ ) - { - split( lines[i], line, "\n" ) - - # - # 3.11.95 check outermost access - # - if ( line[1] == "ACCESS") - { - outeraccess = line[3] - #printf("\n----- outeraccess = |%s| --------\n",outeraccess) - } - - # - # start for nesting ADT - # - if ( line[1] == "CLASS" || line[1] == "STRUCT" || line[1] == "UNION" ) - { - # - # check for a normal nested ADT - # - if ( line[2] ~ "(::|<)" && lastaccess == "public" && outeraccess == "public") - { - if (line[2] ~ "::") - { - len = length(line[2]) - match( line[2], "(::|<).*$") - newclass = substr( line[2],RSTART+2,RLENGTH) - thisclass = substr( line[2],1,RSTART-1) - if (class == thisclass) - { - # - # hier is a nested class, struct, or union found!!!!!!! - # - - basesubclass = line[2] - #printf("\n----basesubclass=|%s|-----\n",basesubclass) - #printf("\n----thisclass=|%s|---------newclass=|%s|-----\n",thisclass,newclass) - #printf("\n----RECURSION--class=|%s|--line[1]=|%s|--line[2]=|%s|---\n", \ - #class,line[1],line[2]); - - nesttype = lower[line[1]] - nestbaseindex = 3 - #printf("\nvor parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - save_i = i - class = parse_and_print_adt(basesubclass,newclass,thisclass,nestbaseindex,nesttype) - i = save_i - #printf("\nafter parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - start = 1 - continue - } - } - } - } - else - { - # - # check for a TEMPLATE nested ADT - # - if ( line[1] == "TEMPLATE" && line[2] ~ /(class|union|struct)/ && lastaccess == "public" && outeraccess == "public") - { - len = length(line[3]) - match( line[3], "(::|<).*$") - newclass = substr( line[3],RSTART+2,RLENGTH) - thisclass = substr( line[3],1,RSTART-1) - if (class == thisclass) - { - # - # hier is a nested class, struct, or union found!!!!!!! - # - - basesubclass = line[3] - #printf("\n----basesubclass=|%s|-----\n",basesubclass) - #printf("\n----thisclass=|%s|---------newclass=|%s|-----\n",thisclass,newclass) - #printf("\n---RECURSION--class=|%s|--line[1]=|%s|--line[2]=|%s|--line[3]=|%s|---\n", \ - #class,line[1],line[2],line[3]); - - nesttype = "template" - nestbaseindex = 5 - #printf("\nvor parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - save_i = i - class = parse_and_print_adt(basesubclass,newclass,thisclass,nestbaseindex,nesttype) - i = save_i - #printf("\nafter parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - start = 1 - continue - } - } - } - # - # end for nesting ADT - # - # - # now print the protoypes of the public ADT - # - if ( ( line[1] == "MEMBER" || - line[1] == "FUNC" || - line[1] == "TYPEDEF" || - line[1] == "ENUM" || - line[1] == "FRIEND" ) && - line[2] == class && - line[3] == "public" ) - { - outspace = "" - for (z=1; z<nesting_level; z++) - outspace = outspace " " - lastaccess = "public" - if ( start == 0 ) - { - start = 1 - if ( device == "text" ) - print( outspace "\ \n" outspace "public:\n") - else if ( device == "troff" ) - print( outspace " \\f(COpublic:\\fP") - else if ( device == "mml" ) - print( outspace "<HardReturn><Family Courier>\\ \\ public:<Family Times>" ) - } - outspace = "" - for (z=1; z<=nesting_level; z++) - outspace = outspace " " - if ( device == "text" ) - { - outputPrototype( outspace line[4] ) - } - else if ( device == "troff" ) - outputPrototype( outspace line[4] ) - else - { - printf( "<HardReturn>" ) - outputPrototype( outspace line[4] ) - } - } - } - } - if ( access["protected"] == "on" ) - { - # - # collecting loop over the protected lines of 1 ADT - # - start = 0 - for ( i=0; i<=num; i++ ) - { - split( lines[i], line, "\n" ) - - # - # 3.11.95 check outermost access - # - if ( line[1] == "ACCESS") - { - outeraccess = line[3] - #printf("\n----- outeraccess = |%s| --------\n",outeraccess) - } - - # - # start for nesting ADT - # - if ( line[1] == "CLASS" || line[1] == "STRUCT" || line[1] == "UNION" ) - { - # - # check for a normal nested ADT - # - if ( line[2] ~ "(::|<)" && lastaccess == "protected" && outeraccess == "protected") - { - if (line[2] ~ "::") - { - len = length(line[2]) - match( line[2], "(::|<).*$") - newclass = substr( line[2],RSTART+2,RLENGTH) - thisclass = substr( line[2],1,RSTART-1) - if (class == thisclass) - { - # - # hier is a nested class, struct, or union found!!!!!!! - # - - basesubclass = line[2] - #printf("\n----basesubclass=|%s|-----\n",basesubclass) - #printf("\n----thisclass=|%s|---------newclass=|%s|-----\n",thisclass,newclass) - #printf("\n----RECURSION--class=|%s|--line[1]=|%s|--line[2]=|%s|---\n", \ - #class,line[1],line[2]); - - nesttype = lower[line[1]] - nestbaseindex = 3 - #printf("\nvor parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - save_i = i - class = parse_and_print_adt(basesubclass,newclass,thisclass,nestbaseindex,nesttype) - i = save_i - #printf("\nafter parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - start = 1 - continue - } - } - } - } - else - { - # - # check for a TEMPLATE nested ADT - # - if ( line[1] == "TEMPLATE" && line[2] ~ /(class|union|struct)/ && lastaccess == "protected" && outeraccess == "protected") - { - len = length(line[3]) - match( line[3], "(::|<).*$") - newclass = substr( line[3],RSTART+2,RLENGTH) - thisclass = substr( line[3],1,RSTART-1) - if (class == thisclass) - { - # - # hier is a nested class, struct, or union found!!!!!!! - # - - basesubclass = line[3] - #printf("\n----basesubclass=|%s|-----\n",basesubclass) - #printf("\n----thisclass=|%s|---------newclass=|%s|-----\n",thisclass,newclass) - #printf("\n---RECURSION--class=|%s|--line[1]=|%s|--line[2]=|%s|--line[3]=|%s|---\n", \ - #class,line[1],line[2],line[3]); - - nesttype = "template" - nestbaseindex = 5 - #printf("\nvor parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - save_i = i - class = parse_and_print_adt(basesubclass,newclass,thisclass,nestbaseindex,nesttype) - i = save_i - #printf("\nafter parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - start = 1 - continue - } - } - } - # - # end for nesting ADT - # - # - # now print the protoypes of the public ADT - # - if ( ( line[1] == "MEMBER" || - line[1] == "FUNC" || - line[1] == "TYPEDEF" || - line[1] == "ENUM" || - line[1] == "FRIEND" ) && - line[2] == class && - line[3] == "protected" ) - { - outspace = "" - for (z=1; z<nesting_level; z++) - outspace = outspace " " - lastaccess = "protected" - if ( start == 0 ) - { - start = 1 - if ( device == "text" ) - print( outspace "\ \n" outspace "protected:\n") - else if ( device == "troff" ) - print( outspace " \\f(COprotected:\\fP") - else if ( device == "mml" ) - print(outspace "<HardReturn><Family Courier>\\ \\ protected:<Family Times>" ) - } - outspace = "" - for (z=1; z<=nesting_level; z++) - outspace = outspace " " - if ( device == "text" ) - outputPrototype( outspace line[4] ) - else if ( device == "troff" ) - outputPrototype( outspace line[4] ) - else - { - printf( "<HardReturn>" ) - outputPrototype( outspace line[4] ) - } - } - } - } - if ( access["private"] == "on" ) - { - # - # collecting loop over the private lines of 1 ADT - # - start = 0 - for ( i=0; i<=num; i++ ) - { - split( lines[i], line, "\n" ) - - # - # 3.11.95 check outermost access - # - if ( line[1] == "ACCESS") - { - outeraccess = line[3] - #printf("\n----- outeraccess = |%s| --------\n",outeraccess) - } - - # - # start for nesting ADT - # - if ( line[1] == "CLASS" || line[1] == "STRUCT" || line[1] == "UNION" ) - { - # - # check for a normal nested ADT - # - if ( line[2] ~ "(::|<)" && lastaccess == "private" && outeraccess == "private") - { - if (line[2] ~ "::") - { - len = length(line[2]) - match( line[2], "(::|<).*$") - newclass = substr( line[2],RSTART+2,RLENGTH) - thisclass = substr( line[2],1,RSTART-1) - if (class == thisclass) - { - # - # hier is a nested class, struct, or union found!!!!!!! - # - - basesubclass = line[2] - #printf("\n----basesubclass=|%s|-----\n",basesubclass) - #printf("\n----thisclass=|%s|---------newclass=|%s|-----\n",thisclass,newclass) - #printf("\n----RECURSION--class=|%s|--line[1]=|%s|--line[2]=|%s|---\n", \ - #class,line[1],line[2]); - - nesttype = lower[line[1]] - nestbaseindex = 3 - #printf("\nvor parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - save_i = i - class = parse_and_print_adt(basesubclass,newclass,thisclass,nestbaseindex,nesttype) - i = save_i - #printf("\nafter parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - start = 1 - continue - } - } - } - } - else - { - # - # check for a TEMPLATE nested ADT - # - if ( line[1] == "TEMPLATE" && line[2] ~ /(class|union|struct)/ && lastaccess == "private" && outeraccess == "private") - { - len = length(line[3]) - match( line[3], "(::|<).*$") - newclass = substr( line[3],RSTART+2,RLENGTH) - thisclass = substr( line[3],1,RSTART-1) - if (class == thisclass) - { - # - # hier is a nested class, struct, or union found!!!!!!! - # - - basesubclass = line[3] - #printf("\n----basesubclass=|%s|-----\n",basesubclass) - #printf("\n----thisclass=|%s|---------newclass=|%s|-----\n",thisclass,newclass) - #printf("\n---RECURSION--class=|%s|--line[1]=|%s|--line[2]=|%s|--line[3]=|%s|---\n", \ - #class,line[1],line[2],line[3]); - - nesttype = "template" - nestbaseindex = 5 - #printf("\nvor parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - save_i = i - class = parse_and_print_adt(basesubclass,newclass,thisclass,nestbaseindex,nesttype) - i = save_i - #printf("\nafter parse_and_print_adt: class=%s nesting_level=%s",class,nesting_level); - #printf("\ni=%s num=%s line[1]=|%s| line[2]=|%s| line[3]=|%s|\n", \ - #i,num,line[1],line[2],line[3]); - start = 1 - continue - } - } - } - # - # end for nesting ADT - # - # - # now print the protoypes of the public ADT - # - if ( ( line[1] == "MEMBER" || - line[1] == "FUNC" || - line[1] == "TYPEDEF" || - line[1] == "ENUM" || - line[1] == "FRIEND" ) && - line[2] == class && - line[3] == "private" ) - { - outspace = "" - for (z=1; z<nesting_level; z++) - outspace = outspace " " - lastaccess = "private" - if ( start == 0 ) - { - start = 1 - if ( device == "text" ) - print( outspace "\ \n" outspace "private:\n") - else if ( device == "troff" ) - print( outspace " \\f(COprivate:\\fP") - else if ( device == "mml" ) - print(outspace "<HardReturn><Family Courier>\\ \\ private:<Family Times>" ) - } - outspace = "" - for (z=1; z<=nesting_level; z++) - outspace = outspace " " - if ( device == "text" ) - outputPrototype( outspace line[4] ) - else if ( device == "troff" ) - outputPrototype( outspace line[4] ) - else - { - printf( "<HardReturn>" ) - outputPrototype( outspace line[4] ) - } - } - } - } - outspace = "" - for (z=1; z<nesting_level; z++) - outspace = outspace " " - if ( device == "text" ) - { - print( outspace "};" ) - print( "\n" ) - } - else if ( device == "troff" ) - { - print( outspace "\\f(CO};" ) - print( "\\fP\n.fi" ) - } - else if ( device == "mml" ) - { - print( outspace "<HardReturn><Family Courier>};<Family Times>" ) - } - nesting_level-- - return oldclass -} diff --git a/bin/info2doc.fmt b/bin/info2doc.fmt deleted file mode 100644 index ef0b0331543..00000000000 --- a/bin/info2doc.fmt +++ /dev/null @@ -1,23 +0,0 @@ -start -hide section FILENAME -hide section COPYRIGHT -print prelude -print title -print synopsis -print section CLASS TYPE -print section AUDIENCE -print section DESCRIPTION -print section EXAMPLE -print contract * -print section * -print section NOTES -print section PORTABILITY -print section SEE ALSO -print section LIBRARY -print section VERSION -print section DATE RELEASED -print section RCSID -print section SCCSID -print section AUTHOR(S) -print copyright -end diff --git a/bin/info2head b/bin/info2head deleted file mode 100755 index 15ee9ae0f1e..00000000000 --- a/bin/info2head +++ /dev/null @@ -1,166 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Front end to awk script for generating manual pages from classinfo -# files. -# -# = AUTHOR(S) -# Graham Dumpleton -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/bin"} - -AWK="${AWK-gawk}" - - -if test "$AWK" = "gawk" -then - VARG="-v" -fi - -EXT="3" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` file.ci" -} - -# -# Check usage. -# -if test $# != "1" -o "'basename $1 .ci'" = "$1" -then - USAGE -fi - -# -# Check for awk file etc. -# -INFO2DOC=$LIBDIR/info2doc.awk -MANFMT=$LIBDIR/info2head.fmt -HIDINGFMT=$LIBDIR/hiding.fmt - -if test ! -f $HIDINGFMT -then - ERROR "Can't find $HIDINGFMT" -fi - -if test ! -f $INFO2DOC -then - ERROR "Can't find $INFO2DOC" -fi - -if test ! -f $MANFMT -then - ERROR "Can't find $MANFMT" -fi - - - -ADTS=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^(CLASS|STRUCT|UNION)$" && $2 !~ "(::|<)" { - printf( "%s\n", $2 ) -} -$1 ~ "^TEMPLATE$" && $3 !~ "::" { - printf( "%s\n", $3 ) -}' $1` - - -VPUBL=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PUBLIC$" { - if ( $2 ~ "on" ) - printf("%s","publ=on"); - else - printf("%s","publ="); -}' $HIDINGFMT` - -VPROT=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PROTECTED$" { - if ( $2 ~ "on" ) - printf("%s","prot=on"); - else - printf("%s","prot="); -}' $HIDINGFMT` - -VPRIV=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PRIVATE$" { - if ( $2 ~ "on" ) - printf("%s","priv=on"); - else - printf("%s","priv="); -}' $HIDINGFMT` - -echo " $VPUBL $VPROT $VPRIV " - - -# $VARG publ=on $VARG prot= $VARG priv= \ -# $VARG $VPUBL $VARG $VPROT $VARG $VPRIV \ -if test ! -z "$ADTS" -then - for ADT in $ADTS - do - echo "$ADT" - - echo "making $ADTS.hxx file ..." - $AWK -f $INFO2DOC \ - $VARG $VPUBL $VARG $VPROT $VARG $VPRIV \ - $VARG pass=0 $VARG device=text $VARG infile=$1 \ - $VARG class=$ADT \ - $MANFMT $MANFMT > $ADT.$EXT -# troff -a $ADT.$EXT > $ADT.hxx - cp $ADT.$EXT $ADT.hxx - echo "$ADTS.hxx file done!" -# echo "removing $ADTS.$EXT file ..." - \rm $ADT.$EXT -# echo "file $ADTS.$EXT file removed!" - done -fi diff --git a/bin/info2head.fmt b/bin/info2head.fmt deleted file mode 100644 index 87eb1c8b1d0..00000000000 --- a/bin/info2head.fmt +++ /dev/null @@ -1,23 +0,0 @@ -start -hide section FILENAME -hide section COPYRIGHT -hide prelude -hide title -print synopsis -hide section CLASS TYPE -hide section AUDIENCE -hide section DESCRIPTION -hide section EXAMPLE -hide contract * -hide section * -hide section NOTES -hide section PORTABILITY -hide section SEE ALSO -hide section LIBRARY -hide section VERSION -hide section DATE RELEASED -hide section RCSID -hide section SCCSID -hide section AUTHOR(S) -hide copyright -end diff --git a/bin/info2headsrc b/bin/info2headsrc deleted file mode 100755 index 9b6bfcfcf77..00000000000 --- a/bin/info2headsrc +++ /dev/null @@ -1,326 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Front end to awk script for generating <class>.hxx and <class>.hxx files -# from classinfo files. -# -# = AUTHOR(S) -# K. Dorn -# -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/bin"} - -AWK="${AWK-gawk}" - - -if test "$AWK" = "gawk" -then - VARG="-v" -fi - -EXT="3" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` file.ci" -} - -# -# Check usage. -# -if test $# != "1" -o "'basename $1 .ci'" = "$1" -then - USAGE -fi - - -# -# Check for awk file etc. -# -INFO2SRC=$BINDIR/info2src.awk -INFO2DOC=$LIBDIR/info2doc.awk -MANFMT=$LIBDIR/info2head.fmt -HIDINGFMT=$LIBDIR/hiding.fmt -VENDORFMT=$LIBDIR/vendor.fmt - -if test ! -f $VENDORFMT -then - ERROR "Can't find $VENDORFMT" -fi - -if test ! -f $HIDINGFMT -then - ERROR "Can't find $HIDINGFMT" -fi - -if test ! -f $INFO2DOC -then - ERROR "Can't find $INFO2DOC" -fi - -if test ! -f $MANFMT -then - ERROR "Can't find $MANFMT" -fi - -ADTS=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^(CLASS|STRUCT|UNION)$" && $2 !~ "(::|<)" { - printf( "%s\n", $2 ) -} -$1 ~ "^TEMPLATE$" && $3 !~ "::" { - printf( "%s\n", $3 ) -}' $1` - - - -VMERGE=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^CSAMERGECXXHXX$" { - if ( $2 ~ "on" ) - printf("%s","merge=on"); - else - printf("%s","merge="); -}' $HIDINGFMT` - -VCSA=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^CSAHEADER$" { - if ( $2 ~ "on" ) - printf("%s","csaprintheader=on"); - else - printf("%s","csaprintheader="); -}' $HIDINGFMT` - -VPUBL=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PUBLIC$" { - if ( $2 ~ "on" ) - printf("%s","publ=on"); - else - printf("%s","publ="); -}' $HIDINGFMT` - -VPROT=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PROTECTED$" { - if ( $2 ~ "on" ) - printf("%s","prot=on"); - else - printf("%s","prot="); -}' $HIDINGFMT` - -VPRIV=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PRIVATE$" { - if ( $2 ~ "on" ) - printf("%s","priv=on"); - else - printf("%s","priv="); -}' $HIDINGFMT` - - - - -VCOCXX=`$AWK ' -BEGIN { - FS=""; RS="" -} -/VENDOR_COMPILATION_HEADER_CXX_START/, /VENDOR_COMPILATION_HEADER_CXX_END/ { -sub("^VENDOR_COMPILATION_HEADER_CXX_START\n","",$0) -sub("VENDOR_COMPILATION_HEADER_CXX_END$","",$0) - -gsub( / \\\" /, "999", $0 ) -gsub( "\"\\[\t ]*", "234", $0 ) -gsub( "234\\\n", "345", $0 ) -gsub( /234.\n/, "456", $0 ) -gsub( /456[\t ]*234/, "567", $0 ) -gsub( /567/, "", $0 ) -gsub( /234/, "", $0 ) -gsub( /345/, "", $0 ) -gsub( "999", "\"", $0 ) - -print $0 -}' $VENDORFMT` - - -VMECXX=`$AWK ' -BEGIN { - FS=""; RS="" -} -/VENDOR_METHOD_HEADER_CXX_START/, /VENDOR_METHOD_HEADER_CXX_END/ { -sub("^VENDOR_METHOD_HEADER_CXX_START\n","",$0) -sub("VENDOR_METHOD_HEADER_CXX_END$","",$0) - -gsub( / \\\" /, "999", $0 ) -gsub( "\"\\[\t ]*", "234", $0 ) -gsub( "234\\\n", "345", $0 ) -gsub( /234.\n/, "456", $0 ) -gsub( /456[\t ]*234/, "567", $0 ) -gsub( /567/, "", $0 ) -gsub( /234/, "", $0 ) -gsub( /345/, "", $0 ) -gsub( "999", "\"", $0 ) - -print $0 -}' $VENDORFMT` - -VCOHXX=`$AWK ' -BEGIN { - FS=""; RS="" -} -/VENDOR_COMPILATION_HEADER_HXX_START/, /VENDOR_COMPILATION_HEADER_HXX_END/ { -sub("^VENDOR_COMPILATION_HEADER_HXX_START\n","",$0) -sub("VENDOR_COMPILATION_HEADER_HXX_END$","",$0) - -gsub( / \\\" /, "999", $0 ) -gsub( "\"\\[\t ]*", "234", $0 ) -gsub( "234\\\n", "345", $0 ) -gsub( /234.\n/, "456", $0 ) -gsub( /456[\t ]*234/, "567", $0 ) -gsub( /567/, "", $0 ) -gsub( /234/, "", $0 ) -gsub( /345/, "", $0 ) -gsub( "999", "\"", $0 ) - -print $0 -}' $VENDORFMT` - - -VCLHXX=`$AWK ' -BEGIN { - FS=""; RS="" -} -/VENDOR_CLASS_HEADER_HXX_START/, /VENDOR_CLASS_HEADER_HXX_END/ { -sub("^VENDOR_CLASS_HEADER_HXX_START\n","",$0) -sub("VENDOR_CLASS_HEADER_HXX_END$","",$0) - -gsub( / \\\" /, "999", $0 ) -gsub( "\"\\[\t ]*", "234", $0 ) -gsub( "234\\\n", "345", $0 ) -gsub( /234.\n/, "456", $0 ) -gsub( /456[\t ]*234/, "567", $0 ) -gsub( /567/, "", $0 ) -gsub( /234/, "", $0 ) -gsub( /345/, "", $0 ) -gsub( "999", "\"", $0 ) - -print $0 -}' $VENDORFMT` - - -echo " $VCOCXX " > vcocxx.txt -echo " $VMECXX " > vmecxx.txt -echo " $VCOHXX " > vcohxx.txt -echo " $VCLHXX " > vclhxx.txt - - - -echo " $VPUBL $VPROT $VPRIV $VCSA $VMERGE" - -# -# get from *.ci file the classes that should separated -# and make the <class>.hxx and <class>.cxx files -# -if test ! -z "$ADTS" -then - LASTADT="" - LOPCNT=1 - BASEFILENAME=`basename $1` - HXXMERGEFILE=`echo $BASEFILENAME | sed -e 's/\..*$//'`.mhxx - CXXMERGEFILE=`echo $BASEFILENAME | sed -e 's/\..*$//'`.mcxx - rm -f $HXXMERGEFILE - rm -f $CXXMERGEFILE - for ADT in $ADTS - do - if test "$LASTADT" != "$ADT" - then - echo "loop = $LOPCNT" - echo "$ADT" - - echo "making $ADTS.hxx file ..." - $AWK -f $INFO2DOC \ - $VARG fvclhxx=vclhxx.txt \ - $VARG fvcohxx=vcohxx.txt \ - $VARG $VPUBL $VARG $VPROT $VARG $VPRIV $VARG $VCSA $VARG $VMERGE \ - $VARG pass=0 $VARG device=text $VARG infile=$1 \ - $VARG class=$ADT $VARG loop=$LOPCNT\ - $MANFMT $MANFMT > $ADT.hxx - echo "$ADTS.hxx file done!" - if test "$VMERGE" = "merge=on" - then - echo "merging $ADT.hxx into $HXXMERGEFILE" - cat $ADT.hxx >> $HXXMERGEFILE - fi - - echo "making $ADTS.cxx file ..." - $AWK -f $INFO2SRC \ - $VARG fvmecxx=vmecxx.txt \ - $VARG fvcocxx=vcocxx.txt \ - $VARG $VPUBL $VARG $VPROT $VARG $VPRIV $VARG $VCSA $VARG $VMERGE \ - $VARG infile=$1 $VARG classext=$ADT $VARG mode=single $VARG loop=$LOPCNT\ - $1 > $ADT.cxx - echo "$ADTS.cxx file done!" - if test "$VMERGE" = "merge=on" - then - echo "merging $ADT.cxx into $CXXMERGEFILE" - cat $ADT.cxx >> $CXXMERGEFILE - fi - - LOPCNT=`expr $LOPCNT + 1` - LASTADT=$ADT - fi - done -fi -# -# remove temporary vendor files -# -rm -f vcocxx.txt -rm -f vmecxx.txt -rm -f vcohxx.txt -rm -f vclhxx.txt diff --git a/bin/info2man b/bin/info2man deleted file mode 100755 index e38551c68ff..00000000000 --- a/bin/info2man +++ /dev/null @@ -1,169 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Front end to awk script for generating manual pages from classinfo -# files. -# -# = AUTHOR(S) -# Graham Dumpleton -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/bin"} - -AWK="${AWK-gawk}" - -if test "$AWK" = "gawk" -then - VARG="-v" -fi - -EXT="3" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` file.ci" -} - -# -# Check usage. -# -if test $# != "1" -o "'basename $1 .ci'" = "$1" -then - USAGE -fi - -# -# Check for awk file etc. -# -INFO2MAN=$LIBDIR/info2doc.awk -MANFMT=$LIBDIR/info2doc.fmt -HIDINGFMT=$LIBDIR/hiding.fmt - -if test ! -f $HIDINGFMT -then - ERROR "Can't find $HIDINGFMT" -fi - -if test ! -f $INFO2MAN -then - ERROR "Can't find $INFO2MAN" -fi - -if test ! -f $MANFMT -then - ERROR "Can't find $MANFMT" -fi - - - - -ADTS=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^(CLASS|STRUCT|UNION)$" && $2 !~ "(::|<)" { - printf( "%s\n", $2 ) -} -$1 ~ "^TEMPLATE$" && $3 !~ "::" { - printf( "%s\n", $3 ) -}' $1` - - - -VCSA=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^CSAHEADER$" { - if ( $2 ~ "on" ) - printf("%s","csaprintheader=off"); - else - printf("%s","csaprintheader=off"); -}' $HIDINGFMT` - -VPUBL=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PUBLIC$" { - if ( $2 ~ "on" ) - printf("%s","publ=on"); - else - printf("%s","publ="); -}' $HIDINGFMT` - -VPROT=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PROTECTED$" { - if ( $2 ~ "on" ) - printf("%s","prot=on"); - else - printf("%s","prot="); -}' $HIDINGFMT` - -VPRIV=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PRIVATE$" { - if ( $2 ~ "on" ) - printf("%s","priv=on"); - else - printf("%s","priv="); -}' $HIDINGFMT` - -echo " $VPUBL $VPROT $VPRIV $VCSA " - - - -if test ! -z "$ADTS" -then - for ADT in $ADTS - do - echo "$ADT" - - $AWK -f $INFO2MAN \ - $VARG $VPUBL $VARG $VPROT $VARG $VPRIV $VARG $VCSA \ - $VARG pass=0 $VARG device=troff $VARG infile=$1 \ - $VARG class=$ADT $MANFMT $MANFMT > $ADT.$EXT - done -fi diff --git a/bin/info2mml b/bin/info2mml deleted file mode 100755 index d38ac0f814a..00000000000 --- a/bin/info2mml +++ /dev/null @@ -1,166 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Front end to awk script for generating Frame mml from classinfo -# files. -# -# = AUTHOR(S) -# Graham Dumpleton -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT/$OSE_RELEASE_NAME -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/bin"} - -AWK="${AWK-gawk}" - -if test "$AWK" = "gawk" -then - VARG="-v" -fi - -EXT="mml" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` file.ci" -} - -# -# Check usage. -# -if test $# != "1" -o "'basename $1 .ci'" = "$1" -then - USAGE -fi - -# -# Check for awk file etc. -# -INFO2MAN=$LIBDIR/info2doc.awk -HIDINGFMT=$LIBDIR/hiding.fmt -MANFMT=$LIBDIR/info2doc.fmt - - -if test ! -f $HIDINGFMT -then - ERROR "Can't find $HIDINGFMT" -fi - -if test ! -f $INFO2MAN -then - ERROR "Can't find $INFO2MAN" -fi - -if test ! -f $MANFMT -then - ERROR "Can't find $MANFMT" -fi - -ADTS=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^(CLASS|STRUCT|UNION)$" && $2 !~ "(::|<)" { - printf( "%s\n", $2 ) -} -$1 ~ "^TEMPLATE$" && $3 !~ "::" { - printf( "%s\n", $3 ) -}' $1` - - -VCSA=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^CSAHEADER$" { - if ( $2 ~ "on" ) - printf("%s","csaprintheader=off"); - else - printf("%s","csaprintheader=off"); -}' $HIDINGFMT` - -VPUBL=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PUBLIC$" { - if ( $2 ~ "on" ) - printf("%s","publ=on"); - else - printf("%s","publ="); -}' $HIDINGFMT` - -VPROT=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PROTECTED$" { - if ( $2 ~ "on" ) - printf("%s","prot=on"); - else - printf("%s","prot="); -}' $HIDINGFMT` - -VPRIV=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PRIVATE$" { - if ( $2 ~ "on" ) - printf("%s","priv=on"); - else - printf("%s","priv="); -}' $HIDINGFMT` - -echo " $VPUBL $VPROT $VPRIV $VCSA " - - - -if test ! -z "$ADTS" -then - for ADT in $ADTS - do - echo "$ADT" - - $AWK -f $INFO2MAN \ - $VARG $VPUBL $VARG $VPROT $VARG $VPRIV $VARG $VCSA \ - $VARG pass=0 $VARG device=mml $VARG infile=$1 \ - $VARG class=$ADT $MANFMT $MANFMT > $ADT.$EXT - done -fi diff --git a/bin/info2src b/bin/info2src deleted file mode 100755 index c165b336341..00000000000 --- a/bin/info2src +++ /dev/null @@ -1,133 +0,0 @@ -#! /bin/sh -# ============================================================================= -# -# = DESCRIPTION -# Script to combine class2info and info2src. -# -# = AUTHOR(S) -# Graham Dumpleton -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# -# ============================================================================= - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT/$OSE_RELEASE_NAME -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/bin"} - -AWK="gawk" - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` file.ci" -} - -if test $# != "1" -o "'basename $1 .ci'" = "$1" -then - USAGE -fi - -# -# Check for awk file. -# -INFO2SRC=$BINDIR/info2src.awk -HIDINGFMT=$LIBDIR/hiding.fmt - -file=`basename $1` -base="`echo $file | sed -e 's/\..*$//'`" - -if test ! -f $INFO2SRC -then - ERROR "Can't find $INFO2SRC" -fi - -if test ! -f $HIDINGFMT -then - ERROR "Can't find $HIDINGFMT" -fi - - -VCSA=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^CSAHEADER$" { - if ( $2 ~ "on" ) - printf("%s","csaprintheader=on"); - else - printf("%s","csaprintheader="); -}' $HIDINGFMT` - -VPUBL=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PUBLIC$" { - if ( $2 ~ "on" ) - printf("%s","publ=on"); - else - printf("%s","publ="); -}' $HIDINGFMT` - -VPROT=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PROTECTED$" { - if ( $2 ~ "on" ) - printf("%s","prot=on"); - else - printf("%s","prot="); -}' $HIDINGFMT` - -VPRIV=`$AWK ' -BEGIN { - FS="\n"; RS="" -} -$1 ~ "^PRIVATE$" { - if ( $2 ~ "on" ) - printf("%s","priv=on"); - else - printf("%s","priv="); -}' $HIDINGFMT` - -echo " $VPUBL $VPROT $VPRIV $VCSA " - - -# $VARG publ=on $VARG prot=on $VARG priv=on \ -echo "making $base.cxx file ..." -$AWK -f $INFO2SRC \ - $VARG $VPUBL $VARG $VPROT $VARG $VPRIV $VARG $VCSA \ - $VARG infile=$1 $VARG classext= $VARG mode=multiple \ - $1 > $base.cxx -echo "$base.cxx file done!" diff --git a/bin/info2src.awk b/bin/info2src.awk deleted file mode 100755 index 1a8b19ae964..00000000000 --- a/bin/info2src.awk +++ /dev/null @@ -1,630 +0,0 @@ -# ============================================================================= -# -# = DESCRIPTION -# Awk script to convert classinfo description file to src stubs. -# -# = AUTHOR(S) -# Graham Dumpleton -# K. Dorn -# -# = COPYRIGHT -# Copyright 1991 OTC LIMITED -# -# ============================================================================= - -BEGIN { -# separator = "/* ------------------------------"\ -# "------------------------------------------- */" - separator = "" - csa_method_trailer=sprintf("\n/*] END Method */\n\n") - FS="\n"; RS="" - firsttime = "first" - templ="" - blank=" " - classfunc = "" - rettyp = "" - classname="" - classtitle="" - filedate="" - filename="" - filename1="" - author="" - classdescription="" - methoddescription="" - -# csaprintheader=1 - -# accpubl = "off" -# accprot = "off" -# accpriv = "off" -} -# -# variable von awk sind nicht in begin zuweisbar! -# -{ - accmergecxxhxx = merge - accloop = loop - accpubl = publ - accprot = prot - accpriv = priv -#printf("\nmerge=%s loop=%s csaprintheader=%s firsttime=%s\n",merge,loop,csaprintheader,firsttime); -} - -function csa_print_compilation_header_alt() -{ - if ( length( firsttime ) > 3 ) - { - - csa_compilation_header=sprintf("\n/*[ Compilation unit "\ - "----------------------------------------------------------\n"\ - "\n"\ - " Component : CSA - OSC\n"\ - "\n"\ - " Name : %s.[Ci]\n"\ - "\n"\ - " Author : %s\n"\ - "\n"\ - " Language : C++\n"\ - "\n"\ - " Creation Date : %s\n"\ - "\n"\ - " Test State : %%Q%%\n"\ - "\n"\ - " Description : %s\n"\ - "\n"\ - "\n"\ - " Copyright (C) Siemens AG 1995 All Rights Reserved\n"\ - "\n"\ - "--------------------------------------"\ - "---------------------------------------*/\n"\ - "/*] END */\n"\ - "#pragma ident \"%%Z%% %%M%% %%I%% (%%G%%), %%Y%% %%Q%%:"\ - " implementation file for class \n"\ - "%s\"\n"\ - "\n"\ - "#undef __STDC__\n"\ - "#undef __GNUG__\n"\ - "\n",filename1,author,filedate,classdescription,names[$2]); - printf("%s",csa_compilation_header); - firsttime = "" - } -} - -function csa_print_compilation_header() -{ - if ((csaprintheader == "on" && merge != "on") || (merge == "on" && loop == "1")) - { - if ( length( firsttime ) > 3 ) - { - FS=" "; RS="\n" - read_fvmecxx_file() - read_fvcocxx_file() - FS="\n"; RS="" - - #csa_compilation_header=sprintf(vcocxx,filename1,author,filedate,classdescription,names[$2]); -csa_compilation_header=sprintf(vcocxx,filename1,author,filedate,classdescription,classname); - printf("%s",csa_compilation_header); - firsttime = "" - } - } - else if (csaprintheader == "on" && merge == "on" && loop != "1" && length( firsttime ) > 3) - { - FS=" "; RS="\n" - read_fvmecxx_file() - read_fvcocxx_file() - FS="\n"; RS="" - firsttime = "" - } -} - -function csa_print_method_header_alt() -{ - prrettyp = "" - if (rettyp != "") - prrettyp=sprintf("type = %s",rettyp); - else - prrettyp=sprintf("-"); - - csa_method_header=sprintf("\n/*[ Method ---------------------"\ - "-------------------------------------------\n"\ - "\n"\ - " Name : %s\n"\ - "\n"\ - " Description : %s\n"\ - "\n"\ - " Return : %s\n"\ - "\n"\ - "--------------------------------------------"\ - "------------------------------*/\n\n",classfunc,methoddescription,prrettyp) - printf("%s",csa_method_header); -} - -function csa_print_method_header() -{ - if (csaprintheader == "on") - { - prrettyp = "" - if (rettyp != "") - prrettyp=sprintf("type = %s",rettyp); - else - prrettyp=sprintf("-"); - - csa_method_header=sprintf(vmecxx,classfunc,methoddescription,prrettyp) - printf("%s",csa_method_header); - } -} - -function csa_print_method_trailer() -{ - if (csaprintheader == "on") - { - csa_method_trailer=sprintf("/*] END Method */\n") - printf("\n%s\n",csa_method_trailer); - } -} - -function csa_get_method_description() -{ - n = split( $0, line, "\n" ) - methoddescription="" - for ( i=5; i<=n; i++ ) - { - len = length(line[i]) - comm = substr(line[i],4,len) - methoddescription = methoddescription comm "\n " - } -} - - -function read_fvmecxx_file() -{ - vmecxx1 = "\n" - while ( getline < fvmecxx > 0 ) - vmecxx1 = vmecxx1 $0 "\n" - vmecxx = vmecxx1 -} - -function read_fvcocxx_file() -{ - vcocxx1 = "\n" - while ( getline < fvcocxx > 0 ) - vcocxx1 = vcocxx1 $0 "\n" - vcocxx = vcocxx1 -} - - -# -# hier laueft er durch mit allen zeilen -# - -$1 ~ /CLASS2INFO/ { - filedate=$2 - filename=$3 - len=length($3) - filename1=substr($3,1,(len-2)) -} - -$1 ~ /INFO/ && $2 ~ /GLOBAL/ && $3 ~ /LIBRARY/ { - library=$4 - len=length(library) - library=substr(library,4,len) - if ( merge != "on") - printf( "#include <%s/%s>\n", library, filename ) - else - if ( loop == "1") - printf( "#include <%s/%s>\n", library, filename ) -} - -$1 ~ /INFO/ && $2 ~ /GLOBAL/ && $3 ~ /AUTHOR/ { - l=length($4) - author=substr($4,4,l) -} - -$1 ~ /INFO/ && $2 ~ /HDR/ && $3 ~ /TITLE/ { - classname=$4 - classtitle=$5 -} - -$1 ~ /INFO/ && $2 ~ /HDR/ && $3 ~ /DESCRIPTION/ { - n = split( $0, line, "\n" ) - classdescription="" - for ( i=5; i<=n; i++ ) - { - len = length(line[i]) - comm = substr(line[i],4,len) - classdescription = classdescription comm "\n " - } -# if (csaprintheader == "on") -# csa_print_compilation_header() -} - -$1 ~ /INCLUDE/ { - if ( merge != "on") - printf( "#include %s\n", $2) -# else -# if ( loop == "1") -# printf( "#include %s\n", $2) -} - -# -# neu mit nested classes -# -$1 ~ /(CLASS|STRUCT|UNION)/ { - nestedclass = "" - nested = "" - templnested = "" - containerclass = "" - if ( $2 ~ "(::|<)" ) - { - len = length($2) - match( $2, "(::|<).*$") - newclass = substr( $2,RSTART+2,RLENGTH) - thisclass = substr( $2,1,RSTART-1) - if (thisclass == classext) - { - nestedclass = newclass - nested = "on" - containerclass = thisclass - class = newclass $3 # 23.10.95 - } - else - nestedclass = "" - } - else - { - names[$2] = $2 - } -} - -# -# neu mit nested classes -# -$1 ~ /TEMPLATE/ { - templnestedclass = "" - nested = "" - templnested = "" - if ( $2 ~ /(class|union|struct)/ && $3 ~ "(::|<)" ) - { - len = length($3) - match( $3, "(::|<).*$") - templnewclass = substr( $3,RSTART+2,RLENGTH) - templthisclass = substr( $3,1,RSTART-1) - if (templthisclass == classext) - { - templnestedclass = templnewclass - nestedtempl = $4 -#printf("\n------nestedtempl=%s----\n",nestedtempl); - class = templnewclass $4 - nestedtemplclass = templnewclass $4 - nested = "on" - templnested = "on" - containerclass = templthisclass - } - else - templnestedclass = "" - } - else - { - class = $3 $4 - templclass = $3 $4 - args[$3] = $4 - templ=$4 - # This needs extra work. - # - # macht aus: <class hans,class otto> folgendes: - # <hans,otto> - - sub( "<[\t ]*(class)[\t ]+", "<", class ) - sub( ",[\t ]*(class)[\t ]+", ",", class ) - - names[$3] = class - } -} - -# -# neu nested classes, achtung: nur level1 moeglich, da keine rekursion! -# -$1 ~ /END/ && $2 == class{ - nested= "" - templnested= "" -} - -# -# alt ohne nested classes -# -#$1 ~ /(CLASS|STRUCT|UNION)/ { -# names[$2] = $2 -#} - -# -# alt ohne nested classes -# -#$1 ~ /TEMPLATE/ { -# class = $3 $4 -# templclass = $3 $4 -# args[$3] = $4 -# templ=$4 -# # This needs extra work. -# -# macht aus: <class hans,class otto> folgendes: -# <hans,otto> -# -# sub( "<[\t ]*(class)[\t ]+", "<", class ) -# sub( ",[\t ]*(class)[\t ]+", ",", class ) - -# names[$3] = class -#} - - -$1 ~ /FUNC/ { - prototype = $4 - class = $2 - hiding = $3 - if ( (((hiding == "private") && (accpriv == "on") ) || ((hiding == "public") && (accpubl == "on") ) || ((hiding == "protected") && (accprot == "on") )) && ((mode != "single") || ((mode == "single") && ((classext == class) || (class == nestedclass) || (class == templnestedclass))) )) - { -# printf("\nclassext=%s\n",classext); -# printf("\nclass =%s\n",class); -# printf("\nhiding=%s\n",hiding); - csa_print_compilation_header() - # Filter out inline functions. - flinline=0 - if ( prototype ~ /^[\t ]*inline[\t ]+/ ) - { - flinline=1 -#printf("\n######inline####\n"); -# next - sub( "^[\t ]*inline[\t ]+", "", prototype ) - } - # Filter out pure virtual functions: wenn prototype "= 0 ;" enthaelt! - flpurevirt=0 - if ( prototype ~ /[\t ]*=[\t ]*0[\t ]*;[\t ]*$/ ) - { - flpurevirt=1 - next - } - # Strip out unwanted bits "static oder virtual". - flstatic=0 - if ( prototype ~ /^[\t ]*static[\t ]+/ ) - { - flstatic=1 - } - flvirtual=0 - if ( prototype ~ /^[\t ]*virtual[\t ]+/ ) - { - flvirtual=1 - } - sub( "^[\t ]*(static|virtual)[\t ]+", "", prototype ) -# suchstring ersetzen src/zielstring - # Strip out unwanted bits "; - # blank und tab" am ende der methode. - sub( ";[\t ]*$", "", prototype ) - # Strip out unwanted bits : 1. default werte der methode aus class def und comma. -# gsub( "[\t ]*\\(=[^(=][^,=]*,", ",", prototype ) -# gsub( "[\t ]*\\(=[^(=][^,=]*\\)", ")", prototype ) - -#neu - if ( prototype !~ /[\t \&\*]*operator[^a-zA-Z0-9]+/ ) - { -#neu - # Strip out unwanted bits : 1. default werte der methode aus class def und comma, aber nicht bei - # operator funs , wegen deren "=" ! - gsub( "[\t ]*=[^(=][^,=]*,", ",", prototype ) - gsub( "[\t ]*=[^(=][^,=]*\\)", ")", prototype ) -#neu - } -#neu - -#printf("\nprototype=|%s|\n",prototype); - - # Put in class name. - floperator=0 - if ( prototype ~ /[\t \&\*]*operator[^a-zA-Z0-9]+/ ) - { - # - # operator funcs - # - floperator=1 -#printf("\noperatorfunc|%s|\n",prototype); - match( prototype, "[^\t \&\*]*operator" ) - typoper = substr( prototype, 1,RSTART-1) -#printf("\ntypoper=|%s|\n",typoper); - wholelen=length(prototype) - restoper = substr( prototype, RSTART, wholelen) -#printf("\nrestoper=|%s|\n",restoper); - len=length(restoper) - restoper1 = substr( restoper, 9, len ) - match( restoper1, "[^\t ].*$" ) # trimstring fuer anf des feldes - restoper2 = substr( restoper1, RSTART, RLENGTH ) -#printf("\nrestoper2=|%s|\n",restoper2); - len=length(restoper2) # pvar++ - restoper3 = substr( restoper2,2, len ) -#printf("\nrestoper3=|%s|\n",restoper3); - match( restoper3, "\\(.*$" ) # gebe naechsten string der - # mit ( anfaengt bis zum ende - decl = substr( restoper3, RSTART, RLENGTH ) -#printf("\nparas=|%s| s=%d l=%d\n",decl,RSTART,RLENGTH); - parstart=index(restoper,decl) - restoperfun=substr(restoper,1,parstart-1) -#printf("\nrestoperfun=|%s|\n",restoperfun); - -#neu - # Strip out unwanted bits : 1. default werte der methode aus class def und comma. - gsub( "[\t ]*=[^(=][^,=]*,", ",", decl ) - gsub( "[\t ]*=[^(=][^,=]*\\)", ")", decl ) - restoper=restoperfun decl -#printf("\nneu restoper=|%s|\n",restoper); -#neu - - -if (nested == "on" ) - prototype=typoper containerclass "::" class "::" restoper -else - prototype=typoper class "::" restoper -#printf("\nprototype=|%s|\n",prototype); - -if (nested == "on" ) - classfunc = containerclass "::" class "::" restoperfun -else - classfunc = class "::" restoperfun -#printf("\nclassfunc=|%s|\n",classfunc); - rettyp = typoper -#printf("\nrettyp=|%s|\n",rettyp); - funcname = classfunc -#printf("\n7|%s|\n",funcname); - } - else - { - # - # other functions - # - match( prototype, "[^\t ]*\\(.*$" ) - decl = substr( prototype, RSTART, RLENGTH ) - -#-----neu start, damit 0-n blanks zwischen "func-name" und "(" stehen koennen! - match( decl, "\\(.*$" ) - decl = substr( decl, RSTART, RLENGTH ) - parstart=index(prototype,decl) - typfuncn=substr(prototype,1,parstart-1) - sub( "[\t ]*$", "", typfuncn ) - prototype = "" - prototype = typfuncn " " decl -#printf("\nprototypeneu=|%s|\n",prototype); -#printf("\ntypfuncnneu=|%s|\n",typfuncn); -#printf("\ndeclneu=|%s|\n",decl); - - - match( prototype, "[^\t ]*\\(.*$" ) - decl = substr( prototype, RSTART, RLENGTH ) -#-----neu end - -#printf("\ndecl=|%s|\n",decl); - parstart=index(prototype,decl) - typfuncn=substr(prototype,1,parstart-1) - - nitems=split(typfuncn,typfuncitems,"[\t \&\*]") - sub( "[\t ]*$", "", typfuncn ) - funcn = typfuncitems[nitems-1] - funstart=index(typfuncn,funcn) - typ=substr(typfuncn,1,funstart-1) -#printf("\ntypfuncn=|%s|\n",typfuncn); -#printf("\nfuncn=|%s|\n",funcn); -#printf("\ntyp=|%s|\n",typ); -if (nested == "on" ) - sub( "^", typ containerclass "::" class "::" funcn, decl ) -else - sub( "^", typ class "::" funcn, decl ) - prototype=decl -#printf("\nprototype=|%s|\n",prototype); - classfunc = "" -if (nested == "on" ) - sub( "^", containerclass "::" class "::" funcn, classfunc ) -else - sub( "^", class "::" funcn, classfunc ) -#printf("\nclassfunc=|%s|\n",classfunc); - rettyp = "" - sub( "^", typ, rettyp ) -#printf("\nrettyp=|%s|\n",rettyp); -#printf("\n6|%s|\n",prototype); - match( prototype, "^[^(]*\\(" ) - funcname = substr( prototype, RSTART, RLENGTH ) -#printf("\n7|%s|\n",funcname); - } - - # Output it. - - if (firsttime == "") - { - csa_get_method_description() -# if (csaprintheader == "on") - csa_print_method_header() - - if ( length(prototype) > 75 ) - { - match( prototype, "^[^(]*\\(" ) - funcname = substr( prototype, RSTART, RLENGTH ) - if ( prototype ~ "^[^(]*\\(\\)[\t ]*\\(" ) - { - funcname = funcname ")(" - sub( "^[^(]*\\(\\)[\t ]*\\(", "", prototype ) - } - else - sub( "^[^(]*\\(", "", prototype ) - - if ( templclass ~ "<" && templnested == "" && nested == "") - { - printf( "template%s\n", templ) - } - if ( templnested == "on") - { - printf( "template%s\n", nestedtempl ) - } - printf( "%s\n", funcname ) - - match( prototype, "\\)([\t ]*const)?[\t ]*$" ) - functail = substr( prototype, RSTART, RLENGTH ) - sub( "\\)([\t ]* const)?[\t ]*$", "", prototype ) - narg = 0 - while ( match( prototype, "[^<>,#]*<[^<>]*>" ) ) - { - narg++ - arg = substr( prototype, RSTART, RLENGTH ) - sub( "[^<>,#]*<[^<>]*>", "#" narg, prototype ) - fargs["#" narg] = arg - # Need the following to stop resubstitution of the pattern matched - # back into the string. - gsub( "&", "\\\\&", fargs["#" narg] ) - } - numargs = split( prototype, args, "," ) - for ( m=1; m<=numargs; m++ ) - { - while ( match( args[m], "#[0-9]+" ) ) - { - arg = substr( args[m], RSTART, RLENGTH ) - sub( arg, fargs[arg], args[m] ) - } - sub( "[\t ]*", "", args[m] ) - printf( " %s", args[m] ) - if ( m == numargs ) - { - print( "" ) - } - else - print( "," ) - } - if (flinline == 1) - printf("/* inline */\n"); -# printf( "%s\n%s{\n}\n\n%s\n", functail,csa_method_trailer, separator ) - printf( "%s\n", functail) -# csa_print_method_trailer() -# printf( "{\n}\n\n%s\n", separator ) - } - else - { - if (flinline == 1) - printf("/* inline */\n"); - - if ( templclass ~ "<" && templnested == "" && nested == "") - { - printf( "template%s\n", templ ) - } - if ( templnested == "on") - { - printf( "template%s\n", nestedtempl ) - } -# printf( "%s\n%s{\n}\n\n%s\n", prototype,csa_method_trailer, separator ) - printf( "%s\n", prototype) -# csa_print_method_trailer() -# printf( "{\n}\n\n%s\n", separator ) - } - csa_print_method_trailer() - if (rettyp != "" && rettyp != "void " && rettyp != "void") - printf( "{\n\treturn((%s)0);\n}\n\n%s\n",rettyp, separator ) - else - printf( "{\n}\n\n%s\n", separator ) - - } - # end of firsttime - } - # end of if -} -#end of FUNC diff --git a/bin/libsize.pl b/bin/libsize.pl deleted file mode 100755 index 3fd3a468b10..00000000000 --- a/bin/libsize.pl +++ /dev/null @@ -1,192 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -# Provides size breakdown of ACE, TAO, or orbsvcs libs. -# -# Assumes (or builds) the lib with debug=0. Allows other make args, -# such as -j 4, to be passed on the command line. - -$usage = - "$0 [-h, for html output] [-s, for shared libs] [-v] [make arguments]\n"; - -#### -#### Configuration parameters. -#### -$build_args = - 'debug=0 optimize=1 static_libs_only=1 DEFFLAGS=-DACE_USE_RCSID=0'; -$ACE_COMPONENTS = - 'OS Utils Logging Threads Demux Connection Sockets IPC Svcconf ' . - 'Streams Memory Token Other'; -$TAO_COMPONENTS = - 'POA Pluggable_Protocols Default_Resources Interpretive_Marshaling ' . - 'IDL_Compiler ORB_Core Dynamic_Any'; -$ORBSVCS_COMPONENTS = - 'Naming ImplRepo Time Concurrency Property Trader LifeCycle Sched ' . - 'Event CosEvent Event2 AV'; - - -#### The following are only used for VxWorks libraries, and -#### only if the corresponding environment variable isn't set. -$default_toolenv = '386'; -$default_wind_base = '/project/doc/pkg/wind'; -$default_host_type = 'sun4-solaris2'; - -#### Use gmake if it's on the user's PATH, otherwise use make. Use -#### sh -c to avoid warning if gmake isn't found. -$make = - system ("sh -c \"gmake --version\" > /dev/null 2>&1") ? 'make' : 'gmake'; - -$ACE_ROOT = $ENV{'ACE_ROOT'} || - die "$0: ACE_ROOT was not set!\n"; - - -$html = $verbose = 0; -$lib_extension = 'a'; - -#### -#### Process command line args. -#### -while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) { - if ($ARGV[0] eq '-h') { - $html = 1; - chop ($sysname = `uname -s`); - chop ($sysrev = `uname -r`); - shift; - } elsif ($ARGV[0] eq '-s') { - $lib_extension = 'so'; - $build_args =~ s/ static_libs_only=1//; - shift; - } elsif ($ARGV[0] eq '-v') { - $verbose = 1; - shift; - } elsif ($ARGV[0] eq '-?') { - print "$usage"; - exit; - } else { - #### Pass remaining args to make. - } -} - -$make_args = join (' ', @ARGV) . $build_args; - -chop ($pwd = `pwd`); - -if ($pwd =~ m%/ace$%) { - #### libACE - $COMPONENTS = "$ACE_COMPONENTS"; - $LIB_COMPONENTS = 'ACE_COMPONENTS'; - $libname = 'ACE'; -} elsif ($pwd =~ m%/tao$%) { - $COMPONENTS = "$TAO_COMPONENTS"; - $LIB_COMPONENTS = 'TAO_COMPONENTS'; - $libname = 'TAO'; -} elsif ($pwd =~ m%/orbsvcs/orbsvcs$%) { - $COMPONENTS = "$ORBSVCS_COMPONENTS"; - $LIB_COMPONENTS = 'TAO_ORBSVCS'; - $libname = 'orbsvcs'; -} else { - die "$0: unsupported directory; $pwd\n"; -} - -$lib = "lib${libname}.$lib_extension"; - - -#### -#### Select the size command based on ACE_ROOT setting. -#### -if ($ACE_ROOT =~ /vxworks/) { - $TOOLENV = $ENV{'TOOLENV'} || $default_toolenv; - $WIND_BASE = $ENV{'WIND_BASE'} || $default_wind_base; - $WIND_HOST_TYPE = $ENV{'WIND_HOST_TYPE'} || $default_host_type; - $size = "$WIND_BASE/host/$WIND_HOST_TYPE/bin/size$TOOLENV"; -} elsif ($ACE_ROOT =~ /lynx-ppc/) { - $size = '/usr/lynx/3.0.0/ppc/cdk/sunos-xcoff-ppc/bin/size'; -} elsif ($ACE_ROOT =~ /lynx/) { - $size = '/usr/lynx/3.0.0/x86/cdk/sunos-coff-x86/bin/size'; -} elsif ($ACE_ROOT =~ /chorus/) { - $size = '/project/doc/mvme/green68k/gnu/bin/size'; -} else { - $size = 'size'; -} - - -#### -#### Measure the size of the entire library. -#### -$sizeTotal = build_lib ("$LIB_COMPONENTS=\"$COMPONENTS\""); -$components = " <th>Platform\n <th>Component\n <th>Total"; -$componentSize = " <th>Size, bytes\n <td align=center>$sizeTotal"; -$componentPercentage = - " <th>Percentage of<br>total size\n <td align=center>100"; -print "Total $sizeTotal (100)\n" unless $html; - - -#### -#### Measure the size of each library component. -#### -foreach my $i (split (' ', $COMPONENTS)) { - $sizeLib = build_lib ("$LIB_COMPONENTS=\"$i\""); - $components .= "\n <th>$i"; - $componentSize .= "\n <td align=center>$sizeLib"; - $thisPercentage = percentage ($sizeLib, $sizeTotal); - $componentPercentage .= "\n <td align=center>$thisPercentage"; - print "$i $sizeLib ($thisPercentage)\n" unless $html; -} - -#### -#### Produce HTML output, if requested. -#### -if ($html) { - print '<center><table cellpadding=4 border=4>' . "\n"; - print ' <tr>' . "\n"; - print "$echoArgs $components\n"; - print ' <tr>' . "\n"; - print " <th rowspan=2>$sysname $sysrev $ACE_ROOT\n"; - print "$echoArgs $componentSize\n"; - print ' <tr>' . "\n"; - print "$echoArgs $componentPercentage\n"; - print '</table></center><p>' . "\n"; -} - - -#### -#### Build library with componnents specified in argument. -#### -sub build_lib () -{ - my ($lib_components) = @_; - - unlink "$lib"; - - print "$make $make_args $lib_components\n" if $verbose; - - system ("$make $make_args $lib_components >> make.log 2>&1") && - die "$0: command failed; $make $make_args $lib_components\n"; - - my $libSize = 0; - - open (SIZE, "$size $lib |") || - die "$0: unable to open $size\n"; - while (<SIZE>) { - my (@field) = split; - $libSize += $field[3] if $field[3] =~ /\d/; #### Skip size header line. - } - close (SIZE); - - $libSize; -} - - -#### -#### Return percentage of first argument as fraction of second. -#### Returns a string with two-decimal place precision. -#### -sub percentage () -{ - my ($size, $total) = @_; - - sprintf ("%.2f", $size * 100 / $total); -} diff --git a/bin/make_release b/bin/make_release deleted file mode 100755 index cecab1730ed..00000000000 --- a/bin/make_release +++ /dev/null @@ -1,487 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' - & eval 'exec perl -w -S $0 $argv:q' - if 0; - -# $Id$ -# -# Creates an ACE or TAO kit. Intended to be called from the -# ACE or TAO top-level Makefiles. -# -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -$usage="usage: $0 [-?] [-k <kit>] [-n] [-t <type>] " . - "[-c <controlled files>] [-r <release files>] " . - "[-l <release lib files] [-u]\n"; -$long_usage=" -? option prints this message\n" . - " -k <kit>, where <kit> is ace, tao, or ace+tao\n" . - " -n option prints what would be done, but doesn't do it\n" . - " -t <type>, where <type> is major, minor, or beta (default)\n" . - " -c <controlled files> lists the CVS-controlled files\n" . - " -r <release files> lists the files to be released\n" . - " -l <release lib files> list the files to put in the lib kit\n" . - " -u to update versions\n"; - -######## -######## Configuration parameters. -######## -if (-d '/pkg/gnu/bin') { - $gnu = '/pkg/gnu/bin/'; - #### Insert it at head of PATH, so that cvs diff uses GNU diff. - $ENV{'PATH'} = "/pkg/gnu/bin:" . $ENV{'PATH'}; -} else { - #### The default utilities had better be GNU. - $gnu = ''; -} - -$exec_prefix = $exec_suffix = ''; -$kit = ''; -$release_type = 'beta'; -$controlled_files = ''; -$release_files = ''; -$release_filter = '\\( -name CVS -o -name build \\) -prune -o ' . - '! -name \'.\#*\' ! -name \'\#*\' ! -name \'*~\' ' . - '! -name \'*.MAK\' -print'; -$update_versions = 0; - - -######## -######## Process command line args. -######## -while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) { - if ($ARGV[0] eq '-k') { - if ($ARGV[1] =~ /^[^-]+/ && - ($ARGV[1] eq 'ace' || $ARGV[1] eq 'tao' || $ARGV[1] eq 'ace+tao')) { - $kit = $ARGV[1]; shift; - } else { - print STDERR "$0: must provide argument for -k option\n"; - die "$usage$long_usage"; - } - } elsif ($ARGV[0] eq '-n') { - $exec_prefix = 'echo \''; - $exec_suffix = '\''; - } elsif ($ARGV[0] eq '-t') { - if ($ARGV[1] =~ /^[^-]+/ && - ($ARGV[1] eq 'major' || $ARGV[1] eq 'minor' || - $ARGV[1] eq 'beta')) { - $release_type = $ARGV[1]; shift; - } else { - print STDERR "$0: must provide argument for -t option\n"; - die "$usage$long_usage"; - } - } elsif ($ARGV[0] eq '-c') { - if ($ARGV[1] =~ /^[^-]+/) { - $controlled_files = $ARGV[1]; shift; - } else { - print STDERR "$0: must provide argument for -c option\n"; - die "$usage$long_usage"; - } - } elsif ($ARGV[0] eq '-r') { - if ($ARGV[1] =~ /^[^-]+/) { - $release_files = $ARGV[1]; shift; - } else { - print STDERR "$0: must provide argument for -r option\n"; - die "$usage$long_usage"; - } - } elsif ($ARGV[0] eq '-l') { - if ($ARGV[1] =~ /^[^-]+/) { - $release_lib_files = $ARGV[1]; shift; - } else { - print STDERR "$0: must provide argument for -l option\n"; - die "$usage$long_usage"; - } - } elsif ($ARGV[0] eq '-u') { - $update_versions = 1; - } elsif ($ARGV[0] eq '-?') { - print "$usage$long_usage"; - exit; - } else { - print STDERR "$0: unknown option $ARGV[0]\n"; - die "$usage$long_usage"; - } - shift; -} - -die "must specify a -k option\n" unless "$kit"; -if ($kit eq 'ace') { - $KIT = 'ACE'; -} elsif ($kit eq 'tao') { - $KIT = 'TAO'; -} else { - #### Creating combined ACE+TAO kit. Don't use $KIT. -}; - -$chmod = '/bin/chmod'; -$cpio = "${gnu}cpio"; -$cvs = "${exec_prefix}${gnu}cvs"; -$date = "${gnu}date"; -$egrep = "${gnu}egrep"; -$find = "${gnu}find"; -$gzip = "${gnu}gzip"; -$mv = '/bin/mv'; -chop ($now = `$date +"%a %b %d %T %Y"`); - - -######## -######## Setup signal handlers. -######## -$status = 1; #### Must get set to 0 explicitly to indicate success. -$SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup'; - - -######## -######## Defend against fascist umasks. -######## -umask 022; - - -######## -######## Main execution thread. -######## -if ($update_versions && "$kit" ne 'ace+tao') { - $major_version = $minor_version = $beta_version = 0; - $previous_version = $version = ''; - - $status = - &check_workspace () || - &get_versions () || - &update_version_files () || - &update_changelog () || - &tag () || - &diff () || - &create_kit (); -} else { - $status = &create_kit (); -} -&cleanup; - - -######## -######## Clean up when done or on signal. -######## -sub cleanup { - exit $status; -} - - -######## -######## Check that the workspace is up-to-date, if releasing from -######## the official release directory. -######## -sub check_workspace () { - my $module; - - if ($kit =~ /^ace/) { - chdir '..' || die "$0: unable to chdir ..\n"; - $module = 'ACE_wrappers'; - } elsif ($kit =~ /tao/) { - chdir '../..' || die "$0: unable to chdir ../..\n"; - $module = 'ACE_wrappers/TAO'; - } - - my @out_of_date = (); - open (CVS, "$cvs -nq checkout -P $module 2>&1 |") || - die "$0: unable to open $cvs\n"; - while (<CVS>) { - next if m%^U %; #### Allow others to update the repository. - next if m%^cvs checkout: New directory `.*' -- ignored$%; #### empty dirs. - - push (@out_of_date, $_) if "$_"; - } - close CVS; - - if ($kit =~ /^ace/) { - chdir 'ACE_wrappers' || die "$0: unable to chdir ACE_wrappers\n"; - } elsif ($kit =~ /tao/) { - chdir 'ACE_wrappers/TAO' || die "$0: unable to chdir ACE_wrappers/TAO\n"; - } - - if (! "$exec_prefix" && @out_of_date) { - warn "ERROR: workspace must be updated (with cvs -q up -d) or " . - "cleaned:\n " . - join ("\n ", @out_of_date) . "\n"; - return 1; - } - - 0; -} - - -######## -######## Retrieve version information from VERSION file(s). -######## -sub get_versions () { - open (VERSION, '< VERSION') || - die "$0: unable to open VERSION\n"; - while (<VERSION>) { - if (/$KIT version (\d+)\.(\d+)\.(\d+)/o) { - $major_version = $1; - $minor_version = $2; - $beta_version = $3; - last; - } elsif (/$KIT version (\d+)\.(\d+)[^\.]/o) { - #### Previous release was a minor. - $major_version = $1; - $minor_version = $2; - last; - } elsif (/$KIT version (\d+)[^\.]/o) { - #### Previous release was a major. - $major_version = $1; - last; - } - } - close VERSION; - - if ($release_type eq 'beta') { - if ($beta_version > 0) { - $previous_version = "$major_version.$minor_version.$beta_version"; - } else { - $previous_version = "$major_version.$minor_version"; - } - - ++$beta_version; - $version = "$major_version.$minor_version.$beta_version"; - } elsif ($release_type eq 'minor' ) { - $beta_version = 0; - ++$minor_version; - $version = "$major_version.$minor_version"; - } elsif ($release_type eq 'major' ) { - $minor_version = $beta_version = 0; - ++$major_version; - $version = "$major_version.$minor_version"; - } - - print "new $KIT version: $version\n"; - - if ($kit =~ /tao/) { - $ace_minor_version = $ace_beta_version = 0; - open (ACE_VERSION, '< ../VERSION') || - die "$0: unable to open ../VERSION\n"; - while (<ACE_VERSION>) { - if (/ACE version (\d+)\.(\d+)\.(\d+)/o) { - $ace_major_version = $1; - $ace_minor_version = $2; - $ace_beta_version = $3; - last; - } elsif (/ACE version (\d+)\.(\d+)[^\.]/o) { - #### ACE release was a minor. - $ace_major_version = $1; - $ace_minor_version = $2; - last; - } elsif (/ACE version (\d+)[^\.]/o) { - #### ACE release was a major. - $ace_major_version = $1; - last; - } - } - close ACE_VERSION; - - if ($ace_beta_version == 0) { - $ace_version = "$ace_major_version.$ace_minor_version"; - } else { - $ace_version = "$ace_major_version.$ace_minor_version.$ace_beta_version"; - } - } - - 0; -} - - -######## -######## Update VERSION file(s). -######## -sub update_version_files () { - system ("$exec_prefix" . - "perl -pi -e 's/$KIT version .*/$KIT version $version, released $now./' " . - "VERSION $exec_suffix"); - return 1 if $? >> 8; - - system ("$exec_prefix" . - "perl -pi -e 's/$KIT VERSION:.*/$KIT VERSION: $version/' " . - "PROBLEM-REPORT-FORM $exec_suffix"); - return 1 if $? >> 8; - - if (! "$exec_prefix" && $kit =~ /^tao/) { - system ("$exec_prefix" . - "perl -pi -e 's/ACE VERSION:.*/ACE VERSION: $ace_version/' " . - "PROBLEM-REPORT-FORM $exec_suffix"); - return 1 if $? >> 8; - - open (TAO_VERSION_H, "> tao/Version.h") || - die "$0: unable to open tao/Version.h\n"; - - print TAO_VERSION_H - "// \$Id\$\n" . - "// This is an automatically generated file.\n\n" . - "\#define TAO_MAJOR_VERSION ${major_version}\n" . - "\#define TAO_MINOR_VERSION ${minor_version}\n" . - "\#define TAO_BETA_VERSION ${beta_version}\n" . - "\#define TAO_VERSION \"${version}\"\n"; - - close TAO_VERSION_H; - } - - if (! "$exec_prefix" && $kit =~ /^ace/) { - open (ACE_VERSION_H, "> ace/Version.h") || - die "$0: unable to open ace/Version.h\n"; - - print ACE_VERSION_H - "// \$Id\$\n" . - "// This is an automatically generated file.\n\n" . - "\#define ACE_MAJOR_VERSION ${major_version}\n" . - "\#define ACE_MINOR_VERSION ${minor_version}\n" . - "\#define ACE_BETA_VERSION ${beta_version}\n" . - "\#define ACE_VERSION \"${version}\"\n"; - - close ACE_VERSION_H; - } - - 0; -} - - -######## -######## Add ChangeLog entries, and make sure that they have proper -######## permissions. -######## -sub update_changelog () { - my $logname = $ENV{'LOGNAME'}; - my $signature = $ENV{'SIGNATURE'} || $logname; - my $message = "$now $signature <$logname\\\@cs.wustl.edu>\n\n" . - " * $KIT version $version released.\n\n"; - my $message_insert = - "perl -pi -e 'BEGIN {\$message_printed = 0;} - if (! \$message_printed) { - print \"$message\"; - ++\$message_printed; }' ChangeLog"; - - if ("$exec_prefix") { - print "$message_insert\n"; - } else { - system ($message_insert); - } - - if ($kit =~ /^ace/) { - system ("$cvs commit -m'$version' " . - "VERSION PROBLEM-REPORT-FORM ChangeLog ace/Version.h " . - "&& chmod 0644 VERSION PROBLEM-REPORT-FORM ChangeLog " . - "ace/Version.h"); - } elsif ($kit =~ /tao/) { - system ("$cvs commit -m'$version' VERSION PROBLEM-REPORT-FORM ChangeLog " . - "tao/Version.h " . - "&& chmod 0644 VERSION PROBLEM-REPORT-FORM ChangeLog " . - "tao/Version.h"); - } - return 1 if $? >> 8; - - 0; -} - - -######## -######## Tag the release. -######## -sub tag () { - my $tag = "$KIT-$version"; - #### cvs tag does not allow dots. - $tag =~ tr/./_/; - - print "start tagging $tag\n"; - system ("$cvs -q tag $tag $controlled_files > /dev/null"); - return 1 if $? >> 8; - print "finished tagging $tag\n"; - - 0; -} - - -######## -######## If building a beta, create a diff from the previous version. -######## -sub diff () { - if ("$previous_version") { - #### Only create a diff for a beta version. - - my $previous_tag = "$KIT-$previous_version"; - my $tag = "$KIT-$version"; - my $diffs_dir = "$kit" eq 'ace' ? 'diffs' : '../diffs'; - - #### cvs tag does not allow dots. - $previous_tag =~ tr/./_/; - $tag =~ tr/./_/; - - my $module = "$kit" eq 'ace' ? 'ACE_wrappers' : 'ACE_wrappers/TAO'; - - if ("$exec_prefix") { - print "nice -15 $cvs -q rdiff -u -r $previous_tag -r $tag " . - "$module 2>/dev/null | " . - "nice -15 sed 's%ACE_wrappers-repository/%ACE_wrappers/%g' | " . - "nice -15 $gzip -9 > $diffs_dir/$previous_tag-$tag.diff.gz &"; - } else { - system ("sleep 60; " . - "nice -15 $cvs -q rdiff -u -r $previous_tag -r $tag " . - "$module 2>/dev/null | " . - "nice -15 sed 's%ACE_wrappers-repository/%ACE_wrappers/%g' | " . - "nice -15 $gzip -9 > $diffs_dir/$previous_tag-$tag.diff.gz &"); - } - } - - #### Ignore return value. No promises on diffs. - 0; -} - - -######## -######## Create the tar file(s) and move to their proper location. -######## -sub create_kit () { - if ("$exec_prefix") { - print "chdir '..'\n"; - } else { - chdir '..' || die "$0: unable to chdir ..\n"; - } - - # These files don't get LF->CRLF conversions done when making the zip. - $bin_files = - "\"\\.dsp|\\.dsw|\\.mak|\\.mdp|\\.ide|\\.exe\|\\.ico\|\\.gz\|\\.zip\|\\.gif\""; - - if ($kit eq 'ace') { - system ("$exec_prefix" . - "/bin/rm -f ACE.zip ACE-lib.zip; " . - "$find $release_files $release_filter | " . - "$egrep $bin_files | " . - "zip ACE.zip -q9@ &&" . - "$find $release_files $release_filter | " . - "$egrep -v $bin_files | " . - "zip ACE.zip -qlg9@ &&" . - "$find $release_lib_files $release_filter | " . - "$egrep $bin_files | " . - "zip ACE-lib.zip -q9@ &&" . - "$find $release_lib_files $release_filter | " . - "$egrep -v $bin_files | " . - "zip ACE-lib.zip -qlg9@ &&" . - "$find $release_files $release_filter | $cpio -o -H tar | " . - "$gzip -9 > ACE.tar.gz && " . - "$find $release_lib_files $release_filter | $cpio -o -H tar | " . - "$gzip -9 > ACE-lib.tar.gz && " . - "$chmod a+r ACE.tar.gz ACE-lib.tar.gz ACE.zip ACE-lib.zip && " . - "$mv ACE.zip ACE-lib.zip ACE_wrappers/ &&" . - "$mv ACE.tar.gz ACE-lib.tar.gz ACE_wrappers/ $exec_suffix"); - } elsif ($kit eq 'ace+tao') { - system ("$exec_prefix" . - "/bin/rm -f ACE+TAO.zip; " . - "$find $release_files $release_filter | " . - "$egrep $bin_files | " . - "zip ACE+TAO.zip -q9@ &&" . - "$find $release_files $release_filter | " . - "$egrep -v $bin_files | " . - "zip ACE+TAO.zip -qlg9@ &&" . - "$find $release_files $release_filter | $cpio -o -H tar | " . - "$gzip -9 > ACE+TAO.tar.gz && " . - "$chmod a+r ACE+TAO.tar.gz ACE+TAO.zip && " . - "$mv ACE+TAO.tar.gz ACE+TAO.zip ACE_wrappers/ $exec_suffix"); - } - - 0; -} diff --git a/bin/man2html b/bin/man2html deleted file mode 100755 index e2b51561270..00000000000 --- a/bin/man2html +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh - -OSE_HOST= - -OSE_RELEASE_NAME= -export OSE_RELEASE_NAME - -OSE_ROOT=${OSE_ROOT-$ACE_ROOT} -export OSE_ROOT - -OSE_VERSION_ROOT=$OSE_ROOT -export OSE_VERSION_ROOT - -BINDIR="$OSE_VERSION_ROOT/$OSE_HOST/bin" -LIBDIR=${CLASSINFOLIBDIR-"$OSE_VERSION_ROOT/bin"} - -# -# Error. -# -ERROR() -{ - echo "`basename $0`: $1" >&2 - shift - while test $# != "0" - do - echo $1 >&2 - shift - done - exit 1 -} - -# -# Usage message. -# -USAGE() -{ - ERROR "Usage: `basename $0` files" -} - -# -# Check usage. -# -if test "$#" = "0" -then - USAGE -fi - -while test "$#" != "0" -do - INPUT=$1 - BASENAME=`basename $INPUT | sed -e 's/\(.*\)\.[^.]*$/\1/'` - OUTPUT=${BASENAME}.html - - if test -f ${INPUT} - then - echo ${BASENAME} - cat ${INPUT} | - sed -e 's/\\-/-/g' \ - -e 's/\\ / /g' \ - -e 's/\\[0&]/ /g' \ - -e 's/&/\&/g' \ - -e 's/</\</g' \ - -e 's/>/\>/g' \ - -e 's/\\|//g' \ - -e 's/\\e/\\/g' | - gawk -f ${LIBDIR}/man2html1.awk | - sed -e 's^\\fB\([^\\]*\)\\fR^<B>\1</B></I>^g' \ - -e 's^\\f(CO\(.[^\\]*\)\\fR^<CODE>\1</CODE>^g' \ - -e 's^\\fI\(.[^\\]*\)\\fR^<I>\1</I></B>^g' \ - -e 's^\\fB^<B>^g' \ - -e 's^\\f(CO^<CODE>^g' \ - -e 's^\\fI^<I>^g' \ - -e 's^\\f[RP]^</B></I></CODE>^g' \ - -e 's/^.[LP]P/<P>/' \ - -e 's/^.br/<BR>/' \ - -e 's/^\.DS.*/<pre>/' \ - -e 's$^\.DE.*$</pre>$' \ - -e 's/^\.nf */<pre>/' \ - -e 's$^\.fi *$</pre>$' \ - -e 's$^\.BE *$</pre><HR>$' \ - -e 's/^\.RS.*/<UL>/' \ - -e 's$^\.RE.*$</UL>$' \ - -e 's/^$/<P>/g' \ - -e 's^\.SH *"*\([^"]*\)"*^</pre><H2>\1</H2>^' \ - -e '/^\.[a-zA-Z]*.*/d' | - gawk -f ${LIBDIR}/man2html2.awk > ${OUTPUT} - fi - shift -done diff --git a/bin/man2html1.awk b/bin/man2html1.awk deleted file mode 100644 index a3546ee1378..00000000000 --- a/bin/man2html1.awk +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/gawk - - -# defining macros - eat them -/^\.de.*/ { - getline - while ( $0 !~ "^\.\.$" ) - { - getline - } - getline - } - -# eat [nt]roff comments -$0 ~ /['.][\/\\]"/ || $1 == "'" { next } - -# remove sidebar macros -$1 == ".VS" || $1 == ".VE" || $1 == ".AS" { next } - - -# handle first .SH as special case - .SH NAME -/^.SH *NAME */ { - getline - while ( $0 ~ /\.[a-zA-Z].*/ ) # eat dot-cmd following title - { - getline - } - print "<TITLE>" $0 "</TITLE>" - print "<H1>" $0 "</H1>\n" - next - -#-e 's/^.SH *NAME */{N;s#.*\n\(.*\)#<H1>\1</H1>#;}' \ - } - - -# Convert .IP Paragraphs upto next .cmd to hanging indents -# using <DL></DL> pairs without intervening <LI> - -/^\.IP */ { - if ( inIP > 0 ) - { - print "</DL>" - } - inIP = 1 - startIP = 1 - print "<DL>" - match($0, /".*"/ ) - if ( RSTART > 0 ) - { - arg = substr( $0, RSTART+1, RLENGTH-2) - - print "<DT> " arg - } - else if ( length( $2 ) > 0 ) - { - print "<DT> " $2 - } - next - } - -$0 ~ /^\.[a-zA-Z]*/ && inIP > 0 { - inIP = 0 - print "</DL>" - } - -# Convert -# .TP -# Line1 -# line 2 - n -# .Any -# -# to -# <DL> -# <DT> Line1 -# <DD> lines 2 - n -# <DT> - -/^\.TP */ { - if ( inTP > 0 ) - { - print "</DL>" - } - inTP = 1 - print "<DL>" - next - } - -inTP == 1 && $1 !~ /\.[a-zA-Z]*/ { - print "<DT> " $0 - inTP = 2 - next - } - -inTP == 2 && $1 !~ /\.[a-zA-Z]*/{ - print "</I></B>" # Belt and suspenders - print "<DD> " $0 - inTP = 3 - next - } - -$0 ~ /^\.[a-zA-Z]*/ && inTP > 0 { - inTP = 0 - print "</DL>" - } - - - -$1 == ".AP" { - $1="" - print "<DL >" - print "<DT> " $2 "\t\t" $3 "\t\t("$4")" - inTP = 2 - next - } - -# make a blank line -$1 == ".sp" { - print "<BR>" - next # print "<BR>" - } - - -$1 == ".ta" { next } - -# just pass everything else on - - { - if ( startIP > 0 ) - { - print "<DD> " $0 - startIP = 0 - } - else - { - print $0 - } - } - - diff --git a/bin/man2html2.awk b/bin/man2html2.awk deleted file mode 100644 index 149c939ce18..00000000000 --- a/bin/man2html2.awk +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/gawk - -$0 ~ "</pre><H2>SEE ALSO</H2>" { - print $0 - getline - while ( $0 !~ "^<P>$" && $0 !~ "^[ \t]*$" ) { - gsub("OTC[_a-zA-Z0-9]*_[_a-zA-Z0-9]*","<A HREF=\"&.html\">&</A>",$0) - gsub("OUX[_a-zA-Z0-9]*_[_a-zA-Z0-9]*","<A HREF=\"&.html\">&</A>",$0) - gsub("OTK[_a-zA-Z0-9]*_[_a-zA-Z0-9]*","<A HREF=\"&.html\">&</A>",$0) - print $0 - if ( getline <= 0 ) - $0 = "" - } - if ( $0 !~ "^[ \t]*$" ) - print $0 -} - -{ print $0 } diff --git a/bin/rename-ace.pl b/bin/rename-ace.pl deleted file mode 100755 index 0e1bd66069f..00000000000 --- a/bin/rename-ace.pl +++ /dev/null @@ -1,184 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' - & eval 'exec perl -pi -S $0 $argv:q' - if 0; - -# $Id$ - -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -s/\bAcceptor\b/ACE_Acceptor/g; -s/\bAddr\b/ACE_Addr/g; -s/\bArgument_Vector\b/ACE_ARGV/g; -s/\bAtomic_Op\b/ACE_Atomic_Op/g; -s/\bCORBA_Handler\b/ACE_CORBA_Handler/g; -s/\bCondition\b/ACE_Condition/g; -s/\bConnector\b/ACE_Connector/g; -s/\bControl_Block\b/ACE_Control_Block/g; -s/\bControl_Mode\b/ACE_Control_Mode/g; -s/\bData_Block\b/ACE_Data_Block/g; -s/\bDummy_Node\b/ACE_Dummy_Node/g; -s/\bDynamic_Node\b/ACE_Dynamic_Node/g; -s/\bElapsed_Time\b/ACE_Elapsed_Time/g; -s/\bEvent_Handler\b/ACE_Event_Handler/g; -s/\bEvent_Handler_T\b/ACE_Event_Handler_T/g; -s/\bFIFO\b/ACE_FIFO/g; -s/\bFIFO_Recv\b/ACE_FIFO_Recv/g; -s/\bFIFO_Recv_Msg\b/ACE_FIFO_Recv_Msg/g; -s/\bFIFO_Send\b/ACE_FIFO_Send/g; -s/\bFIFO_Send_Msg\b/ACE_FIFO_Send_Msg/g; -s/\bFunction_Node\b/ACE_Function_Node/g; -s/\bGet_Opt\b/ACE_Get_Opt/g; -s/\bGuard\b/ACE_Guard/g; -s/\bHANDLE\b/ACE_HANDLE/g; -s/\bHandle_Set_Iterator\b/ACE_Handle_Set_Iterator/g; -s/\bHandle_Set\b/ACE_Handle_Set/g; -s/\bHigh_Res_Timer\b/ACE_High_Res_Timer/g; -s/\bINET_Addr\b/ACE_INET_Addr/g; -s/\bIO_Cntl_Cmds\b/ACE_IO_Cntl_Cmds/g; -s/\bIO_Cntl_Msg\b/ACE_IO_Cntl_Msg/g; -s/\bIO_Vector\b/ACE_IO_Vector/g; -s/\bIPC_SAP\b/ACE_IPC_SAP/g; -s/\bLSOCK\b/ACE_LSOCK/g; -s/\bLSOCK_Acceptor\b/ACE_LSOCK_Acceptor/g; -s/\bLSOCK_Aceeptor\b/ACE_LSOCK_Aceeptor/g; -s/\bLSOCK_CODgram\b/ACE_LSOCK_CODgram/g; -s/\bLSOCK_Connector\b/ACE_LSOCK_Connector/g; -s/\bLSOCK_Dgram\b/ACE_LSOCK_Dgram/g; -s/\bLSOCK_Stream\b/ACE_LSOCK_Stream/g; -s/\bLocal_Memory_Pool\b/ACE_Local_Memory_Pool/g; -s/\bLocation_Node\b/ACE_Location_Node/g; -s/\bLog_Msg\b/ACE_Log_Msg/g; -s/\bLog_Priority\b/ACE_Log_Priority/g; -s/\bLog_Record\b/ACE_Log_Record/g; -s/\bMalloc\b/ACE_Malloc/g; -s/\bMalloc_Align\b/ACE_Malloc_Align/g; -s/\bMalloc_Header\b/ACE_Malloc_Header/g; -s/\bMalloc_Stats\b/ACE_Malloc_Stats/g; -s/\bMap_Entry\b/ACE_Map_Entry/g; -s/\bMap_Iterator\b/ACE_Map_Iterator/g; -s/\bMap_Manager\b/ACE_Map_Manager/g; -s/\bMem_Map\b/ACE_Mem_Map/g; -s/\bMMAP_Memory_Pool\b/ACE_MMAP_Memory_Pool/g; -s/\bMT_SYNCH\b/ACE_MT_SYNCH/g; -s/\bMemory_Pool\b/ACE_Memory_Pool/g; -s/\bMessage_Block\b/ACE_Message_Block/g; -s/\bMessage_Queue\b/ACE_Message_Queue/g; -s/\bMessage_Type\b/ACE_Message_Type/g; -s/\bModule\b/ACE_Module/g; -s/\bModule_Link\b/ACE_Module_Link/g; -s/\bModule_Type\b/ACE_Module_Type/g; -s/\bMultiplexor\b/ACE_Multiplexor/g; -s/\bMutex\b/ACE_Mutex/g; -s/\bNull_Condition\b/ACE_Null_Condition/g; -s/\bNull_Mutex\b/ACE_Null_Mutex/g; -s/\bNULL_SYNCH\b/ACE_NULL_SYNCH/g; -s/\bObchunk\b/ACE_Obchunk/g; -s/\bObject_Node\b/ACE_Object_Node/g; -s/\bObstack\b/ACE_Obstack/g; -s/\bOneshot_Acceptor\b/ACE_Oneshot_Acceptor/g; -s/\bParse_Node\b/ACE_Parse_Node/g; -s/\bProcess_Mutex\b/ACE_Process_Mutex/g; -s/\bProfile_Timer\b/ACE_Profile_Timer/g; -s/\bQ_Entry\b/ACE_Q_Entry/g; -s/\bQueue\b/ACE_Queue/g; -s/\bRW_Mutex\b/ACE_RW_Mutex/g; -s/\bRaw_Data_Block\b/ACE_Raw_Data_Block/g; -s/\bReactor\b/ACE_Reactor/g; -s/\bReactor_Mask\b/ACE_Reactor_Mask/g; -s/\bReactor_Token\b/ACE_Reactor_Token/g; -s/\bRead_Guard\b/ACE_Read_Guard/g; -s/\bRecursive_Lock\b/ACE_Recursive_Lock/g; -s/\bRemove_Node\b/ACE_Remove_Node/g; -s/\bRequest_Queue\b/ACE_Request_Queue/g; -s/\bResume_Node\b/ACE_Resume_Node/g; -s/\bSOCK\b/ACE_SOCK/g; -s/\bSOCK_Acceptor\b/ACE_SOCK_Acceptor/g; -s/\bSOCK_CODgram\b/ACE_SOCK_CODgram/g; -s/\bSOCK_Connector\b/ACE_SOCK_Connector/g; -s/\bSOCK_DGRAM\b/ACE_SOCK_DGRAM/g; -s/\bSOCK_Dgram\b/ACE_SOCK_Dgram/g; -s/\bSOCK_Dgram_Bcast\b/ACE_SOCK_Dgram_Bcast/g; -s/\bSOCK_Dgram_Mcast\b/ACE_SOCK_Dgram_Mcast/g; -s/\bSOCK_IO\b/ACE_SOCK_IO/g; -s/\bSOCK_Stream\b/ACE_SOCK_Stream/g; -s/\bSPIPE\b/ACE_SPIPE/g; -s/\bSPIPE_Acceptor\b/ACE_SPIPE_Acceptor/g; -s/\bSPIPE_Addr\b/ACE_SPIPE_Addr/g; -s/\bSPIPE_Connector\b/ACE_SPIPE_Connector/g; -s/\bSPIPE_IO\b/ACE_SPIPE_Stream/g; -s/\bSPIPE_Msg\b/ACE_SPIPE_Msg/g; -s/\bSString\b/ACE_SString/g; -s/\bSV_Message\b/ACE_SV_Message/g; -s/\bSV_Message_Queue\b/ACE_SV_Message_Queue/g; -s/\bSV_Semaphore\b/ACE_SV_Semaphore/g; -s/\bSV_Semaphore_Complex\b/ACE_SV_Semaphore_Complex/g; -s/\bSV_Semaphore_Simple\b/ACE_SV_Semaphore_Simple/g; -s/\bSV_Shared_Memory\b/ACE_SV_Shared_Memory/g; -s/\bSemaphore\b/ACE_Semaphore/g; -s/\bService_Config\b/ACE_Service_Config/g; -s/\bService_Manager\b/ACE_Service_Manager/g; -s/\bService_Object\b/ACE_Service_Object/g; -s/\bService_Object_Type\b/ACE_Service_Object_Type/g; -s/\bService_Record\b/ACE_Service_Record/g; -s/\bService_Repository\b/ACE_Service_Repository/g; -s/\bService_Repository_Iterator\b/ACE_Service_Repository_Iterator/g; -s/\bService_Type\b/ACE_Service_Type/g; -s/\bShared_Malloc\b/ACE_Shared_Malloc/g; -s/\bShared_Malloc_MM\b/ACE_Shared_Malloc_MM/g; -s/\bShared_Malloc_SV\b/ACE_Shared_Malloc_SV/g; -s/\bShared_Memory\b/ACE_Shared_Memory/g; -s/\bShared_Memory_Pool\b/ACE_Shared_Memory_Pool/g; -s/\bShared_Object\b/ACE_Shared_Object/g; -s/\bSig_Action\b/ACE_Sig_Action/g; -s/\bSig_Handler\b/ACE_Sig_Handler/g; -s/\bSig_Set\b/ACE_Sig_Set/g; -s/\bSignalHandler\b/ACE_SignalHandler/g; -s/\bSignalHandlerV\b/ACE_SignalHandlerV/g; -s/\bSignal_Guard\b/ACE_Signal_Guard/g; -s/\bSignal_Handler\b/ACE_Signal_Handler/g; -s/\bStatic_Node\b/ACE_Static_Node/g; -s/\bStr_Buf\b/ACE_Str_Buf/g; -s/\bStream\b/ACE_Stream/g; -s/\bStream_Head\b/ACE_Stream_Head/g; -s/\bStream_Iterator\b/ACE_Stream_Iterator/g; -s/\bStream_Modules\b/ACE_Stream_Modules/g; -s/\bStream_Node\b/ACE_Stream_Node/g; -s/\bStream_Tail\b/ACE_Stream_Tail/g; -s/\bSTREAM_Type\b/ACE_STREAM_Type/g; -s/\bSuspend_Node\b/ACE_Suspend_Node/g; -s/\bSvc_Handler\b/ACE_Svc_Handler/g; -s/\bSvc_Manager\b/ACE_Svc_Manager/g; -s/\bSvc_Tuple\b/ACE_Svc_Tuple/g; -s/\bSynch\b/ACE_Synch/g; -s/\bSynch_Options\b/ACE_Synch_Options/g; -s/\bTHR_FUNC\b/ACE_THR_FUNC/g; -s/\bTLI\b/ACE_TLI/g; -s/\bTLI_Acceptor\b/ACE_TLI_Acceptor/g; -s/\bTLI_Connector\b/ACE_TLI_Connector/g; -s/\bTLI_Stream\b/ACE_TLI_Stream/g; -s/\bTask\b/ACE_Task/g; -s/\bThread\b/ACE_Thread/g; -s/\bThread_Control\b/ACE_Thread_Control/g; -s/\bThread_Manager\b/ACE_Thread_Manager/g; -s/\bThread_Mutex\b/ACE_Thread_Mutex/g; -s/\bThread_Spawn\b/ACE_Thread_Spawn/g; -s/\bThread_Specific\b/ACE_Thread_Specific/g; -s/\bThru_Task\b/ACE_Thru_Task/g; -s/\bTime_Value\b/ACE_Time_Value/g; -s/\bTimer_Handle\b/ACE_Timer_Handle/g; -s/\bTimer_Queue\b/ACE_Timer_Queue/g; -s/\bToken\b/ACE_Token/g; -s/\bTrace\b/ACE_Trace/g; -s/\bTry_Guard\b/ACE_Try_Guard/g; -s/\bTyped_SV_Message\b/ACE_Typed_SV_Message/g; -s/\bTyped_SV_Message_Queue\b/ACE_Typed_SV_Message_Queue/g; -s/\bUNIX_Addr\b/ACE_UNIX_Addr/g; -s/\bUPIPE\b/ACE_UPIPE/g; -s/\bUPIPE_Addr\b/ACE_UPIPE_Addr/g; -s/\bUPIPE_Stream\b/ACE_UPIPE_Stream/g; -s/\bUPIPE_Acceptor\b/ACE_UPIPE_Acceptor/g; -s/\bUPIPE_Connector\b/ACE_UPIPE_Connector/g; -s/\bWrite_Guard\b/ACE_Write_Guard/g; -s@ace/ACE_@ace/@g; diff --git a/bin/run_all_win32.pl b/bin/run_all_win32.pl deleted file mode 100755 index 01fa7f8532b..00000000000 --- a/bin/run_all_win32.pl +++ /dev/null @@ -1,230 +0,0 @@ -# -*- perl -*- -# $Id$ -# -# This script execute the test programs (usually, other scripts) in -# the RUN_LIST defined below. If it detects any problem it send email. -# -# This script requires ActivePerl for Win32 and libnet from CPAN. -# -# Usage: run_all_win32.pl <log directory> <admin email address> -# -# For example: run_all_win32.pl c:\log peter_pan@neverland.org - -use Net::SMTP; -use File::Basename; -use FileHandle; -require POSIX; - - -# This is the module we will checkout, someday someone could define a -# smaller module. -$MODULE='ACE_wrappers'; - -# The following are for redirecting execution results to temporary files. -$exe_log_name='run_test.log'; # Name of the tempfile used. - -# If using 'sh'. -$sh_cmd="c:/bin/sh "; -$sh_redirection=" > $exe_log_name 2>&1"; - -#if using '4nt' -$four_nt_cmd="d:/Utils/4NT301/4NT.EXE "; -$four_nt_redirection=" >& $exe_log_name"; - -# Pick the one your like. -$shell_invoke = $sh_cmd; -$redirect_output = $sh_redirection; - -# This are the pairs "sub-directory , script" we run; the separator -# *must* be a space followed by a comma and then another space. - -@RUN_LIST = ( - 'tests , run_tests.bat', - 'TAO/tests/Param_Test , run_test.pl', - 'TAO/tests/Param_Test , run_test.pl -i dii', - 'TAO/performance-tests/Cubit/TAO/IDL_Cubit , run_test.pl', - 'TAO/tests/OctetSeq , run_test.pl', - 'TAO/tests/Multiple_Inheritance , run_test.pl', - 'TAO/tests/MT_Client , run_test.pl', - 'TAO/tests/MT_Server , run_test.pl', - 'TAO/tests/Faults , run_test.pl', - 'TAO/tests/NestedUpcall/Reactor , run_test.pl', - 'TAO/tests/NestedUpcall/MT_Client_Test , run_test.pl', - 'TAO/tests/POA/Identity , run_test.pl', - 'TAO/tests/POA/Destruction , run_test.pl', - 'TAO/tests/IORManipulation , run_test.pl', - 'TAO/examples/POA/Adapter_Activator , run_test.pl', - 'TAO/examples/POA/DSI , run_test.pl', - 'TAO/examples/POA/Default_Servant , run_test.pl', - 'TAO/examples/POA/Explicit_Activation , run_test.pl', - 'TAO/examples/POA/FindPOA , run_test.pl', - 'TAO/examples/POA/Forwarding , run_test.pl', - 'TAO/examples/POA/NewPOA , run_test.pl', - 'TAO/examples/POA/On_Demand_Activation , run_test.pl', - 'TAO/examples/POA/On_Demand_Loading , run_test.pl', - 'TAO/examples/POA/Reference_Counted_Servant , run_test.pl', - 'TAO/examples/Simple/bank , run_test.pl', - 'TAO/examples/Simple/grid , run_test.pl', - 'TAO/examples/Simple/time-date , run_test.pl', - 'TAO/examples/Simple/time , run_test.pl', - 'TAO/orbsvcs/tests/Simple_Naming , run_test.pl', - 'TAO/orbsvcs/tests/Trading , run_test.pl', - 'TAO/orbsvcs/tests/Event/Basic , run_test.pl', - 'TAO/orbsvcs/tests/Event/Performance , run_test.pl', - 'TAO/orbsvcs/tests/EC_Basic , run_test.pl', - 'TAO/orbsvcs/tests/EC_Custom_Marshal , run_test.pl', - 'TAO/orbsvcs/tests/EC_Throughput , run_test.pl', -# 'TAO/orbsvcs/tests/EC_Mcast , run_test.pl', -# 'TAO/orbsvcs/tests/EC_Multiple , run_test.pl', - 'TAO/orbsvcs/tests/Event_Latency , run_test.pl', - 'TAO/examples/Simple/echo , run_test.pl < Echo.idl', -# 'TAO/examples/Simple/chat , run_test.pl', - 'TAO/orbsvcs/tests/Property , run_test.pl', - 'TAO/performance-tests/POA/Object_Creation_And_Registration , run_test.pl', - 'TAO/performance-tests/Cubit/TAO/MT_Cubit , run_test.pl -n 100' -# 'TAO/orbsvcs/tests/ImplRepo , run_test.pl airplane', -# 'TAO/orbsvcs/tests/ImplRepo , run_test.pl airplane_ir', - ); - - -# We obtain our revision to report errors. -#$REVISION='$Revision$'; - -# Find out the command name. -$CMD = basename($0); - -# Extract configuration information from command line. -# TODO: Some validation and checking should be done here. -$LOGDIR = $ARGV[0]; -$ADMIN = $ARGV[1]; - -# When an error is found we try to die gracefully and send some email -# to ADMIN. - -$disable_file = $LOGDIR . '/.disable'; - -sub mywarn { - local @msg = @_; - - # Need more error checking here. - - $smtp = Net::SMTP->new('mail.cs.wustl.edu'); - $smtp->mail( "$ADMIN" ); # sender's address - $smtp->to("$ADMIN"); # recipient's address - $smtp->data(); # Start the mail - - # Mail Header - $smtp->datasend("To: $ADMIN\n"); - $smtp->datasend("Subject: Auto run results\n"); - $smtp->datasend("From: $ADMIN\n"); - $smtp->datasend("\n"); - - # Now the message body - $smtp->datasend ('The following message is brought to you by: ', "\n"); - $smtp->datasend ("$CMD, [ $REVISION ] for $BUILD on $CHECKOUT\n\n"); - - local $m; - foreach $m (@msg) { - $smtp->datasend ("$m \n"); - } - - $smtp->datasend ("\nPlease check log files for more info\n"); - - $smtp->dataend(); # Finish sending the mail - $smtp->quit; # Close the SMTP connection -} - -sub mydie { - mywarn @_; - print HIST 'FAILED', "\n"; - unlink $disable_file - || die "cannot unlink disable file"; - exit 0; -} - -### MAIN FUNCTION - -### MAIN FUNCTION - -$histfile = $LOGDIR . '/history'; -open(HIST, '>>' . $histfile) - # Do not use 'mydie' to report the problem, it tries to use HIST.... - || die "cannot open history file \"$histfile\"\n"; - -$date = localtime; - -print HIST $CMD, ': running at ', $date, ' '; - -if (-f $disable_file) { - print HIST "DISABLED\n"; - exit 0; -} - -open (DISABLE, '>' . $disable_file) - || mydie "cannot open disable file"; -print DISABLE "auto_compile <$date> is running\n"; -close (DISABLE) - || mydie "cannot close disable file"; - -$LOGFILE = $LOGDIR . '/' . POSIX::strftime("%b%d_%Y.log", localtime); -open(LOG, '>' . $LOGFILE) - || mydie "cannot open log file"; - -LOG->autoflush (); - -foreach $i (@RUN_LIST) { - local @test_info = split (/\ \,\ /, $i); - local $directory = $test_info[0]; - local $program = $test_info[1]; - print "$directory, $program\n"; - - $date = localtime; - print LOG "$CMD: =============================================\n"; - print LOG "$CMD: running $program in $directory at ", $date, "\n"; - local $subdir = - $ENV{ACE_ROOT} . '/'. $directory; - chdir ($subdir) - || mydie "cannot chdir to $subdir"; - - $run_error = 0; - - system ($shell_invoke . " " . $program . " " . $redirect_output); - - open (RUN, "$exe_log_name") || push @failures, "Can't open execution log file $exe_log_name\n"; - - while (<RUN>) { - print LOG $_; - if (m/^Error/ || m/FAILED/ || m/EXCEPTION/) { - $run_error = 1; - } - } - if (close(RUN) == 0) { - push @failures, "Error when closing log file $program in $directory"; - next; - } - $date = localtime; - print LOG "$CMD: $program finished ", $date, "\n"; - - if ($run_error != 0) { - push @failures, - "errors detected while running $program in $directory"; - } - - unlink ("$exe_log_name"); -} - -if ($#failures >= 0) { - mydie @failures; -} - -close(LOG) - || mydie "cannot close LOGFILE"; - -print HIST "OK\n"; -close(HIST) - || mydie "cannot close history file"; - -unlink $disable_file - || mydie "cannot unlink disable file"; - -exit 0; diff --git a/bin/tao_env.pl b/bin/tao_env.pl deleted file mode 100755 index 0ac889ef308..00000000000 --- a/bin/tao_env.pl +++ /dev/null @@ -1,17 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' - & eval 'exec perl -pi -S $0 $argv:q' - if 0; - -# $Id$ -# -# You may want to run the "find" command with this script, which maybe -# something like this: -# -# find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.C" -o -name "*.cc" -o -name "*.c" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.ipp" \) -print | xargs $ACE_ROOT/bin/auto_ptr.perl - -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -s/^_env/TAO_IN_ENV/; -s/([^_A-Za-z])_env/$1TAO_IN_ENV/g; diff --git a/bin/tao_svcconf.pl b/bin/tao_svcconf.pl deleted file mode 100755 index 56d05830f59..00000000000 --- a/bin/tao_svcconf.pl +++ /dev/null @@ -1,15 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' - & eval 'exec perl -pi -S $0 $argv:q' - if 0; - -# $Id$ -# -# This script can help you convert TAO svc.conf using dynamic services -# to use static services. -# -# You may want to run the "find" command with this script, which maybe -# something like this: -# -# find . -name svc.conf -print | xargs $ACE_ROOT/bin/tao_svcconf.pl - -s/^ *dynamic *([A-Za-z_]+) [^\"]+(\"[^\"]+\").*/static $1 $2/; diff --git a/bin/vc_filter.pl b/bin/vc_filter.pl deleted file mode 100755 index 0a497380245..00000000000 --- a/bin/vc_filter.pl +++ /dev/null @@ -1,56 +0,0 @@ -# $Id$ -# -# A perl script that filers length VC output into a concise html report. - -# Define html tags. -$header = "<html><head> -<title>Error/Warning Summary of Daily Build</title> -</head> - -<body bgcolor=\"white\"> -<h1>Error/Warning Summary of Daily Build</h1><TT>\n"; -$trailer = "</TT></body></html>"; - -$kosher_b = ""; -$kosher_e = ""; - -$in_sin_b = "<FONT COLOR=\"RED\">"; -$in_sin_e = "</FONT>"; - -$new_build_b = "<P>"; -$new_build_e = ""; - -# Get filename. -$fname = $ARGV[0]; -open (fp, "$fname"); - -print $header ; - -while ($line = <fp>) -{ - print "$new_build_b $line $new_build_e<BR>" if ($line =~/^--------------------Configuration:/); - - if ($line =~/^[A-Z_a-z0-9.]+ - [0-9]+ error\(s\), +[0-9]+ warning\(s\)/) - { - if ($line =~/0 error\(s\), 0 warning\(s\)/) - { - print "$kosher_b $line $kosher_e<BR>"; - } - else - { - print "$in_sin_b $line $in_sin_e<BR>"; - } - } - - print "$in_sin_b $line $in_sin_e<BR>" - if ($line =~/^[-A-Z_a-z0-9.\/\\:]+\([0-9]+\) : / || - $line =~/^[-A-Z_a-z0-9.\/\\:]+.*, line [0-9]+: / || - $line =~/^[-A-Z_a-z0-9.\\:]+\.obj : / || - $line =~/^fatal error/ || - $line =~/^Error executing/ || - $line =~/^4NT: / || - $line =~/^LINK : /); - -} - -print $trailer; diff --git a/bin/vendor.fmt b/bin/vendor.fmt deleted file mode 100755 index a780d430fec..00000000000 --- a/bin/vendor.fmt +++ /dev/null @@ -1,101 +0,0 @@ -# -# vendor description header control file for ADTs -# please insert your company name in the field <vendor> -# -# K. Dorn -# - -VENDOR_COMPILATION_HEADER_CXX_START -"\n/*[ Compilation unit "\ - "----------------------------------------------------------\n"\ - "\n"\ - " Component : CSA - OSC\n"\ - "\n"\ - " Name : %s.[Ci]\n"\ - "\n"\ - " Author : %s\n"\ - "\n"\ - " Language : C++\n"\ - "\n"\ - " Creation Date : %s\n"\ - "\n"\ - " Test State : %%Q%%\n"\ - "\n"\ - " Description : %s\n"\ - "\n"\ - "\n"\ - " Copyright (C) <Vendor> 1995 All Rights Reserved\n"\ - "\n"\ - "--------------------------------------"\ - "---------------------------------------*/\n"\ - "/*] END */\n"\ - "#pragma ident \" %%Z%% %%M%% %%I%% (%%G%%), %%Y%% %%Q%%:"\ - " implementation file for class "\ - "%s \" \n "\ - "\n"\ - "\n" -VENDOR_COMPILATION_HEADER_CXX_END - - -VENDOR_METHOD_HEADER_CXX_START -"\n/*[ Method ---------------------"\ - "-------------------------------------------\n"\ - "\n"\ - " Name : %s\n"\ - "\n"\ - " Description : %s\n"\ - "\n"\ - " Return : %s\n"\ - "\n"\ - "--------------------------------------------"\ - "------------------------------*/\n\n" -VENDOR_METHOD_HEADER_CXX_END - - -VENDOR_COMPILATION_HEADER_HXX_START -"\n/*[ Compilation unit "\ - "----------------------------------------------------------\n"\ - "\n"\ - " Component : CSA - OSC\n"\ - "\n"\ - " Name : %s.h\n"\ - "\n"\ - " Author : %s\n"\ - "\n"\ - " Language : C++\n"\ - "\n"\ - " Creation Date : %s\n"\ - "\n"\ - " Test State : %%Q%%\n"\ - "\n"\ - " Description : %s\n"\ - "\n %s\n"\ - "\n"\ - "\n"\ - " Copyright (C) <Vendor> 1995 All Rights Reserved\n"\ - "\n"\ - "--------------------------------------"\ - "---------------------------------------*/\n"\ - "/*] END */\n"\ - "#pragma ident \" %%Z%% %%M%% %%I%% (%%G%%), %%Y%% %%Q%%:"\ - " implementation file for class "\ - "%s \" \n "\ - "\n"\ - "\n" -VENDOR_COMPILATION_HEADER_HXX_END - -VENDOR_CLASS_HEADER_HXX_START -"\n/*[ Class ---------------------"\ - "-------------------------------------------\n"\ - "\n"\ - " Name : %s\n"\ - "\n"\ - " Description : %s\n"\ - "\n %s\n"\ - "\n"\ - "--------------------------------------------"\ - "------------------------------*/\n\n" -VENDOR_CLASS_HEADER_HXX_END - - - |