xmotd-1.17.3b-lite/ 42755 153 145 0 7674161300 12107 5ustar elfusersxmotd-1.17.3b-lite/README100644 153 145 12746 7674157564 13135 0ustar elfusersXMOTD 1.17.3 README http://www.ee.ryerson.ca/~elf/xmotd/ February 2003 Luis Fernandes, Ryerson University, Toronto, Canada xmotd is a message-of-the-day browser for X11 and dumb-terminals. WHAT'S NEW 1.17.3 fixes a timestamp bug introduced in 1.17.2. The patch was contributed by Marcin Owsiany and also Andy Roosen (who also added more features to xmotd; these will appear in a future version). REQUIREMENTS xmotd requires, a C compiler and at minimum, X11R5 including Xt (the X Toolkit) for the resource and command-line parsing functions, and the Athena widget (Xaw) libraries. Optionally, Xm (the Motif toolkit) should be installed if you wish to compile the Motif version; the Xpm library should be installed if you wish to compile-in support for colour logos. The HTML library is not included with the 'lite' distribution. BUILDING First, unpack the distribution with: zcat xmotd-1.17.x.tar.gz | tar xvf - A directory called xmotd-1.17.x will be created; cd into that directory and to build the default flavour type: xmkmf -a; make all Note: If your xmkmf does not support the -a option (e.g. /usr/openwin/bin/xmkmf), type: xmkmf; make makefiles; make all xmotd can be built in different flavours: - with the Athena widget library (default), or; - with Athena & HTML widget, or; - with the Motif widget library, or; - with Motif and HTML widget. Refer to the commentary in the Imakefile for details on customizing the build for HTML, Motif and XPM support. INSTALLATION After the compilation is complete (ignore compilation warnings when the HTML widget is being compiled) and if you wish to install xmotd automatically, type: make install NOTE: that "make install" will replace your app-defaults file (if you have previously installed xmotd ) with the app-defaults in the distribution. If you have modified your app-defaults, make a copy before invoking the install. Alternatively, you can manually copy the xmotd binary to the install directory and the manual-page to the man8 directory. PLATFORMS It has been sucessfully compiled here at Ryerson under SunOS 4.1.4, Solaris 2.5.1, 2.6 and 2.8 and GNU/Linux 2.4.18. xmotd has also been successfully compiled on the following platforms: HP 9000/735 running HP-UX 9.03 (X11R5). IBM RS/6000 model C10 (PowerPC) running AIX v3.2.5. Silicon Graphics INDY running Irix 5.3 (X11R5) Mips/CDC (running EPIX) and PCS/M68030 (running MUNIX/SysV). MANIFEST This distribution contains the following files: README (this file) ACKNOWLEDGEMENTS (contributors to xmotd) GNU (Terms of GPL) Imakefile (X Consortium's gift to humanity) Makefile (...3 guesses) XMotd (app-defaults) XMotd_motif (Motif app-defaults) xmotd.8 ([nt]roff man-page) xlogo.bm (default bitmap, the "X"-logo) xlogo.xpm (default pixmap used w/ xpm support) *.c, *.h (source) browser (shell script) libhtmlw/ (NCSA HTML widget; not in 'lite' version) xmotd has many options. Refer to the man-page for further details on customizing and more examples showing xmotd in use. You can read the man-page, without installing it, with the following command: nroff -man xmotd.8 | less APP-DEFAULTS xmotd can be customized via editres. Reasonably adequate application defaults are compiled into xmotd so it is NOT necessary to install the supplied app-defaults file. You can also customize the resources with the supplied app-defaults file, XMotd. The Motif version is called XMotd_motif; rename it XMotd before installing and comment-out appropriate resources if building with HTML support. The app-defaults file installs in: $ProjectRoot/lib/X11/app-defaults/XMotd All resources are available as command-line option equivalents so xmotd may be customized completely via the command-line. COPYRIGHT (xmotd) xmotd Copyright 1993 (released as xbanner, no public release) xmotd Copyright 1994-97, 1999, 2001, 2003 Luis Fernandes Permission to use, copy, hack, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. xmotd IS PRESENTED AS IS, WITHOUT ANY IMPLIED OR WRITTEN WARRANTY. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. COPYRIGHT (HTML widget) libhtmlw is copyright (C) 1993, Board of Trustees of the University of Illinois. See the file libhtmlw/HTML.c for the complete text of the NCSA copyright. NOTE: THE HTML WIDGET IS NOT DISTRIBUTED IN THE "LITE" VERSION OF THE xmotd DISTRIBUTION, WHICH IS THEREFORE FULLY COMPLIANT WITH THE GPL. xmotd-1.17.3b-lite/GNU100644 153 145 43070 6344400427 12601 0ustar elfusers GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 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. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, 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 software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, 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 redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's 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 give any other recipients of the Program a copy of this License along with the Program. 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 Program or any portion of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, 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 Program, 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 Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) 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; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, 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 executable. 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. If distribution of executable or 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 counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program 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. 5. 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 Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program 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. 7. 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 Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program 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 Program. 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. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program 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. 9. The Free Software Foundation may publish revised and/or new versions of the 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 Program 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 Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, 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 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. 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) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. xmotd-1.17.3b-lite/browser100755 153 145 1613 6403612561 13613 0ustar elfusers#!/bin/sh #============================================================================ # SYNOPSIS # browser URL # # DESCRIPTION # browser opens a specified URL in an already open browser or launches # a new browser if none is currently running. # # xmotd call browser to open URL then waits for the browser to exit. # Hence browser MUST return after opening the specified URL. # # AUTHOR # Stuart A. Harvey #============================================================================ URL=$1 TOOLWAIT=xtoolwait BROWSER=${BROWSER:-/usr/local/bin/netscape} REMOTE=-remote #---------------------------------------------------------------------------- # Direct an open browser to the specified URL # ${BROWSER} ${REMOTE} "OpenURL(${URL})" status=$? if [ ${status} -ne 0 ]; then xtoolwait ${BROWSER} ${URL} status=$? [ ${status} -ne 0 ] && sleep 3 fi exit ${status} xmotd-1.17.3b-lite/Imakefile100644 153 145 7446 7674161265 14040 0ustar elfusersXCOMM BUILD INSTRUCTIONS (ALSO SEE NOTES): XCOMM ------------------- XCOMM Step 1. xmkmf -a XCOMM Step 2. make all XCOMM ----- XCOMM NOTES XCOMM ----- XCOMM If using /usr/openwin/bin/xmkmf, replace step 1 with: XCOMM 1. xmkmf; make makefiles; make includes; make depend XCOMM XCOMM If building with Motif and HTML replace step 2 with: XCOMM 2. make all EXTRA_DEFINES="-DMOTIF -DHAVE_HTML" XCOMM XCOMM CUSTOMIZING INSTRUCTIONS: To customize xmotd, uncomment XCOMM the "#define" statments appropriately. XCOMM If you wish to use an HTML widget instead of an ASCII text widget, XCOMM then uncomment the following line: XCOMM #define HAVE_HTML XCOMM If you wish to use colour xpm pixmaps for the icon and have the XCOMM Xpm library installed, then uncomment the following line: XCOMM #define HAVE_XPM XCOMM If you wish to build with Motif, then uncomment the following line: XCOMM #define MOTIF XCOMM If compiling MOTIF under SOLARIS 2.x (or CDE on other platforms XCOMM (untested)), uncomment the following line: XCOMM #define SOLARIS2 #ifdef MOTIF #ifdef SOLARIS2 XCOMM These are set if you are building on Solaris 2.x/CDE. You may XCOMM have to set LD_LIBRARY_PATH when you run it (use a shell XCOMM wrapper around xmotd). MOTIF_SOLARIS_LD_FLAG = -R/usr/dt/lib MOTIF_LIB_DIR = -L/usr/dt/lib MOTIF_INCLUDE = -I/usr/dt/include #else XCOMM On other systems, if the Motif libs & includes are NOT installed XCOMM in /usr/lib and /usr/include then uncomment and fill-in the following XCOMM paths appropriately. XCOMM MOTIF_LIB_DIR = -L XCOMM MOTIF_INCLUDE = -I #endif #endif XCOMM Don't touch anything past this point unless you know what you're doing. XCOMM --x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x-- XCOMM CC = purify gcc SRCS = main.c xmotd.c changed.c textmode.c usage.c browser.c logo.c atom.c OBJS = main.o xmotd.o changed.o textmode.o usage.o browser.o logo.o atom.o INCLS = maindefs.h appdefs.h main.h CDEBUGFLAGS = -g MANSUFFIX = 8 MANIFEST = README GNU ACKNOWLEDGEMENTS Imakefile browser\ Makefile XMotd XMotd_motif xmotd.8 xlogo.bm xlogo.xpm\ $(SRCS) $(INCLS) XCOMM No space after the equals-sign VER =1.17.3b LITE =1.17.3b .PRECIOUS: distrib #ifdef HPArchitecture CCOPTIONS = -Aa -D_HPUX_SOURCE #endif #ifdef HAVE_XPM XPM_LIB = -lXpm XPM_DEFINE = -DHAVE_XPM #endif #ifdef HAVE_HTML HTML_DEFINE = -DHAVE_HTML HTML_SUB_DIR = ./libhtmlw HTML_DEP_LIB = htmlw HTML_LIB_DIR = -L$(HTML_SUB_DIR) HTML_INCLUDE = -I$(HTML_SUB_DIR) HTML_LIB = -lhtmlw MAKELIST = $(HTML_SUB_DIR) #endif #ifdef MOTIF MOTIF_DEFINE = -DMOTIF MOTIF_LIB = -lXm LD_LIBRARY_PATH = $(MOTIF_SOLARIS_LD_FLAG) #endif EXTRA_DEFINES = $(XPM_DEFINE) $(HTML_DEFINE) $(MOTIF_DEFINE) MOTD_LIBRARIES = $(XPM_LIB) $(HTML_LIB_DIR) $(HTML_LIB) $(MOTIF_LIB_DIR) $(MOTIF_LIB) EXTRA_INCLUDES = $(HTML_INCLUDE) $(MOTIF_INCLUDE) XCOMM This is what the final link looks like: XCOMM LOCAL_LIBRARIES = -lXm -lXmu -lXt -lXext -lX11 -lsocket -lgen -lucb -L/usr/ucblib -R/usr/ucblib -R/usr/X11R6/lib LOCAL_LIBRARIES = $(MOTD_LIBRARIES) XawClientLibs DEPLIBS = $(HTML_DEP_LIB) ComplexProgramTarget(xmotd) InstallAppDefaults(XMotd) #ifdef HAVE_HTML MakefileSubdirs($(HTML_SUB_DIR)) NormalLibraryObjectRule() NamedTargetSubdirs(htmlw, $(HTML_SUB_DIR), , , ) #endif distrib: $(MANIFEST) ./distrib lite: $(MANIFEST) ./distrib lite XCOMM Generate man-page man: xmotd.8 rm -f xmotd-man.ps; troff -mansun xmotd.8 |dpost >xmotd-mansun.ps XCOMM This target builds the java distribution, Wed Sep 26 19:24:51 2001 java-distrib: tar zcvf jmotd-0.55.tar.gz jmotd/README jmotd/logo.gif jmotd/xmotd* jmotd/HistoryItem* xmotd-1.17.3b-lite/Makefile100644 153 145 37545 7674161300 13700 0ustar elfusers# Makefile generated by imake - do not edit! # $XConsortium: imake.c /main/90 1996/11/13 14:43:23 lehors $ # ---------------------------------------------------------------------- # Makefile generated from "Imake.tmpl" and # $XConsortium: Imake.tmpl /main/243 1996/11/13 14:42:56 lehors $ # all:: .SUFFIXES: .i # $XConsortium: Imake.cf /main/26 1996/09/28 16:05:09 rws $ # ----------------------------------------------------------------------- # site-specific configuration parameters that need to come before # the platform-specific parameters - edit site.def to change # site: $XConsortium: site.def /main/revisionist/4 1996/12/31 08:02:07 kaleb $ # ---------------------------------------------------------------------- # platform-specific configuration parameters - edit sun.cf to change # platform: $XConsortium: sun.cf /main/160 1996/12/26 08:52:18 kaleb $ # operating system: SunOS (5.5.0) # $XConsortium: svr4.cf /main/16 1996/09/28 16:13:41 rws $ # $XConsortium: sv4Lib.rules /main/18 1996/09/28 16:13:29 rws $ # ---------------------------------------------------------------------- # site-specific configuration parameters that go after # the platform-specific parameters - edit site.def to change # site: $XConsortium: site.def /main/revisionist/4 1996/12/31 08:02:07 kaleb $ # --------------------------------------------------------------------- # Imake rules for building libraries, programs, scripts, and data files # rules: $XConsortium: Imake.rules /main/217 1996/12/05 09:48:26 kaleb $ PATHSEP = / SHELL = /bin/sh TOP = . CURRENT_DIR = . IMAKE = imake DEPEND = makedepend MKDIRHIER = mkdirhier EXPORTLISTGEN = exportlistgen CONFIGSRC = $(TOP)/config IMAKESRC = $(CONFIGSRC)/imake DEPENDSRC = $(CONFIGSRC)/makedepend INCROOT = /usr/X11/include USRLIBDIR = /usr/X11/lib SHLIBDIR = /usr/X11/lib LINTLIBDIR = $(USRLIBDIR)/lint MANPATH = /usr/X11/man MANSOURCEPATH = $(MANPATH)/man MANDIR = $(MANSOURCEPATH)1 LIBMANDIR = $(MANSOURCEPATH)3 FILEMANDIR = $(MANSOURCEPATH)$(FILEMANSUFFIX) AR = /usr/ccs/bin/ar cq BOOTSTRAPCFLAGS = CC = gcc -fpcc-struct-return AS = /usr/ccs/bin/as COMPRESS = compress GZIP = gzip CPP = /usr/ccs/lib/cpp $(STD_CPP_DEFINES) PREPROCESSCMD = gcc -fpcc-struct-return -E $(STD_CPP_DEFINES) INSTALL = /usr/ucb/install INSTALLFLAGS = -c LD = /usr/ccs/bin/ld LEX = /usr/ccs/bin/lex LEXLIB = -ll YACC = /usr/ccs/bin/yacc CCYACC = /usr/ccs/bin/yacc LINT = lint LINTLIBFLAG = -o LINTOPTS = -bh LN = ln -s MAKE = /usr/ccs/bin/make MV = mv CP = cp RM = rm -f MANSUFFIX = 1x LIBMANSUFFIX = 3x FILEMANSUFFIX = 4 TROFF = psroff NROFF = nroff MSMACROS = -ms MANMACROS = -man TBL = tbl EQN = eqn NEQN = neqn COL = col DVIPS = dvips LATEX = latex STD_INCLUDES = STD_CPP_DEFINES = -Dsun -DSVR4 $(PROJECT_DEFINES) STD_DEFINES = -Dsun -DSVR4 $(PROJECT_DEFINES) EXTRA_LOAD_FLAGS = EXTRA_LDOPTIONS = EXTRA_LIBRARIES = -lsocket -lnsl TAGS = ctags SHAREDCODEDEF = SHLIBDEF = SHLIBLDFLAGS = -G -z text PICFLAGS = -fpic CXXPICFLAGS = -K PIC PROTO_DEFINES = INSTPGMFLAGS = INSTBINFLAGS = -m 0755 INSTUIDFLAGS = -m 4711 INSTLIBFLAGS = -m 0644 INSTINCFLAGS = -m 0444 INSTMANFLAGS = -m 0444 INSTDATFLAGS = -m 0444 INSTKMEMFLAGS = -g sys -m 2711 PROJECTROOT = /usr/X11 CDEBUGFLAGS = -O2 CCOPTIONS = ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) LDPRELIB = -L$(USRLIBDIR) LDPOSTLIB = LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH) CCLINK = $(CCENVSETUP) $(CC) CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH) CXXLINK = $(CXXENVSETUP) $(CXX) LDSTRIPFLAGS = -x LDCOMBINEFLAGS = -r DEPENDFLAGS = MACROFILE = sun.cf RM_CMD = $(RM) IMAKE_DEFINES = IRULESRC = $(CONFIGDIR) IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \ $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \ $(EXTRA_ICONFIGFILES) # $XConsortium: X11.rules /main/2 1996/12/04 10:13:00 swick $ # ---------------------------------------------------------------------- # X Window System Build Parameters and Rules # $XConsortium: X11.tmpl /main/290 1996/12/27 16:14:21 kaleb $ # ----------------------------------------------------------------------- # X Window System make variables; these need to be coordinated with rules XTOP = $(TOP) BINDIR = /usr/X11/bin BUILDINCROOT = $(TOP)/exports BUILDINCDIR = $(BUILDINCROOT)/include BUILDINCTOP = ../.. BUILDLIBDIR = $(TOP)/exports/lib BUILDLIBTOP = ../.. BUILDBINDIR = $(TOP)/exports/bin BUILDBINTOP = ../.. XBUILDINCROOT = $(XTOP)/exports XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 XBUILDINCTOP = ../../.. XBUILDBINDIR = $(XBUILDINCROOT)/bin INCDIR = $(INCROOT) ADMDIR = /usr/adm LIBDIR = $(USRLIBDIR)/X11 TOP_X_INCLUDES = FONTDIR = $(LIBDIR)/fonts XINITDIR = $(LIBDIR)/xinit XDMDIR = $(LIBDIR)/xdm TWMDIR = $(LIBDIR)/twm XSMDIR = $(LIBDIR)/xsm NLSDIR = $(LIBDIR)/nls XLOCALEDIR = $(LIBDIR)/locale PEXAPIDIR = $(LIBDIR)/PEX LBXPROXYDIR = $(LIBDIR)/lbxproxy PROXYMANAGERDIR = $(LIBDIR)/proxymngr XPRINTDIR = $(LIBDIR) XAPPLOADDIR = $(LIBDIR)/app-defaults FONTCFLAGS = -t INSTAPPFLAGS = $(INSTDATFLAGS) RGB = rgb FONTC = bdftopcf MKFONTDIR = mkfontdir DOCUTILSRC = $(XTOP)/doc/util XDOCMACROS = $(DOCUTILSRC)/macros.t XIDXMACROS = $(DOCUTILSRC)/indexmacros.t PROGRAMSRC = $(TOP)/programs LIBSRC = $(XTOP)/lib FONTSRC = $(XTOP)/fonts INCLUDESRC = $(BUILDINCROOT)/include XINCLUDESRC = $(INCLUDESRC)/X11 SERVERSRC = $(XTOP)/programs/Xserver CONTRIBSRC = $(XTOP)/../contrib UNSUPPORTEDSRC = $(XTOP)/unsupported DOCSRC = $(XTOP)/doc RGBSRC = $(XTOP)/programs/rgb BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir FONTSERVERSRC = $(PROGRAMSRC)/xfs FONTINCSRC = $(XTOP)/include/fonts EXTINCSRC = $(XTOP)/include/extensions TRANSCOMMSRC = $(LIBSRC)/xtrans TRANS_INCLUDES = -I$(TRANSCOMMSRC) XENVLIBDIR = $(USRLIBDIR) CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) # $XConsortium: sunLib.tmpl /main/44 1996/12/09 16:34:30 kaleb $ ICONV_INBUF_DEFINE = -DICONV_INBUF_CONST=const # $XConsortium: sv4Lib.tmpl /main/23 1996/12/04 10:11:01 swick $ XMULIBONLY = -lXmu REGEXSYSLIB = -lgen DYNLIBSYSLIB = -ldl IAFSYSLIB = XLIBSRC = $(LIBSRC)/X11 SOXLIBREV = 6.1 DEPXONLYLIB = XONLYLIB = -lX11 LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln XLIBONLY = $(XONLYLIB) XEXTLIBSRC = $(LIBSRC)/Xext SOXEXTREV = 6.3 DEPEXTENSIONLIB = EXTENSIONLIB = -lXext LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln LINTEXTENSIONLIB = $(LINTEXTENSION) DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) XLIB = $(EXTENSIONLIB) $(XONLYLIB) LINTXLIB = $(LINTXONLYLIB) XAUTHSRC = $(LIBSRC)/Xau DEPXAUTHLIB = $(USRLIBDIR)/libXau.a XAUTHLIB = -lXau LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln XDMCPLIBSRC = $(LIBSRC)/Xdmcp DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a XDMCPLIB = -lXdmcp LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln XMUSRC = $(LIBSRC)/Xmu SOXMUREV = 6.0 DEPXMULIB = XMULIB = -lXmu LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln OLDXLIBSRC = $(LIBSRC)/oldX SOOLDXREV = 6.0 DEPOLDXLIB = OLDXLIB = -loldX LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln XPLIBSRC = $(LIBSRC)/Xp SOXPREV = 6.2 DEPXPLIB = XPLIB = -lXp LINTXP = $(LINTLIBDIR)/llib-lXp.ln TOOLKITSRC = $(LIBSRC)/Xt SOXTREV = 6.0 DEPXTOOLONLYLIB = XTOOLONLYLIB = -lXt LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) LINTXTOOLLIB = $(LINTXTOOLONLYLIB) XALIBSRC = $(LIBSRC)/Xa DEPvarLIB = $(USRLIBDIR)/libXa.a varLIB = -lXa LINTvar = $(LINTLIBDIR)/llib-lXa.ln AWIDGETSRC = $(LIBSRC)/Xaw SOXAWREV = 6.1 DEPXAWLIB = XAWLIB = -lXaw LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln XILIBSRC = $(LIBSRC)/Xi SOXINPUTREV = 6.0 DEPXILIB = XILIB = -lXi LINTXI = $(LINTLIBDIR)/llib-lXi.ln XTESTLIBSRC = $(LIBSRC)/Xtst SOXTESTREV = 6.1 DEPXTESTLIB = XTESTLIB = -lXtst LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln PEXLIBSRC = $(LIBSRC)/PEX5 SOPEXREV = 6.0 DEPPEXLIB = PEXLIB = -lPEX5 LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln XIELIBSRC = $(LIBSRC)/XIE SOXIEREV = 6.0 DEPXIELIB = XIELIB = -lXIE LINTXIE = $(LINTLIBDIR)/llib-lXIE.ln PHIGSLIBSRC = $(LIBSRC)/PHIGS DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a PHIGSLIB = -lphigs LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a XBSDLIB = -lXbsd LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln ICESRC = $(LIBSRC)/ICE SOICEREV = 6.3 DEPICELIB = ICELIB = -lICE LINTICE = $(LINTLIBDIR)/llib-lICE.ln SMSRC = $(LIBSRC)/SM SOSMREV = 6.0 DEPSMLIB = SMLIB = -lSM LINTSM = $(LINTLIBDIR)/llib-lSM.ln XKEYSRC = $(LIBSRC)/Xkey SOXKEYREV = 6.0 DEPXKEYLIB = XKEYLIB = -lXkey LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln FSLIBSRC = $(LIBSRC)/FS DEPFSLIB = $(USRLIBDIR)/libFS.a FSLIB = -lFS LINTFS = $(LINTLIBDIR)/llib-lFS.ln FONTLIBSRC = $(LIBSRC)/font DEPFONTLIB = $(USRLIBDIR)/libfont.a FONTLIB = -lfont LINTFONT = $(LINTLIBDIR)/llib-lfont.ln XKBFILELIBSRC = $(LIBSRC)/xkbfile DEPXKBFILELIB = $(USRLIBDIR)/libxkbfile.a XKBFILELIB = -lxkbfile LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln XKBCOMPCMD = xkbcomp DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) DEPLIBS1 = $(DEPLIBS) DEPLIBS2 = $(DEPLIBS) DEPLIBS3 = $(DEPLIBS) DEPLIBS4 = $(DEPLIBS) DEPLIBS5 = $(DEPLIBS) DEPLIBS6 = $(DEPLIBS) DEPLIBS7 = $(DEPLIBS) DEPLIBS8 = $(DEPLIBS) DEPLIBS9 = $(DEPLIBS) DEPLIBS10 = $(DEPLIBS) CONFIGDIR = $(LIBDIR)/config USRLIBDIRPATH = $(USRLIBDIR) LDPRELIBS = -L$(USRLIBDIR) LDPOSTLIBS = TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES) PROJECT_DEFINES = # ---------------------------------------------------------------------- # start of Imakefile # BUILD INSTRUCTIONS (ALSO SEE NOTES): # ------------------- # Step 1. xmkmf -a # Step 2. make all # ----- # NOTES # ----- # If using /usr/openwin/bin/xmkmf, replace step 1 with: # 1. xmkmf; make makefiles; make includes; make depend # # If building with Motif and HTML replace step 2 with: # 2. make all EXTRA_DEFINES="-DMOTIF -DHAVE_HTML" # # CUSTOMIZING INSTRUCTIONS: To customize xmotd, uncomment # the "#define" statments appropriately. # If you wish to use an HTML widget instead of an ASCII text widget, # then uncomment the following line: # #define HAVE_HTML # If you wish to use colour xpm pixmaps for the icon and have the # Xpm library installed, then uncomment the following line: # #define HAVE_XPM # If you wish to build with Motif, then uncomment the following line: # #define MOTIF # If compiling MOTIF under SOLARIS 2.x (or CDE on other platforms # (untested)), uncomment the following line: # #define SOLARIS2 # Don't touch anything past this point unless you know what you're doing. # --x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x-- # CC = purify gcc SRCS = main.c xmotd.c changed.c textmode.c usage.c browser.c logo.c atom.c OBJS = main.o xmotd.o changed.o textmode.o usage.o browser.o logo.o atom.o INCLS = maindefs.h appdefs.h main.h CDEBUGFLAGS = -g MANSUFFIX = 8 MANIFEST = README GNU ACKNOWLEDGEMENTS Imakefile browser\ Makefile XMotd XMotd_motif xmotd.8 xlogo.bm xlogo.xpm\ $(SRCS) $(INCLS) # No space after the equals-sign VER =1.17.3b LITE =1.17.3b .PRECIOUS: distrib EXTRA_DEFINES = $(XPM_DEFINE) $(HTML_DEFINE) $(MOTIF_DEFINE) MOTD_LIBRARIES = $(XPM_LIB) $(HTML_LIB_DIR) $(HTML_LIB) $(MOTIF_LIB_DIR) $(MOTIF_LIB) EXTRA_INCLUDES = $(HTML_INCLUDE) $(MOTIF_INCLUDE) # This is what the final link looks like: # LOCAL_LIBRARIES = -lXm -lXmu -lXt -lXext -lX11 -lsocket -lgen -lucb -L/usr/ucblib -R/usr/ucblib -R/usr/X11R6/lib LOCAL_LIBRARIES = $(MOTD_LIBRARIES) $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XLIB) DEPLIBS = $(HTML_DEP_LIB) PROGRAM = xmotd all:: xmotd xmotd: $(OBJS) $(DEPLIBS) $(RM) $@ $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) install:: xmotd @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) xmotd $(DESTDIR)$(BINDIR)/xmotd install.man:: xmotd.man @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xmotd.man $(DESTDIR)$(MANDIR)/xmotd.$(MANSUFFIX) depend:: $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) lint: $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) lint1: $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) clean:: $(RM) xmotd install:: XMotd.ad @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XMotd.ad $(DESTDIR)$(XAPPLOADDIR)/XMotd distrib: $(MANIFEST) ./distrib lite: $(MANIFEST) ./distrib lite # Generate man-page man: xmotd.8 rm -f xmotd-man.ps; troff -mansun xmotd.8 |dpost >xmotd-mansun.ps # This target builds the java distribution, Wed Sep 26 19:24:51 2001 java-distrib: tar zcvf jmotd-0.55.tar.gz jmotd/README jmotd/logo.gif jmotd/xmotd* jmotd/HistoryItem* # ---------------------------------------------------------------------- # common rules for all Makefiles - do not edit .c.i: $(RM) $@ $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ emptyrule:: clean:: $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* Makefile:: -@if [ -f Makefile ]; then set -x; \ $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ else exit 0; fi $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) tags:: $(TAGS) -w *.[ch] $(TAGS) -xw *.[ch] > TAGS man_keywords:: catman -M $(DESTDIR)$(MANPATH) -w # ---------------------------------------------------------------------- # empty rules for directories that do not have SUBDIRS - do not edit install:: @echo "install in $(CURRENT_DIR) done" install.man:: @echo "install.man in $(CURRENT_DIR) done" install.linkkit:: @echo "install.linkkit in $(CURRENT_DIR) done" Makefiles:: includes:: depend:: # ---------------------------------------------------------------------- # dependencies generated by makedepend xmotd-1.17.3b-lite/XMotd100644 153 145 3153 6346612176 13171 0ustar elfusers!XMotd: app-defaults for xmotd 1.15 !TITLE !use a backslash to quote leading spaces in the title *title.label: \ This is the\nMessage of the Day\n\n !BITMAP !If you have a custom bitmap you wish to display, uncomment the next !resource and correct the path- and file-name to point to the location !of your X-bitmap file. N.B.: the bitmap can also be specified with the !"-bitmaplogo" command-line option. !*BitmapLogo: /usr/local/site.bm !overall-colour *form.background: lightsteelblue3 !Shape the buttons; this is better than the default, crappy, Dr. Seuss !flat-background buttons. ShapeStyle is ignored, however, if Kaleb's !3D Athena widgets are installed. *shapeStyle: oval !the text-box that displays the motd *Text.height: 500 *Text.width: 680 *Text*font: -*-times-medium-r-*-*-*-140-* *Text*scrollVertical: whenNeeded *Text*scrollHorizontal: whenNeeded *Text*autoFill: off *Text*input: False *Text*background: lightsteelblue1 !Additional resource for the title *title.font: -*-times-bold-i-*-*-*-240-* *title.width: 500 *title.borderWidth: 0 *title.background: lightsteelblue3 !Additional resource for the bitmap *logo.background: lightsteelblue3 *logo.borderWidth: 0 !the horizontal-line *hline.borderWidth: 0 *hline.height: 2 *hline.width: 744 *hline.background: black *hline.foreground: black !The label that displays the date & filename (below the dismiss button) *info.font: -*-times-bold-i-*-*-*-140-* *info.borderWidth: 0 *info.background: lightsteelblue3 !Quit Button *quit.font: -*-times-bold-r-*-*-*-240-* *quit.label: Dismiss *quit*foreground: dodgerblue4 *quit*background: lightsteelblue3 xmotd-1.17.3b-lite/XMotd_motif100644 153 145 3261 6346612214 14360 0ustar elfusers!XMotd: Motif app-defaults for xmotd 1.15 !TITLE !Use a backslash to quote leading spaces in the title *title*labelString: \ This is the\nMessage of the Day\n\n !BITMAP !If you have a custom bitmap you wish to display, uncomment the next !resource and correct the path- and file-name to point to the location !of your X-bitmap file. N.B.: the bitmap can also be specified with the !"-bitmaplogo" command-line option. !*BitmapLogo: /usr/local/site.bm !overall-colour *form.background: lightsteelblue3 !The text-box that displays the motd *text.rows: 25 *text.columns: 80 *text*fontList: -*-times-medium-r-*-*-*-140-* *text*wordWrap: False *text*background: white *text*borderWidth: 0 *text*background: lightsteelblue1 !Used for the HTML widget !Uncomment these, and comment-out the corresponding ones above !*text.width: 680 !*text.height: 500 !*text*borderWidth: 1 !Additional resource for the title *title*fontList: -*-times-bold-i-*-*-*-240-* *title*width: 500 *title*borderWidth: 0 *title*background: lightsteelblue3 !Resources for the bitmap *logo*background: lightsteelblue3 *logo*borderColor: lightsteelblue3 !The logo has a damned border which the following resource is !supposed to eliminate. But it doesn't work! *logo*borderWidth: 0 !The horizontal line *hline.width: 680 *hline.background: black *hline.foreground: black !The label that displays the date & filename (below the dismiss button) *info*fontList: -*-times-*-r-*-*-*-140-* *info*background: lightsteelblue3 !Quit Button *quit.fontList: -*-times-bold-i-*-*-*-240-* !(unfortunately the "Next Message" string is hard-coded) *quit.labelString: Dismiss *quit*foreground: dodgerblue4 *quit*background: lightsteelblue3 xmotd-1.17.3b-lite/xmotd.8100444 153 145 42260 7623034310 13442 0ustar elfusers.\" $Id: xmotd.8,v 1.11 2003/02/14 00:31:02 elf Exp $" .TH XMOTD 8 "Nov 24 1999" "X11 Release 6.4" .SH NAME xmotd \- message-of-the-day browser for X (and dumb terminals, VT100, etc.) .SH SYNOPSIS .B /usr/local/bin/xmotd [\fBX-toolkit options\fP] [\fBxmotd-options\fP] \fIfile\fP [\fIfile2\fP ... ] .B /usr/local/bin/xmotd [\fBX-toolkit options\fP] [\fBxmotd-options\fP] \fIdirectory\fP .PP or (in text-mode) .B /usr/local/bin/xmotd [\fB-stampfile\fP \fIstamp-file\fP] [\fB-wakeup\fP \fIsleep-period\fP] \fIfile\fP [\fIfile2\fP ...] .SH DESCRIPTION .LP \fBxmotd\fP is a utility program (for X11 and dumb terminals) that can be executed during the login process to display pertinent messages (i.e. the message of the day) or to periodically check, while the user is logged in, whether one or more message files have been modified and display them if they have. Under X11, it displays a customizable bitmap in the top-left corner. It provides for up to 3 lines of title-text (the length of the text depends on the size of the font chosen). It has a \fI"Dismiss"\fP button below the bitmap and a read-only text-widget that displays the message (or messages) of the day. The date of the message (and optionally, the filename) is displayed just above the text. .LP .B xmotd can be configured to run in various modes: to always pop-up after login or to pop-up only when the motd changes; to pop-down automatically (without user-intervention) after a specified delay; to run in the background and periodically check if the motd has changed and display it. By default, .B xmotd displays a message only if the file(s) was updated since the last time the user read it. .LP If .B xmotd has to display more than one file, the user is obliged to press the \fI"Next Message"\fP button to view subsequent messages; the text of the button changes to \fI"Dismiss"\fP when the last message is displayed. .LP .B xmotd defaults to text-only mode (output to .B stdout when it cannot connect to an X display. This mode is useful for running .B xmotd from user's .I ~/.login file in cases where they can also login via dialup. .LP .B xmotd can display messages marked-up with HTML and xpm colour pixmap logos. Support for these must be configured at compile-time. .SH OPERATION .LP .B xmotd is usually run from the system \fIXsession\fP file via xdm(1), CDE login and/or from the user's .I ~/.login file. At sites where xdm is not used, \fBxmotd\fP may be run from the user's .I ~/.xinitrc where a (possibly) malicious user may intentionally or accidently remove the \fBxmotd\fP invocation from the file. .LP When .B xmotd first runs, it creates a timestamp file (by default called .I .xmotd ) in the user's home-directory. On subsequent invocations, .B xmotd uses the date of this file to decide whether or not the message-of-the-day (motd) files have been updated. If the date of the motd file is later than the date on the \fI~/.xmotd\fP file, then .B xmotd will display the motd file; otherwise it will silently exit (if there are no more files to be displayed and if \fB-wakeup\fP was not used). When invoked with \fB-wakeup\fP, xmotd daemonizes itself and goes to sleep for the specified sleep-period, periodically waking-up to see if the motds have changed and then displaying them. .LP By default, .B xmotd pops-down only when the \fI"Dismiss"\fP button is clicked; the rest of the login-procedure then continues. This interactive behaviour can be overriden so .B xmotd will pop-down without user intervention, after a specified timeout period. .SH OPTIONS All the standard .B X options are valid. In addition, the following options, which may also be set as resources in the app-defaults file (See RESOURCES), are available: .TP 8 .BI \-always overrides .B xmotd default behavior; the \fI~/.xmotd\fP time-stamp is ignored and the message (or messages) is always displayed. Zero-length (empty) files are displayed when this option is specified. .TP 8 .BI \-atom " atom-name" register .B xmotd with name \fIatom-name\fP. By default, only one .B xmotd is allowed to run (per user). You can permit multiple instances of .B xmotd to run by giving each instance an unique name. .B xmotd will intern an atom with the X server, that combines the atom-name and the user's login-id (e.g. \fI"xmotd.elf"\fP ; the default atom name is \fI"xmotd"\fP); subsequent invocations of .B xmotd will check if this atom exists and exit if it does. .TP 8 .BI \-bitmaplogo " bitmap-filename" specifies that the bitmap \fIbitmap-filename\fP is to be displayed in place of the default bitmap, the "X" logo. Ideally, the specified bitmap should have a width and height of 100 pixels. If xpm support is compiled-in, xpm colour pixmaps may be substituted instead. See NOTES for additional details. .TP 8 .BI \-browser " web-browser" specifies the path and filename of a web-browser to be used when an URL is clicked (HTML version only). By default, \fIweb-browser\fP is \fI"/usr/local/bin/netscape"\fP. See NOTES for additional details. .TP 8 .BI \-help displays command-line options usage. .TP 8 .BI \-paranoid (used with \fB-warnfile\fP) displays the warning message unconditionally at every login (even when there are no messages to be displayed). .TP 8 .BI \-popdown " timeout" exit or pop-down without user intervention, \fItimeout\fP seconds after being invoked. The user can dismiss \fBxmotd\fP at any time before the timeout, by clicking on the \fI"Dismiss"\fP button. This option is only valid at the initial login; it is ignored on subsequent pop-ups when \fBxmotd\fP is invoked with \fB-wakeup\fP. .TP 8 .BI \-showfilename displays the filename of the file currently being viewed (as it appears on the command-line), alongside the date. .TP 8 .BI \-stampfile " stamp-filename" overrides the default timestamp filename, \fI~/.xmotd\fP, and uses \fIstamp-filename\fP instead. .TP 8 .BI \-tail display the end of a file; the text is automatically scrolled so the end of the file is visible. .TP 8 .BI \-usedomains uses local domain-name based time-stamping in cases where user's home-directories are shared (NFS mounted) across various domains. Time-stamps are created (and checked) with appropriate domain-names appended. .TP 8 .BI \-warnfile " warning-filename" specifies a file containing a standard message used to warn users of the consequences of deviance and sundry unlawful things they should not even \fIthink\fP of doing on your network; your network's rules of use, information about disk quotas, modem charges and printer accounting fees (used with \fB-paranoid\fP). .TP 8 .BI \-wakeup " sleep-period" causes \fBxmotd\fP to run in the background and wakeup periodically every \fIsleep-period\fP hours to check whether the files have been modified and therefore need to be (re-)displayed. The sleep period is specified as a floating point number where the fractional portion indicates the number of minutes. For example, a sleep-period of 0.25 indicates 15 minutes (one quarter of an hour) and a sleep-period of 1.5 indicates one and one-half hours; the minimum (enforced) sleep-period is 1 minute. The \fB-wakeup\fP option is useful at sites where users with personal workstations never log-out. See NOTES for additional details. .TP 8 .I file [file2 ... ] one or more files to be displayed may be specified. The file(s) contain the text of the message(s) of the day. If HTML support is compiled-in the motd files should be marked-up with HTML. .TP 8 .I directory Instead of supplying one or more files on the command-line, \fBxmotd\fP may be supplied a \fIdirectory\fP containing file(s) to be displayed. \fBxmotd\fP will scan the directory and display all the files contained therein, that need to be displayed. This feature is useful when used with the \fB-wakeup\fP option; upon waking-up, \fBxmotd\fP will re-scan the directory for any files (including new files that have been subsequently added) that need to be displayed. .SH EXAMPLES .LP Give \fBxmotd\fP a geometry option to tell it to pop-up at a location other than 0,0 and read-in the message-of-the-day from the file \fI/usr/local/motd\fP: .nf xmotd -geometry +20+20 /usr/local/motd .fi .LP Use a bigger window (900x600) and automatically position it (at top-left corner at 20,20), always pop-up \fBxmotd\fP displaying the contents of \fI/usr/local/motd\fP, ignoring the user's \fI~/.xmotd\fP timestamp-file and pop-down after 20 seconds: .nf xmotd -geom 900x600+20+20 -always -popdown 20 /usr/local/motd .fi .LP Use a custom bitmap in the file \fI/usr/local/xmotd.bm\fP: .nf xmotd -geom +5+5 -bitmaplogo /usr/local/xmotd.bm /usr/local/motd .fi .LP In the following example, all the files in \fI/usr/local/messages/\fP will be checked for modification times greater than the time-stamp and only those files will be displayed and every eight and a half hours, \fBxmotd\fP will check if any files have changed (or new ones added) and display them if necessary: .nf xmotd -geom +5+5 -wakeup 8.5 /usr/local/messages/ .fi To display a warning-message every time the user logs-in (even when no messages need to be displayed), and to display the filenames of the files being viewed, use: .nf xmotd -geom +5+5 -warnfile /usr/local/WARNING -paranoid \\ -showfilename /usr/local/motds/ .fi X resources may be changed from the command-line using the \fB-xrm\fP option. This example (typed as a single line) illustrates how \fBxmotd\fP can be customized exclusively from the command-line: .nf /usr/local/bin/xmotd -always \\ -xrm "*title.label: Top 10 Disk Hogs\\n As of midnight\\n " \\ -xrm "*title.foreground: yellow" \\ -xrm "*form.background: red" \\ -xrm "*title.background: red" \\ -xrm "*logo.background: pink" \\ -xrm "*text*font: -adobe-times-bold-*-normal-*-*-180-*" \\ -geometry 500x650-1-1 \\ -bitmaplogo /usr/common/choke.xbm -popdown 10 \\ /usr/common/accounting/top & .fi .SH RESOURCES editres(1) may be used to edit resources. The application class-name is \fIXMotd\fP. .LP The resource: \fIXMotd*Always\fP (set to either \fBTrue\fP or \fBFalse\fP) is equivalent to the \fB-always\fP command-line option. .LP The resource: \fIXMotd*Atom\fP (set to the name of the atom \fBxmotd\fP is registered with) is equivalent to the \fB-atom\fP command-line option. .LP The resource: \fIXMotd*BitmapLogo\fP (set to the path and filename of the bitmap/pixmap-file) is equivalent to the \fB-bitmaplogo\fP command-line option. .LP The resource: \fIXMotd*Browser\fP (set to the path and filename of the browser to be used when users click on an URL (HTML version only)) is equivalent to the \fB-browser\fP command-line option. .LP The resource: \fIXMotd*Paranoid\fP (set to \fBTrue/False\fP) is equivalent to the \fB-paranoid\fP command-line option. .LP The resource: \fIXMotd*Popdown\fP (set to the number of seconds) is equivalent to the \fB-popdown\fP command-line option. .LP The resource: \fIXMotd*UseDomains\fP (set to \fBTrue/False\fP) is equivalent to the \fB-usedomains\fP command-line option. .LP The resource: \fIXMotd*ShowFilename\fP (set to \fBTrue/False\fP) is equivalent to the \fB-showfilename\fP command-line option. .LP The resource: \fIXMotd*Warnfile\fP (set to the path and filename of the warning-file) is equivalent to the \fB-warnfile\fP command-line option. .LP The resource: \fIXMotd*Tail\fP (set to \fBTrue/False\fP) is equivalent to the \fB-tail\fP command-line option. .LP The resource: \fIXMotd*Wakeup\fP (set to an floating-point number representing hours) is equivalent to the \fB-wakeup\fP command-line option. .LP The resource: \fIXMotd*title.label\fP (set to a possibly multi-line string) may be used to customize the title. By default, the title is the single line:\fI"Message Of The Day\\n\\n\\n"\fP (the 2-character sequence, \fI"\\n"\fP, indicates a carriage-return). For example, if you want a 2 line title that reads: .nf This is the Message of the Day .fi the resource can be specified as: .nf *title.label: \\ This is the\\nMessage of the Day\\n\\n .fi Note that the first backslash quotes the leading spaces that indent the words, \fB"This is the"\fP. .SH WIDGET HIERARCHY The widget hierarchy is as follows (Class-name & object-name): .nf .ta .5i 1.0i 1.5i 2.0i XMotd xmotd Form form Label logo Label title Label hline Label info Command quit Text text \fBOR\fP Html text .fi .SH FILES \fI$ProjectRoot/lib/X11/xdm/Xsession\fP (where \fI$ProjectRoot\fP is \fB/usr/X11R6\fP or, perhaps \fB/usr/X11\fP). For systems running CDE put a script that invokes \fBxmotd\fP in \fI/etc/dt/config/Xsession.d/\fP \fI$HOME/.xmotd\fP (default timestamp filename) \fI$HOME/.login\fP .TE .SH SEE ALSO .BR X(1), .BR xdm(1), .BR editres(1), .BR login(1), .BR xv(l), .BR gimp(l), .BR xpaint(l), .BR cat(1), .BR less(l) .SH NOTES The \fB-always\fP option is considered fascist; it is provided merely for completeness and for testing purposes. If xpm support is compiled-in, \fBxmotd -help\fP will print the words \fI"bitmap/pixmap"\fP for the \fB-bitmaplogo\fP description instead of just \fI"bitmap"\fP. Under dumb-terminal mode, all command-line options are ignored with the exception of \fB-stampfile\fP and \fB-wakeup\fP; the \fB-always\fP option is equivalent to cat'ing the motd from the \fI~/.login\fP file; and \fB-popdown\fP is not really relevant. Both \fB-warnfile\fP and \fB-paranoid\fP may be simulated with appropriate cat(1) and more(1) commands. \fBxmotd\fP processes invoked with \fB-wakeup\fP will continue sleeping, "S" in the ps(1) status field, after the user has logged-out until the sleep timeout expires. Only when \fBxmotd\fP wakes-up, will it detect that the user has logged-out and exit. \fBxmotd\fP's logout-detection routine relies on the xdm(1) support scripts \fBGiveConsole\fP (which chown's \fB/dev/console\fP to the user) and \fBTakeConsole\fP (which chown's \fB/dev/console\fP back to root) setting the correct permissions and ownership on \fB/dev/console\fP. When \fBxmotd\fP wakes-up, it attempts to open(2) \fB/dev/console\fP for reading; if this open fails, it is an indication that the user has logged out because \fBTakeConsole\fP has changed ownership of the console. The \fB-browser\fP option was originally called \fB-netscape\fP; it was renamed to be more generic. When initially run, the browser is invoked as: .nf /usr/local/bin/netscape %s .fi where \fB%s\fP is replaced by the selected URL. Subsequent URLs will be displayed in the already running browser using the syntax: .nf /usr/local/bin/netscape -remote openURL(%s) .fi You may substitute a browser of your choice for \fBnetscape\fP, if it supports this syntax. .SH BUGS There are no provisions for displaying embedded images in the HTML version of \fBxmotd\fP (until a stable XmHTML widget is available, or perhaps when \fBxmotd\fP is ported to the GTK). At least one other. .SH QUOTES .nf \fI...and our lives are forever changed we will never be the same the more you change the less you feel\fP --\fBTonight, tonight\fP, "Mellon Collie And The Infinite Sadness" Billy Corgan, The Smashing Pumpkins \fIOmnia mutantur, nos et mutamur in illis. (All things change, and we change with them).\fP --Matthias Borbonius: \fBDeliciae Poetarum Germanorum\fP, i. 685 \fITo everything there is a season, And a time to every purpose under heaven.\fP --Ecclesiastes 3:1-4 .fi .SH AUTHORS Luis Fernandes is the primary author and maintainer. Richard Deal contributed the directory-scanning code. Stuart A. Harvey contributed the URL support code for the HTML version. David M. Ronis contributed code to support xpm logos. .SH COPYRIGHT Copyright 1993 (as xbanner, no public release) Copyright 1994-97, 1999, 2001, 2003 Luis A. Fernandes Permission to use, copy, hack, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This application is presented as is without any implied or written warranty. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The HTML widget Copyright 1993, Board of Trustees of the University of Illinois. See the file libhtmlw/HTML.c for the complete text of the NCSA copyright. NOTE: THE HTML WIDGET IS NOT DISTRIBUTED IN THE "LITE" VERSION OF THE xmotd DISTRIBUTION, WHICH IS THEREFORE FULLY COMPLIANT WITH THE GPL. xmotd-1.17.3b-lite/xlogo.bm100644 153 145 15141 6343332441 13672 0ustar elfusers#define xlogo_width 100 #define xlogo_height 100 static char xlogo_bits[] = { 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xfe,0xff, 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xfc,0xff,0xff,0x07, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf7,0xf8,0xff,0xff,0x0f,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xfe,0xf3,0xf8,0xff,0xff,0x0f,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0xff,0xf1,0xf0,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xff,0xf1,0xe0,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff, 0xf0,0xc0,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x7f,0xf0,0xc0, 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f,0xf0,0x80,0xff,0xff, 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0xf0,0x00,0xff,0xff,0xff,0x01, 0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0xf0,0x00,0xfe,0xff,0xff,0x03,0x00,0x00, 0x00,0x00,0x00,0xf8,0x0f,0xf0,0x00,0xfe,0xff,0xff,0x03,0x00,0x00,0x00,0x00, 0x00,0xfc,0x07,0xf0,0x00,0xfc,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0xfe, 0x03,0xf0,0x00,0xf8,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0xf0, 0x00,0xf0,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0xf0,0x00,0xf0, 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x80,0xff,0x00,0xf0,0x00,0xe0,0xff,0xff, 0x3f,0x00,0x00,0x00,0x00,0xc0,0x7f,0x00,0xf0,0x00,0xc0,0xff,0xff,0x7f,0x00, 0x00,0x00,0x00,0xe0,0x3f,0x00,0xf0,0x00,0x80,0xff,0xff,0xff,0x00,0x00,0x00, 0x00,0xf0,0x1f,0x00,0xf0,0x00,0x80,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xf0, 0x1f,0x00,0xf0,0x00,0x00,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xf8,0x0f,0x00, 0xf0,0x00,0x00,0xfe,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0x07,0x00,0xf0,0x00, 0x00,0xfc,0xff,0xff,0x07,0x00,0x00,0x00,0xfe,0x03,0x00,0xf0,0x00,0x00,0xfc, 0xff,0xff,0x07,0x00,0x00,0x00,0xfe,0x03,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff, 0x0f,0x00,0x00,0x00,0xff,0x01,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0x1f,0x00, 0x00,0x80,0xff,0x00,0x00,0xf0,0x00,0x00,0xe0,0xff,0xff,0x3f,0x00,0x00,0xc0, 0x7f,0x00,0x00,0xf0,0x00,0x00,0xe0,0xff,0xff,0x3f,0x00,0x00,0xe0,0x3f,0x00, 0x00,0xf0,0x00,0x00,0xc0,0xff,0xff,0x7f,0x00,0x00,0xe0,0x3f,0x00,0x00,0xf0, 0x00,0x00,0x80,0xff,0xff,0xff,0x00,0x00,0xf0,0x1f,0x00,0x00,0xf0,0x00,0x00, 0x00,0xff,0xff,0xff,0x01,0x00,0xf8,0x0f,0x00,0x00,0xf0,0x00,0x00,0x00,0xff, 0xff,0xff,0x01,0x00,0xfc,0x07,0x00,0x00,0xf0,0x00,0x00,0x00,0xfe,0xff,0xff, 0x03,0x00,0xfe,0x03,0x00,0x00,0xf0,0x00,0x00,0x00,0xfc,0xff,0xff,0x07,0x00, 0xfe,0x03,0x00,0x00,0xf0,0x00,0x00,0x00,0xf8,0xff,0xff,0x0f,0x00,0xff,0x01, 0x00,0x00,0xf0,0x00,0x00,0x00,0xf8,0xff,0xff,0x0f,0x80,0xff,0x00,0x00,0x00, 0xf0,0x00,0x00,0x00,0xf0,0xff,0xff,0x1f,0xc0,0x7f,0x00,0x00,0x00,0xf0,0x00, 0x00,0x00,0xe0,0xff,0xff,0x3f,0xe0,0x3f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, 0xc0,0xff,0xff,0x7f,0xe0,0x3f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xc0,0xff, 0xff,0x7f,0xf0,0x1f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x80,0xff,0xff,0xff, 0xf8,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xff,0xff,0x7f,0xfc,0x07, 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xfe,0xff,0x7f,0xfc,0x07,0x00,0x00, 0x00,0xf0,0x00,0x00,0x00,0x00,0xfe,0xff,0x3f,0xfe,0x03,0x00,0x00,0x00,0xf0, 0x00,0x00,0x00,0x00,0xfc,0xff,0x1f,0xff,0x01,0x00,0x00,0x00,0xf0,0x00,0x00, 0x00,0x00,0xf8,0xff,0x8f,0xff,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, 0xf0,0xff,0xc7,0x7f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf0,0xff, 0xc7,0x7f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xe0,0xff,0xe3,0x3f, 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xc0,0xff,0xf1,0x7f,0x00,0x00, 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x80,0xff,0xf8,0xff,0x00,0x00,0x00,0x00, 0xf0,0x00,0x00,0x00,0x00,0xc0,0x7f,0xfc,0xff,0x00,0x00,0x00,0x00,0xf0,0x00, 0x00,0x00,0x00,0xc0,0x7f,0xfc,0xff,0x01,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, 0x00,0xe0,0x3f,0xfe,0xff,0x03,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf0, 0x1f,0xff,0xff,0x07,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0x8f,0xff, 0xff,0x07,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xfc,0xc7,0xff,0xff,0x0f, 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xfc,0xc7,0xff,0xff,0x1f,0x00,0x00, 0x00,0xf0,0x00,0x00,0x00,0x00,0xfe,0xe3,0xff,0xff,0x3f,0x00,0x00,0x00,0xf0, 0x00,0x00,0x00,0x00,0xff,0xe1,0xff,0xff,0x3f,0x00,0x00,0x00,0xf0,0x00,0x00, 0x00,0x80,0xff,0xc0,0xff,0xff,0x7f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x80, 0xff,0x80,0xff,0xff,0xff,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xc0,0x7f,0x00, 0xff,0xff,0xff,0x01,0x00,0x00,0xf0,0x00,0x00,0x00,0xe0,0x3f,0x00,0xff,0xff, 0xff,0x01,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x1f,0x00,0xfe,0xff,0xff,0x03, 0x00,0x00,0xf0,0x00,0x00,0x00,0xf8,0x0f,0x00,0xfc,0xff,0xff,0x07,0x00,0x00, 0xf0,0x00,0x00,0x00,0xf8,0x0f,0x00,0xf8,0xff,0xff,0x0f,0x00,0x00,0xf0,0x00, 0x00,0x00,0xfc,0x07,0x00,0xf8,0xff,0xff,0x0f,0x00,0x00,0xf0,0x00,0x00,0x00, 0xfe,0x03,0x00,0xf0,0xff,0xff,0x1f,0x00,0x00,0xf0,0x00,0x00,0x00,0xff,0x01, 0x00,0xe0,0xff,0xff,0x3f,0x00,0x00,0xf0,0x00,0x00,0x80,0xff,0x00,0x00,0xc0, 0xff,0xff,0x7f,0x00,0x00,0xf0,0x00,0x00,0x80,0xff,0x00,0x00,0xc0,0xff,0xff, 0x7f,0x00,0x00,0xf0,0x00,0x00,0xc0,0x7f,0x00,0x00,0x80,0xff,0xff,0xff,0x00, 0x00,0xf0,0x00,0x00,0xe0,0x3f,0x00,0x00,0x00,0xff,0xff,0xff,0x01,0x00,0xf0, 0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0xfe,0xff,0xff,0x03,0x00,0xf0,0x00,0x00, 0xf8,0x0f,0x00,0x00,0x00,0xfe,0xff,0xff,0x03,0x00,0xf0,0x00,0x00,0xf8,0x0f, 0x00,0x00,0x00,0xfc,0xff,0xff,0x07,0x00,0xf0,0x00,0x00,0xfc,0x07,0x00,0x00, 0x00,0xf8,0xff,0xff,0x0f,0x00,0xf0,0x00,0x00,0xfe,0x03,0x00,0x00,0x00,0xf0, 0xff,0xff,0x1f,0x00,0xf0,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xf0,0xff,0xff, 0x1f,0x00,0xf0,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xe0,0xff,0xff,0x3f,0x00, 0xf0,0x00,0x80,0xff,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x7f,0x00,0xf0,0x00, 0xc0,0x7f,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x00,0xf0,0x00,0xe0,0x3f, 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x00,0xf0,0x00,0xf0,0x1f,0x00,0x00, 0x00,0x00,0x00,0xff,0xff,0xff,0x01,0xf0,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00, 0x00,0xfe,0xff,0xff,0x03,0xf0,0x00,0xf8,0x0f,0x00,0x00,0x00,0x00,0x00,0xfc, 0xff,0xff,0x07,0xf0,0x00,0xfc,0x07,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, 0x07,0xf0,0x00,0xfe,0x03,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x0f,0xf0, 0x00,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0x1f,0xf0,0x00,0xff, 0x01,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x3f,0xf0,0x80,0xff,0x00,0x00, 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x3f,0xf0,0xc0,0x7f,0x00,0x00,0x00,0x00, 0x00,0x00,0xc0,0xff,0xff,0x7f,0xf0,0xe0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, 0x80,0xff,0xff,0xff,0xf0,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, 0xff,0xff,0xf1,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff, 0xf1,0xf8,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xf3,0xfc, 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xf7,0xfe,0x03,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff}; xmotd-1.17.3b-lite/xlogo.xpm100644 153 145 24454 6351573746 14125 0ustar elfusers/* XPM */ static char * xlogo_xpm[] = { "100 100 4 1", " c #333373733E3E", ". c #B6B6E2E20D0D", "X c #9F9FB6B6CDCD", "o c #000047470000", " .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", "X .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX o", "XX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oo", "XXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo", "XXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo", "XXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo", "XXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooo", "XXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooo", "XXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooo", "XXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooX", "XXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooX", "XXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXX", "XXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXX", "XXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXX", "XXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXX", "XXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXX", "XXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXX", "XXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXX", "XXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXXXXX", "XXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXXXXXX", "XXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXX", "XXXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXX", "XXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXXXXXXX ooooooXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXXXX oooooooXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXXXXXX ooooooXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXXX ooooooXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXX ooooooXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXX ooooooXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXX oooooooXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXX .......XXX ooooooXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XX ooooooXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......X ooooooXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ...... oooooooXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .... oooooooXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo ooooooXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo ooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo ooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo ooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo oooo...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo o.......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooo ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooo .......XXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oooooo .......XXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooo .......XXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooo .......XXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooX .......XXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooXX .......XXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXX .......XXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooooXXXXX ......XXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXX oooooooooXXXXXXX .......XXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXX .......XXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXX .......XXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXX ......XXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXX .......XXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXX oooooooooXXXXXXXXXXXXXX .......XXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXX .......XXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXXXX", "XXXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXXX", "XXXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXXX", "XXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXX .......XXXXXXXX", "XXXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXXX", "XXXXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXXX", "XXXXXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXXX", "XXXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .......XXXXX", "XXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXXX", "XXXXXXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXXX", "XXXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XXX", "XXXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .......XX", "XXXXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......XX", "XXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......X", "XXXXXXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......", "XXXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ......", "XXXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .....", "XXXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ....", "XXXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ...", "XXXX ooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ...", "XXX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ..", "XX oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .", "X oooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ."}; xmotd-1.17.3b-lite/patchlevel.h100644 153 145 71 7623025330 14434 0ustar elfusers#define RELEASE 1 #define PATCH 17 #define STATUS "FCS" xmotd-1.17.3b-lite/main.c100644 153 145 47647 7674160133 13337 0ustar elfusers/* xmotd is a message of the day displayer for X11 and dumb-terminals * * It displays a logo in the top-left corner, a 3-line title to its * right and a text-widget (optionally a HTML widget) for displaying * the message, just below. The motd filename(s) are supplied on the * command-line. A single button is used to sequentailly access the * motd(s) and to dismiss the browser when all the messages have been * viewed. A label displays the time of the file being viewed and * (optionally) the filename. It has options for automatically popping * down w/o user intervention and other features which I can't be * bothered to type-in here and would rather have you look at the * man-page or http://www.ee.ryerson.ca:8080/~elf/xmotd.html * */ /* $Id: main.c,v 1.19 2003/02/14 00:35:03 elf Exp elf $ */ /* * Copyright 1993-97, 1999, 2003 Luis Fernandes * * Permission to use, copy, hack, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This application is presented as is * without any implied or written warranty. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * libhtmlw is copyright (C) 1993, Board of Trustees of the University * of Illinois. See the file libhtmlw/HTML.c for the complete text of * the NCSA copyright. */ #include #include #include #include #include #include #include #include #include #if defined(HPUX) #include #define dirent direct #else #include #endif #include #include #include #ifdef HAVE_XPM #include #endif #ifdef MOTIF #include #include #include #include #include #else #include #include #include #include #include #endif #ifdef HAVE_HTML #include #endif #define MIN_SLEEP_PERIOD 60 /* in seconds */ #define HOURS_TO_SECS 3600.0 #include "maindefs.h" #include "appdefs.h" #include "main.h" extern time_t motdChanged(); extern void nextMessage(Widget w, caddr_t call_data, caddr_t client_data); extern void AnchorCallbackProc(Widget w, caddr_t call_data, caddr_t client_data); /* browser.c */ extern void loadLogo(char *logo, Pixmap *icon_pixmap, Pixel fg, Pixel bg); /* in logo.c */ /* fwd decls*/ XtActionProc reallyQuit(Widget w, XButtonEvent *ev); void Quit(Widget w, caddr_t call_data, caddr_t client_data); void printUsage(char *str); /* usage.c */ int runSilentRunDeep(unsigned slumber); unsigned getAlarmTime(float period); messageptr freeMessage(messageptr msglist); messageptr newMessage(char *file); XtAppContext app_con; Widget topLevel; /* the application widget*/ Widget text, quit; Widget info; XtIntervalId timer; /* pop-down time-out ID */ Pixmap icon_pixmap; app_res_t app_res; /* application resources, in main.h */ /* list of pointers to the messages that will actually be displayed */ messageptr msgslist; int gargc; /* globally accessible argc */ char **gargv; /* globally accessible argv*/ char timeStamp[256]; static int alreadyForked; /* flag to remember if we are already running in the background */ #define offset(field) XtOffset (struct _resources *, field) static XtResource resources[] = { { "always","Always",XtRInt, sizeof(int), offset(always),XtRString, "0"}, { "popdown","Popdown",XtRInt, sizeof(int), offset(pto),XtRString, "0"}, { "usedomains","UseDomains",XtRInt, sizeof(int), offset(usedomains),XtRString, "0"}, { "showfilename","ShowFilename",XtRInt, sizeof(int), offset(showfilename),XtRString, "0"}, { "paranoid","Paranoid",XtRInt, sizeof(int), offset(paranoid),XtRString, "0"}, { "tail","Tail",XtRInt, sizeof(int), offset(tail),XtRString, "0"}, { "bitmaplogo","BitmapLogo",XtRString, sizeof(String), offset(logo),XtRString, NULL}, { "warnfile","Warnfile",XtRString, sizeof(String), offset(warnfile),XtRString, NULL}, { "wakeup","Wakeup",XtRFloat, sizeof(float), offset(periodic),XtRString, "0"}, { "stampfile","Stampfile",XtRString, sizeof(String), offset(stampfile),XtRString, TIMESTAMP}, { "atom","Atom",XtRString, sizeof(String), offset(atomname),XtRString, ATOM}, #ifdef HAVE_HTML { "browser","Browser",XtRString, sizeof(String), offset(browser),XtRString, BROWSER}, #endif }; static XrmOptionDescRec options[] = { { "-always", "always", XrmoptionNoArg, "1"}, { "-showfilename", "showfilename", XrmoptionNoArg, "1"}, { "-usedomains", "usedomains", XrmoptionNoArg, "1"}, { "-paranoid", "paranoid", XrmoptionNoArg, "1"}, { "-tail", "tail", XrmoptionNoArg, "1"}, { "-popdown", "popdown", XrmoptionSepArg, (caddr_t) NULL}, { "-bitmaplogo", "bitmaplogo", XrmoptionSepArg, (caddr_t) NULL}, { "-warnfile", "warnfile", XrmoptionSepArg, (caddr_t) NULL}, { "-wakeup", "wakeup", XrmoptionSepArg, (caddr_t) NULL}, { "-stampfile", "stampfile", XrmoptionSepArg, (caddr_t) NULL}, { "-atom", "atom", XrmoptionSepArg, (caddr_t) NULL}, #ifdef HAVE_HTML { "-browser", "browser", XrmoptionSepArg, (caddr_t) NULL}, #endif }; /* You can use shift + btn1 to quit xmotd (when run with -wakeup)*/ static char shift1Trans[]="#override\n\ Shift,Shift: reallyquit()"; static XtActionsRec xlations[]={ {"reallyquit", (XtActionProc) reallyQuit}, }; /* when the text widget is mapped and we are in "tail" mode, scroll to the end of the file*/ static char tailTrans[]="#override\n\ : end-of-file()"; char * getTimeStampName() { static char buf[256]; sprintf(buf, "%s/%s", getenv("HOME"), app_res.stampfile); if(app_res.usedomains) { char domainame[256]; getdomainname(domainame, 256); strcat(buf, "."); strcat(buf, domainame); } return(buf); } /* convert user-specified wakeup time to seconds (argument to sleep)*/ unsigned getAlarmTime(float period) { unsigned slumber=(period*HOURS_TO_SECS); /* fprintf(stderr,"slumber=%ld\n", slumber);*/ /* limit sleep to 60sec*/ return((slumbernext; free(oldmsg->file); free(oldmsg); return(msglist); } /*freeMessage*/ messageptr newMessage(char *file) { messageptr newmsg; if (!(newmsg = (messageptr)malloc(sizeof(struct messagenode)))) { perror("xmotd"); exit (2); /*problems, probably no ram HA */ } /*if*/ newmsg->file=(char *)calloc(1,(strlen(file)+1)*sizeof(char)); if(!newmsg->file) { perror("xmotd"); exit(2); } strcpy(newmsg->file, file); newmsg->next = NULL; return(newmsg); } /*newMessage*/ int numFilesToDisplay(int argc, char **argv) { register int numsg=0, i; struct stat motdstat; messageptr newmsg, currentmsg = msgslist; /* i starts at 1 since argv[0] is the program name*/ for(i=1; id_ino == 0) continue; if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; strcpy(name, argv[i]); if (name[strlen(name) - 1] != '/') strcat(name, "/"); strcat(name, dp->d_name); if (access(name, 0) < 0) continue; if(motdChanged(name, timeStamp) || app_res.always) { newmsg = newMessage(name); if (!currentmsg) /* first in list */ msgslist = newmsg; else currentmsg->next = newmsg; currentmsg = newmsg; numsg++; } /*if motdchanged*/ } /*while*/ closedir(dir); } /*if opendir*/ } else if(motdChanged(argv[i], timeStamp) || app_res.always) { newmsg = newMessage(argv[i]); if (!currentmsg) /* first in list */ msgslist = newmsg; else currentmsg->next = newmsg; currentmsg = newmsg; numsg++; } } if((numsg || app_res.paranoid || app_res.always) && app_res.warnfile) { newmsg = newMessage(app_res.warnfile); newmsg->next = msgslist; msgslist = newmsg; numsg++; } /*if*/ return numsg; }/* numFilesToDisplay*/ int runSilentRunDeep(unsigned slumber) { int numsg=0; while(1) { int fd; /* fprintf(stderr, "Going to sleep! (Zzzzzzzz...)\n");*/ sleep(slumber); /* fprintf(stderr, "Waking-up! (Yawn...)\n");*/ /* first thing we do after waking up is to see if the user is still logged-in*/ if((fd=open("/dev/console", O_RDONLY, O_RDONLY)<0)) { /* since xmotd can't read from the console we assume user has logged-out, so we exit*/ exit(0); } close(fd); /* next check if any messages need to be displayed, if there aren't any, go back to sleep; otherwise return to display messages*/ if(numsg=numFilesToDisplay(gargc, gargv)) return(numsg); } } main(argc, argv) int argc; char **argv; { extern Boolean atomExists(String); Display *display; register int i, start=0; int numsg; if ((argc > 1) && !(strcmp(argv[1],"-help"))) { printUsage(argv[0]); /* and exit */ } /* Test to see whether we are connected to an X display. If we aren't, we proceed in text-only mode: bare-bones functionality; output to stdout. Why bare-bones, I hear you asking? Well, X does all the command-line options parsing for me and I don't feel like duplicating all that code. So there.*/ if((display=XOpenDisplay((char *)NULL))==NULL) { if(argc<2) { fprintf(stderr, "xmotd: ERROR, missing file.\n"); printUsage(argv[0]); /* and exit */ } else { extern void runInTextMode(); runInTextMode(argc, argv); /* ...and exit... */ } fprintf(stderr,"Never gets here!\n"); exit(0); /* just in case */ } else { XCloseDisplay(display); } /* we have to init the toolkit *before* we check the command-line so we can use X's parsing routines, since -geom options, etc. may be specified, in which case, the motd-filename is *not* the 2nd argument*/ topLevel = XtVaAppInitialize(&app_con, "XMotd", options, XtNumber(options), &argc, argv, fallback_resources, NULL); XtGetApplicationResources(topLevel, (caddr_t) &app_res, resources, XtNumber(resources), (ArgList) NULL, (Cardinal) 0); if(argc<2) { fprintf(stderr,"xmotd: ERROR, missing file\n"); printUsage(argv[0]); /* and exit */ } if(app_res.paranoid && !app_res.warnfile) { fprintf(stderr,"xmotd: ERROR, specified \"-paranoid\" without \"-warnfile\"\n"); printUsage(argv[0]); /* and exit */ } strcpy(timeStamp, getTimeStampName()); gargc=argc; gargv=argv; /* first figure out how many of the files supplied on the command-line we will be actually displaying; i.e. we only show the new ones (unless -always has been specified, in which case we show all of them)*/ numsg=numFilesToDisplay(argc, argv); if(!app_res.periodic && !numsg) { /* if none of the messages need to be displayed and -wakeup not specified */ XtDestroyApplicationContext(app_con); exit(0); } if(app_res.periodic) /*-wakeup or -timeout specified*/ { /*ensure no other copies of xmotd are running*/ if(atomExists(app_res.atomname)){ XtDestroyApplicationContext(app_con); exit(0); } if(fork()) exit(0); /*we have to daemonize ourselves*/ alreadyForked=1; /* make a note of it */ if(!numsg) { /* if no messages to be displayed, we sleep */ numsg=runSilentRunDeep(getAlarmTime(app_res.periodic)); } } createWidgets(numsg); nextMessage((Widget)NULL, (caddr_t)NULL, (caddr_t)NULL); XtAddEventHandler(topLevel, (EventMask)0, True, (XtEventHandler)_XEditResCheckMessages, 0); XtRealizeWidget(topLevel); XtAppMainLoop(app_con); } createWidgets(int anymsg) { Widget form, paned, logo, mlabel, hline; XtTranslations shift1TransTable, tailTransTable; Pixel fg, bg; Arg args[8]; int n; #ifdef MOTIF XmString xmstr; form=XtVaCreateManagedWidget("form", xmFormWidgetClass,topLevel, NULL); #else form=XtVaCreateManagedWidget("form", formWidgetClass,topLevel, XtNresizable, True, NULL); #endif /* ifdef MOTIF */ XtVaGetValues(form, XtNbackground, &bg, XtNforeground, &fg, NULL); loadLogo(app_res.logo, &icon_pixmap, fg, bg); #ifdef MOTIF logo=XtVaCreateManagedWidget("logo", xmLabelWidgetClass, form, XmNleftAttachment, XmATTACH_FORM, XmNtopAttachment, XmATTACH_FORM, XmNlabelType, XmPIXMAP, XmNlabelPixmap, icon_pixmap, XmNborderWidth, 0, NULL); mlabel=XtVaCreateManagedWidget("title", xmLabelWidgetClass, form, XmNleftAttachment, XmATTACH_WIDGET, XmNleftWidget, logo, XmNrightAttachment, XmATTACH_FORM, NULL); hline=XtVaCreateManagedWidget("hline", xmSeparatorWidgetClass, form, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, logo, NULL); quit = XtVaCreateManagedWidget("quit", xmPushButtonWidgetClass, form, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, logo, XmNlabelType, XmSTRING, XmNtraversalOn, False, /* remove Dismiss button from the Tab group; comment this line out if YOU WANT "Space-bar" to activate the dismiss button*/ NULL); info=XtVaCreateManagedWidget("info", xmLabelWidgetClass, form, XmNleftAttachment, XmATTACH_FORM, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, quit, XmNlabelType, XmSTRING, NULL); #ifdef HAVE_HTML n = 0; XtSetArg(args[n],XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n],XmNtopWidget, info); n++; XtSetArg(args[n],XmNbottomAttachment, XmATTACH_FORM); n++; text = XtVaCreateManagedWidget("text", htmlWidgetClass, form,NULL); XtSetValues(text,args,n); XtManageChild(text); #else n=0; XtSetArg(args[n], XmNeditMode, XmMULTI_LINE_EDIT); n++; XtSetArg(args[n], XmNeditable, False); n++; XtSetArg(args[n], XmNscrollHorizontal, False); n++; XtSetArg(args[n], XmNscrollLeftSide, True); n++; XtSetArg(args[n], XmNcursorPositionVisible, False); n++; text=XmCreateScrolledText(form, "text", args, n); n=0; XtVaSetValues(XtParent(text), XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, info, XmNbottomAttachment, XmATTACH_FORM, NULL); XtManageChild(text); #endif /* ifdef HAVE_HTML & ifdef MOTIF */ #else logo=XtVaCreateManagedWidget("logo", labelWidgetClass, form, XtNleft, XtChainLeft, XtNright, XtChainLeft, XtNbitmap, icon_pixmap, NULL); mlabel=XtVaCreateManagedWidget("title", labelWidgetClass, form, XtNfromHoriz, logo, NULL); hline=XtVaCreateManagedWidget("hline", labelWidgetClass, form, XtNfromVert, logo, XtNfromVert, mlabel, XtNlabel, (char *)NULL, NULL); quit = XtVaCreateManagedWidget("quit", commandWidgetClass, form, XtNleft, XtChainLeft, XtNright, XtChainLeft, XtNfromVert, logo, NULL); info=XtVaCreateManagedWidget("info", labelWidgetClass, form, XtNright, XtChainLeft, XtNfromVert, quit, XtNresizable, True, NULL); #ifdef HAVE_HTML text = XtVaCreateManagedWidget("text", htmlWidgetClass, form, XtNfromVert, info, XtNwidth, 680, XtNheight, 500, NULL); #else text = XtVaCreateManagedWidget("text", asciiTextWidgetClass, form, XtNfromVert, info, NULL); #endif /* ifdef HAVE_HTML */ if(app_res.tail) { tailTransTable=XtParseTranslationTable(tailTrans); XtOverrideTranslations(text, tailTransTable); } #endif /* ifdef MOTIF */ if((anymsg>1)) { #ifdef MOTIF xmstr=XmStringCreateLocalized(NEXT_MESSAGE_LABEL); XtVaSetValues(quit, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); XtAddCallback(quit, XmNactivateCallback, (XtCallbackProc)nextMessage, 0); #else XtAddCallback(quit, XtNcallback, (XtCallbackProc)nextMessage,(caddr_t)0); XtVaSetValues(quit, XtNlabel, NEXT_MESSAGE_LABEL, NULL); #endif if(app_res.pto) timer=XtAppAddTimeOut(app_con, (unsigned long)(app_res.pto*1000), (XtTimerCallbackProc)nextMessage, (caddr_t) NULL); } else { #ifdef MOTIF xmstr=XmStringCreateLocalized(LAST_MESSAGE_LABEL); XtVaSetValues(quit, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); XtAddCallback(quit, XmNactivateCallback, (XtCallbackProc)Quit, 0); #else XtAddCallback(quit, XtNcallback, (XtCallbackProc)Quit, 0); XtVaSetValues(quit, XtNlabel, LAST_MESSAGE_LABEL, NULL); #endif if(app_res.pto) timer=XtAppAddTimeOut(app_con, (unsigned long)(app_res.pto*1000), (XtTimerCallbackProc)Quit, (caddr_t) NULL); } #ifdef HAVE_HTML XtAddCallback(text, WbNanchorCallback, (XtCallbackProc)AnchorCallbackProc,(caddr_t)0); #endif XtAppAddActions(app_con, xlations, XtNumber(xlations)); shift1TransTable=XtParseTranslationTable(shift1Trans); XtOverrideTranslations(quit, shift1TransTable); }/* createWidgets*/ xmotd-1.17.3b-lite/xmotd.c100644 153 145 14336 7674157543 13546 0ustar elfusers/*$Id: xmotd.c,v 1.20 2003/02/14 00:37:38 elf Exp $*/ /* * Copyright 1994-97, 2003 Luis Fernandes * * Permission to use, copy, hack, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This application is presented as is * without any implied or written warranty. * */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include #include #include #include #include #include #include #include #include #include #include #ifdef MOTIF #include #include #include #include #include #ifdef HAVE_HTML #include #endif #else #include #include #include #include #include #ifdef HAVE_HTML #include #endif #endif #include "maindefs.h" #include "main.h" extern time_t motdChanged(); extern messageptr freeMessage(); extern Pixmap icon_pixmap; extern char timeStamp[256]; extern messageptr msgslist;/* list of pointers to the motds requested to be displayed */ extern app_res_t app_res; extern XtAppContext app_con; extern XtIntervalId timer; char *txtbuf; /* file is loaded into this malloc'd pointer */ void /*ARGSUSED*/ nextMessage(Widget w, caddr_t call_data, caddr_t client_data) { char buffer[256]; time_t ftime= time((time_t *)NULL); extern Widget info, quit; #ifdef MOTIF XmString xmstr; #endif /* fprintf(stderr,"nextMessage()\n"); */ if (!msgslist) return; memset(buffer, 0, 256); displayMessage(msgslist->file); updateTimeStamp(getTimeStampName()); /* update the timestamp whenever we pop-up to display a message */ if(app_res.showfilename) /*show the filename */ { sprintf(buffer, "%s (%s)", ctime(&ftime), msgslist->file); } else { sprintf(buffer, "%s", ctime(&ftime)); } *strchr(buffer, '\n')=' '; /* junk the \n at the end*/ #ifdef MOTIF xmstr=XmStringCreateLocalized(buffer); XtVaSetValues(info, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); #else XtVaSetValues(info, XtNlabel, buffer, NULL); #endif /* next time through the loop, we continue at the next message*/ msgslist = freeMessage(msgslist); /*figure out if we are displaying the last message; if we are, then change the button-label to "Dismiss" and re-direct the callback to Quit()*/ if(!msgslist) { extern void Quit(Widget w, caddr_t call_data, caddr_t client_data) ; /* fprintf(stderr, "msgindex=%d, displayed %s (LAST MESSAGE)\n", msgindex, buffer);*/ #ifdef MOTIF xmstr=XmStringCreateLocalized(LAST_MESSAGE_LABEL); XtVaSetValues(quit, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); XtRemoveAllCallbacks(quit, XmNactivateCallback); XtAddCallback(quit, XmNactivateCallback, (XtCallbackProc)Quit, 0); #else XtVaSetValues(quit, XtNlabel, LAST_MESSAGE_LABEL, NULL); XtRemoveAllCallbacks(quit, XtNcallback); XtAddCallback(quit, XtNcallback, (XtCallbackProc)Quit, 0); #endif if(app_res.pto) timer=XtAppAddTimeOut(app_con, (unsigned long)(app_res.pto*1000), (XtTimerCallbackProc)Quit, (caddr_t) NULL); return; } if(app_res.pto) timer=XtAppAddTimeOut(app_con, (unsigned long)(app_res.pto*1000), (XtTimerCallbackProc)nextMessage, (caddr_t) NULL); } void revisitMessagesAndDisplay(int numsg) { extern int gargc; extern char **gargv; extern Widget topLevel, quit; extern void Quit(Widget w, caddr_t call_data, caddr_t client_data); /* fprintf(stderr,"revisitMessagesAndDisplay()\n");*/ if(numsg>1) { #ifdef MOTIF XmString xmstr; xmstr=XmStringCreateLocalized(NEXT_MESSAGE_LABEL); XtVaSetValues(quit, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); XtRemoveAllCallbacks(quit,XmNactivateCallback); XtAddCallback(quit, XmNactivateCallback, (XtCallbackProc)nextMessage, 0); #else XtVaSetValues(quit, XtNlabel, NEXT_MESSAGE_LABEL, NULL); XtRemoveAllCallbacks(quit,XtNcallback); XtAddCallback(quit, XtNcallback, (XtCallbackProc)nextMessage, 0); #endif } /* find and display 1st msg*/ nextMessage((Widget)NULL, (caddr_t)NULL, (caddr_t)NULL); XMapRaised(XtDisplay(topLevel), XtWindow(topLevel)); XFlush(XtDisplay(topLevel)); } int displayMessage(char *filename) { FILE *fp; struct stat motdstat; extern Widget text; /* fprintf(stderr,"displayMessage()\n"); */ #ifdef MOTIF XmString xmstr; #endif /* memset((char *)(&motdstat), 0, sizeof(struct stat));*/ if((fp=fopen(filename,"r"))==NULL) /* Read it in...*/ { perror(filename); return(0); /* no file by this name*/ } stat(filename,&motdstat); if(txtbuf) free(txtbuf); txtbuf=(char *)calloc(1, (motdstat.st_size+1)*sizeof(char)); if(!txtbuf) { extern XtAppContext app_con; perror("xmotd"); XtDestroyApplicationContext(app_con); exit(2); } fread(txtbuf,(int)motdstat.st_size,1,fp); fclose(fp); #ifdef MOTIF #ifdef HAVE_HTML HTMLSetText(text,txtbuf,NULL,NULL,0,NULL,NULL); #else XtVaSetValues(text, XmNvalue, txtbuf, NULL); #endif #else #ifdef HAVE_HTML HTMLSetText(text,txtbuf,NULL,NULL,0,NULL,NULL); #else XtVaSetValues(text, XtNstring, txtbuf, NULL); #endif #endif return(1); }/* displayMessage*/ xmotd-1.17.3b-lite/changed.c100444 153 145 4016 6344527172 13744 0ustar elfusers/* Copyright 1993-97 Luis Fernandes * * Permission to use, copy, hack, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This application is presented as is * without any implied or written warranty. */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* changed.c: utility function for checking the times of 2 files * $Id: changed.c,v 1.4 1997/06/02 11:28:58 elf Exp $ */ #include #include #include #include #include #include "main.h" extern app_res_t app_res; /* motdChanged() returns time_t of the motd file: if modification time * of motd is greater than the modification time of time-stamp file; * else it returns 0. * */ time_t motdChanged(char *motd, char *stamp) { struct stat motdstat, tsstat; stat(motd, &motdstat); if(stat(stamp, &tsstat)) { extern int errno; if(errno==ENOENT) /* file does not exist if 1st time */ return(motdstat.st_mtime); } if(motdstat.st_mtime <= tsstat.st_mtime) /*Butch Deal*/ return((time_t) 0); if(!motdstat.st_size && !app_res.always) return((time_t) 0); return(motdstat.st_mtime); } xmotd-1.17.3b-lite/textmode.c100444 153 145 7702 6617701203 14201 0ustar elfusers/* $Id: textmode.c,v 1.7 1998/11/03 22:24:31 elf Exp $ */ /* * Copyright 1993-97 Luis Fernandes * * Permission to use, copy, hack, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This application is presented as is * without any implied or written warranty. * */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include #include #include #include #include #include #include "maindefs.h" void runInTextMode(argc, argv) int argc; char **argv; { register int i, displayed=0; float sleepPeriod=0.0; static int onceAlready; static char buf[256], stampfile[256]; memset(buf, 0, 256); memset(stampfile, 0, 256); strcpy(stampfile, TIMESTAMP); /* default stampfile name */ while(1) { sprintf(buf, "%s/%s", getenv("HOME"), stampfile); for(i=1; i convert to seconds*/ sleepPeriod=(atof(argv[i+1])*3600.0); i++; } else { fprintf(stdout, "%s: WARNING, ignoring %s\n", argv[0], argv[i]); } } } if(displayed) { /* fprintf(stderr, "Displayed file(s)\n");*/ updateTimeStamp(buf); /* reset the timestamp after all files have been read*/ } if(sleepPeriod) { int fd; if(fork()) exit(0); sleep((unsigned)sleepPeriod); /* Check if user is still logged-in by trying to open "/dev/tty". If we can't open the controlling terminal then the user has logged-out (W. Richard Stevens _Advanced Programming in the Unix Environment_) and xmotd can exit. */ if((fd=open("/dev/tty", O_RDONLY, O_RDONLY)<0)) { exit(0); } close(fd); displayed=0; /* reset the flag */ } else { exit(0); } } /* while forever */ } xmotd-1.17.3b-lite/usage.c100444 153 145 5334 7623034610 13452 0ustar elfusers/* $Id: usage.c,v 1.8 2003/02/14 00:34:14 elf Exp $ */ /* * Copyright 1994-97, 1999, 2003 Luis Fernandes * * Permission to use, copy, hack, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This application is presented as is * without any implied or written warranty. * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include #include "maindefs.h" #include "patchlevel.h" void printUsage(str) char *str; { fprintf(stderr, "This is xmotd %d.%d %s\n", RELEASE, PATCH, STATUS); fprintf(stderr, USAGESTRING, str); fprintf(stderr, "\nValid options are:\n"); fprintf(stderr, " -help display this message\n"); fprintf(stderr, " -always ignore time-stamp and always display motd(s)\n"); fprintf(stderr, " -bitmaplogo file show the bitmap"); #ifdef HAVE_XPM fprintf(stderr, "/pixmap"); #endif fprintf(stderr," in \"file\" instead of X logo\n"); #ifdef HAVE_HTML fprintf(stderr, " -browser program invoke \"program\" when URL is clicked\n"); #endif fprintf(stderr, " -paranoid (used with -warnfile) always show the warning message\n"); fprintf(stderr, " -popdown # automatically pop-down xmotd after waiting # seconds\n"); fprintf(stderr, " -stampfile file use \"file\" as timestamp, instead of \"%s\"\n", TIMESTAMP); fprintf(stderr, " -showfilename show name of the file currently being viewed\n"); fprintf(stderr, " -usedomains append domain-names to timestamp\n"); fprintf(stderr, " -wakeup #.# every # hours, check motd(s) for changes\n"); fprintf(stderr, " -warnfile file show the warning message in \"file\" before motd(s)\n"); fprintf(stderr, " -atom name register xmotd with \"name\"\n"); fprintf(stderr, " -tail scroll & display end of motd file(s)\n"); fprintf(stderr, "\n"); exit(1); } xmotd-1.17.3b-lite/browser.c100444 153 145 4314 6401355367 14036 0ustar elfusers/* Copyright 1996-97 Stuart A. HarveyStuart A. Harvey * * Permission to use, copy, hack, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This application is presented as is * without any implied or written warranty. */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* browser.c: * callback procedure to launch a browser (tm) when a hypertext * anchor is activated. * $Id: browser.c,v 1.3 1997/08/28 20:09:27 elf Exp $ */ #ifdef HAVE_HTML #include #include "maindefs.h" #include "libhtmlw/HTML.h" #include "main.h" extern app_res_t app_res; void __ExecWebBrowser ( char* href ); XtCallbackProc AnchorCallbackProc( Widget w, caddr_t call_data, caddr_t client_data) { WbAnchorCallbackData *anchor_data = ( WbAnchorCallbackData *) client_data; __ExecWebBrowser ( anchor_data->href ); } void __ExecWebBrowser ( char* href ) { static int browser_pid=0; char *default_browser=BROWSER; char *local_browser=BROWSER; if ( ! app_res.browser ) { local_browser=default_browser; } else { local_browser=app_res.browser; } browser_pid = fork(); if ( browser_pid == 0 ) { /* child process */ execlp(local_browser,local_browser,href,NULL); fprintf(stderr,"xmotd: Couldn't exec %s\n", local_browser); } else { int status; (void) wait(&status); } } #endif xmotd-1.17.3b-lite/logo.c100444 153 145 7432 6363542653 13322 0ustar elfusers/* * Copyright 1993-97 Luis Fernandes * * Permission to use, copy, hack, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This application is presented as is * without any implied or written warranty. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * libhtmlw is copyright (C) 1993, Board of Trustees of the University * of Illinois. See the file libhtmlw/HTML.c for the complete text of * the NCSA copyright. */ /* $Id: logo.c,v 1.2 1997/07/18 01:23:55 elf Exp $ */ #include #include #include #ifdef HAVE_XPM #include /* default pixmap that goes in the corner*/ #include "xlogo.xpm" #endif #include "maindefs.h" /* default bitmap that goes in the corner*/ #include "xlogo.bm" /* Creates an icon pixmap and returns it in icon_pixmap. If xpm is supported, use it.*/ void loadLogo(char *logo, Pixmap *icon_pixmap, Pixel fg, Pixel bg) { extern Widget topLevel; #ifdef HAVE_XPM Pixmap shape_mask_return; #endif if(logo) { #ifdef MOTIF #ifdef HAVE_XPM int rv=XpmReadFileToPixmap(XtDisplay(topLevel) ,RootWindowOfScreen(XtScreen(topLevel)) ,logo, icon_pixmap ,&shape_mask_return, NULL); if(rv!=BitmapSuccess) { fprintf(stderr,BAD_BITMAP_MESSAGE, logo); exit(-1); } #else *icon_pixmap=XmGetPixmap(XtScreen(topLevel), logo, fg, bg); #endif /* HAVE_XPM*/ #else unsigned int width, height; /* read-in user-specified bitmap*/ int rv=XReadBitmapFile(XtDisplay(topLevel), RootWindowOfScreen(XtScreen(topLevel)), logo, &width, &height, icon_pixmap, (int *)NULL, (int*)NULL); if(rv!=BitmapSuccess) { /* if xpm support is compiled in...*/ #ifdef HAVE_XPM /*... attempt to load it as an xpm file*/ rv=XpmReadFileToPixmap(XtDisplay(topLevel) ,RootWindowOfScreen(XtScreen(topLevel)) ,logo, icon_pixmap ,&shape_mask_return, NULL); #endif if(rv!=BitmapSuccess) { fprintf(stderr,BAD_BITMAP_MESSAGE, logo); exit(-1); } } #endif /*MOTIF*/ } else { #ifdef HAVE_XPM /* display default X pixmap compiled-in*/ XpmCreatePixmapFromData(XtDisplay(topLevel), RootWindowOfScreen(XtScreen(topLevel)), xlogo_xpm, icon_pixmap, &shape_mask_return, NULL); #else /* display default X bitmap compiled-in*/ /* Note: XCreateBitmapFromData doesn't seem to work under Motif for some reason, but XCreatePixmapFromBitmapData works for both, so we use it.*/ *icon_pixmap= XCreatePixmapFromBitmapData(XtDisplay(topLevel), RootWindowOfScreen(XtScreen(topLevel)), xlogo_bits,xlogo_width,xlogo_height, fg, bg, DefaultDepthOfScreen(XtScreen(topLevel))); #if 0 *icon_pixmap= XCreateBitmapFromData(XtDisplay(topLevel), RootWindowOfScreen(XtScreen(topLevel)), xlogo_bits,xlogo_width,xlogo_height); #endif #endif /*HAVE_XPM*/ } }/*loadLogo*/ xmotd-1.17.3b-lite/atom.c100444 153 145 4655 7016362141 13312 0ustar elfusers/*$Id: atom.c,v 1.2 1999/11/23 00:50:14 elf Exp $*/ /* * Copyright 1999 Luis Fernandes * * Permission to use, copy, hack, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This application is presented as is * without any implied or written warranty. * */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include #include #include #include #include #include extern XtAppContext app_con; extern Widget topLevel; /* the application widget*/ /* To prevent multiple copies of xmotd from running (when run with -wakeup) for the same user (this usually happens when a user logs in and out multiple times within the timeout period), we create an Atom in the server so other copies of xmotd can check it returns: True if the atom already exists False if the atom didn't exist (and was created) */ Boolean atomExists(String atomname) { Atom xmotd; struct passwd *pw; static char buffer[256]; pw = getpwuid(getuid()); /* create an unique atom */ sprintf(buffer, "xmotd-%s.%s", atomname, pw->pw_name); /*check if the atom exists*/ xmotd=XInternAtom(XtDisplay(topLevel), buffer, (Boolean)True); /*if the atom doesn't exist*/ if(xmotd==None){ /*create it*/ xmotd=XInternAtom(XtDisplay(topLevel), buffer, (Boolean)False); /* fprintf(stderr,"Created atom: %s\n", buffer); */ return(False); } else{ fprintf(stderr,"xmotd (atomized as %s) is already running-- aborting.\n", atomname); return(True); } } /* atomExists */ xmotd-1.17.3b-lite/maindefs.h100444 153 145 1330 7623034714 14136 0ustar elfusers/* $Id: maindefs.h,v 1.3 2003/02/14 00:35:22 elf Exp $ */ #define TIMESTAMP ".xmotd" /* the date of this file, in user's * home-directory, is used to * determine whether the motd has * changed and should be displayed*/ #define USAGESTRING "Usage:\n%s [X-toolkit-options] [options] {{file [file2 ...]} {dir/}}\n" #define BAD_BITMAP_MESSAGE "Error reading bitmap file: %s.\nPossible causes:\n the file does not exist (perhaps you mis-typed the name),\n or it is not a valid X bitmap,\n or there is insufficient memory to allocate the bitmap.\n" #define NEXT_MESSAGE_LABEL "Next Message" #define LAST_MESSAGE_LABEL "Dismiss" #define BROWSER "/usr/local/bin/netscape" #define ATOM "xmotd" xmotd-1.17.3b-lite/appdefs.h100444 153 145 4336 6757364172 14016 0ustar elfusers/* $Id: appdefs.h,v 1.3 1999/08/20 23:45:22 elf Exp $ */ #ifdef MOTIF String fallback_resources[] = { "*form.foreground: black", "*form.background: lightsteelblue3", "*text*fontList: -*-times-bold-r-*-*-*-140-*", "*text*background: lightsteelblue1", #ifdef HAVE_HTML "*text.width: 680", "*text.height: 500", "*text*borderWidth: 1", #else "*text.rows: 25", "*text.columns: 80", "*text*borderWidth: 0", "*text*wordWrap: False", #endif "*title*fontList: -*-times-bold-i-*-*-*-240-*", "*title*width: 500", "*title*borderWidth: 0", "*title*background: lightsteelblue3", "*title*labelString: Message Of The Day\n\n" "*logo*background: lightsteelblue3", "*logo*borderColor: lightsteelblue3", "*logo*borderWidth: 0", "*info*fontList: -*-times-*-r-*-*-*-140-*", "*info*background: lightsteelblue1", "*hline.width: 680", "*hline.background: black", "*quit.fontList: -*-times-bold-i-*-*-*-240-*", "*quit.labelString: Dismiss", "*quit*foreground: dodgerblue4", "*quit*background: lightsteelblue1", NULL, }; #else String fallback_resources[] = { /* "*shell.geometry: +20+20",*/ "*form.foreground: black", "*form.background: lightsteelblue3", "*shapeStyle: oval", "*Text*font: -*-times-bold-r-*-*-*-140-*", "*text*background: lightsteelblue1", #ifdef HAVE_HTML "*Text.width: 680", "*Text.height: 500", "*text*borderWidth: 1", #else "*Text.height: 500", "*Text.width: 680", "*Text*scrollVertical: whenNeeded", "*Text*scrollHorizontal: whenNeeded", "*Text*autoFill: off", "*Text*input: False", #endif "*title.font: -*-times-bold-i-*-*-*-240-*", "*title.width: 500", "*title.borderWidth: 0", "*title.background: lightsteelblue3", "*title.label: Message Of The Day\n\n\n", "*logo.background: lightsteelblue3", "*logo.borderWidth: 0", "*hline.borderWidth: 0", "*hline.height: 2", "*hline.width: 700", "*hline.background: black", "*hline.foreground: black", "*info.font: -*-times-bold-i-*-*-*-120-*", "*info.borderWidth: 0", "*info.background: lightsteelblue3", "*quit.font: -*-times-bold-r-*-*-*-240-*", "*quit.label: Dismiss", "*quit*foreground: dodgerblue4", "*quit*background: lightsteelblue1", NULL, }; #endif xmotd-1.17.3b-lite/main.h100444 153 145 2543 7016616125 13301 0ustar elfusers/* $Id: main.h,v 1.5 1999/11/23 23:01:14 elf Exp $ */ typedef struct _resources { int always; /* flag; if set, ignore .xmotd timestamp */ int pto; /* popdown time-out value in seconds*/ int usedomains; /* do timestamping with .xmotd.domain-name */ int showfilename; /* display the name of the file being viewed next to the date & time */ int paranoid; /* used with -warnfile; always display the warning message */ float periodic; /* if set, xmotd will periodically check the motd files to see if they have changed, and display them accordingly. The value indicates the sleep period in hours (decimals represent minutes)*/ int tail; /* flag; if scroll text widget to end */ String warnfile; /* path to a filename containing a standard warning message that is displayed whenever a motd is displayed*/ String logo; /* path to logo (xbm) */ String stampfile; /* name of the timestamp filename */ String atomname; /* we can force multiple xmotds to run by giving them unique names */ #ifdef HAVE_HTML String browser; /* path to web-browser */ #endif } app_res_t; typedef struct messagenode { /* linked list of messages to display */ char *file; struct messagenode *next; } *messageptr;