# HG changeset patch # User jwe # Date 837744422 0 # Node ID 893481f3a763f2eda6628cb64a4e448906c6b9d9 # Parent b1a56412c385e9b464e39481c3fbd15032802ae0 [project @ 1996-07-19 02:42:08 by jwe] Initial revision diff --git a/dlfcn/Makefile.orig b/dlfcn/Makefile.orig new file mode 100644 --- /dev/null +++ b/dlfcn/Makefile.orig @@ -0,0 +1,44 @@ +# %W% revision of %E% %U% +# This is an unpublished work copyright (c) 1992 HELIOS Software GmbH +# 30159 Hannover, Germany + +# Do not edit at HELIOS, edit GNUmakefile instead! + +SHELL=/bin/sh +IPATH= +DEFS= +DEBUGFLAGS=-g -DDEBUG +NODEBUGFLAGS=-O +CFLAGS=$(IPATH) $(DEFS) $(NODEBUGFLAGS) +TARGET=libdl.a +DEST=/usr/local/lib +HDRS=dlfcn.h +SRCS=dlfcn.c +NOSTART=-e _nostart # for AIX 3 +#NOSTART=-bnoentry # for AIX 4 +OBJS=$(SRCS:%.c=%.o) + +all: $(TARGET) dlfcn.c + +dlfcn.o: dlfcn.h + +$(TARGET): $(OBJS) dl.exp + $(CC) $(CFLAGS) -o $@ $(OBJS) -bE:dl.exp -bM:SRE $(NOSTART) -lld + +lint: + lint $(IPATH) $(DEFS) $(SRCS) >lintout + +info: + sccs info + +clean: + rm -f lintout a.out core *.o *-lg *% *~ tags deps% + +clobber: clean + rm -f $(TARGET) deps + +install: all + cp $(TARGETS) $(DEST) + +shar: + shar README Makefile dlfcn.h dlfcn.c dl.exp >dlfcn.shar diff --git a/dlfcn/README b/dlfcn/README new file mode 100644 --- /dev/null +++ b/dlfcn/README @@ -0,0 +1,192 @@ +Copyright (c) 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH +Not derived from licensed software. + +Permission is granted to freely use, copy, modify, and redistribute +this software, provided that the author is not construed to be liable +for any results of using the software, alterations are clearly marked +as such, and this notice is not modified. + +libdl.a +------- + +This is an emulation library to emulate the SunOS/System V.4 functions +to access the runtime linker. The functions are emulated by using the +AIX load() function and by reading the .loader section of the loaded +module to find the exports. The to be loaded module should be linked as +follows (if using AIX 3): + + cc -o module.so -bM:SRE -bE:module.exp -e _nostart $(OBJS) + +For AIX 4: + + cc -o module.so -bM:SRE -bE:module.exp -bnoentry $(OBJS) + +The module export file contains the symbols to be exported. Because +this library uses the loader section, the final module.so file can be +stripped. C++ users should build their shared objects using the script +makeC++SharedLib (part of the IBM C++ compiler), this will make sure +that constructors and destructors for static and global objects will be +called upon loading and unloading the module. + +Usage +----- + +void *dlopen(const char *path, int mode); + +This routine loads the module pointed to by path and reads its export +table. If the path does not contain a '/' character, dlopen will search +for the module using the LIBPATH environment variable. It returns an +opaque handle to the module or NULL on error. The mode parameter can be +either RTLD_LAZY (for lazy function binding) or RTLD_NOW for immediate +function binding. The AIX implementation currently does treat RTLD_NOW +the same as RTLD_LAZY. The flag RTLD_GLOBAL might be or'ed into the +mode parameter to allow loaded modules to bind to global variables or +functions in other loaded modules loaded by dlopen(). If RTLD_GLOBAL is +not specified, only globals from the main part of the executable or +shared libraries are used to look for undefined symbols in loaded +modules. + + +void *dlsym(void *handle, const char *symbol); + +This routine searches for the symbol in the module referred to by +handle and returns its address. If the symbol could not be found, the +function returns NULL. The return value must be casted to a proper +function pointer before it can be used. SunOS/System V.4 allows handle +to be a NULL pointer to refer to the module the call is made from, this +is not implemented. + +int dlclose(void *handle); + +This routine unloads the module referred to by the handle and disposes +of any local storage. this function returns -1 on failure. + +char *dlerror(void); + +This routine can be used to retrieve a text message describing the most +recent error that occured on on of the above routines. This function +returns NULL if there is no error information. + +Initialization and termination handlers +--------------------------------------- + +The emulation provides for an initialization and a termination +handler. The dlfcn.h file contains a structure declaration named +dl_info with following members: + + void (*init)(void); + void (*fini)(void); + +The init function is called upon first referencing the library. The +fini function is called at dlclose() time or when the process exits. +The module should declare a variable named dl_info that contains this +structure which must be exported. These functions correspond to the +documented _init() and _fini() functions of SunOS 4.x, but these are +appearently not implemented in SunOS. When using SunOS 5.0, these +correspond to #pragma init and #pragma fini respectively. At the same +time any static or global C++ object's constructors or destructors will +be called. + +BUGS +---- + +Please note that there is currently a problem with implicitely loaded +shared C++ libaries: if you refer to a shared C++ library from a loaded +module that is not yet used by the main program, the dlopen() emulator +does not notice this and does not call the static constructors for the +implicitely loaded library. This can be easily demonstrated by +referencing the C++ standard streams from a loaded module if the main +program is a plain C program. + +Jens-Uwe Mager + +HELIOS Software GmbH +Lavesstr. 80 +30159 Hannover +Germany + +Phone: +49 511 36482-0 +FAX: +49 511 36482-69 +AppleLink: helios.de/jum +Internet: jum@helios.de + +Revison History +--------------- + +SCCS/s.dlfcn.h: + +D 1.4 95/04/25 09:36:52 jum 4 3 00018/00004/00028 +MRs: +COMMENTS: +added RTLD_GLOBAL, include and C++ guards + +D 1.3 92/12/27 20:58:32 jum 3 2 00001/00001/00031 +MRs: +COMMENTS: +we always have prototypes on RS/6000 + +D 1.2 92/08/16 17:45:11 jum 2 1 00009/00000/00023 +MRs: +COMMENTS: +added dl_info structure to implement initialize and terminate functions + +D 1.1 92/08/02 18:08:45 jum 1 0 00023/00000/00000 +MRs: +COMMENTS: +Erstellungsdatum und -uhrzeit 92/08/02 18:08:45 von jum + +SCCS/s.dlfcn.c: + +D 1.10 96/02/15 17:42:44 jum 12 10 00012/00007/00521 +MRs: +COMMENTS: +the C++ constructor and destructor chains are now called properly for either +xlC 2 or xlC 3 (CSet++). + +D 1.9 95/09/22 11:09:38 markus 10 9 00001/00008/00527 +MRs: +COMMENTS: +Fix version number + +D 1.8 95/09/22 10:14:34 markus 9 8 00008/00001/00527 +MRs: +COMMENTS: +Added version number for dl lib + +D 1.7 95/08/14 19:08:38 jum 8 6 00026/00004/00502 +MRs: +COMMENTS: +Integrated the fixes from Kirk Benell (kirk@rsinc.com) to allow loading of +shared objects generated under AIX 4. Fixed bug that symbols with exactly +8 characters would use garbage characters from the following symbol value. + +D 1.6 95/04/25 09:38:03 jum 6 5 00046/00006/00460 +MRs: +COMMENTS: +added handling of C++ static constructors and destructors, added RTLD_GLOBAL to bind against other loaded modules + +D 1.5 93/02/14 20:14:17 jum 5 4 00002/00000/00464 +MRs: +COMMENTS: +added path to dlopen error message to make clear where there error occured. + +D 1.4 93/01/03 19:13:56 jum 4 3 00061/00005/00403 +MRs: +COMMENTS: +to allow calling symbols in the main module call load with L_NOAUTODEFER and +do a loadbind later with the main module. + +D 1.3 92/12/27 20:59:55 jum 3 2 00066/00008/00342 +MRs: +COMMENTS: +added search by L_GETINFO if module got loaded by LIBPATH + +D 1.2 92/08/16 17:45:43 jum 2 1 00074/00006/00276 +MRs: +COMMENTS: +implemented initialize and terminate functions, added reference counting to avoid multiple loads of the same library + +D 1.1 92/08/02 18:08:45 jum 1 0 00282/00000/00000 +MRs: +COMMENTS: +Erstellungsdatum und -uhrzeit 92/08/02 18:08:45 von jum diff --git a/dlfcn/dl.exp b/dlfcn/dl.exp new file mode 100644 --- /dev/null +++ b/dlfcn/dl.exp @@ -0,0 +1,5 @@ +#! +dlopen +dlclose +dlsym +dlerror diff --git a/dlfcn/ftp-site b/dlfcn/ftp-site new file mode 100644 --- /dev/null +++ b/dlfcn/ftp-site @@ -0,0 +1,1 @@ +ftp://anubis.han.de/pub/aix/dlfcn.shar diff --git a/emacs/NEWS b/emacs/NEWS new file mode 100644 --- /dev/null +++ b/emacs/NEWS @@ -0,0 +1,225 @@ +Changes in version 0.8 +********************** + +* Comment types. + +Octave mode can now distinguish between various types of comments, +similar to Emacs Lisp: + +`#' To be aligned to the same column on the right of the source + code. + +`##' To be aligned to the same level of indentation as the code. + +`###' To start at the left margin. + +(Without this distinction, things like + + code # This is an inline comment which extends + # across on line + +were not uniquely identifiable, because the second line of the in-line +comment could not be distinguished from a full-line comment.) + +* Inferior Octave support. + +It is now possible to run Octave from within Emacs, either by directly +entering commands at the prompt in a buffer in Inferior Octave mode, or +by interacting with Octave from within a file with Octave code. This is +useful in particular for debugging Octave code. + +For more details, see the Texinfo documentation. + +* New function `octave-insert-defun' to reduce typing effort. + + +Changes in version 0.7 +********************** + +This version is a rather complete rewrite of 0.6. + +In general, it was attempted to use standard Emacs features and +functions as much as possible. + +* Font Lock support was improved and enhanced. + +Function declarations are now fontified correctly. Builtin keywords +(reserved words and text functions) and variables are now fontified as +well. + +* Partial Imenu support was added. + +Function declarations can now be indexed. + +* A completion mechanism for builtin keywords and variables was added. + +Completion can be performed by pressing M-TAB (octave-complete-symbol) +after typing the initial characters of the keyword. + +In a future release, completion (as well as imenu and font locking) may +also include user defined variables. + +* Bug reporting. + +The function octave-submit-bug-report was added. + +* Commands for dealing with blocks. + +The functions for dealing with begin-else-end blocks were rewritten from +scratch. They are now based on the function octave-scan-blocks, which +works similar to the standard Emacs scan-lists function. One can now go +forward and backward across balanced blocks, and go up and down block +levels. It is no longer required that extended `end' keywords are used; +in fact, an error message will be issued in the case of nonmatching +block keywords. Matching is achieved through one general function, and +now also works for else keywords. + +The block motion commands are + + octave-forward-block + octave-backward-block + octave-down-block + octave-up-block + octave-backward-up-block + +One can also mark the `current' block (the innermost block containing +point) using octave-mark-block. + +* Commands for dealing with functions. + +Moving across functions, as well as marking and indenting them now works +as for defuns in Lisp mode. + +* Filling. + +The code for auto-filling was rewritten, and octave-fill-paragraph was +added. The code for filling is far from perfection yet. In future +releases, a function for filling the region will be added. + +The problem of getting the right fill function after toggling Auto-Fill +mode was solved by an advice to auto-fill-mode. + +* Abbrevs. + +The mechanism of listing all abbrevs using `? or ` was retained. All +other abbrev code was dropped---why should Octave mode only use its own +abbrevs? + +* Comments. + +As the comment syntax and comment-start are specified correctly, one can +use the standard comment-region. The function octave-uncomment-region +is still provided, but now based on comment-region. + +The special treatment of commenting regions was removed, but may easily +be added again. + +* Paragraphs. + +Empty lines and form feeds are now recognized as separating paragraphs +of Octave code, so one can now move across them and fill them. + +* Indentation. + +Indentation should work without problems now, assuming `sane' coding. +The problems in 0.6 which came from assuming that only one else or end +keyword would occur in one line should now have disappeared. + +The user-level variables for customizing indentation were renamed as +follows: + + 0.7 0.6 + + octave-block-offset octave-stmt-indent + octave-continuation-offset octave-continuation-indent + +Of course, it is still easy to write code in a way that makes Octave +mode get the indentations wrong. For example, + + if (something) \ + +will result in having octave-continuation-offset added although this is +wrong. Or, + + printf ("This is some stupid %s \ + for getting indentation wrong.", + "text") + +is what you deserve anyway :-) Octave mode currently assumes that +strings do not extend across lines ... + +* Other commands for moving. + +The functions octave-previous-statement and octave-next-statement were +removed, partially because their names do not coincide with the usage of +`statement' in the Octave manual. The functions now provided are + + octave-previous-code-line + octave-next-code-line + octave-beginning-of-line + octave-end-of-line + +The first two look for the previous or next `code' line, i.e., they skip +across all empty or comment lines. The latter two also go understand +continuation lines, and move to their beginning and end, respectively. + +The effect of the former octave-previous-statement can now be achieved +upon following octave-previous-code-line by octave-beginning-of-line. + +* Special insertions: LFD, SPC and semicolon. + +These characters are now `electric', doing a little extra work. All +three expand abbrevs if abbrev mode is on and blink matching blocks if +octave-blink-matching-blocks is t. + +In future versions, SPC might also do auto-newlining after certain +keywords (or e.g., a continuation character). + +* User-level customization. + +The variables for customizing Octave mode are as follows. + +** As in 0.6. + + octave-auto-newline + octave-comment-column + octave-comment-start + octave-continuation-string + +** Different from 0.6. + + 0.7 0.6 + + octave-blink-matching-block octave-blink-matching-blocks + octave-block-offset octave-statement-indent + octave-continuation-offset octave-continuation-indent + octave-inhibit-startup-message octave-startup-message + +The first three have only been renamed. (The first in analogy to the +standard blink-matching-paren, the others because they are really extra +offsets and not the absolute indentations.) + +Controlling startup messages now works as in Emacs itself. + +** New in 0.7. + + octave-fill-column + +** Removed from 0.7. + + octave-comment-indent-style + octave-comment-indent-char + octave-comment-region + +* Help + +A mechanism for looking up entries in the indices of ALL info files with +documentation for Octave (as specified by octave-help-files) was added +(octave-help). If multiple matches are found, one can cycle through the +matches. + +* Other changes. + +octave-comment-hook was removed. One can instead use the standard Emacs +indent-for-comment. + diff --git a/emacs/TODO b/emacs/TODO new file mode 100644 --- /dev/null +++ b/emacs/TODO @@ -0,0 +1,25 @@ +* Write a function octave-debug which just provides the debugging +features in a restricted keymap (i.e., l, b, f, ..., q). + +* Make (un)commenting work with indented comments. Perhaps one can simply +provide an extended comment prefix which includes leading spaces? + +* Maybe also work with strings generated by single apostrophs. (NOT for +font locking, though.) This would require cranking up a specialized +version of octave-in-string-p. + +* Bug fixes. + +** Filling. + +The whole code related to filling needs to be redone. For example, + + [a b c d e] = sscanf ("This %s is %s another %s %s string", s, "C") + +followed by RET will comment the "C" if auto-filling is on because the +standard function indent-new-comment-line things that it is within a +comment (because of the comment start syntax class of `%' for MATLAB +compatibility). + +As long as single apostroph strings are not supported, one could simply +remove all MATLAB compatibility and change the syntax class of `%'. diff --git a/glob/COPYING.LIB b/glob/COPYING.LIB new file mode 100755 --- /dev/null +++ b/glob/COPYING.LIB @@ -0,0 +1,481 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/kpathsea/.gdbinit b/kpathsea/.gdbinit new file mode 100644 --- /dev/null +++ b/kpathsea/.gdbinit @@ -0,0 +1,5 @@ +directory /w/kpathsea + +define redo +file kpsewhich +end diff --git a/scripts/image/Make_IMAGE_toolbox b/scripts/image/Make_IMAGE_toolbox new file mode 100644 --- /dev/null +++ b/scripts/image/Make_IMAGE_toolbox @@ -0,0 +1,30 @@ +#!/bin/sh + +SRC=" + Make_IMAGE_toolbox + README + ToDo + colormap.m + default.img + gray.m + gray2ind.m + image.m + imagesc.m + imshow.m + ind2gray.m + ind2rgb.m + loadimage.m + ntsc2rgb.m + ocean.m + octtopnm.c + rgb2ind.m + rgb2ntsc.m + saveimage.m +" + +command="shar $SRC > image_toolbox.shar" + +echo $command +eval $command + +exit 0 diff --git a/scripts/image/README b/scripts/image/README new file mode 100644 --- /dev/null +++ b/scripts/image/README @@ -0,0 +1,49 @@ +Release 0.0 of the octave image processing toolbox. + +======================================================================== + +To install: + +1) Copy all of the m-files to a directory that is in octave's LOADPATH. + +2) Compile octtopnm.c (Either "sh octtopnm.c" *or* "make octtopnm" *or* + "cc -o octtopnm octtopnm.c" do the job for me) + +3) Copy octtopnm and default.img to some directory. + +4) Before calling any of the routines from octave, make sure that the + octave *global* variable IMAGEDIR contains the name of the directory + in step 3) + +A specific installation example: + +My HOME directory is /mpl/amr. I have all the m-files, octtopnm and +default.img stored in directory /mpl/amr/Apps/octave/image. My +.octaverc file contains the following lines: + +LOADPATH=[LOADPATH,":/mpl/amr/Apps/octave/image"]; +global IMAGEDIR="/mpl/amr/Apps/octave/image"; + +======================================================================== + +Notes: + +1) One of the programs "xv" or "xloadimage" must be in your PATH. + If you don't have either of these installed, I recommend + downloading and installing xv. (Try export.lcs.mit.edu or + mirror sites for source.) + +2) For a quick test of the major features try: + + image; # An "Easter egg" containing my favorite image. + imagesc(eye(40)); # Auto matrix scaling test. + colormap(ocean); # Change to a color colormap. + imagesc(rand(50)); # A color image. + +3) Octave won't "quit" (for me anyway) until I've killed all of the image + windows. + +Good luck! + +Tony Richardson +amr@mpl.ucsd.edu diff --git a/scripts/image/ToDo b/scripts/image/ToDo new file mode 100644 --- /dev/null +++ b/scripts/image/ToDo @@ -0,0 +1,2 @@ +Write a program to convert from ppm format to octave format. +We should eventually handle pbm and pgm files also (pnmtooct). diff --git a/scripts/image/default.img b/scripts/image/default.img new file mode 100644 --- /dev/null +++ b/scripts/image/default.img @@ -0,0 +1,178 @@ +# name: map +# type: matrix +# rows: 64 +# columns: 3 +0.00000 0.00000 0.00000 +0.01587 0.01587 0.01587 +0.03175 0.03175 0.03175 +0.04762 0.04762 0.04762 +0.06349 0.06349 0.06349 +0.07937 0.07937 0.07937 +0.09524 0.09524 0.09524 +0.11111 0.11111 0.11111 +0.12698 0.12698 0.12698 +0.14286 0.14286 0.14286 +0.15873 0.15873 0.15873 +0.17460 0.17460 0.17460 +0.19048 0.19048 0.19048 +0.20635 0.20635 0.20635 +0.22222 0.22222 0.22222 +0.23810 0.23810 0.23810 +0.25397 0.25397 0.25397 +0.26984 0.26984 0.26984 +0.28571 0.28571 0.28571 +0.30159 0.30159 0.30159 +0.31746 0.31746 0.31746 +0.33333 0.33333 0.33333 +0.34921 0.34921 0.34921 +0.36508 0.36508 0.36508 +0.38095 0.38095 0.38095 +0.39683 0.39683 0.39683 +0.41270 0.41270 0.41270 +0.42857 0.42857 0.42857 +0.44444 0.44444 0.44444 +0.46032 0.46032 0.46032 +0.47619 0.47619 0.47619 +0.49206 0.49206 0.49206 +0.50794 0.50794 0.50794 +0.52381 0.52381 0.52381 +0.53968 0.53968 0.53968 +0.55556 0.55556 0.55556 +0.57143 0.57143 0.57143 +0.58730 0.58730 0.58730 +0.60317 0.60317 0.60317 +0.61905 0.61905 0.61905 +0.63492 0.63492 0.63492 +0.65079 0.65079 0.65079 +0.66667 0.66667 0.66667 +0.68254 0.68254 0.68254 +0.69841 0.69841 0.69841 +0.71429 0.71429 0.71429 +0.73016 0.73016 0.73016 +0.74603 0.74603 0.74603 +0.76190 0.76190 0.76190 +0.77778 0.77778 0.77778 +0.79365 0.79365 0.79365 +0.80952 0.80952 0.80952 +0.82540 0.82540 0.82540 +0.84127 0.84127 0.84127 +0.85714 0.85714 0.85714 +0.87302 0.87302 0.87302 +0.88889 0.88889 0.88889 +0.90476 0.90476 0.90476 +0.92063 0.92063 0.92063 +0.93651 0.93651 0.93651 +0.95238 0.95238 0.95238 +0.96825 0.96825 0.96825 +0.98413 0.98413 0.98413 +1.00000 1.00000 1.00000 +# name: X +# type: matrix +# rows: 53 +# columns: 40 +35 35 36 37 35 36 36 35 34 35 36 36 37 38 37 37 39 38 38 40 +38 40 38 38 39 39 39 33 16 12 13 13 11 11 13 10 10 11 14 19 +35 35 35 36 35 36 36 35 35 35 36 35 36 37 37 37 38 37 38 38 +38 38 39 39 38 38 39 33 16 13 11 10 14 12 12 12 12 9 11 18 +35 36 36 35 37 36 35 37 36 35 36 36 36 37 37 39 37 38 38 38 +40 38 40 38 39 39 38 33 17 12 12 13 10 10 13 12 12 12 11 16 +36 35 37 36 37 34 36 36 35 35 36 36 36 37 37 37 38 38 38 38 +40 38 38 39 38 38 39 33 18 11 12 12 12 9 11 11 11 9 11 15 +36 36 35 36 35 36 37 36 36 36 36 36 37 37 38 38 37 38 38 37 +38 37 38 38 37 39 37 33 18 11 13 13 11 10 11 11 11 12 11 16 +35 36 36 37 37 37 36 36 36 36 37 36 38 38 36 34 32 29 27 25 +22 22 22 25 30 35 37 33 17 11 13 13 11 11 11 13 13 11 11 13 +36 37 36 36 37 36 36 36 37 37 37 36 35 33 28 27 20 15 13 12 +10 11 13 12 16 17 23 28 15 12 12 13 11 11 13 11 11 12 10 14 +35 36 35 37 37 38 37 37 37 37 36 35 34 28 19 14 13 13 12 10 +11 12 12 11 12 12 12 12 10 12 13 12 11 12 12 12 12 12 9 11 +35 35 37 37 37 36 38 37 35 37 35 27 18 14 13 11 10 11 11 13 +11 11 11 11 12 12 11 14 11 12 13 12 12 11 11 13 9 13 9 13 +30 35 36 37 36 37 35 36 38 33 23 16 11 12 11 12 11 12 13 13 +11 11 11 11 12 12 12 11 10 12 13 13 11 11 11 13 10 12 10 12 +27 33 34 37 38 36 37 36 32 22 14 11 11 8 9 12 10 12 13 13 +11 10 9 10 10 11 11 9 9 10 13 13 11 12 12 11 13 11 12 11 +21 28 36 36 37 37 36 33 16 12 12 11 10 11 11 11 11 13 15 11 +12 12 10 10 14 13 13 10 11 11 11 10 12 13 12 11 10 12 14 13 +18 25 33 36 37 37 33 19 13 12 11 9 9 11 11 11 10 13 11 11 +12 14 14 12 14 13 13 11 11 9 10 11 12 12 12 12 12 13 13 13 +16 21 31 36 36 33 19 15 9 10 12 11 11 10 12 10 8 11 13 13 +13 12 11 11 13 11 10 12 14 13 12 11 12 13 11 13 13 10 9 13 +14 19 26 34 33 21 13 13 9 11 12 11 12 9 11 10 11 9 13 13 +13 13 12 12 14 14 11 14 15 16 15 12 12 12 12 11 11 11 10 15 +11 18 25 32 24 14 11 10 12 14 13 13 12 13 14 11 10 12 14 17 +17 14 14 19 20 17 15 16 14 16 18 10 11 13 12 11 11 12 9 15 +13 15 22 26 17 13 13 13 13 12 15 16 17 19 18 18 20 22 22 25 +25 24 21 23 24 20 17 17 15 15 17 14 14 11 12 12 12 9 10 14 +12 14 22 22 12 13 15 17 15 15 20 23 26 26 24 27 29 29 31 33 +33 30 28 29 26 23 23 21 18 17 16 14 13 11 13 13 11 11 9 13 +11 14 21 19 12 12 17 20 17 18 24 30 34 33 33 34 35 36 40 39 +37 33 36 36 32 29 28 25 24 19 17 14 13 12 11 12 10 12 11 14 +10 15 21 17 13 13 18 22 22 25 32 37 38 39 39 41 38 43 46 44 +42 39 40 40 40 38 35 30 27 21 18 15 12 13 13 11 11 12 13 14 +11 16 21 18 12 11 19 23 26 32 35 39 40 41 41 43 43 45 45 44 +42 41 40 40 41 40 37 33 28 26 22 15 14 11 11 13 12 13 11 12 +12 16 22 19 11 10 16 22 27 33 38 40 42 43 43 44 43 44 44 44 +44 44 44 44 44 42 40 35 33 28 24 18 12 12 13 12 12 12 11 11 +14 18 24 19 13 10 16 21 26 33 39 41 44 43 44 45 44 46 46 47 +46 48 45 44 44 42 40 38 35 31 28 18 9 12 12 11 11 12 12 12 +13 19 22 15 11 9 14 21 26 34 40 43 45 43 45 46 47 49 50 49 +48 47 46 46 45 43 43 40 36 33 28 19 10 12 12 11 11 12 11 11 +17 20 19 11 13 10 15 21 28 35 40 43 44 45 46 46 48 48 49 49 +49 49 48 47 44 45 43 40 39 36 30 18 10 13 10 11 11 12 11 12 +19 27 15 14 13 10 14 22 32 37 41 44 44 46 46 46 48 49 49 49 +49 49 48 47 47 46 45 45 41 37 28 16 10 13 11 13 10 14 14 13 +31 31 16 13 13 10 16 24 30 36 39 41 44 45 47 47 48 49 49 49 +49 49 49 49 48 47 46 43 38 31 23 15 10 9 11 11 12 13 12 12 +42 40 24 15 13 14 20 24 29 34 38 42 43 45 46 48 49 50 49 50 +49 48 48 47 46 46 45 41 35 23 15 12 11 11 12 12 9 14 13 13 +53 55 38 18 16 19 20 25 28 36 42 44 43 44 45 47 48 50 51 50 +48 47 48 46 46 43 41 40 36 24 15 12 13 13 12 11 11 12 13 12 +61 61 49 22 21 23 25 27 35 40 44 46 44 40 39 45 47 50 51 47 +46 45 45 45 47 43 38 35 32 30 21 17 12 11 12 13 13 12 11 11 +62 61 54 32 29 32 29 30 34 35 36 38 36 36 37 43 49 53 49 43 +41 41 43 44 46 43 40 36 31 29 25 23 16 13 12 13 15 11 9 9 +62 62 60 42 36 38 35 32 32 30 19 17 19 31 33 40 48 53 47 40 +40 41 44 43 46 41 39 38 38 34 29 27 19 15 17 31 31 18 11 14 +62 61 61 46 38 37 34 38 42 37 32 37 38 37 35 39 43 46 44 39 +38 43 45 27 20 21 29 37 41 39 39 32 23 18 31 41 36 25 13 18 +60 61 61 45 39 34 33 40 45 44 44 42 41 40 36 38 41 41 39 40 +40 44 47 42 32 30 37 42 43 44 41 36 24 21 38 54 54 47 35 26 +59 61 61 45 39 35 35 39 43 43 45 44 45 45 38 41 44 43 41 35 +46 46 48 52 50 47 47 45 43 42 42 37 25 26 53 62 61 60 55 54 +45 52 56 44 37 37 36 41 41 44 44 47 49 44 43 46 49 48 42 40 +47 50 48 47 49 48 46 44 42 41 41 38 29 34 60 62 62 61 59 58 +39 38 42 38 36 35 38 41 38 45 46 50 51 47 46 46 44 46 45 41 +45 53 52 48 47 47 45 44 43 42 43 38 32 43 61 62 61 62 62 62 +43 40 35 33 34 37 37 42 43 43 46 50 51 48 45 44 46 47 44 43 +50 52 54 51 48 46 46 43 43 43 40 39 36 52 61 62 62 62 62 62 +38 40 40 31 32 35 38 39 41 44 45 50 49 47 44 44 43 43 43 48 +52 53 51 50 48 45 45 43 43 43 40 41 47 59 62 62 61 62 63 62 +38 40 40 37 32 36 34 34 43 43 45 48 49 47 42 44 43 43 43 46 +50 50 52 49 45 47 43 43 42 41 41 43 51 61 61 61 62 63 63 62 +41 38 39 37 35 30 35 38 38 42 44 45 45 44 38 38 40 41 43 44 +48 50 49 48 45 44 43 41 41 39 39 44 60 61 61 62 63 63 63 63 +44 40 36 38 34 30 31 33 37 39 42 45 45 37 30 29 31 33 40 43 +44 46 47 46 45 42 41 40 35 38 41 56 60 60 62 63 63 63 63 63 +48 46 41 36 32 29 31 32 38 41 44 44 39 27 25 28 29 31 30 35 +39 43 45 46 41 41 37 35 31 36 44 59 61 62 63 63 63 63 63 63 +48 47 45 42 37 30 26 29 35 40 44 44 34 28 27 29 29 29 29 35 +44 45 46 44 41 38 35 30 29 38 58 62 63 63 63 63 63 63 62 61 +49 48 48 46 41 37 31 35 32 33 41 40 32 29 29 29 29 31 33 36 +44 44 44 42 41 33 35 30 33 56 60 58 60 62 60 62 62 61 61 59 +47 49 48 48 45 42 38 46 41 34 32 34 35 33 33 33 37 37 38 39 +36 40 39 39 39 39 37 36 43 47 45 45 50 53 56 60 62 61 59 55 +45 47 50 46 45 44 40 44 47 43 39 39 39 38 38 38 40 39 39 34 +36 39 43 41 47 49 51 51 51 49 47 45 42 43 45 56 62 58 50 49 +43 44 47 44 45 45 39 39 46 45 43 50 50 45 38 41 43 38 31 36 +43 49 50 50 53 57 56 56 56 54 53 52 49 47 44 49 57 51 52 51 +39 48 46 42 42 46 36 33 36 40 44 49 49 51 44 47 53 50 46 37 +43 49 53 54 57 57 58 60 57 58 58 57 54 51 49 47 47 51 53 51 +46 52 47 41 47 45 38 45 52 48 43 44 47 48 46 47 54 54 49 43 +42 44 47 51 53 55 55 56 58 57 60 57 59 58 55 51 49 52 50 47 +50 50 44 43 51 45 41 57 62 61 57 51 48 47 48 48 54 52 52 52 +51 50 47 46 48 51 53 54 51 52 53 56 57 58 60 54 48 52 48 47 +44 41 41 49 52 43 42 60 62 62 62 63 61 61 61 60 52 53 54 55 +56 53 51 51 52 51 48 47 45 46 49 50 54 57 58 53 48 47 47 48 +30 35 46 50 47 37 45 60 61 62 63 63 63 63 63 63 61 54 52 54 +55 54 54 55 56 55 54 52 46 44 45 48 51 53 55 53 46 43 47 49 diff --git a/scripts/image/mkinstalldirs b/scripts/image/mkinstalldirs new file mode 100755 --- /dev/null +++ b/scripts/image/mkinstalldirs @@ -0,0 +1,36 @@ +#!/bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Last modified: Wed Jan 25 09:35:21 1995 +# Public domain + +errstatus=0 + +dirmode=0755 + +for file in ${1+"$@"} ; do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d in ${1+"$@"} ; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" || errstatus=$? + echo "chmod $dirmode $pathcomp" 1>&2 + chmod $dirmode "$pathcomp" || errstatus=$? + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/scripts/mkinstalldirs b/scripts/mkinstalldirs new file mode 100755 --- /dev/null +++ b/scripts/mkinstalldirs @@ -0,0 +1,36 @@ +#!/bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Last modified: Wed Jan 25 09:35:21 1995 +# Public domain + +errstatus=0 + +dirmode=0755 + +for file in ${1+"$@"} ; do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d in ${1+"$@"} ; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" || errstatus=$? + echo "chmod $dirmode $pathcomp" 1>&2 + chmod $dirmode "$pathcomp" || errstatus=$? + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here