annotate oldXMenu/FindPane.c @ 26114:c19849fe02b5

Doc fix, duplex and setpagedevice configuration. (ps-print-version): New version number (4.2). (ps-spool-config, ps-spool-tumble): New vars. (ps-print-prologue-1): Changed to defconst, adjust PostScript programming, new PostScript procedure to handle errors. (ps-print-prologue-2): Changed to defconst. (ps-print-duplex-feature): New const: duplex and tumble setting. (ps-setup, ps-begin-file): Fix funs. (ps-boolean-capitalized): New fun. Doc fix, n-up printing. (ps-print-version): New version number (5.0). (ps-page-dimensions-database): Added document media. (ps-n-up-printing, ps-n-up-margin, ps-n-up-border-p, ps-n-up-filling) (ps-page-order, ps-printing-region-p): New vars. (ps-n-up-printing, ps-n-up-filling, ps-header-sheet, ps-end-job): New funs. (ps-page-dimensions-get-media, ps-n-up-landscape, ps-n-up-lines) (ps-n-up-columns, ps-n-up-missing, ps-n-up-xcolumn, ps-n-up-ycolumn) (ps-n-up-xline, ps-n-up-yline, ps-n-up-repeat, ps-n-up-end) (ps-n-up-xstart, ps-n-up-ystart): New macros. (ps-print-begin-sheet-hook): New hook. (ps-boundingbox-re, ps-n-up-database, ps-n-up-filling-database): New const. (ps-setup, ps-begin-file, ps-get-buffer-name, ps-begin-job) (ps-end-file, ps-dummy-page, ps-generate): Fix funs. (ps-print-prologue-1): Adjust PostScript programming for n-up printing. (ps-count-lines): Changed to defun. (ps-header-page): Changed to defsubst, fix fun. (ps-printing-region): Doc fix, adjust programming code. (ps-output-boolean, ps-background-pages, ps-background-text) (ps-background-image, ps-background, ps-get-boundingbox): Adjust programming code. Doc fix, better customization. (ps-print-region-function, ps-number-of-columns, ps-spool-tumble) (ps-print-color-p, ps-printing-region-p, ps-n-up-database) (ps-end-file): Doc fix. (ps-setup, ps-begin-file): Fun fix. (postscript): New group. (ps-zebra-gray, ps-banner-page-when-duplexing): New vars. (ps-print-prologue-1): Adjust PostScript programming. (ps-print): Adjust group hierarchy. (ps-print-n-up, ps-print-zebra, ps-print-background, ps-print-printer) (ps-print-page): New subgroups. (ps-print-prologue-header, ps-printer-name, ps-lpr-command) (ps-lpr-switches, ps-page-dimensions-database, ps-paper-type) (ps-landscape-mode, ps-print-control-characters, ps-n-up-printing) (ps-n-up-margin, ps-n-up-border-p, ps-n-up-filling, ps-zebra-stripes) (ps-zebra-stripe-height, ps-print-background-image) (ps-print-background-text, ps-spool-config): Adjust customization. (dos-ps-printer): Definition eliminated.
author Kenichi Handa <handa@m17n.org>
date Wed, 20 Oct 1999 01:06:27 +0000
parents bbce331da1be
children 23a1cea22d13
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
1 #include "copyright.h"
Dave Love <fx@gnu.org>
parents:
diff changeset
2
Dave Love <fx@gnu.org>
parents:
diff changeset
3 /* $Header: /u/src/emacs/19.0/oldXMenu/RCS/FindPane.c,v 1.1 1992/04/11 22:10:19 jimb Exp $ */
Dave Love <fx@gnu.org>
parents:
diff changeset
4 /* Copyright Massachusetts Institute of Technology 1985 */
Dave Love <fx@gnu.org>
parents:
diff changeset
5
Dave Love <fx@gnu.org>
parents:
diff changeset
6 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
7 * XMenu: MIT Project Athena, X Window system menu package
Dave Love <fx@gnu.org>
parents:
diff changeset
8 *
Dave Love <fx@gnu.org>
parents:
diff changeset
9 * XMenuFindPane - Find the first menu pane who's label matches a
Dave Love <fx@gnu.org>
parents:
diff changeset
10 * particular string.
Dave Love <fx@gnu.org>
parents:
diff changeset
11 *
Dave Love <fx@gnu.org>
parents:
diff changeset
12 * Author: Tony Della Fera, DEC
Dave Love <fx@gnu.org>
parents:
diff changeset
13 * January 22, 1986
Dave Love <fx@gnu.org>
parents:
diff changeset
14 *
Dave Love <fx@gnu.org>
parents:
diff changeset
15 */
Dave Love <fx@gnu.org>
parents:
diff changeset
16
Dave Love <fx@gnu.org>
parents:
diff changeset
17 #include "XMenuInt.h"
Dave Love <fx@gnu.org>
parents:
diff changeset
18
Dave Love <fx@gnu.org>
parents:
diff changeset
19 int
Dave Love <fx@gnu.org>
parents:
diff changeset
20 XMenuFindPane(menu, label)
Dave Love <fx@gnu.org>
parents:
diff changeset
21 register XMenu *menu;
Dave Love <fx@gnu.org>
parents:
diff changeset
22 register char *label;
Dave Love <fx@gnu.org>
parents:
diff changeset
23 {
Dave Love <fx@gnu.org>
parents:
diff changeset
24 register XMPane *p_ptr;
Dave Love <fx@gnu.org>
parents:
diff changeset
25 register int i = 0;
Dave Love <fx@gnu.org>
parents:
diff changeset
26
Dave Love <fx@gnu.org>
parents:
diff changeset
27 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
28 * Check for NULL pointers!
Dave Love <fx@gnu.org>
parents:
diff changeset
29 */
Dave Love <fx@gnu.org>
parents:
diff changeset
30 if (label == NULL) {
Dave Love <fx@gnu.org>
parents:
diff changeset
31 _XMErrorCode = XME_ARG_BOUNDS;
Dave Love <fx@gnu.org>
parents:
diff changeset
32 return(XM_FAILURE);
Dave Love <fx@gnu.org>
parents:
diff changeset
33 }
Dave Love <fx@gnu.org>
parents:
diff changeset
34
Dave Love <fx@gnu.org>
parents:
diff changeset
35 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
36 * Find the pane who's label matches the given label.
Dave Love <fx@gnu.org>
parents:
diff changeset
37 */
Dave Love <fx@gnu.org>
parents:
diff changeset
38 for (
Dave Love <fx@gnu.org>
parents:
diff changeset
39 p_ptr = menu->p_list->next;
Dave Love <fx@gnu.org>
parents:
diff changeset
40 p_ptr != menu->p_list;
Dave Love <fx@gnu.org>
parents:
diff changeset
41 p_ptr = p_ptr->next
Dave Love <fx@gnu.org>
parents:
diff changeset
42 ){
Dave Love <fx@gnu.org>
parents:
diff changeset
43 if (p_ptr->label_length == 0) {
Dave Love <fx@gnu.org>
parents:
diff changeset
44 if (*label == '\0') {
Dave Love <fx@gnu.org>
parents:
diff changeset
45 _XMErrorCode = XME_NO_ERROR;
Dave Love <fx@gnu.org>
parents:
diff changeset
46 return (i);
Dave Love <fx@gnu.org>
parents:
diff changeset
47 }
Dave Love <fx@gnu.org>
parents:
diff changeset
48 }
Dave Love <fx@gnu.org>
parents:
diff changeset
49 else {
Dave Love <fx@gnu.org>
parents:
diff changeset
50 if (strncmp (label, p_ptr->label, p_ptr->label_length) == 0) {
Dave Love <fx@gnu.org>
parents:
diff changeset
51 _XMErrorCode = XME_NO_ERROR;
Dave Love <fx@gnu.org>
parents:
diff changeset
52 return (i);
Dave Love <fx@gnu.org>
parents:
diff changeset
53 }
Dave Love <fx@gnu.org>
parents:
diff changeset
54 }
Dave Love <fx@gnu.org>
parents:
diff changeset
55 i++;
Dave Love <fx@gnu.org>
parents:
diff changeset
56 }
Dave Love <fx@gnu.org>
parents:
diff changeset
57
Dave Love <fx@gnu.org>
parents:
diff changeset
58 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
59 * If we get here then we have not found
Dave Love <fx@gnu.org>
parents:
diff changeset
60 * a match.
Dave Love <fx@gnu.org>
parents:
diff changeset
61 */
Dave Love <fx@gnu.org>
parents:
diff changeset
62 _XMErrorCode = XME_P_NOT_FOUND;
Dave Love <fx@gnu.org>
parents:
diff changeset
63 return (XM_FAILURE);
Dave Love <fx@gnu.org>
parents:
diff changeset
64 }