Mercurial > hg > xemacs-beta
comparison src/sunpro.c @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | 0293115a14e9 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 /* Sunpro-specific routines. | |
2 | |
3 Copyright (C) 1994 Sun Microsystems, Inc. | |
4 | |
5 This file is part of XEmacs. | |
6 | |
7 XEmacs is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 2, or (at your option) any | |
10 later version. | |
11 | |
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with XEmacs; see the file COPYING. If not, write to | |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | |
22 /* Synched up with: Not in FSF. */ | |
23 | |
24 #include <config.h> | |
25 #include "lisp.h" | |
26 | |
27 /* #### | |
28 | |
29 The following junk used to be in lisp/prim/files.el. It obviously | |
30 doesn't belong there, but should go somewhere. | |
31 | |
32 (if (fboundp 'ut-log-text) ;; #### Sun stuff; what is this? | |
33 (ut-log-text "Reading a file.")) | |
34 */ | |
35 | |
36 /* Whether usage tracking is turned on (Sun only) */ | |
37 Lisp_Object Vusage_tracking; | |
38 #ifdef USAGE_TRACKING | |
39 #include <ut.h> | |
40 #endif | |
41 | |
42 DEFUN ("ut-log-text", | |
43 Fut_log_text, | |
44 Sut_log_text, | |
45 1, MANY, 0 /* | |
46 Log a usage-tracking message if `usage-tracking' is non-nil. | |
47 Args are the same as to `format'. Returns whether the message was | |
48 actually logged. If usage-tracking support was not compiled in, this | |
49 function has no effect and always returns `nil'. See function | |
50 `has-usage-tracking-p'. | |
51 */ ) | |
52 (nargs, args) | |
53 int nargs; | |
54 Lisp_Object *args; | |
55 { | |
56 #ifdef USAGE_TRACKING | |
57 Lisp_Object xs; | |
58 unsigned char *s; /* #### Does not support I18N4. */ | |
59 | |
60 if (!NILP (Vusage_tracking)) | |
61 { | |
62 xs = Fformat (nargs, args); | |
63 CHECK_STRING (xs); | |
64 s = string_data (XSTRING (xs)); | |
65 ut_log_text ((char *) s); | |
66 } | |
67 return Vusage_tracking; | |
68 #else | |
69 return Qnil; | |
70 #endif | |
71 } | |
72 | |
73 | |
74 /************************************************************************/ | |
75 /* initialization */ | |
76 /************************************************************************/ | |
77 | |
78 void | |
79 syms_of_sunpro (void) | |
80 { | |
81 defsubr (&Sut_log_text); | |
82 } | |
83 | |
84 void | |
85 vars_of_sunpro (void) | |
86 { | |
87 DEFVAR_LISP ("usage-tracking", &Vusage_tracking /* | |
88 Whether usage tracking is turned on (Sun internal use only). | |
89 Has no effect if usage tracking support has not been compiled in. | |
90 */ ); | |
91 Vusage_tracking = Qnil; | |
92 | |
93 Fprovide (intern ("sparcworks")); | |
94 #ifdef USAGE_TRACKING | |
95 Fprovide (intern ("usage-tracking")); | |
96 #endif | |
97 } | |
98 | |
99 void | |
100 init_sunpro (void) | |
101 { | |
102 #ifdef USAGE_TRACKING | |
103 if (!purify_flag) | |
104 { /* Enabled only when not dumping an executable */ | |
105 Vusage_tracking = Qt; | |
106 ut_initialize ("xemacs", NULL, NULL); | |
107 } | |
108 else | |
109 { | |
110 Vusage_tracking = Qnil; | |
111 } | |
112 #else | |
113 Vusage_tracking = Qnil; | |
114 #endif | |
115 } |