wmpinboard-1.0.orig/0040755000175000017500000000000007214245166012600 5ustar hmhhmhwmpinboard-1.0.orig/man/0040755000175000017500000000000007214245166013353 5ustar hmhhmhwmpinboard-1.0.orig/man/Makefile.am0100644000175000017500000000034007214234637015402 0ustar hmhhmh## Process this file with automake to produce Makefile.in man_MANS = wmpinboard.1 EXTRA_DIST = $(man_MANS) *.pod wmpinboard.1: wmpinboard.pod -pod2man --release=$(VERSION) --center=wmpinboard wmpinboard.pod wmpinboard.1 wmpinboard-1.0.orig/man/Makefile.in0100644000175000017500000001305607214234637015423 0ustar hmhhmh# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : CC = @CC@ CONDITIONAL_SOURCES = @CONDITIONAL_SOURCES@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ man_MANS = wmpinboard.1 EXTRA_DIST = $(man_MANS) *.pod mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = man1dir = $(mandir)/man1 MANS = $(man_MANS) NROFF = nroff DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status install-man1: $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done install-man: $(MANS) @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-man1 uninstall-man: @$(NORMAL_UNINSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = man distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-man install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-man uninstall: uninstall-am all-am: Makefile $(MANS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: install-man1 uninstall-man1 install-man uninstall-man tags \ distdir info-am info dvi-am dvi check check-am installcheck-am \ installcheck install-exec-am install-exec install-data-am install-data \ install-am install uninstall-am uninstall all-redirect all-am all \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean wmpinboard.1: wmpinboard.pod -pod2man --release=$(VERSION) --center=wmpinboard wmpinboard.pod wmpinboard.1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wmpinboard-1.0.orig/man/wmpinboard.10100644000175000017500000013067607214234637015612 0ustar hmhhmh.\" Automatically generated by Pod::Man version 1.02 .\" Thu Apr 13 13:01:39 2000 .\" .\" Standard preamble: .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used .\" to do unbreakable dashes and therefore won't be available. \*(C` and .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` ` . ds C' ' 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and .\" index entries marked with X<> in POD. Of course, you'll have to process .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" . . . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ====================================================================== .\" .IX Title "WMPINBOARD 1" .TH WMPINBOARD 1 "0.99.3" "2000-04-13" "wmpinboard" .UC .SH "NAME" \&\fBwmpinboard\fR \- a \fBWindow Maker\fR dock app resembling a miniature pinboard .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& wmpinboard [options] .Ve .Sh "What wmpinboard is" .IX Subsection "What wmpinboard is" \&\fBwmpinboard\fR is a \fBWindow Maker\fR dock applet resembling a miniature pinboard. It's intended to somewhat relieve heavily littered desktops by allowing you to place reminders on a graphical on-screen pinboard rather than producing a mess of real notes all around your keyboard (thus being environmentally A Good Thing, too \fB;\-)\fR ). It supports arbitrary 6x10 X fonts and has XLocale support, enabling you to enter locale-dependent special characters if set up appropriately. Besides text, you can add small monochrome sketches to your notes or simply encircle or underline words as a means of emphasis, and alarms can be set to explicitly remind you of things. Above all, \fBwmpinboard\fR is animated in redundant ways to make it look even more attractive, and themeability provides for a way of adapting its appearance to that of the rest of your desktop. .Sh "What wmpinboard \s-1ISN\s0'T" .IX Subsection "What wmpinboard ISN'T" Clearly, \fBwmpinboard\fR doesn't allow you to keep an unlimited number of notes holding arbitrary amounts of information, and that's not what it's meant to do. Just as real notes offer limited space, so do those simulated by \fBwmpinboard\fR. Besides, as a dock applet, it aims at being small and neat and yet useful in a way, and that's what it is, too, or considered to be by some people, anyway. If you need room for more comprehensive reminders, use another program, either additionally or exclusively. There's a variety of such out there, but their niche is different from that which \fBwmpinboard\fR claims. .SH "OPTIONS" .IX Header "OPTIONS" \&\fBwmpinboard\fR's command-line options can be roughly divided into four groups: configuration directives, run-time options, command-line actions, and general options. Generally, \fBwmpinboard\fR supports GNU-style long options (which may be abbreviated unambiguously) as well as short ones for parameters used more commonly. .Sh "Configuration directives" .IX Subsection "Configuration directives" This type of command-line options changes some aspect of \&\fBwmpinboard\fR's configuration that is saved along with the data and thus set in a more permanent way. Only one such parameter may be specified per call, and there mustn't be another instance running. .Ip "\fB\f(CB\*(C`\-\-font=FONT\*(C'\fB\fR" 2 .IX Item "--font=FONT" Makes \fBwmpinboard\fR use the specified font; \fB\f(CB\*(C`FONT\*(C'\fB\fR can be one of the shortcuts listed when running the program with "\fB\f(CB\*(C`\-\-help\*(C'\fB\fR" as a parameter, or a complete X descriptor of a fixed size 6x10 font. The pinboard \fImust be empty\fR in order for this option to be applicable. For more details, see the section on "FREQUENTLY ASKED QUESTIONS". .Ip "\fB\f(CB\*(C`\-\-theme=FILE\*(C'\fB\fR" 2 .IX Item "--theme=FILE" Configures \fBwmpinboard\fR to load the specified theme when started interactively the next time. \fB\f(CB\*(C`FILE\*(C'\fB\fR is the location of a \&\fBwmpinboard\fR theme file (typically with a file name extension of \&\fI.wmpbtheme\fR). If it can't be loaded when run interactively, the program will revert to its default theme. If \fB\f(CB\*(C`FILE\*(C'\fB\fR is an empty string or \*(L"default\*(R", the use of a custom theme will be deactivated. .Sp Themes affect \fBwmpinboard\fR's appearance, in particular, its pinboard, edit mode and alarm panel pixmaps, the latter's digits, and possibly the location of the pinboard mode label area (via which notes are created). For downloading themes, or if you're inclined to create one yourself and need instructions, check out the program's home page (see the section on "AUTHOR" or \fBwmpinboard\fR's "\fB\f(CB\*(C`\-\-help\*(C'\fB\fR" output for the \s-1URL\s0). The themes kit containing instructions and samples on how to create theme files for \fBwmpinboard\fR that can be downloaded there is also included with the source package of the program. .Ip "\fB\f(CB\*(C`\-\-alarm\-cmd=CMD\*(C'\fB\fR" 2 .IX Item "--alarm-cmd=CMD" Configures \fB\f(CB\*(C`CMD\*(C'\fB\fR as the command to be executed on alarms. E.g., you could use "\f(CW\*(C`xkbbell\*(C'\fR" to cause the program to beep on such occassions, or make it run some sound-playing program. To reset the alarm command to none, make \fB\f(CB\*(C`CMD\*(C'\fB\fR a zero-length string. .Sh "Run-time options" .IX Subsection "Run-time options" .Ip "\fB\f(CB\*(C`\-d DISPLAY\*(C'\fB\fR or \fB\f(CB\*(C`\-\-display=DISPLAY\*(C'\fB\fR" 2 .IX Item "-d DISPLAY or --display=DISPLAY" Uses the specified X display rather than the default one. .Ip "\fB\f(CB\*(C`\-c\*(C'\fB\fR or \fB\f(CB\*(C`\-\-click\-to\-focus\*(C'\fB\fR" 2 .IX Item "-c or --click-to-focus" This turns on some emulation of a click-based keyboard focus mode. See the section on "FREQUENTLY ASKED QUESTIONS". .Ip "\fB\f(CB\*(C`\-t TIME\*(C'\fB\fR or \fB\f(CB\*(C`\-\-timeout=TIME\*(C'\fB\fR" 2 .IX Item "-t TIME or --timeout=TIME" Sets the edit mode timeout (i.e., the number of seconds of idleness after which edit mode is terminated automatically) to \fB\f(CB\*(C`TIME\*(C'\fB\fR seconds. The compile-time default is 60s, but this may have been changed for your particular build; run with \fB\f(CB\*(C`\-v\*(C'\fB\fR if in doubt to check that. Specifying a value of 0 (zero) will disable the timeout. .Ip "\fB\f(CB\*(C`\-n\*(C'\fB\fR or \fB\f(CB\*(C`\-\-normal\-state\*(C'\fB\fR" 2 .IX Item "-n or --normal-state" Forces \fBwmpinboard\fR to run in so-called NormalState, which is preferred by \fBAfterStep\fR's \fBWharf\fR. .Ip "\fB\f(CB\*(C`\-w\*(C'\fB\fR or \fB\f(CB\*(C`\-\-withdrawn\-state\*(C'\fB\fR" 2 .IX Item "-w or --withdrawn-state" Forces the program to run in so-called WithdrawnState, as desired by the \fBWindow Maker\fR dock. This option and the previous one are mutually exclusive. Note also that \fBwmpinboard\fR tries to auto-detect whether \&\fBWindow Maker\fR is running and sets itself up accordingly. Using \fB\f(CB\*(C`\-n\*(C'\fB\fR or \fB\f(CB\*(C`\-w\*(C'\fB\fR should only be necessary in case those heuristics fail on your system for some reason or other. .Ip "\fB\f(CB\*(C`\-\-light\*(C'\fB\fR" 2 .IX Item "--light" Use this switch to suppress animations. .Sh "Command-line actions" .IX Subsection "Command-line actions" Even though \fBwmpinboard\fR is by design an interactive application, there may be occasions when it comes in handy to be able to access/manipulate notes from the command line. That's why the program offers a set of command-line options allowing for basic operations of that kind. Still, it should be kept in mind that \fBwmpinboard\fR is primarily meant to be used interactively. .PP All of the options below will, if an interactive instance of \&\fBwmpinboard\fR is running in the background, cause that to save its data (and quit \fIedit mode\fR, if necessary), and if any changes are made by the respective option, the interactive instance will then be signalled to re-read the data file. Even though the implemented methods of inter-process communication should generally be sufficiently safe with respect to avoiding data file corruption, it's in theory possible to undermine the concept and cause damage that way\*(--yet this won't happen unless you deliberately take pains to achieve the goal. Generally, everything should work fine as long as you don't try running multiple non-interactive instances of \fBwmpinboard\fR simultaneously. .PP Only one of the below actions can be specified per call to \fBwmpinboard\fR. .Ip "\fB\f(CB\*(C`\-\-dump\*(C'\fB\fR" 2 .IX Item "--dump" This dumps the contents of all notes, replacing line breaks by spaces (unless preceded by a hyphen) and shortening sequences of blanks. The list of dumped strings will be sorted by color groups. If you use special characters in your notes, make sure your terminal's running with the same character set as \fBwmpinboard\fR, or what you'll see might have a garbage-like quality. .Sp Each line of output represents one note and is prefixed by the internal number \fIcurrently\fR identifying the respective note and, if an alarm is configured for the respective note, time and date (or \*(L"daily\*(R"). .Ip "\fB\f(CB\*(C`\-\-dump\-raw\*(C'\fB\fR" 2 .IX Item "--dump-raw" Unlike the \*(L"cooked\*(R" dump described above, this just dumps the raw contents of all notes without applying any kind of formatting. May come in handy if your notes happen to contain E-mail addresses or other things for which lines 10 characters wide are too narrow. .Ip "\fB\f(CB\*(C`\-\-del=NUMBER\*(C'\fB\fR" 2 .IX Item "--del=NUMBER" This option will remove the note identified by \fB\f(CB\*(C`NUMBER\*(C'\fB\fR from the pinboard. \fB\f(CB\*(C`NUMBER\*(C'\fB\fR is a number determined by the output of either dump option, which should be consulted right before using this one, since note numbers may change when notes are moved around on the board or others are removed. .Ip "\fB\f(CB\*(C`\-\-add=STRING\*(C'\fB\fR" 2 .IX Item "--add=STRING" When run with this option, \fBwmpinboard\fR will add a new note (provided the maximal number of notes has not yet been reached) at a random position on the board, with contents \fB\f(CB\*(C`STRING\*(C'\fB\fR, word-wrapping the text at the end of the note's lines where necessary (after white space and hyphens). If due to this wrapping, the entire string cannot be stored on the note, the remainder will be discarded silently. .Sp In order to create a note with a certain color, the string can be prefixed by a color code specifying the group of colors which a random color is to be selected from (code letters are recognized case-insensitively): .Sp .Vb 4 \& %G - green \& %Y - yellow/white \& %R - reddish \& %B - blue .Ve Alternatively or additionally, you may specify a position code as \*(L"%1\*(R" through \*(L"%9\*(R", defining an approximate position on the board where the note is to be placed. Each of the nine figures corresponds to a ninth of the board with its index assigned in accordance with the layout of your keypad (i.e., \*(L"%1\*(R" meaning lower left, \*(L"%9\*(R" upper right corner, and so forth). .Sp Thus, .Sp .Vb 1 \& wmpinboard --add '%g%5test' .Ve will place a green note saying \*(L"test\*(R" at the center of the board. .Sp (Note: The \*(L"%\*(R" character can be escaped by a second one if you want to add an un-prefixed string starting with a percent character.) .Ip "\fB\f(CB\*(C`\-\-add\-raw=STRING\*(C'\fB\fR" 2 .IX Item "--add-raw=STRING" Via this option, a new note can be added from the command line (provided that this won't exceed the maximum number of notes). \&\fB\f(CB\*(C`STRING\*(C'\fB\fR specifies the \fIraw\fR contents of the note, as printed by \&\fB\f(CB\*(C`\-\-dump\-raw\*(C'\fB\fR. The same set of color group and position codes as for the previous option applies. .Sh "General options" .IX Subsection "General options" .Ip "\fB\f(CB\*(C`\-h\*(C'\fB\fR or \fB\f(CB\*(C`\-\-help\*(C'\fB\fR" 2 .IX Item "-h or --help" This prints a help screen listing command line options together with brief descriptions. .Ip "\fB\f(CB\*(C`\-i\*(C'\fB\fR or \fB\f(CB\*(C`\-\-info\*(C'\fB\fR" 2 .IX Item "-i or --info" Prints information about the current user configuration (font, theme, alarm command) and some useless statistics. .Ip "\fB\f(CB\*(C`\-v\*(C'\fB\fR or \fB\f(CB\*(C`\-\-version\*(C'\fB\fR" 2 .IX Item "-v or --version" This prints some more detailed version information, in particular, which compile-time settings this binary was built with. .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBwmpinboard\fR operates in basically two different modes, namely, the \&\fIpinboard view\fR and \fIedit mode\fR. Furthermore, a \fIpanel\fR of buttons granting access to extended options can be popped up in \fIedit mode\fR, which in turn allows you to display the \fIalarm panel\fR to configure alarm settings for the current note. .Sh "Pinboard view" .IX Subsection "Pinboard view" This is \fBwmpinboard\fR's normal mode of operation. A potentially chaotic arrangement of tiny squares on a beige-colored oblong (default theme) is meant to resemble notes pinned to a cork board. Possible actions include: .Ip "\(bu" 2 \&\fIAdd\fR a note, by left-clicking on the board's \*(L"\s-1TO\s0 \s-1DO\s0\*(R" label. This creates a new, blank, randomly-colored note at a random position on the board and puts \fBwmpinboard\fR in \fIedit mode\fR (see below). If you prefer to place a new note at a certain position before being prompted to enter its contents, this can be done by moving the mouse cursor after having clicked on the label. This will realize the note and allow you to drag it to a position of your choice. \fBwmpinboard\fR will switch to \fIedit mode\fR as soon as you release the mouse button. .Ip "\(bu" 2 \&\fIEdit\fR/\fIview\fR a note, by left-clicking on a note. This switches to \fIedit mode\fR (described below). .Ip "\(bu" 2 \&\fIMove\fR a note, by dragging it using the right mouse button. This also raises the note in question on top of all others. Depending on its horizontal position, the note will be tilted automatically. As a side-effect, a single brief right-click can be used to raise a note on top of overlapping ones without moving it. .Sp By dragging a note with the left mouse button, you can move it without changing its level with respect to other notes, i.e., without raising it on top of all others. .Sh "Edit mode" .IX Subsection "Edit mode" This mode serves two purposes: on the one hand, it presents you with a \&\*(L"full-size\*(R" view of a note's contents, on the other, you can use the occasion to edit it. Due to its limited size, a note can hold up to 10 characters on 6 lines (minus one on the last, i.e., 59 characters altogether), plus a monochrome sketch of some kind. Possibly actions: .Ip "\(bu" 2 \&\fIEnter\fR text. \fBwmpinboard\fR supports user-selectable fonts and dead keys, so you should be able to enter any characters that are usually accessible via your keyboard and have them displayed correctly. Furthermore, the cursor can be moved around using the arrow keys (or EMACS-style via [Ctrl]\-[N]/[P]/[F]/[B], if you are so inclined). Alternatively, it can be placed explicitly by left-clicking where you want it to be. Other special keys that are supported include: .RS 2 .Ip "[PgUp]/[PgDn]" 2 .IX Item "[PgUp]/[PgDn]" Places the cursor on character 1/59, respectively. .Ip "[Home]/[End]" 2 .IX Item "[Home]/[End]" Places the cursor at the textual start or end of the current line. .Ip "[Del]" 2 .IX Item "[Del]" Deletes the character currently under the text cursor and shifts the remaining text on the current line to the left; if the current line is blank, removes it and shifts all lines below up by one line. .Ip "[Backspace]" 2 .IX Item "[Backspace]" See [Del], but affects the character on the left of the cursor. .Ip "[Ins]" 2 .IX Item "[Ins]" Toggles inserting/overwriting of existing text; the current mode is indicated by a cursor change (block cursor means insert mode). .Ip "[Enter]" 2 .IX Item "[Enter]" In insert mode, wraps the current line at the cursor's position; in overwrite mode (underscore cursor), merely moves the cursor to the start of the next line. .Ip "[Ctrl]\-[Y], \-[Z]" 2 .IX Item "[Ctrl]-[Y], -[Z]" Removes an entire (intermediate) line, shifting those below up by one, and places the cursor at the start of the current line. .Ip "[Esc]" 2 .IX Item "[Esc]" Quits \fIedit mode\fR and returns to the \fIpinboard view\fR. .Ip "[Shift]\-[Left]/[Right]" 2 .IX Item "[Shift]-[Left]/[Right]" Cycles through all notes currently on the pinboard. .Ip "[Shift]\-[Up]/[Down]" 2 .IX Item "[Shift]-[Up]/[Down]" Cycles through all notes that are \fIroughly\fR the same color as the current one. For this purpose, colors have internally been divided into four groups: green, white/yellow, reddish, blue. .Ip "([Shift]\-)[Tab]" 2 .IX Item "([Shift]-)[Tab]" Cycles (backwards) through availabe note colors. .RE .RS 2 .RE .Ip "\(bu" 2 \&\fICut'n'paste\fR text. Despite the limitations implied, \fBwmpinboard\fR has support for cutting & pasting to and from the X clipboard: .RS 2 .Ip "\(bu" 2 In order to copy text to the clipboard, select the desired segment via either the left or the right mouse button: the left one will copy the text post-formatted as done by the command line switch \fB\f(CB\*(C`\-\-dump\*(C'\fB\fR (see the section on "OPTIONS"); the right button will copy the raw selection. Similarly, a left double click will select the word (i.e., all adjoining non-blank characters) at the respective position, a right one will do the same but neglect line breaks as delimiters. Additionally, you can copy a note's entire raw contents by pressing [Ctrl]\-[R]; [Ctrl]\-[C] will do the same with applied post-formatting. .Ip "\(bu" 2 To paste the clipboard's contents, press the middle button wherever the insertion is supposed to happen. This will insert the clipboard's current contents, trying to word-wrap the text (at white space and after hyphens). If in insert mode, following text will be shifted towards the end of the note, trying to word-wrap that as well. .Sp If you wish to paste something without word-wrapping (e.g., an \s-1URL\s0 containing a hyphen), paste it via [Ctrl]\-[I] (think [i]nsert). This will paste the clipboard's raw contents at the current location of the cursor, shifting subsequent text if in insert mode (not trying to word-wrap that either). .RE .RS 2 .Sp Obvious limitations you should be aware of include: .RS 2 .RE .Ip "\(bu" 2 As is usually the case (about \fBwmpinboard\fR, anyway), size matters. As you know, a note can hold only up to 59 characters, so trying to paste longer strings will result in those being truncated. .Ip "\(bu" 2 If the text to be pasted is formatted in some way or other, this won't be the case any more after it has been pasted: \fBwmpinboard\fR replaces new line characters by blanks and, when pasting using the mouse, tries to word-wrap text. .Ip "\(bu" 2 The information stored in the cut buffer needn't necessarily be compatible with \fBwmpinboard\fR in that it may be encoded with another character set. .RE .RS 2 .RE .Ip "\(bu" 2 \&\fILeave\fR \fIedit mode\fR. This is achieved by left-clicking on the triangle in the lower right-hand side corner. If the note is completely empty, it will be removed from the board. In any case, this returns to the \fIpinboard view\fR. .Ip "\(bu" 2 \&\fIPop up\fR a \fIpanel\fR with some further options to choose from. This is done by right-clicking on the aforementioned triangle. To learn what the \fIpanel\fR is there for, see the corresponding section below. .Ip "\(bu" 2 \&\fIDraw\fR a sketch. This mode can be activated via the \fIpanel\fR, and deactivated by either right-clicking somewhere on the note or opening the \fIpanel\fR again. While in drawing mode, the mouse pointer is pencil-shaped, and drawing can be done by keeping the left mouse button pressed and dragging the mouse, just as you'd expect. Sketch and text may overlap each other, but keyboard input is ignored while in drawing mode. .Ip "\(bu" 2 \&\fIErase\fR a sketch. Just like DRAWing mode, this mode is entered via the \fIpanel\fR, and can be quit just like the former. In erase mode, the text is hidden, so you needn't guess whether a pixel belongs to an entered character or a drawn sketch. Note that the erase cursor's point is slightly larger than the one used when drawing. .PP Note: \fBwmpinboard\fR remembers where you left the text cursor after you last edited a note and restores this position when you edit it the next time. .Sh "Edit mode panel" .IX Subsection "Edit mode panel" This \fIpanel\fR is intended to provide easy access to some options affecting \fIedit mode\fR or the current note in general. The \fIpanel\fR looks like this (letters denoting the buttons for reference below): .PP .Vb 5 \& +---+---+---+---+ \& | a | c | e | g | \& +---+---+---+---+ \& | b | d | f | h | \& +---+---+---+---+ .Ve The buttons bear tiny icons which are meant to suggest what they do, which isn't all that easy on a 12x12 pixels area. \fB\f(CB\*(C`:^)\*(C'\fB\fR .PP Here's a description of what each button does: .Ip "(a)" 4 .IX Item "(a)" Left-clicking on this button opens and closes the \fIalarm panel\fR (see below), which allows you to configure alarm settings for the note being edited. When the \fIalarm panel\fR is visible, the alarm is activated. To turn it off, press the button again and make the panel disappear. .Ip "(b)" 4 .IX Item "(b)" This button allows one to cycle through all colors available for notes (20 of them). Clicking on it won't close the \fIpanel\fR, so this can be done repeatedly. Using the left mouse button traverses the colors in ascending, using the right button in descending order. \fINote:\fR colors can also be changed via a keyboard shortcut in \fIedit mode\fR (see that section). .Ip "(c)" 4 .IX Item "(c)" This button closes the \fIpanel\fR and returns to \fIedit mode\fR, with the sketch-\fIdraw\fRing feature enabled (see above). .Ip "(d)" 4 .IX Item "(d)" Closes the \fIpanel\fR and returns to \fIedit mode\fR, with the sketch-\fIeras\fRing feature enabled (see above). Don't panic if entered text vanishes all of a sudden when you do this: this is because \&\fBwmpinboard\fR intentionally hides it to eradicate the need for you to make wild guesses as to what's entered text and which pixels belong to a sketch. .Ip "(e)" 4 .IX Item "(e)" This button removes all entered text on the current note and places the text cursor on the very first character. Besides, it closes the \&\fIpanel\fR, thus returning to \fIedit mode\fR. .Ip "(f)" 4 .IX Item "(f)" Pressing this button completely removes a drawn sketch on the current note and returns to \fIedit mode\fR. .Ip "(g)" 4 .IX Item "(g)" This option removes the *entire* note from the board and returns to \&\fIpinboard view\fR. .Ip "(h)" 4 .IX Item "(h)" This button merely closes the \fIpanel\fR (and thus puts you back in \&\fIedit mode\fR). The same can be achieved by simply right-clicking in this view. .Sh "Alarm panel" .IX Subsection "Alarm panel" This panel can be accessed from the \fIedit mode panel\fR described above. If the panel is visible while the \fIedit mode panel\fR is on, the alarm is set, otherwise, it's disabled. .PP The \fIalarm panel\fR consists of six distinct clickable areas. The digits to the left and right of the colon are the hour and minute which an alarm is to be set for. Below them, a date can be specified in month, day order. On the right, there are two toggle buttons (which can be either green (on) or red (off) and are mutually exclusive). The top one represents a daily alarm whereas the bottom one indicates/sets a date-specific one. .PP The hour, minute, month, and day of month fields can each be incremented or decremented by left- or right-clicking on them, respectively. Clicking on one of the toggle buttons configures the alarm as the respective type. .PP As the above description implies, there are two distinct kinds of alarms: daily and date-specific ones. .PP Alarms are generally executed only when in \fIpinboard view\fR and not moving any notes about. If you're keeping the program busy at the time an alarm would have to occur, it will be delayed until you're finished (i.e., let the program return to idle \fIpinboard view\fR). The same holds if an alarm occurs while another one is running. .PP If all prerequisites are given and an alarm becomes due, the corresponding note is displayed in edit view, and the display starts to flash on and off, along with the alarm command being executed (see the section on "OPTIONS"). To stop the blinking, click on the note. From then on, the note will be in \fIedit mode\fR. .PP For daily alarms, the entered date is ignored, and as the name suggests, they're run every day at the specified time. To deactivate such an alarm, you have to open the \fIedit mode panel\fR and click button (a) to make the \fIalarm panel\fR disappear, which turns the alarm off. .PP In contrast, date-specific alarms are executed only once, at the specified day and time. Since a year cannot be specified (explicitly), the alarm will be run on this date's next occurrence within a year from when the alarm was set. After that, the alarm will automatically be disabled. If a date-specific alarm becomes due while \fBwmpinboard\fR isn't running, it will be displayed as soon as the program is started the next time\*(--which does \fBnot\fR go for daily alarms. .PP The default mode for alarms is date-specific, and time and date are initialized with the next full hour when the alarm panel is opened the first time for a given note. .PP Internally, alarm times are stored in universal format, i.e., if you change the time zone after having set an alarm, the time will stay universally the same but will differ relative to the new time zone from what absolute time you originally set. This behavior is intended. .PP Finally, it should be mentioned that there are a few limitations with respect to command line actions (such as \fB\f(CB\*(C`\-\-add\*(C'\fB\fR, \fB\f(CB\*(C`\-\-del\*(C'\fB\fR, \&\fB\f(CB\*(C`\-i\*(C'\fB\fR, etc.). See the section on "RESTRICTIONS". .SH "FREQUENTLY ASKED QUESTIONS" .IX Header "FREQUENTLY ASKED QUESTIONS" .Ip "\(bu" 2 \&\fIQ:\fR Is a \*(L"pinboard\*(R" this small really of any use? .Sp \&\fIA:\fR Of course the limited size imposes certain restrictions, but if you think about it, you'll agree that a real life pinboard reminds you of things by the mere existence of notes being pinned to it. In order to read what they say, you have to step close and, possibly, detach the note. .Sp Quite similarly, \fBwmpinboard\fR reminds you of things by facing you with colored representations of notes on your screen. To find out what it was you intended them to remind you of, all you have to do is click on a note, which will then be displayed full size. Furthermore, the alarm feature introduced in a later version allows for even more explicit reminders and thus renders \fBwmpinboard\fR even more powerful in a way than any real-life cork board. \fB\f(CB\*(C`:\-)\*(C'\fB\fR .Sp By choosing from a variety of possible colors, you can assign particular colors to certain kinds of reminders, which may further enhance \fBwmpinboard\fR's usability. Moreover, you can place certain notes on certain areas of the board to emphasize their category, urgency, etc. It's up to you what to make of it. .Sp Finally, by adding drawing capabilities, I've definitely overcome the contents quantity barrier imposed by the maximum number of 59 characters, for as everyone knows, a picture is worth more than a thousand words. *grin* .Ip "\(bu" 2 \&\fIQ:\fR I don't live in an English-speaking country, so what about extended characters (umlauts, accents, cyrillic alphabet)? .Sp \&\fIA:\fR \fBwmpinboard\fR allows you to use an arbitrary 8bit X font, provided that its characters are of a fixed size of 6x10 (or, deprecated but possible, anything <= 7x10) pixels. The default font is \*(L"6x10\*(R" (more precisely, it's called \&\*(L"\-misc-fixed-medium-r-normal\*(--10\-100\-75\-75\-c-*\-ISO8859\-1\*(R"), an \&\s-1ISO8859\-1\s0 (Latin1) font which should be part of every XFree installation. .Sp In order to make \fBwmpinboard\fR use another font, run it as .Sp .Vb 1 \& $ wmpinboard --font=FONT .Ve where \fB\s-1FONT\s0\fR is either a shortcut for a compiled-in font name (see the section on "OPTIONS" for a list of those) or a valid, complete X font descriptor. This is a configuration directive, meaning that no other instance of \fBwmpinboard\fR may be running at the time. Note that this \&\fIonly works if there are no more notes on the board\fR. It's intentionally been made impossible to change the font while there are notes saved in \fBwmpinboard\fR's data file, since this might result in garbage being displayed. Of course even a font specified via a shortcut has to exist on your system in order to be usable. .Sp If a configured custom font cannot be loaded or has invalid dimensions, \&\fBwmpinboard\fR will try to revert. Note that this won't affect the font name saved along with the data, though. .Ip "\(bu" 2 \&\fIQ:\fR How can I disable those vexing, superfluous animations? .Sp \&\fIA:\fR .Sp .Vb 1 \& $ wmpinboard --light .Ve .Ip "\(bu" 2 \&\fIQ:\fR Why aren't those animations smooth all of the time? Sometimes it looks like they're being skipped entirely. .Sp \&\fIA:\fR This presumably is a multitasking issue: depending on the current system load and \fBwmpinboard\fR's/the X server's recent \s-1CPU\s0 usage history, it may take a moment until the scheduling has been adapted to the suddenly increased \s-1CPU\s0 load implied by displaying the animation, and short as it is, it may already be finished until this has happened, i.e., it's the X server lagging behind in updating the program's display if \fBwmpinboard\fR's been idle for some time prior to that. It may sound paradoxical, but the effect is the more likely to show the lower the system's load is. I don't see a way to avoid this effect\*(--either this, or you turn off animations altogether. .Ip "\(bu" 2 \&\fIQ:\fR When I leave \fBwmpinboard\fR idle in edit mode for some time, edit mode is terminated automatically. Is that intended? .Sp \&\fIA:\fR Yes. After 60 idle seconds (that's the default; see the section on "OPTIONS") in edit mode (no mouse click and no keyboard input), edit mode is terminated automatically. If the note being edited happens to be blank, it will be discarded (or removed if an existing note is being edited). .Sp This timeout can, however, be adjusted according to your preferences or turned off using the \fB\f(CB\*(C`\-t\*(C'\fB\fR parameter. See the section on "OPTIONS" for this. .Ip "\(bu" 2 \&\fIQ:\fR When does \fBwmpinboard\fR save its data? .Sp \&\fIA:\fR Notes data is saved on each of these occasions: .RS 2 .Ip "\(bu" 2 whenever edit mode is terminated .Ip "\(bu" 2 when you switch notes in edit mode (via [Shift]\-[arrow\ key]) .Ip "\(bu" 2 when a note has been moved on the board .Ip "\(bu" 2 when an interactive instance is running and you run \fBwmpinboard\fR from the command line, making it dump, add, or delete notes .Ip "\(bu" 2 when killed via \s-1SIGINT\s0 or \s-1SIGTERM\s0 and edit mode is active .RE .RS 2 .Sp Notes are saved to a file called \fI.wmpinboarddata\fR in your home directory (see the section on "FILES"). .RE .Ip "\(bu" 2 \&\fIQ:\fR I've tried my best and littered the entire pinboard with quite a lot of notes. Now I can't seem to be able to add another one. .Sp \&\fIA:\fR There's a compile-time limit of 20 notes. I think more notes on this tiny a board really don't make any sense. .Ip "\(bu" 2 \&\fIQ:\fR I've explicitly configured my window manager for click-based rather than mouse-following focus, but \fBwmpinboard\fR's focus follows the mouse regardless. Can I change this? .Sp \&\fIA:\fR By default, \fBwmpinboard\fR actively claims the keyboard input focus (if it's in note edit mode) whenever the pointer is moved over the application's area. Since \fBwmpinboard\fR is a dock applet, i.e., a withdrawn rather than a \*(L"real\*(R" X window, it can't be assigned a focus in the same way as to the latter ones. However, running \fBwmpinboard\fR with the parameter \fB\f(CB\*(C`\-c\*(C'\fB\fR will make it emulate some sort of click-based focusing. This means, it actively claims the keyboard focus only on these occasions: .RS 2 .Ip "\(bu" 2 when a new note is created (\fInot\fR when you click on an existing note\*(--you'll have to explicitly click on the editing area to make it claim focus; this way, you can just view a note without any change to keyboard focus) .Ip "\(bu" 2 when you click somewhere on the text area in edit mode .RE .RS 2 .Sp Once keyboard-focused, \fBwmpinboard\fR will keep it until another window is explicitly focused (usually by clicking on its title bar or border). To focus \fBwmpinboard\fR again when it's lost focus, you'll have to click on its text area in edit mode. This click will only focus the application and not have the usual cursor-positioning effect. .Sp This feature is to be considered experimental since I'm not sure of how much use it really is. A mouse-following focus is the recommended mode of operation. .RE .Ip "\(bu" 2 \&\fIQ:\fR I've noticed that after a while, some sort of darker stains appear on my notes. Is that a bug in some drawing routine? .Sp \&\fIA:\fR No, this is not a bug. These \*(L"stains\*(R" are meant to resemble creases, caused by frequent handling of a particular note (wear & tear, you see?). In fact, they're added with a certain probability whenever you view a note by clicking on it (note that leafing through notes via [Shift]\-[arrow\ keys] is \fInot\fR affected), when you clear its textual or drawn contents via the \fIedit mode panel\fR (very outwearing, that \&\fB;\-)\fR\ ), and when a note is moved. This feature can be disabled at compile time by running \fIconfigure\fR with \f(CW\*(C`\-\-disable\-creases\*(C'\fR as a parameter. .Sp To prevent the question, no, worn-out notes cannot be ironed to get rid of the creases. Sorry. \fB\f(CB\*(C`:\-p\*(C'\fB\fR .Ip "\(bu" 2 \&\fIQ:\fR Is \fBwmpinboard\fR compatible with \fBAfterStep\fR's \fBWharf\fR? .Sp \&\fIA:\fR \fBwmpinboard\fR tries to autodetect whether \fBWindow Maker\fR is running and sets itself up accordingly. If this doesn't work for you for some reason, you can explicitly make it run in either Withdrawn- or NormalState using the \fB\f(CB\*(C`\-w\*(C'\fB\fR or \fB\f(CB\*(C`\-n\*(C'\fB\fR flag, respectively. See the section on "OPTIONS". .Sp Swallowing evidently works with \fBAfterStep\fR 1.6.10; I don't know about earlier versions. A \fBWharf\fR config line you might try is this: .Sp .Vb 1 \& *Wharf wmpinboard nil MaxSwallow "wmpinboard" wmpinboard & .Ve Besides, \fBwmpinboard\fR has been reported to work with \fBBlackbox\fR. .Ip "\(bu" 2 \&\fIQ:\fR I have X running at a color depth of 8 bits, i.e., in palette mode, and \fBwmpinboard\fR obviously requires too many colors and thus looks real messy (or doesn't run at all, complaining about \*(L"not enough free color cells\*(R"). What can I do about this? .Sp \&\fIA:\fR As of version 0.99.1, the recommended solution is to upgrade whatever component of your system restricts you to a palette mode. .Ip "\(bu" 2 \&\fIQ:\fR Can I run multiple instances of \fBwmpinboard\fR as the same user, simultaneously? .Sp \&\fIA:\fR No, this is certainly not a good idea. The run-time behavior may be unpredictable, and your data file can get corrupted. Therefore, any \&\fBwmpinboard\fR process that's to be run interactively first checks whether another interactive instance is running, and if so, refuses to run. .Ip "\(bu" 2 \&\fIQ:\fR I've just upgraded from a pre-0.7 version of \fBwmpinboard\fR and noticed that its data file format has changed completely since. Is there a way to upgrade and yet keep my existing notes? .Sp \&\fIA:\fR There's a \fBPerl\fR script doing the conversion included with the distribution (the source one, anyway). If your package didn't include that, feel free to mail to the author (see the section on "AUTHOR" at the end of this documentation). .Ip "\(bu" 2 \&\fIQ:\fR I find a mere 59 characters per note to be a real limitation. How about making \fBwmpinboard\fR pop up an external window with more room for that? Or how about assigning that job to an external editor? .Sp \&\fIA:\fR There's a variety of comprehensive programs for keeping notes out there, offering this functionality but being rather heavy-weight since they are linked against one \s-1GUI\s0 library or another (\fBCoolNotes\fR or \&\fBKNotes\fR come to mind). On the other hand, I couldn't find a \&\fB\s-1WM\s0\fR\-conforming reminder I could omnipresently stick to my desktop anywhere, so I wrote \fBwmpinboard\fR. I wanted it to be small, neat, easy to use, and yet useful in a way. .Sp I hope that's about what the program is currently like. And I'd prefer to keep it like that rather than inflate it by linking against a \s-1GUI\s0 library\*(--eventually, the note editing code would outweigh the rest of the application by a factor, and people would probably still create notes mostly shorter than 60 characters. If you restrict your memos to keywords and abbreviations, that's quite a lot. .Sp I want \fBwmpinboard\fR to remain an applet in that it doesn't open up external windows and use (if just temporarily) additional desktop space. I explicitly wrote it to have something omnipresent at a fixed position on my desktop. I find it preferable to have the notes pop up in place rather than somewhere else on the screen. .Sp Personally, I use other programs for larger notes too; \fBwmpinboard\fR has been designed for things smaller in size and greater in urgency, it's in no way meant to be a comprehensive knowledge base application of any kind. .Sp Summing up, I think a dock applet should be small both regarding its on-screen representation and the resources it uses. That's why I don't intend to add any pop-up dialogs or similar things to \&\fBwmpinboard\fR. .Ip "\(bu" 2 \&\fIQ:\fR I've tried the program, yet I can't help finding it utterly useless. What shall I do? .Sp \&\fIA:\fR The solution is simple. Just don't use it. .Ip "\(bu" 2 \&\fIQ:\fR Will your answer to this question be \*(L"no\*(R"? .Sp \&\fIA:\fR Nope. .SH "HINTS" .IX Header "HINTS" .Ip "\(bu" 2 A good way of making the best of the organizational features offered by \&\fBwmpinboard\fR is to use certain colors and locations on the pinboard to indicate urgency and contents of a note. For example, you might use each of the color groups for a certain kind of reminder, because that enables you to leaf through all notes with related contents via [Shift]\-[arrow\ keys] in edit mode. Besides, you might assign each corner of the board a specific urgency, altogether allowing you to derive a note's type from its color and its urgency from its location on the board. Thanks again to the ability to leaf through all notes belonging to the same group of colors, notes with similar contents will still be clustered in a way. .SH "UNDOCUMENTED FEATURES" .IX Header "UNDOCUMENTED FEATURES" This piece of documentation doesn't cover any undocumented features. .SH "FILES" .IX Header "FILES" .Ip "\fI~/.wmpinboarddata\fR" 2 .IX Item "~/.wmpinboarddata" the user's \fBwmpinboard\fR data file .Ip "\fI~/.wmpinboarddata.new\fR" 2 .IX Item "~/.wmpinboarddata.new" temporary file created momentarily when saving data .SH "ENVIRONMENT VARIABLES" .IX Header "ENVIRONMENT VARIABLES" .Ip "$HOME" 2 .IX Item "$HOME" the user's home directory .SH "RESTRICTIONS" .IX Header "RESTRICTIONS" .Ip "\(bu" 2 \&\fBwmpinboard\fR relies on a dock app tile size of at least 64x64 pixels. In fact, using smaller tiles renders the applet rather useless, as, e.g., opening the edit mode panel becomes impossible. .Ip "\(bu" 2 Unpredictable effects may be the results if a command line action is taken while an alarm is running and others are due simultaneously. If just a single alarm is active and no others are due, that alarm will be cancelled when the two instances of \fBwmpinboard\fR synchronize. If more instances are due during the process, a race conditions arises that can't be solved satisfactorily due to the program's internal structure and organization. Still, in theory, nothing critical will happen, and the most you'll lose will be an alarm or two. .Ip "\(bu" 2 \&\fBwmpinboard\fR data files are not designed to be portable across architectures. Due to differences in data type representations that are likely otherwise, a datafile can only be reliably used by program binaries running on machines of the same architecture. .Ip "\(bu" 2 Certainly of no interest to anyone, but mentioned for the sake of completeness: \fBwmpinboard\fR's alarm features will start to fail past 04:14:07 on Jan 19, 2037, which is due to the legacy Un*x time format. .SH "BUGS" .IX Header "BUGS" If you stumble on any bugs, feel free to mail the author. The same goes if you encounter any problems running/using the program. Be sure to include any information you consider relevant, i.e., at a minimum, the version of \fBwmpinboard\fR you're using as well as your \s-1OS\s0 and X versions. .PP Also, further suggestions are always welcome. Please check the \fI\s-1TODO\s0\fR file that's part of the distribution to see if what you're about to suggest isn't already on my \*(L"to do\*(R" list, or has been suggested earlier and was rejected for one reason or other. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIwmaker\fR\|(1) .SH "AUTHOR" .IX Header "AUTHOR" \&\fBwmpinboard\fR is copyrighted (c) 1998\-2000 by Marco Go\*:tze, . It is distributed under the terms of the \&\s-1GNU\s0 General Public License, revision 2 or any later revision thereof. Use at your own risk. .PP New releases of and themes for \fBwmpinboard\fR can be found at , or that was true at least by the time this document was last updated. wmpinboard-1.0.orig/man/wmpinboard.pod0100644000175000017500000011152607214234637016225 0ustar hmhhmh=head1 NAME B - a B dock app resembling a miniature pinboard =head1 SYNOPSIS wmpinboard [options] =head2 What wmpinboard is B is a B dock applet resembling a miniature pinboard. It's intended to somewhat relieve heavily littered desktops by allowing you to place reminders on a graphical on-screen pinboard rather than producing a mess of real notes all around your keyboard (thus being environmentally A Good Thing, too B<;-)> ). It supports arbitrary 6x10 X fonts and has XLocale support, enabling you to enter locale-dependent special characters if set up appropriately. Besides text, you can add small monochrome sketches to your notes or simply encircle or underline words as a means of emphasis, and alarms can be set to explicitly remind you of things. Above all, B is animated in redundant ways to make it look even more attractive, and themeability provides for a way of adapting its appearance to that of the rest of your desktop. =head2 What wmpinboard ISN'T Clearly, B doesn't allow you to keep an unlimited number of notes holding arbitrary amounts of information, and that's not what it's meant to do. Just as real notes offer limited space, so do those simulated by B. Besides, as a dock applet, it aims at being small and neat and yet useful in a way, and that's what it is, too, or considered to be by some people, anyway. If you need room for more comprehensive reminders, use another program, either additionally or exclusively. There's a variety of such out there, but their niche is different from that which B claims. =head1 OPTIONS B's command-line options can be roughly divided into four groups: configuration directives, run-time options, command-line actions, and general options. Generally, B supports GNU-style long options (which may be abbreviated unambiguously) as well as short ones for parameters used more commonly. =head2 Configuration directives This type of command-line options changes some aspect of B's configuration that is saved along with the data and thus set in a more permanent way. Only one such parameter may be specified per call, and there mustn't be another instance running. =over 2 =item B> Makes B use the specified font; B> can be one of the shortcuts listed when running the program with "B>" as a parameter, or a complete X descriptor of a fixed size 6x10 font. The pinboard I in order for this option to be applicable. For more details, see L<"FREQUENTLY ASKED QUESTIONS">. =item B> Configures B to load the specified theme when started interactively the next time. B> is the location of a B theme file (typically with a file name extension of F<.wmpbtheme>). If it can't be loaded when run interactively, the program will revert to its default theme. If B> is an empty string or "default", the use of a custom theme will be deactivated. Themes affect B's appearance, in particular, its pinboard, edit mode and alarm panel pixmaps, the latter's digits, and possibly the location of the pinboard mode label area (via which notes are created). For downloading themes, or if you're inclined to create one yourself and need instructions, check out the program's home page (see L<"AUTHOR"> or B's "B>" output for the URL). The themes kit containing instructions and samples on how to create theme files for B that can be downloaded there is also included with the source package of the program. =item B> Configures B> as the command to be executed on alarms. E.g., you could use "C" to cause the program to beep on such occassions, or make it run some sound-playing program. To reset the alarm command to none, make B> a zero-length string. =back =head2 Run-time options =over 2 =item B> or B> Uses the specified X display rather than the default one. =item B> or B> This turns on some emulation of a click-based keyboard focus mode. See L<"FREQUENTLY ASKED QUESTIONS">. =item B> or B> Sets the edit mode timeout (i.e., the number of seconds of idleness after which edit mode is terminated automatically) to B> seconds. The compile-time default is 60s, but this may have been changed for your particular build; run with B> if in doubt to check that. Specifying a value of 0 (zero) will disable the timeout. =item B> or B> Forces B to run in so-called NormalState, which is preferred by B's B. =item B> or B> Forces the program to run in so-called WithdrawnState, as desired by the B dock. This option and the previous one are mutually exclusive. Note also that B tries to auto-detect whether B is running and sets itself up accordingly. Using B> or B> should only be necessary in case those heuristics fail on your system for some reason or other. =item B> Use this switch to suppress animations. =back =head2 Command-line actions Even though B is by design an interactive application, there may be occasions when it comes in handy to be able to access/manipulate notes from the command line. That's why the program offers a set of command-line options allowing for basic operations of that kind. Still, it should be kept in mind that B is primarily meant to be used interactively. All of the options below will, if an interactive instance of B is running in the background, cause that to save its data (and quit I, if necessary), and if any changes are made by the respective option, the interactive instance will then be signalled to re-read the data file. Even though the implemented methods of inter-process communication should generally be sufficiently safe with respect to avoiding data file corruption, it's in theory possible to undermine the concept and cause damage that way--yet this won't happen unless you deliberately take pains to achieve the goal. Generally, everything should work fine as long as you don't try running multiple non-interactive instances of B simultaneously. Only one of the below actions can be specified per call to B. =over 2 =item B> This dumps the contents of all notes, replacing line breaks by spaces (unless preceded by a hyphen) and shortening sequences of blanks. The list of dumped strings will be sorted by color groups. If you use special characters in your notes, make sure your terminal's running with the same character set as B, or what you'll see might have a garbage-like quality. Each line of output represents one note and is prefixed by the internal number I identifying the respective note and, if an alarm is configured for the respective note, time and date (or "daily"). =item B> Unlike the "cooked" dump described above, this just dumps the raw contents of all notes without applying any kind of formatting. May come in handy if your notes happen to contain E-mail addresses or other things for which lines 10 characters wide are too narrow. =item B> This option will remove the note identified by B> from the pinboard. B> is a number determined by the output of either dump option, which should be consulted right before using this one, since note numbers may change when notes are moved around on the board or others are removed. =item B> When run with this option, B will add a new note (provided the maximal number of notes has not yet been reached) at a random position on the board, with contents B>, word-wrapping the text at the end of the note's lines where necessary (after white space and hyphens). If due to this wrapping, the entire string cannot be stored on the note, the remainder will be discarded silently. In order to create a note with a certain color, the string can be prefixed by a color code specifying the group of colors which a random color is to be selected from (code letters are recognized case-insensitively): %G - green %Y - yellow/white %R - reddish %B - blue Alternatively or additionally, you may specify a position code as "%1" through "%9", defining an approximate position on the board where the note is to be placed. Each of the nine figures corresponds to a ninth of the board with its index assigned in accordance with the layout of your keypad (i.e., "%1" meaning lower left, "%9" upper right corner, and so forth). Thus, wmpinboard --add '%g%5test' will place a green note saying "test" at the center of the board. (Note: The "%" character can be escaped by a second one if you want to add an un-prefixed string starting with a percent character.) =item B> Via this option, a new note can be added from the command line (provided that this won't exceed the maximum number of notes). B> specifies the I contents of the note, as printed by B>. The same set of color group and position codes as for the previous option applies. =back =head2 General options =over 2 =item B> or B> This prints a help screen listing command line options together with brief descriptions. =item B> or B> Prints information about the current user configuration (font, theme, alarm command) and some useless statistics. =item B> or B> This prints some more detailed version information, in particular, which compile-time settings this binary was built with. =back =head1 DESCRIPTION B operates in basically two different modes, namely, the I and I. Furthermore, a I of buttons granting access to extended options can be popped up in I, which in turn allows you to display the I to configure alarm settings for the current note. =head2 Pinboard view This is B's normal mode of operation. A potentially chaotic arrangement of tiny squares on a beige-colored oblong (default theme) is meant to resemble notes pinned to a cork board. Possible actions include: =over 2 =item * I a note, by left-clicking on the board's "TO DO" label. This creates a new, blank, randomly-colored note at a random position on the board and puts B in I (see below). If you prefer to place a new note at a certain position before being prompted to enter its contents, this can be done by moving the mouse cursor after having clicked on the label. This will realize the note and allow you to drag it to a position of your choice. B will switch to I as soon as you release the mouse button. =item * I/I a note, by left-clicking on a note. This switches to I (described below). =item * I a note, by dragging it using the right mouse button. This also raises the note in question on top of all others. Depending on its horizontal position, the note will be tilted automatically. As a side-effect, a single brief right-click can be used to raise a note on top of overlapping ones without moving it. By dragging a note with the left mouse button, you can move it without changing its level with respect to other notes, i.e., without raising it on top of all others. =back =head2 Edit mode This mode serves two purposes: on the one hand, it presents you with a "full-size" view of a note's contents, on the other, you can use the occasion to edit it. Due to its limited size, a note can hold up to 10 characters on 6 lines (minus one on the last, i.e., 59 characters altogether), plus a monochrome sketch of some kind. Possibly actions: =over 2 =item * I text. B supports user-selectable fonts and dead keys, so you should be able to enter any characters that are usually accessible via your keyboard and have them displayed correctly. Furthermore, the cursor can be moved around using the arrow keys (or EMACS-style via [Ctrl]-[N]/[P]/[F]/[B], if you are so inclined). Alternatively, it can be placed explicitly by left-clicking where you want it to be. Other special keys that are supported include: =over 2 =item [PgUp]/[PgDn] Places the cursor on character 1/59, respectively. =item [Home]/[End] Places the cursor at the textual start or end of the current line. =item [Del] Deletes the character currently under the text cursor and shifts the remaining text on the current line to the left; if the current line is blank, removes it and shifts all lines below up by one line. =item [Backspace] See [Del], but affects the character on the left of the cursor. =item [Ins] Toggles inserting/overwriting of existing text; the current mode is indicated by a cursor change (block cursor means insert mode). =item [Enter] In insert mode, wraps the current line at the cursor's position; in overwrite mode (underscore cursor), merely moves the cursor to the start of the next line. =item [Ctrl]-[Y], -[Z] Removes an entire (intermediate) line, shifting those below up by one, and places the cursor at the start of the current line. =item [Esc] Quits I and returns to the I. =item [Shift]-[Left]/[Right] Cycles through all notes currently on the pinboard. =item [Shift]-[Up]/[Down] Cycles through all notes that are I the same color as the current one. For this purpose, colors have internally been divided into four groups: green, white/yellow, reddish, blue. =item ([Shift]-)[Tab] Cycles (backwards) through availabe note colors. =back =item * I text. Despite the limitations implied, B has support for cutting & pasting to and from the X clipboard: =over 2 =item * In order to copy text to the clipboard, select the desired segment via either the left or the right mouse button: the left one will copy the text post-formatted as done by the command line switch B> (see L<"OPTIONS">); the right button will copy the raw selection. Similarly, a left double click will select the word (i.e., all adjoining non-blank characters) at the respective position, a right one will do the same but neglect line breaks as delimiters. Additionally, you can copy a note's entire raw contents by pressing S<[Ctrl]-[R]>; S<[Ctrl]-[C]> will do the same with applied post-formatting. =item * To paste the clipboard's contents, press the middle button wherever the insertion is supposed to happen. This will insert the clipboard's current contents, trying to word-wrap the text (at white space and after hyphens). If in insert mode, following text will be shifted towards the end of the note, trying to word-wrap that as well. If you wish to paste something without word-wrapping (e.g., an URL containing a hyphen), paste it via S<[Ctrl]-[I]> (think [i]nsert). This will paste the clipboard's raw contents at the current location of the cursor, shifting subsequent text if in insert mode (not trying to word-wrap that either). =back Obvious limitations you should be aware of include: =over 2 =item * As is usually the case (about B, anyway), size matters. As you know, a note can hold only up to 59 characters, so trying to paste longer strings will result in those being truncated. =item * If the text to be pasted is formatted in some way or other, this won't be the case any more after it has been pasted: B replaces new line characters by blanks and, when pasting using the mouse, tries to word-wrap text. =item * The information stored in the cut buffer needn't necessarily be compatible with B in that it may be encoded with another character set. =back =item * I I. This is achieved by left-clicking on the triangle in the lower right-hand side corner. If the note is completely empty, it will be removed from the board. In any case, this returns to the I. =item * I a I with some further options to choose from. This is done by right-clicking on the aforementioned triangle. To learn what the I is there for, see the corresponding section below. =item * I a sketch. This mode can be activated via the I, and deactivated by either right-clicking somewhere on the note or opening the I again. While in drawing mode, the mouse pointer is pencil-shaped, and drawing can be done by keeping the left mouse button pressed and dragging the mouse, just as you'd expect. Sketch and text may overlap each other, but keyboard input is ignored while in drawing mode. =item * I a sketch. Just like DRAWing mode, this mode is entered via the I, and can be quit just like the former. In erase mode, the text is hidden, so you needn't guess whether a pixel belongs to an entered character or a drawn sketch. Note that the erase cursor's point is slightly larger than the one used when drawing. =back Note: B remembers where you left the text cursor after you last edited a note and restores this position when you edit it the next time. =head2 Edit mode panel This I is intended to provide easy access to some options affecting I or the current note in general. The I looks like this (letters denoting the buttons for reference below): +---+---+---+---+ | a | c | e | g | +---+---+---+---+ | b | d | f | h | +---+---+---+---+ The buttons bear tiny icons which are meant to suggest what they do, which isn't all that easy on a 12x12 pixels area. B> Here's a description of what each button does: =over 4 =item (a) Left-clicking on this button opens and closes the I (see below), which allows you to configure alarm settings for the note being edited. When the I is visible, the alarm is activated. To turn it off, press the button again and make the panel disappear. =item (b) This button allows one to cycle through all colors available for notes (20 of them). Clicking on it won't close the I, so this can be done repeatedly. Using the left mouse button traverses the colors in ascending, using the right button in descending order. I colors can also be changed via a keyboard shortcut in I (see that section). =item (c) This button closes the I and returns to I, with the sketch-Iing feature enabled (see above). =item (d) Closes the I and returns to I, with the sketch-Iing feature enabled (see above). Don't panic if entered text vanishes all of a sudden when you do this: this is because B intentionally hides it to eradicate the need for you to make wild guesses as to what's entered text and which pixels belong to a sketch. =item (e) This button removes all entered text on the current note and places the text cursor on the very first character. Besides, it closes the I, thus returning to I. =item (f) Pressing this button completely removes a drawn sketch on the current note and returns to I. =item (g) This option removes the *entire* note from the board and returns to I. =item (h) This button merely closes the I (and thus puts you back in I). The same can be achieved by simply right-clicking in this view. =back =head2 Alarm panel This panel can be accessed from the I described above. If the panel is visible while the I is on, the alarm is set, otherwise, it's disabled. The I consists of six distinct clickable areas. The digits to the left and right of the colon are the hour and minute which an alarm is to be set for. Below them, a date can be specified in month, day order. On the right, there are two toggle buttons (which can be either green (on) or red (off) and are mutually exclusive). The top one represents a daily alarm whereas the bottom one indicates/sets a date-specific one. The hour, minute, month, and day of month fields can each be incremented or decremented by left- or right-clicking on them, respectively. Clicking on one of the toggle buttons configures the alarm as the respective type. As the above description implies, there are two distinct kinds of alarms: daily and date-specific ones. Alarms are generally executed only when in I and not moving any notes about. If you're keeping the program busy at the time an alarm would have to occur, it will be delayed until you're finished (i.e., let the program return to idle I). The same holds if an alarm occurs while another one is running. If all prerequisites are given and an alarm becomes due, the corresponding note is displayed in edit view, and the display starts to flash on and off, along with the alarm command being executed (see L<"OPTIONS">). To stop the blinking, click on the note. From then on, the note will be in I. For daily alarms, the entered date is ignored, and as the name suggests, they're run every day at the specified time. To deactivate such an alarm, you have to open the I and click button (a) to make the I disappear, which turns the alarm off. In contrast, date-specific alarms are executed only once, at the specified day and time. Since a year cannot be specified (explicitly), the alarm will be run on this date's next occurrence within a year from when the alarm was set. After that, the alarm will automatically be disabled. If a date-specific alarm becomes due while B isn't running, it will be displayed as soon as the program is started the next time--which does B go for daily alarms. The default mode for alarms is date-specific, and time and date are initialized with the next full hour when the alarm panel is opened the first time for a given note. Internally, alarm times are stored in universal format, i.e., if you change the time zone after having set an alarm, the time will stay universally the same but will differ relative to the new time zone from what absolute time you originally set. This behavior is intended. Finally, it should be mentioned that there are a few limitations with respect to command line actions (such as B>, B>, B>, etc.). See L<"RESTRICTIONS">. =head1 FREQUENTLY ASKED QUESTIONS =over 2 =item * I Is a "pinboard" this small really of any use? I Of course the limited size imposes certain restrictions, but if you think about it, you'll agree that a real life pinboard reminds you of things by the mere existence of notes being pinned to it. In order to read what they say, you have to step close and, possibly, detach the note. Quite similarly, B reminds you of things by facing you with colored representations of notes on your screen. To find out what it was you intended them to remind you of, all you have to do is click on a note, which will then be displayed full size. Furthermore, the alarm feature introduced in a later version allows for even more explicit reminders and thus renders B even more powerful in a way than any real-life cork board. B> By choosing from a variety of possible colors, you can assign particular colors to certain kinds of reminders, which may further enhance B's usability. Moreover, you can place certain notes on certain areas of the board to emphasize their category, urgency, etc. It's up to you what to make of it. Finally, by adding drawing capabilities, I've definitely overcome the contents quantity barrier imposed by the maximum number of 59 characters, for as everyone knows, a picture is worth more than a thousand words. *grin* =item * I I don't live in an English-speaking country, so what about extended characters (umlauts, accents, cyrillic alphabet)? I B allows you to use an arbitrary 8bit X font, provided that its characters are of a fixed size of 6x10 (or, deprecated but possible, anything E= 7x10) pixels. The default font is "6x10" (more precisely, it's called "-misc-fixed-medium-r-normal--10-100-75-75-c-*-ISO8859-1"), an ISO8859-1 (Latin1) font which should be part of every XFree installation. In order to make B use another font, run it as $ wmpinboard --font=FONT where B is either a shortcut for a compiled-in font name (see L<"OPTIONS"> for a list of those) or a valid, complete X font descriptor. This is a configuration directive, meaning that no other instance of B may be running at the time. Note that this I. It's intentionally been made impossible to change the font while there are notes saved in B's data file, since this might result in garbage being displayed. Of course even a font specified via a shortcut has to exist on your system in order to be usable. If a configured custom font cannot be loaded or has invalid dimensions, B will try to revert. Note that this won't affect the font name saved along with the data, though. =item * I How can I disable those vexing, superfluous animations? I $ wmpinboard --light =item * I Why aren't those animations smooth all of the time? Sometimes it looks like they're being skipped entirely. I This presumably is a multitasking issue: depending on the current system load and B's/the X server's recent CPU usage history, it may take a moment until the scheduling has been adapted to the suddenly increased CPU load implied by displaying the animation, and short as it is, it may already be finished until this has happened, i.e., it's the X server lagging behind in updating the program's display if B's been idle for some time prior to that. It may sound paradoxical, but the effect is the more likely to show the lower the system's load is. I don't see a way to avoid this effect--either this, or you turn off animations altogether. =item * I When I leave B idle in edit mode for some time, edit mode is terminated automatically. Is that intended? I Yes. After 60 idle seconds (that's the default; see L<"OPTIONS">) in edit mode (no mouse click and no keyboard input), edit mode is terminated automatically. If the note being edited happens to be blank, it will be discarded (or removed if an existing note is being edited). This timeout can, however, be adjusted according to your preferences or turned off using the B> parameter. See L<"OPTIONS"> for this. =item * I When does B save its data? I Notes data is saved on each of these occasions: =over 2 =item * whenever edit mode is terminated =item * when you switch notes in edit mode (via [Shift]-[S]) =item * when a note has been moved on the board =item * when an interactive instance is running and you run B from the command line, making it dump, add, or delete notes =item * when killed via SIGINT or SIGTERM and edit mode is active =back Notes are saved to a file called F<.wmpinboarddata> in your home directory (see L<"FILES">). =item * I I've tried my best and littered the entire pinboard with quite a lot of notes. Now I can't seem to be able to add another one. I There's a compile-time limit of 20 notes. I think more notes on this tiny a board really don't make any sense. =item * I I've explicitly configured my window manager for click-based rather than mouse-following focus, but B's focus follows the mouse regardless. Can I change this? I By default, B actively claims the keyboard input focus (if it's in note edit mode) whenever the pointer is moved over the application's area. Since B is a dock applet, i.e., a withdrawn rather than a "real" X window, it can't be assigned a focus in the same way as to the latter ones. However, running B with the parameter B> will make it emulate some sort of click-based focusing. This means, it actively claims the keyboard focus only on these occasions: =over 2 =item * when a new note is created (I when you click on an existing note--you'll have to explicitly click on the editing area to make it claim focus; this way, you can just view a note without any change to keyboard focus) =item * when you click somewhere on the text area in edit mode =back Once keyboard-focused, B will keep it until another window is explicitly focused (usually by clicking on its title bar or border). To focus B again when it's lost focus, you'll have to click on its text area in edit mode. This click will only focus the application and not have the usual cursor-positioning effect. This feature is to be considered experimental since I'm not sure of how much use it really is. A mouse-following focus is the recommended mode of operation. =item * I I've noticed that after a while, some sort of darker stains appear on my notes. Is that a bug in some drawing routine? I No, this is not a bug. These "stains" are meant to resemble creases, caused by frequent handling of a particular note (wear & tear, you see?). In fact, they're added with a certain probability whenever you view a note by clicking on it (note that leafing through notes via [Shift]-[S] is I affected), when you clear its textual or drawn contents via the I (very outwearing, that S )>, and when a note is moved. This feature can be disabled at compile time by running F with C<--disable-creases> as a parameter. To prevent the question, no, worn-out notes cannot be ironed to get rid of the creases. Sorry. B> =item * I Is B compatible with B's B? I B tries to autodetect whether B is running and sets itself up accordingly. If this doesn't work for you for some reason, you can explicitly make it run in either Withdrawn- or NormalState using the B> or B> flag, respectively. See L<"OPTIONS">. Swallowing evidently works with B 1.6.10; I don't know about earlier versions. A B config line you might try is this: *Wharf wmpinboard nil MaxSwallow "wmpinboard" wmpinboard & Besides, B has been reported to work with B. =item * I I have X running at a color depth of 8 bits, i.e., in palette mode, and B obviously requires too many colors and thus looks real messy (or doesn't run at all, complaining about "not enough free color cells"). What can I do about this? I As of version 0.99.1, the recommended solution is to upgrade whatever component of your system restricts you to a palette mode. =item * I Can I run multiple instances of B as the same user, simultaneously? I No, this is certainly not a good idea. The run-time behavior may be unpredictable, and your data file can get corrupted. Therefore, any B process that's to be run interactively first checks whether another interactive instance is running, and if so, refuses to run. =item * I I've just upgraded from a pre-0.7 version of B and noticed that its data file format has changed completely since. Is there a way to upgrade and yet keep my existing notes? I There's a B script doing the conversion included with the distribution (the source one, anyway). If your package didn't include that, feel free to mail to the author (see L<"AUTHOR"> at the end of this documentation). =item * I I find a mere 59 characters per note to be a real limitation. How about making B pop up an external window with more room for that? Or how about assigning that job to an external editor? I There's a variety of comprehensive programs for keeping notes out there, offering this functionality but being rather heavy-weight since they are linked against one GUI library or another (B or B come to mind). On the other hand, I couldn't find a B-conforming reminder I could omnipresently stick to my desktop anywhere, so I wrote B. I wanted it to be small, neat, easy to use, and yet useful in a way. I hope that's about what the program is currently like. And I'd prefer to keep it like that rather than inflate it by linking against a GUI library--eventually, the note editing code would outweigh the rest of the application by a factor, and people would probably still create notes mostly shorter than 60 characters. If you restrict your memos to keywords and abbreviations, that's quite a lot. I want B to remain an applet in that it doesn't open up external windows and use (if just temporarily) additional desktop space. I explicitly wrote it to have something omnipresent at a fixed position on my desktop. I find it preferable to have the notes pop up in place rather than somewhere else on the screen. Personally, I use other programs for larger notes too; B has been designed for things smaller in size and greater in urgency, it's in no way meant to be a comprehensive knowledge base application of any kind. Summing up, I think a dock applet should be small both regarding its on-screen representation and the resources it uses. That's why I don't intend to add any pop-up dialogs or similar things to B. =item * I I've tried the program, yet I can't help finding it utterly useless. What shall I do? I The solution is simple. Just don't use it. =item * I Will your answer to this question be "no"? I Nope. =back =head1 HINTS =over 2 =item * A good way of making the best of the organizational features offered by B is to use certain colors and locations on the pinboard to indicate urgency and contents of a note. For example, you might use each of the color groups for a certain kind of reminder, because that enables you to leaf through all notes with related contents via [Shift]-[S] in edit mode. Besides, you might assign each corner of the board a specific urgency, altogether allowing you to derive a note's type from its color and its urgency from its location on the board. Thanks again to the ability to leaf through all notes belonging to the same group of colors, notes with similar contents will still be clustered in a way. =back =head1 UNDOCUMENTED FEATURES This piece of documentation doesn't cover any undocumented features. =head1 FILES =over 2 =item F<~/.wmpinboarddata> the user's B data file =item F<~/.wmpinboarddata.new> temporary file created momentarily when saving data =back =head1 ENVIRONMENT VARIABLES =over 2 =item $HOME the user's home directory =back =head1 RESTRICTIONS =over 2 =item * B relies on a dock app tile size of at least 64x64 pixels. In fact, using smaller tiles renders the applet rather useless, as, e.g., opening the edit mode panel becomes impossible. =item * Unpredictable effects may be the results if a command line action is taken while an alarm is running and others are due simultaneously. If just a single alarm is active and no others are due, that alarm will be cancelled when the two instances of B synchronize. If more instances are due during the process, a race conditions arises that can't be solved satisfactorily due to the program's internal structure and organization. Still, in theory, nothing critical will happen, and the most you'll lose will be an alarm or two. =item * B data files are not designed to be portable across architectures. Due to differences in data type representations that are likely otherwise, a datafile can only be reliably used by program binaries running on machines of the same architecture. =item * Certainly of no interest to anyone, but mentioned for the sake of completeness: B's alarm features will start to fail past 04:14:07 on Jan 19, 2037, which is due to the legacy Un*x time format. =back =head1 BUGS If you stumble on any bugs, feel free to mail the author. The same goes if you encounter any problems running/using the program. Be sure to include any information you consider relevant, i.e., at a minimum, the version of B you're using as well as your OS and X versions. Also, further suggestions are always welcome. Please check the F file that's part of the distribution to see if what you're about to suggest isn't already on my "to do" list, or has been suggested earlier and was rejected for one reason or other. =head1 SEE ALSO wmaker(1) =head1 AUTHOR B is copyrighted (c) 1998-2000 by Marco GEtze, Egomar@mindless.comE. It is distributed under the terms of the GNU General Public License, revision 2 or any later revision thereof. Use at your own risk. New releases of and themes for B can be found at Ehttp://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/E, or that was true at least by the time this document was last updated. =cut wmpinboard-1.0.orig/AUTHORS0100644000175000017500000000057107214234636013650 0ustar hmhhmhwmpinboard and its accompanying documentation and pixmaps have been created by Marco G"otze, . Mail bug reports, comments, suggestions, and the like to this address. The package also contains portions of the GNU C library, which, just as ThoughtTracker, is distributed under the terms of the GNU GPL. For additional information, see the CREDITS file. wmpinboard-1.0.orig/COPYING0100644000175000017500000004311007214234636013627 0ustar hmhhmh GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 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) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 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) year 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. wmpinboard-1.0.orig/CREDITS0100644000175000017500000000060107214234637013613 0ustar hmhhmh wmpinboard credits -------------------- - written by Marco G"otze, - closer looks at other WM dock apps as well as the Xlib documentation were of some help - the images were created using The GIMP - wmpinboard uses XIC-related keyboard handling code taken from RXVT's source - thanks to various people for making suggestions and pointing out bugs wmpinboard-1.0.orig/ChangeLog0100644000175000017500000001763207214234636014360 0ustar hmhhmh04/13/00: v1.0 -- announced - lacking reports indicating the contrary, I now consider the program mostly bug-free and am thus releasing a version 1.0 that can officially be considered stable - fixed another occurrence of the DST issue I had overlooked the other day 03/24/00: v0.99.2 -- announced - modified alarm time handling to remember the set date even for daily alarms - changed initialization of alarm times and dates - fixed an anomaly when run on WM and alarms were due on start-up - minor modification of the default alarm panel pixmap - DST fix 03/18/00: v0.99.1 -- announced - implemented much-requested alarm feature (consequently: had to modify the button bar (2 buttons changed, can't be closed via right-click any more); themeability updates; "--info", "--dump", "--dump-raw" output update) -> read the man page - dropped low-color support - (hopefully) fixed a range of potential race conditions - man page, theme kit updates (the latter is now included with the source package) 03/13/00: v0.99 -- announced - switched from xmkmf to configure - now uses existing getopt functions rather than the included source if possible - modified the drag-note-off-the-label behavior to switch to manual note placement as soon as the cursor is moved (as opposed to when it is moved off the label's area) - slightly modified cursor positioning after word-wrapping pastes - "--theme" now warns if specified theme file isn't accessible - added option "--info", printing user configuration information and some useless statistics; reduced "--version" output to mere version information - internal optimizations - man page updates 10/23/99: v0.10 -- announced - made the applet themeable, i.e., board/panel pixmaps and "TO DO" label location can be changed without recompilation (see the man page for details); only, there are no themes yet :^) - made "--font" a configuration directive (as opposed to a run-time option); dropped the "-f" shortcut - extended "--version" output by user configuration information - changed behavior of "--add" to word-wrap after hyphens, too; added position code support for strings passed to "--add" ("%1".."%9", see man page) - changed pasting behavior: pasting using the mouse now attempts to word- wrap pasted (and subsequent, in insert mode) text; [Ctrl]-[I] will do a "raw" paste as before; X pasting code fix - changed color allocation behavior to allow for the program to be run in palette mode without having to be compiled with reduced-color pixmaps in some cases (no guarantees as to proper functioning in those circumstances) - now handles SIG{INT,TERM} properly, saving data if necessary and exiting cleanly 09/01/99: v0.9.2 - implemented EMACS-style C-[npfb] cursor movement - added option to compile with even less colors - back to getopt, this time distributing its source along with the program's - fixed all non-ANSI-conforming segments of code I could find, hopefully enhancing portability 08/15/99: v0.9.1 -- announced - implemented IPC among multiple instances, preventing multiple interactive instances from running simultaneously, and allowing for deletion and addition of notes via the command line - ^C/R now result in a visual selection, too - made intermediate `=' optional for parameterized long command line options - slight changes to assignment of some colors to groups - bug fixes (double click selection at first column; cursor display vs. selection) 07/31/99: v0.9 -- announced - dropped the extensive README file in favor of a full-blown man page - added X clipboard support (via mouse, keyboard; see the man page) - left mouse button can now be used to drag notes without raising them - added possibility to place new notes before editing them by dragging them "off" the "TO DO" label - added command line options "--dump" and "--dump-raw" to list all notes' contents - added simulated wear & tear of notes (can be disabled at compile time) - "--version" now outputs information about compile-time options - made it possible to compile wmpinboard in a fashion optimized for low color depths (looks rather ugly, but at least it will _work_) - slight changes to the palette of available note colors - changed behavior of [Backspace] when pressed on the very last character (now just clears that if it isn't blank); an entire (intermediate) line can now be removed via ^Y or ^Z - fixed a problem related to AfterStep swallowing 06/06/99: v0.8.5 - different animation upon note destruction - reverted from getopt() to manual command line parsing due to compatibility issues on non-GNU systems 05/18/99: v0.8.4 -- announced - in edit mode, note color can now be changed via ([Shift]-)[Tab] - switched from manual command line parsing to getopt functions (causing some changes to the set of parameters, but retaining backward compatibility) 04/19/99: v0.8.3 -- announced - only minor (internal) modifications 03/06/99: v0.8.2 - added some eye candy (i.e., superfluous animations, can be disabled) - minor internal changes 02/23/99: v0.8.1 -- announced - added options to explicitly set/suppress WithdrawnState for better AfterStep Wharf compatibility; now tries to autodetect Window Maker - internal optimizations: tidied up the code and reduced memory usage - fixed a few small buglets 02/20/99: v0.8 -- announced - made some principal changes to the user interface in edit mode (right- clicking on the triangle now pops up a panel from which further actions can be chosen) - added drawing capabilities: you can now add simple sketches to notes (using the same color as the text) - uses alternate mouse cursors where appropriate - now remembers for each note where you left the cursor after editing it the previous time; the text cursor can now be placed using the mouse - [Shift]-[Up/Down] now cycles through notes of *roughly* the same color - some minor changes ([Esc], allow for fonts <= 7x10, adjustable timeout, modified some command line parameters' formats, minor modification of behavior in "-c" mode) - rewrote about half of the README file to fit the altered user interface and generally make it more instructive 01/10/99: v0.7 -- announced - major redesign concerning character input and output, i.e.: - switched from character images to real X fonts (any 8bit 6x10 font should work) - support for input and displaying of local characters (including appropriate handling of dead keys) - switched to a binary data file format - added experimental optional "click to focus" emulation mode - made note timeout optional (command line parameter) 01/06/99: v0.6 -- unreleased - major changes to the program's overall appearance - notes now are 10*6 (-1) in size, and there may be up to 20 of them - notes can no longer be removed by dragging them off the board - right-clicking the triangle in edit mode now clears the note on first click - changes to the keyboard handling (low-level; plus, added insert mode, deleting of entire lines, and the ability to cycle through notes in edit mode) 01/03/99: v0.5.5 -- announced - just some minor changes to the documentation 01/01/99: v0.5.4 - modified keyboard handling ([End]) and edit mode note coloring - changed the set of colors available for notes - in edit mode, both the left and right mouse buttons can now be used to switch colors (in opposite directions) 12/31/98: v0.5.3 - fixed keyboard handling to avoid blocking of WM accelerators - slight modification of the X window initialization procedure to improve docking behavior in some circumstances 12/30/98: v0.5.2 - fixed a bug introduced in v0.5.1 (note display timeout) 12/29/98: v0.5.1 -- announced - fixed a bug raising a note's icon to the top when left-clicking on it - minor code optimizations 12/26/98: v0.5 -- initial release (unannounced) wmpinboard-1.0.orig/INSTALL0100644000175000017500000001722707214234636013637 0ustar hmhhmhBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. wmpinboard-1.0.orig/Makefile.am0100644000175000017500000000203307214234636014627 0ustar hmhhmh## Process this file with automake to produce Makefile.in SUBDIRS = src man EXTRA_DIST = CREDITS TODO wmpb-convert.pl wmpinboard.lsm wmpinboard.spec.in man/Makefile.* man/wmpinboard.* xpm/* themes-kit/* bin-dist: all @test -x ../make_bin_package || ( echo "Not in development environment."; false ) strip src/$(PACKAGE) ../make_bin_package $(PACKAGE) $(VERSION) i386-linux-glibc wmpb-convert.pl rpm-dist: dist cp $(PACKAGE)-$(VERSION).tar.gz ../SOURCES rpm -ba $(PACKAGE).spec on-site: dist bin-dist rpm-dist cp ChangeLog $(HOME)/public_html/stuff/$(PACKAGE) cp $(PACKAGE).lsm $(HOME)/public_html/stuff/$(PACKAGE) pod2html man/$(PACKAGE).pod >$(HOME)/public_html/stuff/$(PACKAGE)/$(PACKAGE).1.html rm -f *~~ mv ../*RPMS/$(PACKAGE)*rpm ../ON-SITE mv $(PACKAGE)-$(VERSION).tar.gz ../ON-SITE cd ../ON-SITE && \ mkdir $(PACKAGE)-tmp && \ cd $(PACKAGE)-tmp && \ cp ../$(PACKAGE)*gz . && \ gz2bz2 $(PACKAGE)*gz && \ mv $(PACKAGE)*.bz2 .. && \ cd .. && \ rmdir $(PACKAGE)-tmp && \ mv $(PACKAGE)* $(HOME)/public_html/stuff/$(PACKAGE) wmpinboard-1.0.orig/Makefile.in0100644000175000017500000002724107214234636014650 0ustar hmhhmh# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : CC = @CC@ CONDITIONAL_SOURCES = @CONDITIONAL_SOURCES@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SUBDIRS = src man EXTRA_DIST = CREDITS TODO wmpb-convert.pl wmpinboard.lsm wmpinboard.spec.in man/Makefile.* man/wmpinboard.* xpm/* themes-kit/* ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = wmpinboard.spec DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ Makefile.am Makefile.in NEWS TODO acconfig.h aclocal.m4 config.h.in \ configure configure.in install-sh missing mkinstalldirs \ wmpinboard.spec.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) config.h: stamp-h @if test ! -f $@; then \ rm -f stamp-h; \ $(MAKE) stamp-h; \ else :; fi stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h 2> /dev/null $(srcdir)/config.h.in: $(srcdir)/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: wmpinboard.spec: $(top_builddir)/config.status wmpinboard.spec.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. @SET_MAKE@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ test "$$subdir" = "." && dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist -rm -rf $(distdir) GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \ cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) dist -rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) $(mkinstalldirs) $(distdir)/man $(distdir)/themes-kit $(distdir)/xpm @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done for subdir in $(SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ || exit 1; \ fi; \ done info-am: info: info-recursive dvi-am: dvi: dvi-recursive check-am: all-am check: check-recursive installcheck-am: installcheck: installcheck-recursive all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive install-exec-am: install-exec: install-exec-recursive install-data-am: install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive uninstall-am: uninstall: uninstall-recursive all-am: Makefile config.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-tags distclean-generic clean-am distclean: distclean-recursive -rm -f config.status maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-recursive -rm -f config.status .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ install-data-recursive uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ install-exec-am install-exec install-data-am install-data install-am \ install uninstall-am uninstall all-redirect all-am all installdirs-am \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean bin-dist: all @test -x ../make_bin_package || ( echo "Not in development environment."; false ) strip src/$(PACKAGE) ../make_bin_package $(PACKAGE) $(VERSION) i386-linux-glibc wmpb-convert.pl rpm-dist: dist cp $(PACKAGE)-$(VERSION).tar.gz ../SOURCES rpm -ba $(PACKAGE).spec on-site: dist bin-dist rpm-dist cp ChangeLog $(HOME)/public_html/stuff/$(PACKAGE) cp $(PACKAGE).lsm $(HOME)/public_html/stuff/$(PACKAGE) pod2html man/$(PACKAGE).pod >$(HOME)/public_html/stuff/$(PACKAGE)/$(PACKAGE).1.html rm -f *~~ mv ../*RPMS/$(PACKAGE)*rpm ../ON-SITE mv $(PACKAGE)-$(VERSION).tar.gz ../ON-SITE cd ../ON-SITE && \ mkdir $(PACKAGE)-tmp && \ cd $(PACKAGE)-tmp && \ cp ../$(PACKAGE)*gz . && \ gz2bz2 $(PACKAGE)*gz && \ mv $(PACKAGE)*.bz2 .. && \ cd .. && \ rmdir $(PACKAGE)-tmp && \ mv $(PACKAGE)* $(HOME)/public_html/stuff/$(PACKAGE) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wmpinboard-1.0.orig/NEWS0100644000175000017500000000002307214234636013267 0ustar hmhhmhSee the ChangeLog. wmpinboard-1.0.orig/README0100644000175000017500000000314707214234636013462 0ustar hmhhmh wmpinboard ============ License --------- wmpinboard is distributed under the terms of the GNU General Public license, revision 2, or--at your choice--any later revision. A copy of said document is included with this source package. Requirements -------------- - an ANSI-compliant C compiler (preferably, GCC or one of its descendants) - X11R6 including header files (installed separately as "xdevel" or similar by some distributions) - the XPM library - wmpinboard is recommended to be run on a high-color (15bit or above) display wmpinboard has reportedly been successfully compiled on the following platforms: - Linux 2.0.x through 2.2.x, various setups - FreeBSD 3.1 - Solaris 2.6 Reports about other platforms are always welcome. Installation -------------- If you're too lazy to read the generic instructions in the INSTALL file, or already know how to install autoconf'ed programs in principle, here are the quick instructions that should suffice in 99% of all cases: $ ./configure $ make $ make install-strip The default prefix is "/usr/local". If you want the binary and man page to go anywhere else, use configure's "--prefix" switch (see `configure --help`). For further compile-time options, see configure's "--help" output. Upgrading from earlier versions --------------------------------- If you're upgrading to wmpinboard 0.7+ from an earlier version, existing notes will get lost due to some major changes concerning its data file format. You can avoid this by running the included PERL script as the user in question beforehand: $ perl /path/to/wmpinboard-x.x/wmpb-convert.pl wmpinboard-1.0.orig/TODO0100644000175000017500000000122607214234636013266 0ustar hmhhmh wmpinboard ============ Things TO DO -------------- - wait some more time, finally declare it stable and name it v1.0 Things perhaps TO DO ---------------------- Things I'm NOT going TO DO ---------------------------- - Make wmpinboard pop up any external windows. Why? See the man page, section "FREQUENTLY ASKED QUESTIONS". - Render rough sketches of the notes' contents in pinboard view. Judging by my personal experience, the notes' texts tend to cover them uniformly due to the limitation in size, so doing this would invariably result in just a mess of dark blobs. Further suggestions? Mail to . wmpinboard-1.0.orig/acconfig.h0100644000175000017500000000044307214234636014520 0ustar hmhhmh/* define if the XPM library is available */ #undef HAVE_LIBXPM /* define if there is an 8-bit-clean memcmp() */ #undef HAVE_MEMCMP /* define the edit mode timeout in seconds (0 disables) */ #undef TIMEOUT /* define if wear & tear of notes (creases) is to be simulated */ #undef CREASES wmpinboard-1.0.orig/aclocal.m40100644000175000017500000001045407214234636014441 0ustar hmhhmhdnl aclocal.m4 generated automatically by aclocal 1.4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN(AM_INIT_AUTOMAKE, [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "[$]*" != "X $srcdir/configure conftestfile" \ && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN(AM_MISSING_PROG, [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) wmpinboard-1.0.orig/config.h.in0100644000175000017500000000233307214234637014622 0ustar hmhhmh/* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define to empty if the keyword does not work. */ #undef const /* Define as __inline if that's what the C compiler calls it. */ #undef inline /* Define if you need to in order for stat and other things to work. */ #undef _POSIX_SOURCE /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* define if the XPM library is available */ #undef HAVE_LIBXPM /* define if there is an 8-bit-clean memcmp() */ #undef HAVE_MEMCMP /* define the edit mode timeout in seconds (0 disables) */ #undef TIMEOUT /* define if wear & tear of notes (creases) is to be simulated */ #undef CREASES /* Define if you have the header file. */ #undef HAVE_GETOPT_H /* Define if you have the header file. */ #undef HAVE_MALLOC_H /* Define if you have the header file. */ #undef HAVE_SIGNAL_H /* Define if you have the header file. */ #undef HAVE_STRING_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the ife library (-life). */ #undef HAVE_LIBIFE /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION wmpinboard-1.0.orig/configure0100755000175000017500000026755407214234637014530 0ustar hmhhmh#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help --enable-timeout[=TIME] set edit mode timeout to TIME seconds (default = 60)" ac_help="$ac_help --enable-creases enable wear and tear (creases) (default = yes)" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=configure.in # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:562: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo "configure:615: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "$*" != "X $srcdir/configure conftestfile" \ && test "$*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { echo "configure: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" 1>&2; exit 1; } fi test "$2" = conftestfile ) then # Ok. : else { echo "configure: error: newly created file is older than distributed files! Check your system clock" 1>&2; exit 1; } fi rm -f conftest* echo "$ac_t""yes" 1>&6 if test "$program_transform_name" = s,x,x,; then program_transform_name= else # Double any \ or $. echo might interpret backslashes. cat <<\EOF_SED > conftestsed s,\\,\\\\,g; s,\$,$$,g EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi test "$program_prefix" != NONE && program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:672: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi PACKAGE=wmpinboard VERSION=1.0 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } fi cat >> confdefs.h <> confdefs.h <&6 echo "configure:718: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (aclocal --version) < /dev/null > /dev/null 2>&1; then ACLOCAL=aclocal echo "$ac_t""found" 1>&6 else ACLOCAL="$missing_dir/missing aclocal" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 echo "configure:731: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoconf --version) < /dev/null > /dev/null 2>&1; then AUTOCONF=autoconf echo "$ac_t""found" 1>&6 else AUTOCONF="$missing_dir/missing autoconf" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 echo "configure:744: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (automake --version) < /dev/null > /dev/null 2>&1; then AUTOMAKE=automake echo "$ac_t""found" 1>&6 else AUTOMAKE="$missing_dir/missing automake" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 echo "configure:757: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoheader --version) < /dev/null > /dev/null 2>&1; then AUTOHEADER=autoheader echo "$ac_t""found" 1>&6 else AUTOHEADER="$missing_dir/missing autoheader" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 echo "configure:770: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then MAKEINFO=makeinfo echo "$ac_t""found" 1>&6 else MAKEINFO="$missing_dir/missing makeinfo" echo "$ac_t""missing" 1>&6 fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:790: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:820: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:871: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 914 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:945: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:950: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:978: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi CFLAGS=`echo "x $CFLAGS"|sed 's/^x //; s/\(^\| \)-g\($\| \)/ /g'` echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 echo "configure:1011: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then echo "$ac_t""yes" 1>&6 ISC=yes # If later tests want to check for ISC. cat >> confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF if test "$GCC" = yes; then CC="$CC -posix" else CC="$CC -Xp" fi else echo "$ac_t""no" 1>&6 ISC= fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross CFLAGS="$CFLAGS -D_BSD_SOURCE -D_POSIX_SOURCE=199506L" if test x$GCC = xyes; then CFLAGS="$CFLAGS -Wall -ansi -pedantic" fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1046: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 echo "configure:1130: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" : fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=NO ac_x_libraries=NO rm -fr conftestdir if mkdir conftestdir; then cd conftestdir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat > Imakefile <<'EOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case "$ac_im_incroot" in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; esac case "$ac_im_usrlibdir" in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; esac fi cd .. rm -fr conftestdir fi if test "$ac_x_includes" = NO; then # Guess where to find include files, by looking for this one X11 .h file. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* # We can compile using X headers with no special include directory. ac_x_includes= else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* # Look for the header file in a standard set of common directories. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in \ /usr/X11/include \ /usr/X11R6/include \ /usr/X11R5/include \ /usr/X11R4/include \ \ /usr/include/X11 \ /usr/include/X11R6 \ /usr/include/X11R5 \ /usr/include/X11R4 \ \ /usr/local/X11/include \ /usr/local/X11R6/include \ /usr/local/X11R5/include \ /usr/local/X11R4/include \ \ /usr/local/include/X11 \ /usr/local/include/X11R6 \ /usr/local/include/X11R5 \ /usr/local/include/X11R4 \ \ /usr/X386/include \ /usr/x386/include \ /usr/XFree86/include/X11 \ \ /usr/include \ /usr/local/include \ /usr/unsupported/include \ /usr/athena/include \ /usr/local/x11r5/include \ /usr/lpp/Xamples/include \ \ /usr/openwin/include \ /usr/openwin/share/include \ ; \ do if test -r "$ac_dir/$x_direct_test_include"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest* fi # $ac_x_includes = NO if test "$ac_x_libraries" = NO; then # Check for the libraries. test -z "$x_direct_test_library" && x_direct_test_library=Xt test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. ac_x_libraries= else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* LIBS="$ac_save_LIBS" # First see if replacing the include by lib works. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ /usr/X11/lib \ /usr/X11R6/lib \ /usr/X11R5/lib \ /usr/X11R4/lib \ \ /usr/lib/X11 \ /usr/lib/X11R6 \ /usr/lib/X11R5 \ /usr/lib/X11R4 \ \ /usr/local/X11/lib \ /usr/local/X11R6/lib \ /usr/local/X11R5/lib \ /usr/local/X11R4/lib \ \ /usr/local/lib/X11 \ /usr/local/lib/X11R6 \ /usr/local/lib/X11R5 \ /usr/local/lib/X11R4 \ \ /usr/X386/lib \ /usr/x386/lib \ /usr/XFree86/lib/X11 \ \ /usr/lib \ /usr/local/lib \ /usr/unsupported/lib \ /usr/athena/lib \ /usr/local/x11r5/lib \ /usr/lpp/Xamples/lib \ /lib/usr/lib/X11 \ \ /usr/openwin/lib \ /usr/openwin/share/lib \ ; \ do for ac_extension in a so sl; do if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest* fi # $ac_x_libraries = NO if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$ac_t""$have_x" 1>&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >> confdefs.h <<\EOF #define X_DISPLAY_MISSING 1 EOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 echo "configure:1379: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_nospace=no fi rm -f conftest* if test $ac_R_nospace = yes; then echo "$ac_t""no" 1>&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_space=no fi rm -f conftest* if test $ac_R_space = yes; then echo "$ac_t""yes" 1>&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$ac_t""neither works" 1>&6 fi fi LIBS="$ac_xsave_LIBS" esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 echo "configure:1444: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" else echo "$ac_t""no" 1>&6 fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 echo "configure:1485: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" else echo "$ac_t""no" 1>&6 fi fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 echo "configure:1533: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else gethostbyname(); #endif ; return 0; } EOF if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_gethostbyname=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo "configure:1582: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" else echo "$ac_t""no" 1>&6 fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says simon@lia.di.epfl.ch: it contains # gethostby* variants that don't use the nameserver (or something). # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 echo "configure:1631: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else connect(); #endif ; return 0; } EOF if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_connect=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo "configure:1680: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" else echo "$ac_t""no" 1>&6 fi fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 echo "configure:1723: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_remove) || defined (__stub___remove) choke me #else remove(); #endif ; return 0; } EOF if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_remove=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 echo "configure:1772: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" else echo "$ac_t""no" 1>&6 fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 echo "configure:1815: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shmat) || defined (__stub___shmat) choke me #else shmat(); #endif ; return 0; } EOF if { (eval echo configure:1843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_shmat=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 echo "configure:1864: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" else echo "$ac_t""no" 1>&6 fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS="$LDFLAGS" test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 echo "configure:1916: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" else echo "$ac_t""no" 1>&6 fi LDFLAGS="$ac_save_LDFLAGS" fi echo $ac_n "checking for main in -lXpm""... $ac_c" 1>&6 echo "configure:1960: checking for main in -lXpm" >&5 ac_lib_var=`echo Xpm'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXpm $X_LIBS -lX11 -lXext $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_LIBXPM 1 EOF else echo "$ac_t""no" 1>&6 { echo "configure: error: The XPM library is required but wasn't found." 1>&2; exit 1; } fi echo $ac_n "checking for sense in -life""... $ac_c" 1>&6 echo "configure:2001: checking for sense in -life" >&5 ac_lib_var=`echo ife'_'sense | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-life $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo ife | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:2049: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } ; return 0; } EOF if { (eval echo configure:2103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF #define const EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 echo "configure:2124: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* done fi echo "$ac_t""$ac_cv_c_inline" 1>&6 case "$ac_cv_c_inline" in inline | yes) ;; no) cat >> confdefs.h <<\EOF #define inline EOF ;; *) cat >> confdefs.h <&6 echo "configure:2167: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for getopt""... $ac_c" 1>&6 echo "configure:2204: checking for getopt" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getopt) || defined (__stub___getopt) choke me #else getopt(); #endif ; return 0; } EOF if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getopt=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_getopt=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'getopt`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 need_getopt=yes fi echo $ac_n "checking for getopt_long""... $ac_c" 1>&6 echo "configure:2253: checking for getopt_long" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getopt_long) || defined (__stub___getopt_long) choke me #else getopt_long(); #endif ; return 0; } EOF if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getopt_long=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_getopt_long=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 need_getopt_long=yes fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 echo "configure:2302: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_memcmp_clean=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" if test x"$ac_cv_func_memcmp_clean" = xyes; then cat >> confdefs.h <<\EOF #define HAVE_MEMCMP 1 EOF else need_memcmp=yes fi echo $ac_n "checking for strchr""... $ac_c" 1>&6 echo "configure:2346: checking for strchr" >&5 if eval "test \"`echo '$''{'ac_cv_func_strchr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strchr(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_strchr) || defined (__stub___strchr) choke me #else strchr(); #endif ; return 0; } EOF if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strchr=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_strchr=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'strchr`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 { echo "configure: error: Your C library seems to be lacking the strchr() function." 1>&2; exit 1; } fi echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6 echo "configure:2395: checking for strcasecmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strcasecmp(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp) choke me #else strcasecmp(); #endif ; return 0; } EOF if { (eval echo configure:2423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strcasecmp=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_strcasecmp=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 { echo "configure: error: Your C library seems to be lacking the strcasecmp() function." 1>&2; exit 1; } fi echo $ac_n "checking for ualarm""... $ac_c" 1>&6 echo "configure:2444: checking for ualarm" >&5 if eval "test \"`echo '$''{'ac_cv_func_ualarm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ualarm(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_ualarm) || defined (__stub___ualarm) choke me #else ualarm(); #endif ; return 0; } EOF if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_ualarm=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_ualarm=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'ualarm`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 { echo "configure: error: Your C library seems to be lacking the ualarm() function." 1>&2; exit 1; } fi echo $ac_n "checking for usleep""... $ac_c" 1>&6 echo "configure:2493: checking for usleep" >&5 if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char usleep(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_usleep) || defined (__stub___usleep) choke me #else usleep(); #endif ; return 0; } EOF if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_usleep=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_usleep=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'usleep`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 { echo "configure: error: Your C library seems to be lacking the usleep() function." 1>&2; exit 1; } fi echo $ac_n "checking for kill""... $ac_c" 1>&6 echo "configure:2542: checking for kill" >&5 if eval "test \"`echo '$''{'ac_cv_func_kill'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char kill(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_kill) || defined (__stub___kill) choke me #else kill(); #endif ; return 0; } EOF if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_kill=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_kill=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'kill`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 { echo "configure: error: Your C library seems to be lacking the kill() function." 1>&2; exit 1; } fi # Check whether --enable-timeout or --disable-timeout was given. if test "${enable_timeout+set}" = set; then enableval="$enable_timeout" case "${enableval}" in yes) timeout=60 ;; no) timeout=0 ;; *) timeout=`echo "${enableval}"|sed 's/^0-9//g'` if test x"$timeout" = x; then { echo "configure: error: Bad value ${enableval} for --enable-timeout." 1>&2; exit 1; } fi if test $timeout -gt 0 -a $timeout -lt 5; then timeout=5 echo "configure: warning: Timeout value to low: increasing to 5 seconds." 1>&2 fi ;; esac else timeout=60 fi cat >> confdefs.h <&2; exit 1; } ;; esac else creases=yes fi if test x"$creases" = xyes; then cat >> confdefs.h <<\EOF #define CREASES 1 EOF fi if test x"$need_memcmp" = xyes; then CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES memcmp.c" fi if test x"$need_getopt" = xyes; then CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES getopt.c" fi if test x"$need_getopt_long" = xyes; then CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES getopt1.c" fi trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo " Makefile src/Makefile man/Makefile wmpinboard.spec config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@ACLOCAL@%$ACLOCAL%g s%@AUTOCONF@%$AUTOCONF%g s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@LIBOBJS@%$LIBOBJS%g s%@CONDITIONAL_SOURCES@%$CONDITIONAL_SOURCES%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 wmpinboard-1.0.orig/configure.in0100644000175000017500000000553407214234637015116 0ustar hmhhmhdnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(wmpinboard, 1.0) AM_CONFIG_HEADER(config.h) AC_PROG_CC dnl don't want the -g flag CFLAGS=`echo "x $CFLAGS"|sed 's/^x //; s/\(^\| \)-g\($\| \)/ /g'` AC_ISC_POSIX AC_LANG_C dnl use POSIX and BSD stuff where available CFLAGS="$CFLAGS -D_BSD_SOURCE -D_POSIX_SOURCE=199506L" dnl additional compile flags when using gcc if test x$GCC = xyes; then CFLAGS="$CFLAGS -Wall -ansi -pedantic" fi dnl X11 stuff AC_PATH_XTRA AC_CHECK_LIB(Xpm, main, AC_DEFINE(HAVE_LIBXPM), AC_MSG_ERROR(The XPM library is required but wasn't found.), $X_LIBS -lX11 -lXext) AC_CHECK_LIB(ife, sense) AC_C_CONST AC_C_INLINE dnl check for C headers and functions dnl more or less optional ones first AC_CHECK_HEADERS([getopt.h malloc.h signal.h string.h unistd.h]) AC_CHECK_FUNC(getopt, , need_getopt=yes) AC_CHECK_FUNC(getopt_long, , need_getopt_long=yes) AC_FUNC_MEMCMP if test x"$ac_cv_func_memcmp_clean" = xyes; then AC_DEFINE(HAVE_MEMCMP) else need_memcmp=yes fi dnl required ones AC_CHECK_FUNC(strchr, , AC_MSG_ERROR(Your C library seems to be lacking the strchr() function.)) AC_CHECK_FUNC(strcasecmp, , AC_MSG_ERROR(Your C library seems to be lacking the strcasecmp() function.)) AC_CHECK_FUNC(ualarm, , AC_MSG_ERROR(Your C library seems to be lacking the ualarm() function.)) AC_CHECK_FUNC(usleep, , AC_MSG_ERROR(Your C library seems to be lacking the usleep() function.)) AC_CHECK_FUNC(kill, , AC_MSG_ERROR(Your C library seems to be lacking the kill() function.)) dnl === compile-time options === dnl TIMEOUT AC_ARG_ENABLE(timeout, [ --enable-timeout[=TIME] set edit mode timeout to TIME seconds (default = 60)], [case "${enableval}" in yes) timeout=60 ;; no) timeout=0 ;; *) timeout=`echo "${enableval}"|sed 's/[^0-9]//g'` if test x"$timeout" = x; then AC_MSG_ERROR(Bad value ${enableval} for --enable-timeout.) fi if test $timeout -gt 0 -a $timeout -lt 5; then timeout=5 AC_MSG_WARN(Timeout value to low: increasing to 5 seconds.) fi ;; esac], [timeout=60]) AC_DEFINE_UNQUOTED(TIMEOUT, ${timeout}) dnl CREASES AC_ARG_ENABLE(creases, [ --enable-creases enable wear and tear (creases) (default = yes)], [case "${enableval}" in yes) creases=yes ;; no) creases=no ;; *) AC_MSG_ERROR(Bad value ${enableval} for --enable-creases.) ;; esac], [creases=yes]) if test x"$creases" = xyes; then AC_DEFINE(CREASES) fi dnl determine what conditional stuff has to be compiled if test x"$need_memcmp" = xyes; then CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES memcmp.c" fi if test x"$need_getopt" = xyes; then CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES getopt.c" fi if test x"$need_getopt_long" = xyes; then CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES getopt1.c" fi AC_SUBST(CONDITIONAL_SOURCES) AC_OUTPUT([ Makefile src/Makefile man/Makefile wmpinboard.spec ]) wmpinboard-1.0.orig/install-sh0100755000175000017500000001273607214234637014613 0ustar hmhhmh#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 wmpinboard-1.0.orig/missing0100755000175000017500000001421307214234637014176 0ustar hmhhmh#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Franc,ois Pinard , 1996. # 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, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 wmpinboard-1.0.orig/mkinstalldirs0100755000175000017500000000132207214234637015402 0ustar hmhhmh#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here wmpinboard-1.0.orig/stamp-h.in0100644000175000017500000000001207214234636014467 0ustar hmhhmhtimestamp wmpinboard-1.0.orig/wmpb-convert.pl0100644000175000017500000000175307214234637015564 0ustar hmhhmh#!/usr/bin/perl -w # # wmpinboard pre-0.7 to v0.7 data file converter # require 5.003; my($ifn, $ofn, $c) = ('.wmpinboardrc', '.wmpinboarddata', 0); die "This script should not be executed while an instance of wmpinboard is " . "running.\n" if `ps x` =~ /\d wmpinboard/; if (open IN, "$ENV{HOME}/$ifn" and open OUT, ">$ENV{HOME}/$ofn") { binmode OUT; print OUT "WMPB0-*-fixed-*--10-*-iso8859-1\n"; while () { chomp; if (@_ = /^(\d+) (\d+) (\d+) (.*)/) { if (length $4 <= 39) { $_[3] =~ s/.{8}/$&\n/gs; $_[3] = join ' ', split /\n/, $_[3]; } $_[3] .= ' ' x (59 - length $_[3]); print OUT pack 'i3a60', @_; $c++ } else { die "Invalid data in `~/.$ifn'.\nAborting" if $_ } } close IN; close OUT; print "Conversion of $c note@{[$c != 1 ? 's' : '']} complete.\n"; unlink "$ENV{HOME}/$ifn" } else { die "Couldn't open both `~/$ifn' and `~/$ofn'.\n" . "Sure you've run this script as the right user?\n" } wmpinboard-1.0.orig/wmpinboard.lsm0100644000175000017500000000054107214234637015455 0ustar hmhhmhBegin3 Title: wmpinboard Version: 1.0 Entered-date: 13APR00 Description: Window Maker dock applet resembling a miniature pinboard Keywords: WindowMaker WM X11 pinboard notes memo alarm Author: gomar@mindless.com (Marco Goetze) Primary-site: http://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/ Copying-policy: GPL End wmpinboard-1.0.orig/wmpinboard.spec.in0100644000175000017500000000256007214234637016224 0ustar hmhhmh%define name @PACKAGE@ %define version @VERSION@ %define release 1 %define prefix /usr/local Summary: Window Maker dock applet resembling a miniature pinboard Name: %{name} Version: %{version} Release: %{release} Copyright: GPL Packager: Marco Goetze Url: http://www.tu-ilmenau.de/~gomar/stuff/%{name}/#download Group: X11/Utilities Source: %{name}-%{version}.tar.gz Buildroot: /home/gomar/Projects/BUILD/%{name}-%{version}-%{release}-root Requires: xpm %description wmpinboard is a Window Maker dock applet resembling a miniature pinboard, intended to somewhat relieve heavily littered desktops by allowing you to place reminders on a graphical on-screen pinboard rather than producing a mess of real notes all around your keyboard. Features include support for arbitrary 6x10 X fonts, XLocale support, drawing capabilities, alarms, animations, themeability, and command line interoperability. %prep %setup %build CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} if echo "$RPM_OPT_FLAGS" | grep -- -DBUILD_STATIC >/dev/null 2>&1; then make static else make fi %install make prefix=$RPM_BUILD_ROOT%{prefix} install-strip %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root) %doc AUTHORS COPYING CREDITS ChangeLog NEWS README TODO %{name}.lsm %attr(755,root,root) %{prefix}/bin/%{name} %attr(755,root,root) %{prefix}/man/man1/%{name}.1 wmpinboard-1.0.orig/src/0040755000175000017500000000000007214245166013367 5ustar hmhhmhwmpinboard-1.0.orig/src/Makefile.am0100644000175000017500000000054207214234637015422 0ustar hmhhmh## Process this file with automake to produce Makefile.in INCLUDES = $(X_CFLAGS) LIBS = $(X_LIBS) -lX11 -lXext -lXpm bin_PROGRAMS = wmpinboard wmpinboard_SOURCES = @CONDITIONAL_SOURCES@ \ misc.c misc.h \ notes.c notes.h \ wmpinboard.c wmpinboard.h \ xmisc.c xmisc.h EXTRA_wmpinboard_SOURCES = \ getopt.c getopt1.c getopt.h \ memcmp.c memcmp.h wmpinboard-1.0.orig/src/Makefile.in0100644000175000017500000001742507214234637015443 0ustar hmhhmh# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : CC = @CC@ CONDITIONAL_SOURCES = @CONDITIONAL_SOURCES@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ INCLUDES = $(X_CFLAGS) LIBS = $(X_LIBS) -lX11 -lXext -lXpm bin_PROGRAMS = wmpinboard wmpinboard_SOURCES = @CONDITIONAL_SOURCES@ misc.c misc.h notes.c notes.h wmpinboard.c wmpinboard.h xmisc.c xmisc.h EXTRA_wmpinboard_SOURCES = getopt.c getopt1.c getopt.h memcmp.c memcmp.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ wmpinboard_OBJECTS = misc.o notes.o wmpinboard.o xmisc.o wmpinboard_LDADD = $(LDADD) wmpinboard_DEPENDENCIES = wmpinboard_LDFLAGS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best SOURCES = $(wmpinboard_SOURCES) $(EXTRA_wmpinboard_SOURCES) OBJECTS = $(wmpinboard_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: wmpinboard: $(wmpinboard_OBJECTS) $(wmpinboard_DEPENDENCIES) @rm -f wmpinboard $(LINK) $(wmpinboard_LDFLAGS) $(wmpinboard_OBJECTS) $(wmpinboard_LDADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = src distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done misc.o: misc.c wmpinboard.h ../config.h notes.o: notes.c wmpinboard.h ../config.h misc.h xmisc.h notes.h wmpinboard.o: wmpinboard.c getopt.h wmpinboard.h ../config.h misc.h \ notes.h xmisc.h ../xpm/pinboard.xpm ../xpm/bbar.xpm \ ../xpm/abar.xpm ../xpm/digits.xpm xmisc.o: xmisc.c wmpinboard.h ../config.h misc.h notes.h xmisc.h info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-binPROGRAMS install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-binPROGRAMS clean-compile clean-tags clean-generic \ mostlyclean-am clean: clean-am distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ distclean-generic clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ check-am installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wmpinboard-1.0.orig/src/getopt.c0100644000175000017500000006746707214234637015057 0ustar hmhhmh/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in /gd/gnu/lib. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO #define _NO_PROTO #endif #ifdef HAVE_CONFIG_H #include #endif #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ #include #include #endif /* GNU C library. */ #ifdef VMS #include #if HAVE_STRING_H - 0 #include #endif #endif #if defined (WIN32) && !defined (__CYGWIN32__) /* It's not Unix, really. See? Capital letters. */ #include #define getpid() GetCurrentProcessId() #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ #ifdef HAVE_LIBINTL_H #include #define _(msgid) gettext (msgid) #else #define _(msgid) (msgid) #endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ #include #define my_index strchr #else /* Avoid depending on library functions or files whose names are inconsistent. */ char *getenv(); static char * my_index(str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ #if !defined (__STDC__) || !__STDC__ /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen(const char *); #endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ static const char *nonoption_flags; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void store_args(int argc, char *const *argv) __attribute__((unused)); static void store_args(int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } text_set_element(__libc_subinit, store_args); #endif /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined (__STDC__) && __STDC__ static void exchange(char **); #endif static void exchange(argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined (__STDC__) && __STDC__ static const char *_getopt_initialize(int, char *const *, const char *); #endif static const char * _getopt_initialize(argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind = 1; nextchar = NULL; posixly_correct = getenv("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { /* Bash 2.0 puts a special variable in the environment for each command it runs, specifying which ARGV elements are the results of file name wildcard expansion and therefore should not be considered as options. */ char var[100]; sprintf(var, "_%d_GNU_nonoption_argv_flags_", getpid()); nonoption_flags = getenv(var); if (nonoption_flags == NULL) nonoption_flags_len = 0; else nonoption_flags_len = strlen(nonoption_flags); } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal(argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { optarg = NULL; if (!__getopt_initialized || optind == 0) { optstring = _getopt_initialize(argc, argv, optstring); optind = 1; /* Don't scan ARGV[0], the program name. */ __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && nonoption_flags[optind] == '1')) #else #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp(argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index(optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp(p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen(p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf(stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen(nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) if (argv[optind - 1][1] == '-') /* --option */ fprintf(stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf(stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); nextchar += strlen(nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf(stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen(nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen(nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index(optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf(stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf(stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index(optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf(stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf(stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf(stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp(p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen(p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf(stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen(nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) fprintf(stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen(nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf(stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen(nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen(nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf(stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt(argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal(argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main(argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt(argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf("option %c\n", c); break; case 'a': printf("option a\n"); break; case 'b': printf("option b\n"); break; case 'c': printf("option c with value `%s'\n", optarg); break; case '?': break; default: printf("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf("non-option ARGV-elements: "); while (optind < argc) printf("%s ", argv[optind++]); printf("\n"); } exit(0); } #endif /* TEST */ wmpinboard-1.0.orig/src/getopt.h0100644000175000017500000001114607214234637015043 0ustar hmhhmh/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in /gd/gnu/lib. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #define _GETOPT_H 1 #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { #if defined (__STDC__) && __STDC__ const char *name; #else char *name; #endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 #if defined (__STDC__) && __STDC__ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt(int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ extern int getopt(); #endif /* __GNU_LIBRARY__ */ extern int getopt_long(int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only(int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal(int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ extern int getopt(); extern int getopt_long(); extern int getopt_long_only(); extern int _getopt_internal(); #endif /* __STDC__ */ #ifdef __cplusplus } #endif #endif /* _GETOPT_H */ wmpinboard-1.0.orig/src/getopt1.c0100644000175000017500000001104507214234637015115 0ustar hmhhmh/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in /gd/gnu/lib. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long(argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal(argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only(argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal(argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main(argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long(argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf("option %s", long_options[option_index].name); if (optarg) printf(" with arg %s", optarg); printf("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf("option %c\n", c); break; case 'a': printf("option a\n"); break; case 'b': printf("option b\n"); break; case 'c': printf("option c with value `%s'\n", optarg); break; case 'd': printf("option d with value `%s'\n", optarg); break; case '?': break; default: printf("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf("non-option ARGV-elements: "); while (optind < argc) printf("%s ", argv[optind++]); printf("\n"); } exit(0); } #endif /* TEST */ wmpinboard-1.0.orig/src/memcmp.c0100644000175000017500000002236707214234637015021 0ustar hmhhmh/* Copyright (C) 1991, 1993, 1995, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #undef __ptr_t #if defined __cplusplus || (defined __STDC__ && __STDC__) # define __ptr_t void * #else /* Not C++ or ANSI C. */ # undef const # define const # define __ptr_t char * #endif /* C++ or ANSI C. */ #ifndef __P # if defined __GNUC__ || (defined __STDC__ && __STDC__) # define __P(args) args # else # define __P(args) () # endif /* GCC. */ #endif /* Not __P. */ #if defined HAVE_STRING_H || defined _LIBC # include #endif #undef memcmp #ifdef _LIBC # include # include # if __BYTE_ORDER == __BIG_ENDIAN # define WORDS_BIGENDIAN # endif #else /* Not in the GNU C library. */ # include /* Type to use for aligned memory operations. This should normally be the biggest type supported by a single load and store. Must be an unsigned type. */ # define op_t unsigned long int # define OPSIZ (sizeof(op_t)) /* Threshold value for when to enter the unrolled loops. */ # define OP_T_THRES 16 /* Type to use for unaligned operations. */ typedef unsigned char byte; # ifndef WORDS_BIGENDIAN # define MERGE(w0, sh_1, w1, sh_2) (((w0) >> (sh_1)) | ((w1) << (sh_2))) # else # define MERGE(w0, sh_1, w1, sh_2) (((w0) << (sh_1)) | ((w1) >> (sh_2))) # endif #endif /* In the GNU C library. */ #ifdef WORDS_BIGENDIAN # define CMP_LT_OR_GT(a, b) ((a) > (b) ? 1 : -1) #else # define CMP_LT_OR_GT(a, b) memcmp_bytes ((a), (b)) #endif /* BE VERY CAREFUL IF YOU CHANGE THIS CODE! */ /* The strategy of this memcmp is: 1. Compare bytes until one of the block pointers is aligned. 2. Compare using memcmp_common_alignment or memcmp_not_common_alignment, regarding the alignment of the other block after the initial byte operations. The maximum number of full words (of type op_t) are compared in this way. 3. Compare the few remaining bytes. */ #ifndef WORDS_BIGENDIAN /* memcmp_bytes -- Compare A and B bytewise in the byte order of the machine. A and B are known to be different. This is needed only on little-endian machines. */ static int memcmp_bytes __P((op_t, op_t)); # ifdef __GNUC__ __inline # endif static int memcmp_bytes (a, b) op_t a, b; { long int srcp1 = (long int) &a; long int srcp2 = (long int) &b; op_t a0, b0; do { a0 = ((byte *) srcp1)[0]; b0 = ((byte *) srcp2)[0]; srcp1 += 1; srcp2 += 1; } while (a0 == b0); return a0 - b0; } #endif static int memcmp_common_alignment __P((long, long, size_t)); /* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t' objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for memory operations on `op_t's. */ #ifdef __GNUC__ __inline #endif static int memcmp_common_alignment (srcp1, srcp2, len) long int srcp1; long int srcp2; size_t len; { op_t a0, a1; op_t b0, b1; switch (len % 4) { default: /* Avoid warning about uninitialized local variables. */ case 2: a0 = ((op_t *) srcp1)[0]; b0 = ((op_t *) srcp2)[0]; srcp1 -= 2 * OPSIZ; srcp2 -= 2 * OPSIZ; len += 2; goto do1; case 3: a1 = ((op_t *) srcp1)[0]; b1 = ((op_t *) srcp2)[0]; srcp1 -= OPSIZ; srcp2 -= OPSIZ; len += 1; goto do2; case 0: if (OP_T_THRES <= 3 * OPSIZ && len == 0) return 0; a0 = ((op_t *) srcp1)[0]; b0 = ((op_t *) srcp2)[0]; goto do3; case 1: a1 = ((op_t *) srcp1)[0]; b1 = ((op_t *) srcp2)[0]; srcp1 += OPSIZ; srcp2 += OPSIZ; len -= 1; if (OP_T_THRES <= 3 * OPSIZ && len == 0) goto do0; /* Fall through. */ } do { a0 = ((op_t *) srcp1)[0]; b0 = ((op_t *) srcp2)[0]; if (a1 != b1) return CMP_LT_OR_GT (a1, b1); do3: a1 = ((op_t *) srcp1)[1]; b1 = ((op_t *) srcp2)[1]; if (a0 != b0) return CMP_LT_OR_GT (a0, b0); do2: a0 = ((op_t *) srcp1)[2]; b0 = ((op_t *) srcp2)[2]; if (a1 != b1) return CMP_LT_OR_GT (a1, b1); do1: a1 = ((op_t *) srcp1)[3]; b1 = ((op_t *) srcp2)[3]; if (a0 != b0) return CMP_LT_OR_GT (a0, b0); srcp1 += 4 * OPSIZ; srcp2 += 4 * OPSIZ; len -= 4; } while (len != 0); /* This is the right position for do0. Please don't move it into the loop. */ do0: if (a1 != b1) return CMP_LT_OR_GT (a1, b1); return 0; } static int memcmp_not_common_alignment __P((long, long, size_t)); /* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory operations on `op_t', but SRCP1 *should be unaligned*. */ #ifdef __GNUC__ __inline #endif static int memcmp_not_common_alignment (srcp1, srcp2, len) long int srcp1; long int srcp2; size_t len; { op_t a0, a1, a2, a3; op_t b0, b1, b2, b3; op_t x; int shl, shr; /* Calculate how to shift a word read at the memory operation aligned srcp1 to make it aligned for comparison. */ shl = 8 * (srcp1 % OPSIZ); shr = 8 * OPSIZ - shl; /* Make SRCP1 aligned by rounding it down to the beginning of the `op_t' it points in the middle of. */ srcp1 &= -OPSIZ; switch (len % 4) { default: /* Avoid warning about uninitialized local variables. */ case 2: a1 = ((op_t *) srcp1)[0]; a2 = ((op_t *) srcp1)[1]; b2 = ((op_t *) srcp2)[0]; srcp1 -= 1 * OPSIZ; srcp2 -= 2 * OPSIZ; len += 2; goto do1; case 3: a0 = ((op_t *) srcp1)[0]; a1 = ((op_t *) srcp1)[1]; b1 = ((op_t *) srcp2)[0]; srcp2 -= 1 * OPSIZ; len += 1; goto do2; case 0: if (OP_T_THRES <= 3 * OPSIZ && len == 0) return 0; a3 = ((op_t *) srcp1)[0]; a0 = ((op_t *) srcp1)[1]; b0 = ((op_t *) srcp2)[0]; srcp1 += 1 * OPSIZ; goto do3; case 1: a2 = ((op_t *) srcp1)[0]; a3 = ((op_t *) srcp1)[1]; b3 = ((op_t *) srcp2)[0]; srcp1 += 2 * OPSIZ; srcp2 += 1 * OPSIZ; len -= 1; if (OP_T_THRES <= 3 * OPSIZ && len == 0) goto do0; /* Fall through. */ } do { a0 = ((op_t *) srcp1)[0]; b0 = ((op_t *) srcp2)[0]; x = MERGE(a2, shl, a3, shr); if (x != b3) return CMP_LT_OR_GT (x, b3); do3: a1 = ((op_t *) srcp1)[1]; b1 = ((op_t *) srcp2)[1]; x = MERGE(a3, shl, a0, shr); if (x != b0) return CMP_LT_OR_GT (x, b0); do2: a2 = ((op_t *) srcp1)[2]; b2 = ((op_t *) srcp2)[2]; x = MERGE(a0, shl, a1, shr); if (x != b1) return CMP_LT_OR_GT (x, b1); do1: a3 = ((op_t *) srcp1)[3]; b3 = ((op_t *) srcp2)[3]; x = MERGE(a1, shl, a2, shr); if (x != b2) return CMP_LT_OR_GT (x, b2); srcp1 += 4 * OPSIZ; srcp2 += 4 * OPSIZ; len -= 4; } while (len != 0); /* This is the right position for do0. Please don't move it into the loop. */ do0: x = MERGE(a2, shl, a3, shr); if (x != b3) return CMP_LT_OR_GT (x, b3); return 0; } int memcmp (s1, s2, len) const __ptr_t s1; const __ptr_t s2; size_t len; { op_t a0; op_t b0; long int srcp1 = (long int) s1; long int srcp2 = (long int) s2; op_t res; if (len >= OP_T_THRES) { /* There are at least some bytes to compare. No need to test for LEN == 0 in this alignment loop. */ while (srcp2 % OPSIZ != 0) { a0 = ((byte *) srcp1)[0]; b0 = ((byte *) srcp2)[0]; srcp1 += 1; srcp2 += 1; res = a0 - b0; if (res != 0) return res; len -= 1; } /* SRCP2 is now aligned for memory operations on `op_t'. SRCP1 alignment determines if we can do a simple, aligned compare or need to shuffle bits. */ if (srcp1 % OPSIZ == 0) res = memcmp_common_alignment (srcp1, srcp2, len / OPSIZ); else res = memcmp_not_common_alignment (srcp1, srcp2, len / OPSIZ); if (res != 0) return res; /* Number of bytes remaining in the interval [0..OPSIZ-1]. */ srcp1 += len & -OPSIZ; srcp2 += len & -OPSIZ; len %= OPSIZ; } /* There are just a few bytes to compare. Use byte memory operations. */ while (len != 0) { a0 = ((byte *) srcp1)[0]; b0 = ((byte *) srcp2)[0]; srcp1 += 1; srcp2 += 1; res = a0 - b0; if (res != 0) return res; len -= 1; } return 0; } #ifdef weak_alias # undef bcmp weak_alias (memcmp, bcmp) #endif wmpinboard-1.0.orig/src/memcmp.h0100644000175000017500000000025307214234637015014 0ustar hmhhmh#ifndef MEMCMP_H_INCLUDED #define MEMCMP_H_INCLUDED extern int memcmp __P ((__const __ptr_t __s1, __const __ptr_t __s2, size_t __n)); #endif /* MEMCMP_H_INCLUDED */ wmpinboard-1.0.orig/src/misc.c0100644000175000017500000000430307214234637014464 0ustar hmhhmh/* * Copyright (C) 1998-2000 by Marco G"otze. * * This code is part of the wmpinboard source package, which is * distributed under the terms of the GNU GPL2. */ #include #include #include #include #include "wmpinboard.h" #ifdef HAVE_SIGNAL_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif extern const char *rc_file_name; /* * prints an error message and exits */ void die(const char *text) { fprintf(stderr, "Fatal error: %s\n", text); exit(EXIT_FAILURE); } /* * allocs bytes and die()s if that fails */ void* smalloc(long amount) { void *p = 0; p = malloc(amount); if (!p) die("Out of memory!"); return p; } /* * returns a true value if a text string is to be considered empty * (if width > 0, limit the check to width characters) */ int string_empty(char *ptr, int width) { int i = 0; while (*ptr && (!width || i++ < width)) if (*ptr++ != ' ') return 0; return 1; } /* * flushes a possibly running interactive instance, returns a true value if * another instance *is* evidently running */ int flush_instance(int pid) { struct stat buf; time_t t; char *s; int i; int running = 0; if (pid != (int) getpid()) { /* not fulfilled if file doesn't exist */ s = smalloc(strlen(getenv("HOME")) + strlen(rc_file_name) + 1); strcpy(s, getenv("HOME")); strcat(s, rc_file_name); stat(s, &buf); t = buf.st_mtime; /* make that other instance confirm its presence by modifying the file */ if (kill(pid, SIGUSR1) != -1) { for (i = 0; i < 3; i++) { /* wait up to 3 secs for a modification */ stat(s, &buf); if (buf.st_mtime != t) break; sleep(1); } running = buf.st_mtime != t; /* we assume that modifying the file is safe now */ } free(s); } return running; } /* * u()ncsarbmel sht eoctnnesto fs<> * m(solt ysudef roc notss' ,osw eod'n todi tnip-alec) */ char* csarbmel(const char *s) { char ch, *t; int i; t = smalloc(strlen(s)+1); strcpy(t, s); for (i = 0; i+1 < strlen(t); i += 2) { ch = t[i]; t[i] = t[i+1]; t[i+1] = ch; } return t; } wmpinboard-1.0.orig/src/misc.h0100644000175000017500000000077007214234637014475 0ustar hmhhmh/* * Copyright (C) 1998-2000 by Marco G"otze. * * This code is part of the wmpinboard source package, which is * distributed under the terms of the GNU GPL2. */ #ifndef MISC_H_INCLUDED #define MISC_H_INCLUDED #include "wmpinboard.h" #define WARN(msg) fprintf(stderr, "Warning: %s\n", msg) void die(const char*); void *smalloc(long); int string_empty(char*, int); int flush_instance(int); char *csarbmel(const char *); void block_sigs(); void unblock_sigs(); #endif /* MISC_H_INCLUDED */ wmpinboard-1.0.orig/src/notes.c0100644000175000017500000007105207214234637014666 0ustar hmhhmh/* * Copyright (C) 1998-2000 by Marco G"otze. * * This code is part of the wmpinboard source package, which is * distributed under the terms of the GNU GPL2. */ #include #include #include #include #include #include "wmpinboard.h" #include "misc.h" #include "xmisc.h" #include "notes.h" #ifdef HAVE_STRING_H #include #endif #ifndef HAVE_MEMCMP #include "memcmp.h" #endif /* a list of the upper left corners of the separate areas of the alarm panel, numbered from left to right and from top to bottom (double digits followed by switches) */ typedef struct { int x, y; } coords_t; const coords_t abar_areas[6] = { /* double digits, 12x9 each */ { 3, 4 }, { 19, 4 }, { 3, 15 }, { 19, 15 }, /* switches, 8x8 each */ { 47, 4 }, { 47, 16 } }; /* * adds a new note and returns its number (or -1 if notes limit exceeded) */ int add_note() { int cols[C_NUM]; int rep = 20; int i, j, n; if (notes_count >= MAX_NOTES) return -1; n = notes_count++; /* find a reasonable color */ for (i = 0; i < C_NUM; i++) cols[i] = 1; for (i = 0; i < n; i++) cols[ndata[i].col] = 0; for (i = j = 0; i < C_NUM; i++) if (cols[i]) cols[j++] = i; ndata[n].col = j ? cols[rand() % j] : rand() % C_NUM; /* choose a random place to pin it, some pixels off any other note's origin (possible if MAX_NOTES is sufficiently small) */ do { ndata[n].x = 6 + rand() % 36; ndata[n].y = 2 + rand() % 44; j = 1; for (i = 0; i < n; i++) if (ndata[i].x - ndata[n].x < 5 && ndata[i].x - ndata[n].x > -5 && ndata[i].y - ndata[n].y < 5 && ndata[i].y - ndata[n].y > -5) { j = 0; break; } } while (!j && --rep); memset(ndata[n].text, 32, 59); ndata[n].text[59] = '\0'; ndata[n].cursor = 0; memset(ndata[n].sketch, 0, 512); memset(ndata[n].creases, 0, 32); ndata[n].a_time = -1; ndata[n].a_flags = ALARM_DATE; state.counter++; return n; } /* * removes a note */ void remove_note(int number) { int i; if (number >= notes_count) return; /* in case memcpy() can't do overlapping copies... */ for (i = number; i < notes_count-1; i++) memcpy(&ndata[i], &ndata[i+1], sizeof(data_t)); notes_count--; } /* * moves a note on top of all others and returns the quote's new ID */ int raise_note(int number) { data_t tmp; int i; if (number >= notes_count-1 || number < 0) return number; memcpy(&tmp, &ndata[number], sizeof(data_t)); /* in case memcpy() can't do overlapping copies... */ for (i = number; i < notes_count-1; i++) memcpy(&ndata[i], &ndata[i+1], sizeof(data_t)); memcpy(&ndata[notes_count-1], &tmp, sizeof(data_t)); return notes_count-1; } /* * returns a value corresponding to how tilted a note is to be displayed */ inline int note_tilt(int note) { return ndata[note].x < 14 ? 0 : (ndata[note].x < 36 ? 1 : 2); } /* * returns true if the note in question is to be considered empty */ int note_empty(int note) { char *ptr = ndata[note].sketch; int i; if (!string_empty(ndata[note].text, 0)) return 0; for (i = 0; i < 511; i++, ptr++) /* last byte ignored */ if (*ptr) return 0; return 1; } /* * creates templates for the icons suiting the specified note */ void color_notes(int note) { XGetSubImage(display, app, 64, 0, 16, 48, ~0, ZPixmap, img, 64, 0); if (ndata[note].sketch[511] & 1) replace_color(img, 64, 0, 16, 48, C_EXTRA, palette[ndata[note].col].fg); else replace_color(img, 64, 0, 16, 48, C_EXTRA, palette[ndata[note].col].bg); replace_color(img, 64, 0, 16, 48, C_INNER, palette[ndata[note].col].bg); #ifdef CREASES render_wear(note); #endif } /* * draws a note's miniature representation on the pinboard */ void pin_note(int note) { merge_masked(img, 64, 16*note_tilt(note), ndata[note].x, ndata[note].y, 16, 16, C_OUTER); } /* * renders the pinboard with all of its notes excluding if >= 0 */ void render_pinboard(int exclude) { int i; XPutImage(display, app, normalGC, img, 0, 0, 0, 0, 64, 64); for (i = 0; i < notes_count; i++) if (i != exclude) { color_notes(i); pin_note(i); } } /* * if (, ) is within a quote's area, returns the quote's ID, otherwise -1 */ int selected_note(int x, int y) { int i; for (i = notes_count-1; i >= 0; i--) if (x >= ndata[i].x && x < ndata[i].x+16 && y >= ndata[i].y && y < ndata[i].y+16 && XGetPixel(img, 128+x-ndata[i].x, note_tilt(i)*16+y-ndata[i].y) != C_OUTER) { return i; } return -1; } /* * prints a letter identified by a note and a position in its text string, and * overlays it by a possible sketch if sketch has a true value */ void print_letter(int note, int letter, int sketch) { int a = 2+6*(letter%10), b = 2+10*(letter/10); if (sketch) { XFillRectangle(display, app, fillGC, a, b, 6, 10); #ifdef CREASES render_edit_wear_area(note, a, b, 6, 10); #endif draw_sketch_area(note, a, b, 6, 10); } XDrawString(display, app, fontGC, a, b + font->ascent, &ndata[note].text[letter], 1); } /* * prints a note's entire text *without* drawing a possibly existing sketch */ void print_text(int note) { int i; for (i = 0; i < 59; i++) print_letter(note, i, 0); } /* * shifts part of a note's text to the right, inserting (step >= 1) */ void shift_string(int note, int at, int margin, int step, int ch) { int i; if (step < 1) return; for (i = margin; i >= at+step; i--) { ndata[note].text[i] = ndata[note].text[i-step]; print_letter(note, i, 1); } for (i = at; i < at+step; i++) { ndata[note].text[i] = ch; print_letter(note, i, 1); } } /* * draws a rectangular section of a sketch, according to the data saved along * with a note */ void draw_sketch_area(int note, int x, int y, int w, int h) { int i, j; for (i = x; i < x+w; i++) for (j = y; j < y+h; j++) if (ndata[note].sketch[8*j + i/8] & (1<<(i%8))) XDrawPoint(display, app, fontGC, i, j); } /* * returns the number of the button bar's button corresponding to the given :* coordinates, or -1 */ int bbar_button(int x, int y) { int i; for (i = 0; i < 8; i++) if (x >= 4 + (i%4)*14 && x < 18 + (i%4)*14 && y >= 32 + (i/4)*14 && y < 46 + (i/4)*14) { return i; } return -1; } /* * returns the number of that area on the alarm panel that corresponds to the * given coordinates, or -1 */ int abar_area(int x, int y) { int i; /* relativate positions */ x -= 3; y -= 4; for (i = 0; i < 6; i++) { coords_t c = abar_areas[i]; if (x >= c.x && x < (c.x + (i < 4 ? 12 : 8)) && y >= c.y && y < (c.y + (i < 4 ? 9 : 8))) { return i; } } return -1; } /* * displays note in edit mode view */ void render_note(int note) { int i; XSetForeground(display, fillGC, palette[ndata[note].col].bg); XSetForeground(display, fontGC, BlackPixel(display, DefaultScreen(display))); XSetBackground(display, fontGC, palette[ndata[note].col].bg); set_mask(0); XFillRectangle(display, app, fillGC, 0, 0, 64, 64); XDrawRectangle(display, app, fontGC, 0, 0, 63, 63); XSetForeground(display, fontGC, palette[ndata[note].col].fg); for (i = 55; i < 62; i += 2) /* draw triangle in the bottom right corner */ XDrawLine(display, app, fontGC, i, 62, 62, i); } /* * prepares edit mode for note (does NOT update the display) */ void init_edit_mode(int note) { #ifdef CREASES XGCValues gcv; gcv.foreground = palette[ndata[note].col].cr; XChangeGC(display, creaseGC, GCForeground, &gcv); #endif render_note(note); #ifdef CREASES render_edit_wear(note); #endif print_text(note); draw_sketch(note); } /* * updates a double digit area on the alarm panel */ inline void render_abar_number(int field) { int a, b; /* split two-digit number into separate digits */ b = state.a_edit[field] % 10; a = (state.a_edit[field] / 10) % 10; /* copy appropriate digits */ XCopyArea(display, digits, abar, normalGC, 6*a, 0, 6, 9, abar_areas[field].x, abar_areas[field].y); XCopyArea(display, digits, abar, normalGC, 6*b, 0, 6, 9, abar_areas[field].x+7, abar_areas[field].y); } /* * updates the alarm panel's switches for a given note */ inline void render_abar_switches(int note) { XPutImage(display, abar, normalGC, img, (ndata[note].a_flags & ALARM_DATE) ? 78 : 70, 55, 47, 4, 8, 8); XPutImage(display, abar, normalGC, img, (ndata[note].a_flags & ALARM_DATE) ? 70 : 78, 55, 47, 16, 8, 8); } /* * renders the alarm panel for a given note */ void render_abar(int note) { int i; for (i = 0; i < 4; i++) render_abar_number(i); render_abar_switches(note); } /* * converts 's contents to what's referred to as "cooked" format (as * opposed to raw data); returns a malloc()ed string that has to be freed * later on! */ char* cook(int note, int pos, int len) { char *s, *t; int i; s = smalloc(70); for (t = s, i = pos; i < (pos+len > 59 ? 59 : pos+len); i++) { if (!string_empty(&ndata[note].text[i], (i >= 50 ? 59 : 10*(i/10+1))-i)) { if (t > s && !(i%10) && t[-1] != ' ' && t[-1] != '-') *t++ = ' '; /* replace virtual newlines by spaces */ if ((t > s && (ndata[note].text[i] != ' ' || t[-1] != ' ') && !(t[-1] == '-' && string_empty(&ndata[note].text[10*(i/10)], i%10+1))) || (t == s && ndata[note].text[i] != ' ')) { *t++ = ndata[note].text[i]; } } } *t = '\0'; return s; } /* * dumps all notes' contents on STDOUT (raw dump unless is true) */ void dump_notes(int cooked) { char *s; int c = 0, i, alarms; /* determine if any notes have alarms configured */ time_next_alarm(); alarms = state.alarm.note >= 0; /* print existing notes */ for (; c < 4; c++) for (i = 0; i < notes_count; i++) if (c_group[ndata[i].col] == c) { s = cooked ? cook(i, 0, 59) : ndata[i].text; if (alarms) { /* any alarms set at all? */ if (ndata[i].a_flags & ALARM_ON) { explode_time(i); if (ndata[i].a_flags & ALARM_DATE) { /* date-specific alarm */ printf("%02d-%02d-%02d %02d:%02d #%02d: %s\n", state.a_edit[4]%100, state.a_edit[2], state.a_edit[3], state.a_edit[0], state.a_edit[1], i, s); } else { /* daily alarm */ printf("daily at %02d:%02d #%02d: %s\n", state.a_edit[0], state.a_edit[1], i, s); } } else /* no alarm set for this note */ printf("%14s #%02d: %s\n", "", i, s); } else /* no alarms set at all */ printf("#%02d: %s\n", i, s); if (cooked) free(s); } } /* * returns the (serial) number of the character (, ) belongs to on a * note; prohibiting char #59 if */ int char_at(int x, int y, int strict) { int i; if (x < 2) x = 2; if (x > 62) x = 62; /* intentional! */ if (y > 61) y = 61; if (y < 2) y = 2; i = (x-2)/6 + ((y-2)/10)*10; if (i > 59) i = 59; return i; } #ifdef CREASES /* * applies random wear & tear to a note (the default probability is multiplied * by ) */ void wear_note(int note) { /* prefabricated crease patterns */ static const int pats = 8; static const unsigned char pat[8][5][5] = { { { 1,0,0,0,0 }, { 0,1,0,0,0 }, { 0,0,1,0,0 }, { 0,0,0,1,0 }, { 0,0,0,0,1 } }, { { 0,0,0,0,1 }, { 0,0,0,1,0 }, { 0,0,1,0,0 }, { 0,1,0,0,0 }, { 1,0,0,0,0 } }, { { 0,0,0,1,0 }, { 0,0,0,1,0 }, { 0,0,1,0,0 }, { 1,1,0,0,0 }, { 0,0,0,0,0 } }, { { 0,1,0,0,0 }, { 0,1,0,0,0 }, { 0,0,1,0,0 }, { 0,0,0,1,1 }, { 0,0,0,0,0 } }, { { 0,0,0,0,0 }, { 0,0,0,1,1 }, { 0,0,1,0,0 }, { 0,1,0,0,0 }, { 0,1,0,0,0 } }, { { 0,0,0,0,0 }, { 1,1,0,0,0 }, { 0,0,1,0,0 }, { 0,0,0,1,0 }, { 0,0,0,1,0 } }, { { 0,0,0,0,0 }, { 0,1,0,0,0 }, { 0,0,1,0,0 }, { 0,0,0,1,0 }, { 0,0,0,0,0 } }, { { 0,0,0,0,0 }, { 0,0,0,1,0 }, { 0,0,1,0,0 }, { 0,1,0,0,0 }, { 0,0,0,0,0 } } }; int i, j, k = 0; /* determine number of crease bits */ for (i = 0; i < 32; i++) for (j = 0; j < 8; j++) k += ndata[note].creases[i]>>(j) & 1; /* don't cover more than 35% of a note's area with creases */ if (100*k/256 < 35 && !(rand() % (4+k/64))) { int x, y; int t = rand() % pats; /* choose a prefab crease pattern to apply... */ int a = rand() % 11; /* ...as well as its location */ int b = rand() % 11; for (y = 0; y < 5; y++) for (x = 0; x < 5; x++) if (pat[t][y][x]) ndata[note].creases[2*(b+y) + (a+x<8)] |= 1<<(7-(a+x)%8); } } /* * makes an otherwise pre-rendered note look worn out */ void render_wear(int note) { int x, y, z; for (z = 0; z <= 48; z += 16) for (y = 0; y < 16; y++) for (x = 0; x < 16; x++) if (ndata[note].creases[2*y+x/8]>>(7-x%8) & 1 && XGetPixel(img, 64+x, z+y) == palette[ndata[note].col].bg) { XPutPixel(img, 64+x, z+y, palette[ndata[note].col].cr); } } /* * renders wear & tear in edit mode in a specific window */ void render_edit_wear_area_win(Window win, int note, int a, int b, int w, int h) { #define m(x, y) (m[2*(y) + (x)/8]>>(7-(x)%8) & 1) #define l(x, y) (l[8*(y) + (x)/8]>>(7-(x)%8) & 1) static unsigned char l[(64/8)*64]; /* high res crease map */ static unsigned char m[32]; /* low res crease map */ int x, y, z; /* lazily render a high-res crease pattern */ if (memcmp(m, ndata[note].creases, sizeof(m))) { memcpy(m, ndata[note].creases, sizeof(m)); memset(l, 0, sizeof(l)); /* now we have to somehow extrapolate a 64x64 crease pattern from a 16x16 sketch... */ for (z = 0; z < 3; z++) /* three passes */ for (y = 2; y < 62; y++) for (x = 2; x < 62; x++) { int sx = x/4, sy = y/4; int xx = x%4, yy = y%4; int xi = (xx<<1)%3, yi = (yy<<1)%3; int xd = xx<2 ? -1 : 1, yd = yy<2 ? -1 : 1; if (z < 2 && ( /* during passes #0 and #1 */ (!z && xi && yi && m(sx, sy) && (m(sx+xd, sy+yd) || m(sx, sy+yd) || m(sx+xd, sy) ) && ((xd<0 && sx<2) || (xd>0 && sx>14) || (yd<0 && sy<2) || (yd>0 && sy>14) || m(sx+2*xd, sy+2*yd)) ) || (z && ( (!xi && !yi && l(x-xd, y-yd) && l(x+2*xd, y+2*yd)) || (!xi && yi && l(x-xd, y) && l(x+2*xd, y)) || (xi && !yi && l(x, y-yd) && l(x, y+2*yd)) )))) { l[8*y + x/8] |= 1<<(7-x%8); } /* during pass #2, remove isolated dots */ if (z == 2 && l(x, y) && !(l(x-1, y-1) || l(x, y-1) || l(x+1, y-1) || l(x-1, y) || l(x+1, y) || l(x-1, y+1) || l(x, y+1) || l(x+1, y+1))) { l[8*y + x/8] &= 0xff - (1<<(7-x%8)); } } } for (y = b; y < b+h; y++) for (x = a; x < a+w; x++) if (x > 1 && y > 1 && x < 62 && y < 62 && x+y <= 116 && l(x, y)) XDrawPoint(display, win, creaseGC, x, y); #undef m #undef l } #endif #ifdef FUNSTUFF /* * atek sparppoirta ecaitnoo npsceai lcoacisno,sr terusnt ur efit ah tahppnede */ void check_occasion(int d, int m, int y) { static const unsigned char sketch0[256] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb3, 0x5d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x0d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x1f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x78, 0x9f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }; static const unsigned char sketch1[512] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0d, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x40, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x56, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0x1f, 0x06, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x6f, 0xfd, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }; char *s; int note; if (!notes_count && !(state.state_bits & 1)) { /* ewclmo een wsures */ if ((note = add_note()) >= 0) { ndata[note].col = 15; memcpy(&ndata[note].sketch[256], sketch0, 256); s = csarbmel( "EWCLMO EotmwipbnaodrhTnaskf rortiygni tuo!t "); strcpy(ndata[note].text, s); free(s); ndata[note].cursor = 50; state.state_bits |= 1; } } else if (notes_count) state.state_bits |= 1; /* purgdadeu essrw not'g tet ihs */ if (m == 12 && d >= 25 && d <= 26) { /* mXsa */ if (!(state.state_bits & 2) && (note = add_note()) >= 0) { ndata[note].col = 14; memcpy(ndata[note].sketch, sketch1, 512); s = csarbmel( " A M REYR MXSA T O Y UO ! "); strcpy(ndata[note].text, s); free(s); state.state_bits |= 2; } } else state.state_bits &= ~2; if (m == 1 && d <= 3) { /* eN weYra */ if (!(state.state_bits & 4) && (note = add_note()) >= 0) { ndata[note].col = 11; ndata[note].sketch[511] = 0x01; s = csarbmel( "nOeca agni aeyrah saapssde.. .A ynaw,y A H PAYP EN WEYRA!"); strcpy(ndata[note].text, s); free(s); state.state_bits |= 4; } } else state.state_bits &= ~4; } #endif /* * pastes into note #, starting at ; returns the serial * number of the character right after the pasted string's end; overwrites * previous contents; tries to word-wrap unless has a true value */ int paste_string(int note, int offset, const char *s, int raw) { const char *t; int i, j; if (!raw) { /* paste "cooked" */ for (i = offset; *s && i < 59; ) { for (; *s && (*s == ' ' || *s == '\t' || *s == '\n'); s++); for (t = s; *t && (t == s || *t == '-' || *(t-1) != '-') && *t != ' ' && *t != '\t' && *t != '\n'; t++); j = t-s; if (i < 50 && i%10 && i/10 != (i+j-1)/10) i = (i/10+1)*10; /* next l.? */ if (j && i <= 58) { if (i+j >= 58) { /* word too long for note? */ strncpy(&ndata[note].text[i], s, 59-i); i = 59; } else { strncpy(&ndata[note].text[i], s, j); i += j; } if (*(t-1) != '-' && i%10) i++; /* insert blank? */ s = t; } } if (ndata[note].text[i] == ' ') /* place cursor right after the text */ for (; i > offset && ndata[note].text[i-1] == ' '; i--); return i; } else { /* paste raw */ i = strlen(s); if (offset+i > 59) i = 59-offset; strncpy(&ndata[note].text[offset], s, i); return offset+i; } } /* * pastes into note # at offset , inserting if , * word-wrapping unless */ void paste(int note, int pos, const char *data, int ins, int raw) { char *s = 0; int i; if (ins) { if (raw) { s = smalloc(60); strcpy(s, ndata[note].text); } else { /* want to wrap subsequent text later, so we have to save it cooked */ s = cook(note, 0, 59); } memset(&ndata[note].text[pos], ' ', 59-pos); } else memset(&ndata[note].text[pos], ' ', pos+strlen(data) > 59 ? 59-pos : strlen(data)); i = paste_string(note, pos, data, raw); if (ins) { if (i <= 58) paste_string(note, i, &s[pos], raw); free(s); } ndata[note].cursor = i > 58 ? 58 : i; } /* * checks whether state.a_edit is valid (mday range w/respect to month...), * sets the hidden year field to a sensible value; the return value is boolean */ int check_time() { struct tm data, *ptr; time_t tt; tt = time(0); ptr = localtime(&tt); memcpy(&data, ptr, sizeof(struct tm)); data.tm_isdst = -1; /* let mktime() decide */ data.tm_year = state.a_edit[2]-1 > ptr->tm_mon || (state.a_edit[2]-1 == ptr->tm_mon && (state.a_edit[3] > ptr->tm_mday || (state.a_edit[3] == ptr->tm_mday && (state.a_edit[0] > ptr->tm_hour || (state.a_edit[0] == ptr->tm_hour && (state.a_edit[1] > ptr->tm_min || (state.a_edit[1] == ptr->tm_min && !ptr->tm_sec))))))) ? ptr->tm_year : ptr->tm_year+1; data.tm_mon = state.a_edit[2]-1; data.tm_mday = state.a_edit[3]; data.tm_hour = state.a_edit[0]; data.tm_min = state.a_edit[1]; /* check if date is convertible, i.e., valid */ tt = mktime(&data); if (tt == -1) return 0; /* check if date has been adapted -> return failure */ if (data.tm_mon != state.a_edit[2]-1 || data.tm_mday != state.a_edit[3]) return 0; /* adapt date and return */ state.a_edit[4] = (unsigned char) data.tm_year; /* char suffices */ return 1; } /* * transforms ndata[note].a_time to state.a_edit */ void explode_time(int note) { struct tm *ptr; if (ndata[note].a_time != -1) { ptr = localtime(&ndata[note].a_time); state.a_edit[0] = ptr->tm_hour; state.a_edit[1] = ptr->tm_min; state.a_edit[4] = ptr->tm_year; } else { /* initialize on first call */ time_t tt; time(&tt); tt += 60*60; ptr = localtime(&tt); state.a_edit[0] = ptr->tm_hour; state.a_edit[1] = 0; /* minute */ state.a_edit[4] = (unsigned char) ptr->tm_year; } state.a_edit[2] = ptr->tm_mon+1; state.a_edit[3] = ptr->tm_mday; } /* * transforms state.a_edit to ndata[note].a_time */ void implode_time(int note) { struct tm data, *ptr; time_t tt; time(&tt); ptr = localtime(&tt); memcpy(&data, ptr, sizeof(struct tm)); data.tm_isdst = -1; /* let mktime determine */ data.tm_hour = state.a_edit[0]; data.tm_min = state.a_edit[1]; data.tm_sec = 0; /* the following 3 ain't required for daily notes, but this way, the date will be saved even in this case, so we set them */ data.tm_year = state.a_edit[4]; data.tm_mon = state.a_edit[2]-1; data.tm_mday = state.a_edit[3]; ndata[note].a_time = mktime(&data); /* shouldn't fail */ } /* * evaluating its a_flags, returns an updated value of a note's a_time field, * considering the current time if != -1 */ time_t adapt_time(int note, time_t now) { time_t res = ndata[note].a_time; /* adaption is only necessary in the case of a daily alarm */ if (!(ndata[note].a_flags & ALARM_DATE)) { struct tm atm, *ptr; if (now == -1) time(&now); ptr = localtime(&res); /* break down alarm time */ memcpy(&atm, ptr, sizeof(struct tm)); ptr = localtime(&now); /* break down current time */ atm.tm_year = ptr->tm_year; atm.tm_mon = ptr->tm_mon; atm.tm_mday = ptr->tm_mday; atm.tm_sec = 0; /* just making sure */ res = mktime(&atm); if (res < now) res += 24*60*60; /* NOT `<='! */ } return res; } /* * sets the state variable's alarm sub structure's values for the next alarm */ /* Together with appropriate calls from wmpinboard.c, this function results in the following strategy for scheduling alarms: - firstly, alarms with ALARM_DATE set are executed only once and get deactivated afterwards; daily alarms remain active even after an alarm - if the program is started after some alarm time was reach, the alarm is displayed if (and only if) it's a date-specific alarm - if an alarm is running while another one becomes due, this subsequent alarm will be run after the user has closed the other note - to achieve the latter, time_next_alarm() considers all notes with an alarm time equal to or greater than the previous one; if they're equal, the new alarm's note's ID must be greater than that of the previous alarm (this realizes a determined order for concurrent alarms and allows the program to avoid running one daily alarm several times in a row) */ void time_next_alarm() { time_t prev_time = state.alarm.time; int i, prev_note = state.alarm.note; if (state.alarm.note >= 0 && !state.alarm.run) prev_note = -1; if (prev_time == -1 || prev_time > time(0)) prev_time = time(0); state.alarm.time = -1; state.alarm.note = -1; state.alarm.run = 0; for (i = 0; i < notes_count; i++) if (ndata[i].a_flags & ALARM_ON) { time_t tt = adapt_time(i, prev_time); if (((ndata[i].a_flags & ALARM_DATE) || (tt == prev_time && i > prev_note) || (tt > prev_time)) && (state.alarm.time == -1 || tt < state.alarm.time)) { state.alarm.time = tt; state.alarm.note = i; } } if (state.alarm.note < 0 && prev_note >= 0 && (ndata[prev_note].a_flags & ALARM_ON)) { /* if there is just one daily alarm, it hasn't been set again above, so let's do it here explicitly */ state.alarm.note = prev_note; state.alarm.time = adapt_time(prev_note, prev_time+1); } } wmpinboard-1.0.orig/src/notes.h0100644000175000017500000000315607214234637014673 0ustar hmhhmh/* * Copyright (C) 1998-2000 by Marco G"otze. * * This code is part of the wmpinboard source package, which is * distributed under the terms of the GNU GPL2. */ #ifndef NOTES_H_INCLUDED #define NOTES_H_INCLUDED #include #include "wmpinboard.h" #define draw_sketch(note) draw_sketch_area(note, 1, 1, 62, 62) int add_note(); void remove_note(int); int raise_note(int); int note_tilt(int); int note_empty(int); void color_notes(int); void pin_note(int); void render_pinboard(int); void render_note(int); int selected_note(int, int); void print_letter(int, int, int); void print_text(int); void shift_string(int, int, int, int, int); void draw_sketch_area(int, int, int, int, int); int bbar_button(int, int); int abar_area(int, int); void init_edit_mode(int); void render_abar_number(int); void render_abar_switches(int); void render_abar(int); char *cook(int, int, int); void dump_notes(int); int char_at(int, int, int); int paste_string(int, int, const char*, int); void paste(int, int, const char*, int, int); int check_time(); void explode_time(int); void implode_time(int); time_t adapt_time(int, time_t); void time_next_alarm(); #ifdef CREASES #include #define render_edit_wear_area(note, x, y, w, h) \ render_edit_wear_area_win(app, note, x, y, w, h) #define render_edit_wear(note) render_edit_wear_area(note, 1, 1, 62, 62) void wear_note(int); void render_wear(int); void render_edit_wear_area_win(Window, int, int, int, int, int); #endif #ifdef FUNSTUFF void check_occasion(int, int, int); #endif #endif /* NOTES_H_INCLUDED */ wmpinboard-1.0.orig/src/wmpinboard.c0100644000175000017500000022751507214234637015707 0ustar hmhhmh/* * Copyright (C) 1998-2000 by Marco G"otze. * * This code is part of the wmpinboard source package, which is * distributed under the terms of the GNU GPL2. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "wmpinboard.h" #include "misc.h" #include "notes.h" #include "xmisc.h" #ifdef HAVE_SIGNAL_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #include "../xpm/pinboard.xpm" #include "../xpm/bbar.xpm" #include "../xpm/abar.xpm" #include "../xpm/digits.xpm" const char *rc_file_name = "/.wmpinboarddata"; /* to be prepended with dir */ const char c_group[C_NUM] = /* group available note colors */ { 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 0, 0, 0 }; #define NUM_FONTS 3 const struct { /* shortcuts for known fonts */ char name[8]; char desc[40]; char font[60]; } fonts[NUM_FONTS] = { { "Default", "default font (ISO8859-1)", "-*-fixed-*--10-*-iso8859-1" }, { "Latin2", "Latin2 (ISO8859-2)", "-*-fixed-*--10-*-iso8859-2" }, { "Russian", "cyrillic font (KOI8-R)", "-*-fixed-*--10-*-koi8-r" } }; const char *default_font = fonts[0].font; opts_t opts = { 0, 0, 0, -1, TIMEOUT, 1, "", "", "" }; palette_t palette[C_NUM+1]; Cursor cursors[3]; /* alternate X cursors */ int label_coords[4] = { 12, 0, 39, 9 }; /* default "TO DO" label coords */ data_t ndata[MAX_NOTES]; /* this holds all the notes */ int notes_count = 0; state_t state = { 0, { 0, 0 }, 0, -1, -1, 0, 0, M_NOOP, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { -1, -1, 0, 0, None } }; Display *display; Window mainwin, iconwin, win; /* win = visible window */ Pixmap app = None, bbar = None, abar = None, digits = None; XImage *img = 0; GC normalGC = 0, fontGC = 0, fillGC = 0; #ifdef CREASES GC creaseGC = 0; #endif XFontStruct *font = 0; sigset_t sync_sig_set; /* signals used for syncing with other instances */ int sync_sig_block_counter = 0; /*************/ /******************************* FUNCTIONS ***********************************/ /*************/ void s_block(); void s_unblock(); int notes_io(int); void load_theme(const char*); void init(void); void done(void); int try_font(const char*, int); void load_font(void); void set_kbfocus(int); void action(actions, const void*); void help(void); void parse_argv(int, char**); void draw_cursor(int, int); void set_cursor(int, int); void sel_text(int); void draw_pixel(int, int); void set_mode(modes); void quit_edit_mode(int, int); void timer(unsigned int); void animate_bbar(int); void animate_abar(int); void animate_note(int); void animate_alarm(); void handle_ButtonPress(XEvent*); void handle_ButtonRelease(XEvent*); void handle_MotionNotify(XEvent*); void handle_KeyPress(XEvent*); void handle_sigs(int); /* * blocks the signals in sync_sig_set */ inline void s_block() { if (!sync_sig_block_counter++) sigprocmask(SIG_BLOCK, &sync_sig_set, 0); } /* * inverse of the above */ inline void s_unblock() { if (!--sync_sig_block_counter) sigprocmask(SIG_UNBLOCK, &sync_sig_set, 0); } /* * reads or writes the data file; returns the PID the file was last written by * * file format revisions: * 0 = v0.7+: introduced binary data file format * 1 = v0.8+: added * 2 = v0.9+: added , * 3 = v0.9.1+: added * 4 = v0.10+: added * 5 = v0.99: added * 6 = v0.99.1: added , */ int notes_io(int save) { /* size of per-note records for specific revisions */ static const int size_0 = sizeof(struct { int a, b, c; char d[60]; }); static const int size_1 = sizeof(struct { int a, b, c; char d[60]; int e; char f[512]; }); static const int size_2 = sizeof(struct { int a, b, c; char d[60]; int e; char f[512]; char g[32]; }); static const int size_6 = sizeof(struct { int a, b, c; char d[60]; int e; char f[512]; char g[32]; time_t h; char i; }); static const char *ext = ".new"; static const char *header = "WMPB6"; /* data file header */ char s[STRING_BUF_SIZE]; char t[STRING_BUF_SIZE]; FILE *file; int pid = (int) getpid(); static int sizes[6]; sizes[0] = size_0; sizes[1] = size_1; sizes[2] = size_2; sizes[3] = size_2; sizes[4] = size_2; sizes[5] = size_2; sizes[6] = size_6; s_block(); s[sizeof(s)-1] = '\0'; strncpy(s, getenv("HOME"), sizeof(s)); if (sizeof(s)-strlen(s)-1 < strlen(rc_file_name)+strlen(ext)) die("Buffer too small in notes_io()."); strcat(s, rc_file_name); if (save) { /* save to temporary file first, later rename it */ strcpy(t, s); strcat(s, ext); } file = fopen(s, save ? "wb" : "rb"); if (!file) { if (save) die("Couldn't open data file for writing."); else { s_unblock(); return pid; /* just don't read in anything if opening the file failed */ } } if (save) { /*** SAVE ***/ fwrite(header, 5, 1, file); fputs(opts.font, file); fputc('\n', file); fputs(opts.theme, file); fputc('\n', file); fputs(opts.alarm_cmd, file); fputc('\n', file); fwrite(&pid, sizeof(pid), 1, file); fwrite(&state.state_bits, sizeof(state.state_bits), 1, file); fwrite(&state.counter, sizeof(state.counter), 1, file); fwrite(ndata, sizeof(data_t), notes_count, file); fclose(file); strcpy(s, t); strcat(s, ext); if (rename(s, t) == -1) { fprintf(stderr, "Fatal error: Failed to rename file `%s' to `%s'.\n", t, s); exit(EXIT_FAILURE); } } else { /*** LOAD ***/ int rev; if (!fread(s, 5, 1, file) || strncmp(s, header, 4)) { /* check header */ fprintf(stderr, "Fatal error: Corrupt data file encountered.\n" "Delete `~%s' to start over.\n", rc_file_name); fclose(file); exit(EXIT_FAILURE); } /* file format revision check */ s[5] = '\0'; rev = strtol(&s[4], 0, 10); if (rev > 6) { fprintf(stderr, "Fatal error: The data file seems to have been created " "by a more recent version\nof wmpinboard. Try and find a newer " "release, or remove `~%s'\nand lose all existing notes.\n", rc_file_name); fclose(file); exit(EXIT_FAILURE); } fgets(opts.font, sizeof(opts.font), file); if (strlen(opts.font) && opts.font[strlen(opts.font)-1] == '\n') opts.font[strlen(opts.font)-1] = '\0'; if (rev >= 4) { fgets(opts.theme, sizeof(opts.theme), file); if (strlen(opts.theme) && opts.theme[strlen(opts.theme)-1] == '\n') opts.theme[strlen(opts.theme)-1] = '\0'; } if (rev >= 6) { fgets(opts.alarm_cmd, sizeof(opts.alarm_cmd), file); if (strlen(opts.alarm_cmd) && opts.alarm_cmd[strlen(opts.alarm_cmd)-1] == '\n') { opts.alarm_cmd[strlen(opts.alarm_cmd)-1] = '\0'; } } if (rev >= 3) fread(&pid, sizeof(pid), 1, file); /* last writer's PID */ if (rev >= 2) /* state.state_bits */ fread(&state.state_bits, sizeof(state.state_bits), 1, file); else state.state_bits = 0; if (rev >= 5) /* counter */ fread(&state.counter, sizeof(state.counter), 1, file); else state.counter = 0; notes_count = 0; while (notes_count < MAX_NOTES) if (fread(&ndata[notes_count], sizes[rev], 1, file)) { switch (rev) { case 0: ndata[notes_count].cursor = 0; memset(ndata[notes_count].sketch, 0, 512); case 1: memset(ndata[notes_count].creases, 0, 32); case 2: case 3: case 4: case 5: ndata[notes_count].a_time = -1; ndata[notes_count].a_flags = ALARM_DATE; default: notes_count++; } } else break; if (!state.counter) state.counter = notes_count; fclose(file); state.alarm.time = -1; state.alarm.note = -1; time_next_alarm(); } s_unblock(); return pid; } /* * loads theme from */ void load_theme(const char *filename) { #ifdef LOW_COLOR if (strlen(filename)) WARN("Skipped loading the configured theme since themes aren't\nsupported" "at low color depths."); #else int coords[4], eof = 0, i; char s[STRING_BUF_SIZE], *t, *p, *q; struct stat buf; FILE *file; if (!strlen(filename)) return; file = fopen(filename, "r"); if (!file) { WARN("Failed to open theme file; check whether the location you specified\n" "is valid. Reverting to default."); return; } if (!fgets(s, sizeof(s), file) || strncmp(s, "WMPBtheme", 9)) { fclose(file); WARN("Configured theme file is corrupted! Reverting to default."); return; } /* we'll need at most bytes to buffer the XPM data read from it */ lstat(filename, &buf); if (!(t = malloc(buf.st_size))) { fclose(file); WARN("Skipped loading configured theme due to memory shortage."); return; } /* parse theme headers... */ if (s[strlen(s)-1] == '\n') s[strlen(s)-1] = '\0'; memset(s, ' ', 9); /* kludge */ do { if ((p = strchr(s, '#'))) *p = '\0'; /* # comments */ p = s; while (*p) { for (; *p == ' ' || *p == '\t'; p++); for (q = p; isalpha(*q); q++); if (q > p) { if (!strncasecmp(p, "label", q-p)) { for (p = q; *p == ' ' || *p == '\t'; p++); if (*p == '=') { for (p++; *p == ' ' || *p == '\t'; p++); for (i = 0; *p && i < 4; i++) { coords[i] = (int) strtol(p, &p, 10); for (; *p && (*p < '0' || *p > '9'); p++); } q = p; if (i >= 4) if ( coords[0] < 0 || coords[0] > 51 || coords[2] < 0 || coords[2] > 51 || coords[1] < 0 || coords[1] > 59 || coords[3] < 0 || coords[3] > 59 || coords[0] >= coords[2] || coords[1] >= coords[3]) { WARN("Theme header `label' followed by coordinates outside the" "\nallowed range--ignored."); } else { if ((coords[2]-coords[0])*(coords[3]-coords[1]) >= 16) memcpy(&label_coords, &coords, sizeof(coords)); else WARN("Label Label area defined by the configured theme's " "headers is too small--ignored."); } else WARN("Theme header `label' followed by improper specification--" "ignored."); } else { WARN("Theme header `label' lacks specification."); q = p; } } else fprintf(stderr, "Warning: Invalid header field in theme: `%s'.\n", p); } for (p = q; *p && *p != ' ' && *p != '\t'; p++); } eof = !fgets(s, sizeof(s), file); if (strlen(s) && s[strlen(s)-1] == '\n') s[strlen(s)-1] = '\0'; } while (!eof && strlen(s)); /* now read all pixmap data sections from the remainder of the file... */ while (!eof) { Pixmap pic; XpmAttributes attr; attr.valuemask = XpmExactColors | XpmCloseness; attr.exactColors = False; attr.closeness = 65536; for (p = t; !(eof = !fgets(s, sizeof(s), file)) && strlen(s) && *s != '\n';) { strcpy(p, s); p += strlen(s); } if (!strstr(t, "char")) continue; /* silently ignore garbage */ if (XpmCreatePixmapFromBuffer(display, RootWindow(display, DefaultScreen(display)), t, &pic, 0, &attr) == XpmSuccess) { if (attr.width == 52 && attr.height == 60) /* board pixmap */ XGetSubImage(display, pic, 0, 0, 52, 60, ~0, ZPixmap, img, 6, 2); else if (attr.width == 58 && attr.height == 30) /* bbar pixmap */ XCopyArea(display, pic, bbar, normalGC, 0, 0, 58, 30, 0, 0); else if (attr.width == 58 && attr.height == 28) /* abar pixmap */ XCopyArea(display, pic, abar, normalGC, 0, 0, 58, 28, 0, 0); else if (attr.width == 60 && attr.height == 9) /* abar digits */ XCopyArea(display, pic, digits, normalGC, 0, 0, 60, 9, 0, 0); else /* invalid pixmap */ WARN("Configured theme contains pixmap of invalid dimensions--" "ignored."); XFreePixmap(display, pic); } else WARN("Encountered invalid pixmap data in configured theme--ignored."); } free(t); #endif } /* * tries to exit properly */ void done(void) { if (normalGC) XFreeGC(display, normalGC); if (fontGC) XFreeGC(display, fontGC); if (fillGC) XFreeGC(display, fillGC); #ifdef CREASES if (creaseGC) XFreeGC(display, creaseGC); #endif if (font) XFreeFont(display, font); if (app != None) XFreePixmap(display, app); if (bbar != None) XFreePixmap(display, bbar); if (abar != None) XFreePixmap(display, abar); if (digits != None) XFreePixmap(display, digits); if (state.alarm.buffer != None) XFreePixmap(display, state.alarm.buffer); if (img) XDestroyImage(img); XCloseDisplay(display); if (opts.display) free(opts.display); } /* * handler for caught signals */ void handle_sigs(int sig) { /* note: the kludges below will result in the application being terminated if the applet was destroyed via the respective WM option but not yet terminated (apparently WM just destroys the window in this case) */ XWindowAttributes attr; const char *s = 0; s_block(); switch (sig) { case SIGALRM: /* used in animation timing */ state.alarmed = 1; break; case SIGUSR1: XGetWindowAttributes(display, win, &attr); /* kludge */ /* quit edit mode w/saving; if not in edit mode, just save */ if (state.mode == M_MOVE) set_mode(M_NOOP); if (state.mode != M_NOOP) quit_edit_mode(0, 1); /* saves */ else notes_io(1); break; case SIGUSR2: XGetWindowAttributes(display, win, &attr); /* kludge */ /* quit edit mode w/o saving... */ if (state.mode != M_NOOP && state.mode != M_MOVE) quit_edit_mode(0, 0); notes_io(0); /* reread data */ notes_io(1); /* rewrite data file */ render_pinboard(-1); redraw_window(); break; case SIGINT: s = "SIGINT"; case SIGTERM: if (!s) s = "SIGTERM"; fprintf(stderr, "Caught %s. Trying to exit cleanly...\n", s); if (state.mode != M_NOOP) { if (note_empty(state.cur_note)) remove_note(state.cur_note); notes_io(1); } exit(EXIT_SUCCESS); } s_unblock(); } /* * initializes the application's X window, installs a signal handler */ void init(void) { struct sigaction sigact; XWMHints wmhints; XSizeHints shints; Atom atom; XTextProperty name; XGCValues gcv; unsigned long gcm; int screen; /* set up syncsig_set */ sigemptyset(&sync_sig_set); sigaddset(&sync_sig_set, SIGUSR1); sigaddset(&sync_sig_set, SIGUSR2); /* install signal handler */ sigact.sa_handler = handle_sigs; sigemptyset(&sigact.sa_mask); sigact.sa_flags = 0; if (sigaction(SIGALRM, &sigact, 0) < 0 || sigaction(SIGUSR1, &sigact, 0) < 0 || sigaction(SIGUSR2, &sigact, 0) < 0 || sigaction(SIGINT, &sigact, 0) < 0 || sigaction(SIGTERM, &sigact, 0) < 0) { die("Unable to install signal handlers."); } if (!(display = XOpenDisplay(opts.display))) { fprintf(stderr, "Fatal error: Can't open display `%s'.\n", XDisplayName(opts.display)); exit(EXIT_FAILURE); } /* try to set up done() to be called upon exit() */ if (atexit(done)) die("Failed to set up exit procedure."); screen = DefaultScreen(display); atom = XInternAtom(display, "WM_DELETE_WINDOW", 0); if (atom == None) die("No window manager running."); /* try to autodetect whether we're running Window Maker... */ if (opts.window_state < 0) /* no window state explicitly specified */ opts.window_state = XInternAtom(display, "_WINDOWMAKER_WM_FUNCTION", 1) != None ? WithdrawnState : NormalState; mainwin = create_win(); wmhints.window_group = mainwin; wmhints.initial_state = opts.window_state; wmhints.flags = StateHint | WindowGroupHint | IconWindowHint; if (opts.animate) wmhints.flags |= XUrgencyHint; /* of any use at all? */ if (opts.window_state == WithdrawnState) { iconwin = create_win(); wmhints.icon_window = iconwin; win = iconwin; } else { wmhints.icon_window = None; win = mainwin; } XSetWMHints(display, mainwin, &wmhints); XSetWMProtocols(display, mainwin, &atom, 1); shints.min_width = 64; shints.min_height = 64; shints.max_width = 64; shints.max_height = 64; shints.x = 0; shints.y = 0; shints.flags = PMinSize | PMaxSize | USPosition; XSetWMNormalHints(display, mainwin, &shints); XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask | KeyPressMask | EnterWindowMask | LeaveWindowMask | FocusChangeMask); if (!XStringListToTextProperty(&opts.name, 1, &name)) die("Can't allocate window name."); XSetWMName(display, mainwin, &name); set_mask(1); app = get_xpm((char**) pinboard_xpm); XMapSubwindows(display, win); gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = WhitePixel(display, screen); gcv.background = BlackPixel(display, screen); gcv.graphics_exposures = 0; normalGC = XCreateGC(display, RootWindow(display, screen), gcm, &gcv); } /* * tries to load font name, dies upon an error if is true */ int try_font(const char *name, int fatal) { if (font) return 1; if (!name || !*name) return 0; font = XLoadQueryFont(display, name); if (font) { if (font->max_bounds.rbearing - font->min_bounds.lbearing > 7 || font->max_bounds.ascent + font->max_bounds.descent > 10) { fprintf(stderr, "Warning: The font `%s'\n" "lacks a fixed character cell size of 6x10.\n", name); XFreeFont(display, font); font = 0; } else { if (!notes_count) strncpy(opts.font, name, sizeof(opts.font)); return 1; } } else fprintf(stderr, "Warning: The font `%s' doesn't exist.\n", name); if (fatal) die("No alternatives left, aborting."); else fprintf(stderr, "Trying to revert...\n"); return 0; } /* * loads the font to be used */ void load_font(void) { XGCValues gcv; unsigned long gcm; try_font(opts.font, 0); try_font(default_font, 1); gcm = GCForeground | GCBackground | GCFillStyle | GCLineStyle | GCFont | GCGraphicsExposures; gcv.foreground = C_OUTER; gcv.background = C_INNER; gcv.font = font->fid; gcv.fill_style = FillSolid; gcv.line_style = LineSolid; gcv.graphics_exposures = 0; fontGC = XCreateGC(display, app, gcm, &gcv); #ifdef CREASES gcm ^= GCBackground | GCFont; creaseGC = XCreateGC(display, app, gcm, &gcv); #endif } /* * (un)sets the keyboard input focus to wmpinboard's window */ void set_kbfocus(int get_it) { if (get_it) XSetInputFocus(display, win, RevertToPointerRoot, CurrentTime); else if (!opts.click_to_focus) XSetInputFocus(display, PointerRoot, RevertToNone, CurrentTime); } /* * takes an action as specified by (for command-line options affection * notes rather than interactive behavior) */ void action(actions type, const void *data) { const char *s; int pid, running; int i, j, k; FILE *file; pid = notes_io(0); running = flush_instance(pid); if (running) pid = notes_io(0); switch (type) { case C_FONT: if (running) die("Can't change font while another instance is running."); if (notes_count) die("Can't change font if the pinboard isn't empty."); for (i = 0; i < NUM_FONTS; i++) if (!strcasecmp(data, fonts[i].name)) { strcpy(opts.font, fonts[i].font); break; } if (i >= NUM_FONTS) { /* not a predefined font */ if (strlen(data) >= sizeof(opts.font)) { /* avoid trouble when retrieving saved data... */ fprintf(stderr, "Fatal error: Specified font descriptor exceeds " "buffer size of %d bytes.\n", sizeof(opts.font)); exit(EXIT_FAILURE); } strcpy(opts.font, data); } notes_io(1); fprintf(stderr, "Successfully changed the font.\n"); break; case C_THEME: if (running) die("Can't change theme while another instance is running."); if (!strlen(data) || !strcasecmp(data, "default")) { opts.theme[0] = '\0'; fprintf(stderr, "Reverted to default theme.\n"); } else { if (strlen(data) >= sizeof(opts.theme)) { fprintf(stderr, "Fatal error: Specified theme file location exceeds " "buffer size of %d bytes.\n", sizeof(opts.theme)); exit(EXIT_FAILURE); } strcpy(opts.theme, data); if (!(file = fopen(opts.theme, "r"))) WARN("Can't open specified theme file."); else fclose(file); fprintf(stderr, "Successfully configured for specified theme.\n"); } notes_io(1); break; case C_ALARM_CMD: if (!strlen(data)) { opts.alarm_cmd[0] = '\0'; fprintf(stderr, "Disabled alarm command.\n"); } else { if (strlen(data) >= sizeof(opts.alarm_cmd)) { fprintf(stderr, "Fatal error: Specified theme file location exceeds " "buffer size of %d bytes.\n", sizeof(opts.alarm_cmd)); exit(EXIT_FAILURE); } strcpy(opts.alarm_cmd, data); fprintf(stderr, "Successfully configured specified alarm command.\n"); } notes_io(1); if (running) { kill(pid, SIGUSR2); sleep(1); /* don't return to the prompt too quickly... */ } break; case A_DUMP: dump_notes(1); break; case A_DUMP_RAW: dump_notes(0); break; #ifdef CREASES case A_IRON: for (i = 0; i < notes_count; memset(ndata[i++].creases, 0, 32)); notes_io(1); if (running) { kill(pid, SIGUSR2); sleep(1); /* don't return to the prompt too quickly... */ } fprintf(stderr, "Hey, ironing isn't part of my job contract, you know...\n"); break; #endif case A_DEL: i = (int) strtol((const char*) data, 0, 10); if (i < 0 || i >= notes_count) die("Specified note doesn't exist."); remove_note(i); notes_io(1); if (running) { kill(pid, SIGUSR2); sleep(1); /* don't return to the prompt too quickly... */ } fprintf(stderr, "Deleted note #%d.\n", i); break; case A_ADD: case A_ADD_RAW: if ((k = add_note()) < 0) die("Maximal number of notes reached."); s = (const char*) data; while (*s == '%') { if (!strncmp("%%", s, 2)) s++; else if (strlen(s) >= 2 && *s == '%') { /* color/position code given */ if (isalpha(s[1])) { /* color code? */ i = 0; switch (toupper(s[1])) { case 'G': i = 0; break; case 'Y': i = 1; break; case 'R': i = 2; break; case 'B': i = 3; break; default: die("Unknown color code."); } while (c_group[ndata[k].col] != i) ndata[k].col = rand() % C_NUM; } if (!isalpha(s[1])) { /* position code? */ i = s[1] - '0'; if (!i--) die("Invalid position code."); ndata[k].x = 6+i%3*12 + rand()%12; ndata[k].y = 3+(2-i/3)*14 + rand()%14; } s += 2; } } if (!strlen(s)) die("Won't add blank note."); i = paste_string(k, 0, s, type == A_ADD_RAW); ndata[k].cursor = i > 58 ? 58 : i; notes_io(1); if (running) { kill(pid, SIGUSR2); sleep(1); /* don't return to the prompt too quickly... */ } fprintf(stderr, "Added note #%d.\n", k); break; case A_EXPORT: k = strtol((const char*) data, 0, 10); if (k < 0 || k > notes_count-1) die("Specified note doesn't exist."); puts("static const char sketch[512] = {"); for (i = 0; i < 64; i++) { printf(" "); for (j = 0; j < 8; j++) { if (j) printf(", "); printf("0x%02x", (unsigned char) ndata[k].sketch[i*8+j]); } if (i < 63) printf(","); printf("\n"); } puts("};"); break; case M_INFO: for (i = 0, k = 0; i < notes_count; i++) if (ndata[i].a_flags & ALARM_ON) k++; printf("user configuration:\n" " - font: %s\n" " - theme: %s\n" " - alarm command: %s\n", strlen(opts.font) ? opts.font : fonts[0].font, strlen(opts.theme) ? opts.theme : "[default]", strlen(opts.alarm_cmd) ? opts.alarm_cmd : "[none]"); printf("\nuseless statistics:\n" " - wmpinboard has saved you (at least) %d real note%s so far\n" " - there %s currently %d note%s on your board\n" " - %d note%s\n", state.counter, (state.counter != 1 ? "s" : ""), (notes_count != 1 ? "are" : "is"), notes_count, (notes_count != 1 ? "s" : ""), k, (k != 1 ? "s have alarms set" : " has an alarm set")); } exit(EXIT_SUCCESS); } /* * prints a help screen and exits */ void help(void) { int i; printf("wmpinboard v" VERSION "\n\n" "Copyright (C) 1998-2000 by Marco G\"otze, .\n" "This program is distributed under the terms of the GNU GPL2.\n\n" "usage: %s [options]\n\n" "configuration directives (see the documentation for detailed information):\n" " --font=FONT use the specified font; FONT can be one of the\n" " following:\n", opts.name); for (i = 0; i < NUM_FONTS; i++) printf(" %-8s %s\n", fonts[i].name, fonts[i].desc); printf( " or a complete X descriptor of a fixed size 6x10\n" " font\n" " --theme=FILE use the specified theme rather than the default\n" " board/panel images (\"default\" or zero-length\n" " string reverts to default)\n" " --alarm-cmd=CMD execute the specified command on alarms\n" " (\"\" disables)\n\n" "run-time options:\n" " -d DISP, --display=DISP use the specified X display\n" " -n, --normal-state force NormalState (AS Wharf) \\ mutually\n" " -w, --withdrawn-state force WithdrawnState (WM dock) / exclusive\n" " -t TIME, --timeout=TIME set edit mode timeout to TIME seconds\n" " (default %ds, 0 disables)\n" " -c, --click-to-focus emulate click-based keyboard focus\n" " --light no animations\n\n" "command-line actions:\n" " --dump dump the contents of all notes\n" " --dump-raw dump the *raw* contents of all notes\n" " --del=NUMBER delete note NUMBER (as identified by a dump)\n" " --add=STRING add a note with STRING as its contents, trying\n" " to word-wrap the text\n" " --add-raw=STRING add a note with STRING as its *raw* contents\n\n" "general options:\n" " -h, --help print this help\n" " -i, --info print user configuration and statistical\n" " information\n" " -v, --version print some more detailed version information\n\n" "See the wmpinboard(1) man page for more information, hints, and explanations.\n" "For themes and updates, check out the program's home page at\n" ".\n", TIMEOUT); exit(EXIT_FAILURE); } /* * parses the list of command line arguments and initializes the application's * opts structure accordingly; handles non-interactive actions, and eventually * reads in the data file if the instance is to be run in interactive mode */ void parse_argv(int argc, char **argv) { static const struct option long_opts[] = { { "font", required_argument, 0, 'f' }, { "theme", required_argument, 0, 'p' }, { "alarm-cmd", required_argument, 0, 'r' }, { "display", required_argument, 0, 'd' }, { "normal-state", no_argument, 0, 'n' }, { "withdrawn-state", no_argument, 0, 'w' }, { "time", required_argument, 0, 't' }, { "click-to-focus", no_argument, 0, 'c' }, { "light", no_argument, 0, 'l' }, { "dump", no_argument, 0, 'u' }, { "dump-raw", no_argument, 0, 'y' }, { "del", required_argument, 0, 'e' }, { "add", required_argument, 0, 'a' }, { "add-raw", required_argument, 0, 'b' }, #ifdef CREASES { "iron", no_argument, 0, 'z' }, #endif { "export-sketch", required_argument, 0, 'x' }, { "help", no_argument, 0, 'h' }, { "info", no_argument, 0, 'i' }, { "version", no_argument, 0, 'v' }, { 0, 0, 0, 0 } }; static const char short_opts[] = "d:nwt:chiv"; if (rindex(argv[0], '/')) opts.name = (char*) rindex(argv[0], '/') + 1; else opts.name = argv[0]; for(;;) { int idx = 0, c; if ((c = getopt_long(argc, argv, short_opts, long_opts, &idx)) == -1) break; switch (c) { case 'f': action(C_FONT, optarg); case 'p': action(C_THEME, optarg); case 'r': action(C_ALARM_CMD, optarg); case 'd': /* display */ if (opts.display) free(opts.display); opts.display = smalloc(strlen(optarg)+1); strcpy(opts.display, optarg); break; case 'n': /* NormalState */ opts.window_state = NormalState; break; case 'w': /* WithdrawnState */ opts.window_state = WithdrawnState; break; case 't': /* timeout */ opts.timeout = strtol(optarg, 0, 10); if (opts.timeout < 0) opts.timeout = -opts.timeout; break; case 'c': /* click-to-focus emulation */ opts.click_to_focus = 1; break; case 'l': /* light (no animations) */ opts.animate = 0; break; case 'u': action(A_DUMP, 0); case 'y': action(A_DUMP_RAW, 0); case 'e': action(A_DEL, optarg); case 'a': action(A_ADD, optarg); case 'b': action(A_ADD_RAW, optarg); #ifdef CREASES case 'z': action(A_IRON, 0); #endif case 'x': action(A_EXPORT, optarg); case 'h': help(); case 'i': action(M_INFO, 0); case 'v': printf("wmpinboard v" VERSION "\n\ncompile-time configuration:\n" " - maximal number of notes is %d\n" #if TIMEOUT == 0 " - edit mode timeout is disabled by default\n" #else " - default edit mode timeout is %d seconds\n" #endif " - wear & tear of notes (creases) is " #ifdef CREASES "enabled\n" #else "disabled\n" #endif #ifndef FUNSTUFF " - FUNSTUFF is disabled :-/\n" #endif , MAX_NOTES #if TIMEOUT != 0 , TIMEOUT #endif ); exit(EXIT_SUCCESS); default : exit(EXIT_FAILURE); } } if (optind < argc) help(); /* exits */ if (flush_instance(notes_io(0))) die("Another interactive instance is running."); } /* * draws a text cursor at character (block cursor if is true) * _without_ updating the display */ void draw_cursor(int pos, int block) { unsigned long c = palette[ndata[state.cur_note].col].fg; unsigned long d = palette[ndata[state.cur_note].col].bg; int i, j; XGetSubImage(display, app, 2+6*(pos%10), 2+10*(pos/10), 6, 10, ~0, ZPixmap, img, 64, 54); for (i = 64; i < 70; i++) for (j = 63; j > (block ? 53 : 62); j--) XPutPixel(img, i, j, XGetPixel(img, i, j) == c ? d : c); XPutImage(display, app, normalGC, img, 64, 54, 2+6*(pos%10), 2+10*(pos/10), 6, 10); } /* * in edit mode, moves the cursor to a new position and updates the display * if has a true value */ void set_cursor(int new_pos, int update) { int in_sel = 0; if (new_pos > 58) return; in_sel = (state.sel_from >= 0 && state.sel_to >= 0 && ((state.sel_from <= new_pos && new_pos < state.sel_to) || (state.sel_to <= new_pos && new_pos < state.sel_from))); if (!in_sel || state.insert) print_letter(state.cur_note, ndata[state.cur_note].cursor, 1); draw_cursor(ndata[state.cur_note].cursor = new_pos, !in_sel && state.insert); if (update) redraw_window(); } /* * selects text in the character range state.sel_from.., previously * unselecting that between state.sel_from..state.sel_to */ void sel_text(int to) { int i, t; if (to == state.sel_to) return; if (state.sel_to >= 0) { i = state.sel_from < state.sel_to ? state.sel_from : state.sel_to; t = state.sel_from < state.sel_to ? state.sel_to : state.sel_from; for (; i < t; i++) print_letter(state.cur_note, i, 1); } print_letter(state.cur_note, ndata[state.cur_note].cursor, 1); i = state.sel_from < to ? state.sel_from : to; t = state.sel_from < to ? to : state.sel_from; for (; i < t; i++) draw_cursor(i, 1); state.sel_to = to; set_cursor(ndata[state.cur_note].cursor, 1); } /* * clears the selection if in edit mode and text is selected */ void clear_selection() { if (state.mode == M_EDIT && state.sel_from >= 0) { state.sel_from = state.sel_to = -1; init_edit_mode(state.cur_note); set_cursor(ndata[state.cur_note].cursor, 1); } } /* * in sketch mode, draws a pixel at (x, y) */ void draw_pixel(int x, int y) { if (!x || !y || x > 62 || y > 62 || x+y >= 115) return; XDrawPoint(display, win, state.sketchGC, x, y); /* actual drawing */ if (state.mode == M_DRAW) /* save bits */ ndata[state.cur_note].sketch[x/8 + y*8] |= 1<<(x%8); else ndata[state.cur_note].sketch[x/8 + y*8] &= ~(1<<(x%8)); } /* * sets the internal mode indicator and installs a corresponding mouse cursor */ void set_mode(modes new) { switch (state.mode = new) { case M_MOVE: XDefineCursor(display, win, cursors[state.cur_note >= 0 ? 0 : 1]); break; case M_DRAW: case M_ERAS: XDefineCursor(display, win, cursors[2]); break; case M_EDIT: state.selecting = 0; state.sel_from = state.sel_to = -1; if (!opts.click_to_focus) set_kbfocus(1); default: XUndefineCursor(display, win); } } /* * returns from M_EDIT, M_DRAW, M_ERAS, or M_BBAR to M_NOOP; destroys the * current note if empty or is true */ void quit_edit_mode(int destroy, int save) { if (state.mode == M_BBAR) { if (ndata[state.cur_note].a_flags & ALARM_ON) animate_abar(0); animate_bbar(0); } if (destroy || (state.cur_note >= 0 && note_empty(state.cur_note))) { remove_note(state.cur_note); destroy = 1; } animate_note(destroy ? 6 : 5); set_mode(M_NOOP); if (save) notes_io(1); /* should be last when called from signal handler */ time_next_alarm(); } /* * sets a timer expiring every microseconds */ void timer(unsigned int intv) { #ifndef __GLIBC__ struct itimerval val = { { 0, intv }, { 0, intv } }; setitimer(ITIMER_REAL, &val, 0); #else ualarm(intv, intv); #endif } /* * adds some eyecandy to the popping-up of the button bar (slides in if * is true, otherwise, out) */ void animate_bbar(int in) { int y; init_edit_mode(state.cur_note); set_cursor(ndata[state.cur_note].cursor, 0); if (in) { /* slide in */ if (opts.animate) { redraw_window(); timer(PANEL_ANI_INT); for (y = 27; y >= 0; y -= 3) { state.alarmed = 0; XCopyArea(display, bbar, win, normalGC, 0, 0, 58, 30-y, 3, 34+y); flush_expose(); while (!state.alarmed); } alarm(0); XCopyArea(display, bbar, win, normalGC, 0, 0, 58, 30, 3, 31); XCopyArea(display, app, win, normalGC, 3, 61, 58, 3, 3, 61); flush_expose(); /* for future refreshes... */ XCopyArea(display, bbar, app, normalGC, 0, 0, 58, 30, 3, 31); } else { /* no animation */ XCopyArea(display, bbar, app, normalGC, 0, 0, 58, 30, 3, 31); redraw_window(); } } else { /* slide out */ if (opts.animate) { timer(PANEL_ANI_INT); for (y = 31; y <= 58; y += 3) { state.alarmed = 0; XCopyArea(display, app, win, normalGC, 3, y, 58, 3, 3, y); XCopyArea(display, bbar, win, normalGC, 0, 0, 58, 61-y, 3, y+3); flush_expose(); while (!state.alarmed); } alarm(0); XCopyArea(display, app, win, normalGC, 3, 61, 58, 3, 3, 61); flush_expose(); } else /* no animation */ redraw_window(); } } /* * like animate_bbar, but for abar (to be called when bbar is already visible) */ void animate_abar(int in) { int y; if (in) { /* slide in */ explode_time(state.cur_note); render_abar(state.cur_note); if (opts.animate) { redraw_window(); timer(PANEL_ANI_INT); for (y = 28; y >= 3; y -= 3) { state.alarmed = 0; XCopyArea(display, abar, win, normalGC, 0, 0, 58, 31-y, 3, y); flush_expose(); while (!state.alarmed); } alarm(0); XCopyArea(display, abar, win, normalGC, 0, 0, 58, 28, 3, 4); flush_expose(); /* for future refreshes... */ XCopyArea(display, abar, app, normalGC, 0, 0, 58, 28, 3, 4); } else { /* no animation */ XCopyArea(display, abar, app, normalGC, 0, 0, 58, 28, 3, 4); redraw_window(); } } else { /* slide out */ implode_time(state.cur_note); /* render app as note plus bbar */ init_edit_mode(state.cur_note); set_cursor(ndata[state.cur_note].cursor, 0); XCopyArea(display, win, app, normalGC, 3, 31, 58, 30, 3, 31); if (opts.animate) { timer(PANEL_ANI_INT); for (y = 4; y <= 25; y += 3) { state.alarmed = 0; XCopyArea(display, app, win, normalGC, 3, y, 58, 3, 3, y); XCopyArea(display, abar, win, normalGC, 0, 0, 58, 28-y, 3, y+3); flush_expose(); while (!state.alarmed); } alarm(0); XCopyArea(display, app, win, normalGC, 3, 28, 58, 3, 3, 28); flush_expose(); } else /* no animation */ redraw_window(); } } /* * animates the switching between two notes (replaces what's currently * being displayed by state.cur_note), in a way specified by