~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/Guile/Glue/glue_basic.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA, Kamaraju Kusumanchi, kohda
  • Date: 2009-04-26 19:35:14 UTC
  • mfrom: (1.1.10 upstream) (4.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090426193514-9yo3oggdslgdls4b
Tags: 1:1.0.7.2-1
[Kamaraju Kusumanchi <kamaraju@gmail.com>]
* New upstream release
* texmacs crashes if /usr/share/texmacs/TeXmacs/misc/pixmaps/unknown.ps
  is not present. Do not remove it. (Closes: #484073, #497021)
* update patches 03_mupad.dpatch, 04_axiom.dpatch, 11-desktop-file.dpatch
* fix the mime problem in gnome. Thanks to Andrea Gamba for the fix.
[kohda]
* Refined a fix for the mime problem in gnome a bit.
* Try to fix /bin/sh problem (debian/fixsh) but it is not complete fix yet.
* Try to fix hard coded settings for ipa fonts(patches/09_ipa.dpatch), 
  especially for Debian where no ipa fonts exist yet.
* Fixed obsolete Build-Depends: changed libltdl3-dev to 
  libltdl-dev | libltdl7-dev (the latter for Ubuntu?)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
* from build-glue-basic.scm. Please do not edit its contents.
6
6
* Copyright (C) 2000 Joris van der Hoeven
7
7
*
8
 
* This software falls under the GNU general public license and comes WITHOUT
9
 
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for details.
10
 
* If you don't have this file, write to the Free Software Foundation, Inc.,
11
 
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
8
* This software falls under the GNU general public license version 3 or later.
 
9
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
 
10
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
12
11
*
13
12
******************************************************************************/
14
13
 
50
49
}
51
50
 
52
51
SCM
 
52
tmg_os_mingwP () {
 
53
  // SCM_DEFER_INTS;
 
54
  bool out= os_mingw ();
 
55
  // SCM_ALLOW_INTS;
 
56
 
 
57
  return bool_to_scm (out);
 
58
}
 
59
 
 
60
SCM
53
61
tmg_x_guiP () {
54
62
  // SCM_DEFER_INTS;
55
63
  bool out= gui_is_x ();
187
195
}
188
196
 
189
197
SCM
 
198
tmg_texmacs_memory () {
 
199
  // SCM_DEFER_INTS;
 
200
  int out= mem_used ();
 
201
  // SCM_ALLOW_INTS;
 
202
 
 
203
  return int_to_scm (out);
 
204
}
 
205
 
 
206
SCM
190
207
tmg_bench_print (SCM arg1) {
191
208
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "bench-print");
192
209
 
775
792
}
776
793
 
777
794
SCM
 
795
tmg_tree_emptyP (SCM arg1) {
 
796
  SCM_ASSERT_CONTENT (arg1, SCM_ARG1, "tree-empty?");
 
797
 
 
798
  content in1= scm_to_content (arg1);
 
799
 
 
800
  // SCM_DEFER_INTS;
 
801
  bool out= is_empty (in1);
 
802
  // SCM_ALLOW_INTS;
 
803
 
 
804
  return bool_to_scm (out);
 
805
}
 
806
 
 
807
SCM
778
808
tmg_tree_assign (SCM arg1, SCM arg2) {
779
809
  SCM_ASSERT_TREE (arg1, SCM_ARG1, "tree-assign");
780
810
  SCM_ASSERT_CONTENT (arg2, SCM_ARG2, "tree-assign");
1053
1083
}
1054
1084
 
1055
1085
SCM
 
1086
tmg_path_next_node (SCM arg1, SCM arg2) {
 
1087
  SCM_ASSERT_CONTENT (arg1, SCM_ARG1, "path-next-node");
 
1088
  SCM_ASSERT_PATH (arg2, SCM_ARG2, "path-next-node");
 
1089
 
 
1090
  content in1= scm_to_content (arg1);
 
1091
  path in2= scm_to_path (arg2);
 
1092
 
 
1093
  // SCM_DEFER_INTS;
 
1094
  path out= next_node (in1, in2);
 
1095
  // SCM_ALLOW_INTS;
 
1096
 
 
1097
  return path_to_scm (out);
 
1098
}
 
1099
 
 
1100
SCM
 
1101
tmg_path_previous_node (SCM arg1, SCM arg2) {
 
1102
  SCM_ASSERT_CONTENT (arg1, SCM_ARG1, "path-previous-node");
 
1103
  SCM_ASSERT_PATH (arg2, SCM_ARG2, "path-previous-node");
 
1104
 
 
1105
  content in1= scm_to_content (arg1);
 
1106
  path in2= scm_to_path (arg2);
 
1107
 
 
1108
  // SCM_DEFER_INTS;
 
1109
  path out= previous_node (in1, in2);
 
1110
  // SCM_ALLOW_INTS;
 
1111
 
 
1112
  return path_to_scm (out);
 
1113
}
 
1114
 
 
1115
SCM
1056
1116
tmg_path_next_tag (SCM arg1, SCM arg2, SCM arg3) {
1057
1117
  SCM_ASSERT_CONTENT (arg1, SCM_ARG1, "path-next-tag");
1058
1118
  SCM_ASSERT_PATH (arg2, SCM_ARG2, "path-next-tag");
1087
1147
}
1088
1148
 
1089
1149
SCM
 
1150
tmg_path_next_tag_same_argument (SCM arg1, SCM arg2, SCM arg3) {
 
1151
  SCM_ASSERT_CONTENT (arg1, SCM_ARG1, "path-next-tag-same-argument");
 
1152
  SCM_ASSERT_PATH (arg2, SCM_ARG2, "path-next-tag-same-argument");
 
1153
  SCM_ASSERT_SCHEME_TREE (arg3, SCM_ARG3, "path-next-tag-same-argument");
 
1154
 
 
1155
  content in1= scm_to_content (arg1);
 
1156
  path in2= scm_to_path (arg2);
 
1157
  scheme_tree in3= scm_to_scheme_tree (arg3);
 
1158
 
 
1159
  // SCM_DEFER_INTS;
 
1160
  path out= next_tag_same_argument (in1, in2, in3);
 
1161
  // SCM_ALLOW_INTS;
 
1162
 
 
1163
  return path_to_scm (out);
 
1164
}
 
1165
 
 
1166
SCM
 
1167
tmg_path_previous_tag_same_argument (SCM arg1, SCM arg2, SCM arg3) {
 
1168
  SCM_ASSERT_CONTENT (arg1, SCM_ARG1, "path-previous-tag-same-argument");
 
1169
  SCM_ASSERT_PATH (arg2, SCM_ARG2, "path-previous-tag-same-argument");
 
1170
  SCM_ASSERT_SCHEME_TREE (arg3, SCM_ARG3, "path-previous-tag-same-argument");
 
1171
 
 
1172
  content in1= scm_to_content (arg1);
 
1173
  path in2= scm_to_path (arg2);
 
1174
  scheme_tree in3= scm_to_scheme_tree (arg3);
 
1175
 
 
1176
  // SCM_DEFER_INTS;
 
1177
  path out= previous_tag_same_argument (in1, in2, in3);
 
1178
  // SCM_ALLOW_INTS;
 
1179
 
 
1180
  return path_to_scm (out);
 
1181
}
 
1182
 
 
1183
SCM
1090
1184
tmg_path_next_argument (SCM arg1, SCM arg2) {
1091
1185
  SCM_ASSERT_CONTENT (arg1, SCM_ARG1, "path-next-argument");
1092
1186
  SCM_ASSERT_PATH (arg2, SCM_ARG2, "path-next-argument");
2460
2554
}
2461
2555
 
2462
2556
SCM
2463
 
tmg_system_append (SCM arg1, SCM arg2) {
2464
 
  SCM_ASSERT_URL (arg1, SCM_ARG1, "system-append");
2465
 
  SCM_ASSERT_URL (arg2, SCM_ARG2, "system-append");
2466
 
 
2467
 
  url in1= scm_to_url (arg1);
2468
 
  url in2= scm_to_url (arg2);
2469
 
 
2470
 
  // SCM_DEFER_INTS;
2471
 
  append (in1, in2);
2472
 
  // SCM_ALLOW_INTS;
2473
 
 
2474
 
  return SCM_UNSPECIFIED;
2475
 
}
2476
 
 
2477
 
SCM
2478
2557
tmg_system_remove (SCM arg1) {
2479
2558
  SCM_ASSERT_URL (arg1, SCM_ARG1, "system-remove");
2480
2559
 
3167
3246
}
3168
3247
 
3169
3248
SCM
3170
 
tmg_connection_declaredP (SCM arg1) {
3171
 
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-declared?");
 
3249
tmg_connection_start (SCM arg1, SCM arg2) {
 
3250
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-start");
 
3251
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-start");
3172
3252
 
3173
3253
  string in1= scm_to_string (arg1);
 
3254
  string in2= scm_to_string (arg2);
3174
3255
 
3175
3256
  // SCM_DEFER_INTS;
3176
 
  bool out= connection_declared (in1);
 
3257
  string out= connection_start (in1, in2);
3177
3258
  // SCM_ALLOW_INTS;
3178
3259
 
3179
 
  return bool_to_scm (out);
 
3260
  return string_to_scm (out);
3180
3261
}
3181
3262
 
3182
3263
SCM
3195
3276
}
3196
3277
 
3197
3278
SCM
3198
 
tmg_connection_start (SCM arg1, SCM arg2, SCM arg3) {
3199
 
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-start");
3200
 
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-start");
3201
 
  SCM_ASSERT_BOOL (arg3, SCM_ARG3, "connection-start");
3202
 
 
3203
 
  string in1= scm_to_string (arg1);
3204
 
  string in2= scm_to_string (arg2);
3205
 
  bool in3= scm_to_bool (arg3);
3206
 
 
3207
 
  // SCM_DEFER_INTS;
3208
 
  string out= connection_start (in1, in2, in3);
3209
 
  // SCM_ALLOW_INTS;
3210
 
 
3211
 
  return string_to_scm (out);
 
3279
tmg_connection_write (SCM arg1, SCM arg2, SCM arg3) {
 
3280
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-write");
 
3281
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-write");
 
3282
  SCM_ASSERT_CONTENT (arg3, SCM_ARG3, "connection-write");
 
3283
 
 
3284
  string in1= scm_to_string (arg1);
 
3285
  string in2= scm_to_string (arg2);
 
3286
  content in3= scm_to_content (arg3);
 
3287
 
 
3288
  // SCM_DEFER_INTS;
 
3289
  connection_write (in1, in2, in3);
 
3290
  // SCM_ALLOW_INTS;
 
3291
 
 
3292
  return SCM_UNSPECIFIED;
 
3293
}
 
3294
 
 
3295
SCM
 
3296
tmg_connection_cmd (SCM arg1, SCM arg2, SCM arg3) {
 
3297
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-cmd");
 
3298
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-cmd");
 
3299
  SCM_ASSERT_STRING (arg3, SCM_ARG3, "connection-cmd");
 
3300
 
 
3301
  string in1= scm_to_string (arg1);
 
3302
  string in2= scm_to_string (arg2);
 
3303
  string in3= scm_to_string (arg3);
 
3304
 
 
3305
  // SCM_DEFER_INTS;
 
3306
  tree out= connection_cmd (in1, in2, in3);
 
3307
  // SCM_ALLOW_INTS;
 
3308
 
 
3309
  return tree_to_scm (out);
3212
3310
}
3213
3311
 
3214
3312
SCM
3229
3327
}
3230
3328
 
3231
3329
SCM
3232
 
tmg_connection_cmd (SCM arg1, SCM arg2, SCM arg3) {
3233
 
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-cmd");
3234
 
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-cmd");
3235
 
  SCM_ASSERT_STRING (arg3, SCM_ARG3, "connection-cmd");
3236
 
 
3237
 
  string in1= scm_to_string (arg1);
3238
 
  string in2= scm_to_string (arg2);
3239
 
  string in3= scm_to_string (arg3);
3240
 
 
3241
 
  // SCM_DEFER_INTS;
3242
 
  tree out= connection_cmd (in1, in2, in3);
3243
 
  // SCM_ALLOW_INTS;
3244
 
 
3245
 
  return tree_to_scm (out);
3246
 
}
3247
 
 
3248
 
SCM
3249
 
tmg_connection_write (SCM arg1, SCM arg2, SCM arg3) {
3250
 
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-write");
3251
 
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-write");
3252
 
  SCM_ASSERT_CONTENT (arg3, SCM_ARG3, "connection-write");
3253
 
 
3254
 
  string in1= scm_to_string (arg1);
3255
 
  string in2= scm_to_string (arg2);
3256
 
  content in3= scm_to_content (arg3);
3257
 
 
3258
 
  // SCM_DEFER_INTS;
3259
 
  connection_write (in1, in2, in3);
3260
 
  // SCM_ALLOW_INTS;
3261
 
 
3262
 
  return SCM_UNSPECIFIED;
3263
 
}
3264
 
 
3265
 
SCM
3266
 
tmg_connection_read (SCM arg1, SCM arg2, SCM arg3) {
3267
 
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-read");
3268
 
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-read");
3269
 
  SCM_ASSERT_STRING (arg3, SCM_ARG3, "connection-read");
3270
 
 
3271
 
  string in1= scm_to_string (arg1);
3272
 
  string in2= scm_to_string (arg2);
3273
 
  string in3= scm_to_string (arg3);
3274
 
 
3275
 
  // SCM_DEFER_INTS;
3276
 
  tree out= connection_read (in1, in2, in3);
3277
 
  // SCM_ALLOW_INTS;
3278
 
 
3279
 
  return tree_to_scm (out);
 
3330
tmg_connection_interrupt (SCM arg1, SCM arg2) {
 
3331
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-interrupt");
 
3332
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-interrupt");
 
3333
 
 
3334
  string in1= scm_to_string (arg1);
 
3335
  string in2= scm_to_string (arg2);
 
3336
 
 
3337
  // SCM_DEFER_INTS;
 
3338
  connection_interrupt (in1, in2);
 
3339
  // SCM_ALLOW_INTS;
 
3340
 
 
3341
  return SCM_UNSPECIFIED;
 
3342
}
 
3343
 
 
3344
SCM
 
3345
tmg_connection_stop (SCM arg1, SCM arg2) {
 
3346
  SCM_ASSERT_STRING (arg1, SCM_ARG1, "connection-stop");
 
3347
  SCM_ASSERT_STRING (arg2, SCM_ARG2, "connection-stop");
 
3348
 
 
3349
  string in1= scm_to_string (arg1);
 
3350
  string in2= scm_to_string (arg2);
 
3351
 
 
3352
  // SCM_DEFER_INTS;
 
3353
  connection_stop (in1, in2);
 
3354
  // SCM_ALLOW_INTS;
 
3355
 
 
3356
  return SCM_UNSPECIFIED;
3280
3357
}
3281
3358
 
3282
3359
SCM
3494
3571
  scm_new_procedure ("texmacs-version-release", (FN) tmg_texmacs_version_release, 1, 0, 0);
3495
3572
  scm_new_procedure ("version-before?", (FN) tmg_version_beforeP, 2, 0, 0);
3496
3573
  scm_new_procedure ("os-win32?", (FN) tmg_os_win32P, 0, 0, 0);
 
3574
  scm_new_procedure ("os-mingw?", (FN) tmg_os_mingwP, 0, 0, 0);
3497
3575
  scm_new_procedure ("x-gui?", (FN) tmg_x_guiP, 0, 0, 0);
3498
3576
  scm_new_procedure ("qt-gui?", (FN) tmg_qt_guiP, 0, 0, 0);
3499
3577
  scm_new_procedure ("win32-display", (FN) tmg_win32_display, 1, 0, 0);
3507
3585
  scm_new_procedure ("var-eval-system", (FN) tmg_var_eval_system, 1, 0, 0);
3508
3586
  scm_new_procedure ("get-locale-language", (FN) tmg_get_locale_language, 0, 0, 0);
3509
3587
  scm_new_procedure ("texmacs-time", (FN) tmg_texmacs_time, 0, 0, 0);
 
3588
  scm_new_procedure ("texmacs-memory", (FN) tmg_texmacs_memory, 0, 0, 0);
3510
3589
  scm_new_procedure ("bench-print", (FN) tmg_bench_print, 1, 0, 0);
3511
3590
  scm_new_procedure ("bench-print-all", (FN) tmg_bench_print_all, 0, 0, 0);
3512
3591
  scm_new_procedure ("system-wait", (FN) tmg_system_wait, 2, 0, 0);
3551
3630
  scm_new_procedure ("tree-load-inclusion", (FN) tmg_tree_load_inclusion, 1, 0, 0);
3552
3631
  scm_new_procedure ("tree-as-string", (FN) tmg_tree_as_string, 1, 0, 0);
3553
3632
  scm_new_procedure ("tree-extents", (FN) tmg_tree_extents, 1, 0, 0);
 
3633
  scm_new_procedure ("tree-empty?", (FN) tmg_tree_emptyP, 1, 0, 0);
3554
3634
  scm_new_procedure ("tree-assign", (FN) tmg_tree_assign, 2, 0, 0);
3555
3635
  scm_new_procedure ("tree-var-insert", (FN) tmg_tree_var_insert, 3, 0, 0);
3556
3636
  scm_new_procedure ("tree-remove", (FN) tmg_tree_remove, 3, 0, 0);
3569
3649
  scm_new_procedure ("path-previous", (FN) tmg_path_previous, 2, 0, 0);
3570
3650
  scm_new_procedure ("path-next-word", (FN) tmg_path_next_word, 2, 0, 0);
3571
3651
  scm_new_procedure ("path-previous-word", (FN) tmg_path_previous_word, 2, 0, 0);
 
3652
  scm_new_procedure ("path-next-node", (FN) tmg_path_next_node, 2, 0, 0);
 
3653
  scm_new_procedure ("path-previous-node", (FN) tmg_path_previous_node, 2, 0, 0);
3572
3654
  scm_new_procedure ("path-next-tag", (FN) tmg_path_next_tag, 3, 0, 0);
3573
3655
  scm_new_procedure ("path-previous-tag", (FN) tmg_path_previous_tag, 3, 0, 0);
 
3656
  scm_new_procedure ("path-next-tag-same-argument", (FN) tmg_path_next_tag_same_argument, 3, 0, 0);
 
3657
  scm_new_procedure ("path-previous-tag-same-argument", (FN) tmg_path_previous_tag_same_argument, 3, 0, 0);
3574
3658
  scm_new_procedure ("path-next-argument", (FN) tmg_path_next_argument, 2, 0, 0);
3575
3659
  scm_new_procedure ("path-previous-argument", (FN) tmg_path_previous_argument, 2, 0, 0);
3576
3660
  scm_new_procedure ("tree->ids", (FN) tmg_tree_2ids, 1, 0, 0);
3672
3756
  scm_new_procedure ("string-load", (FN) tmg_string_load, 1, 0, 0);
3673
3757
  scm_new_procedure ("system-move", (FN) tmg_system_move, 2, 0, 0);
3674
3758
  scm_new_procedure ("system-copy", (FN) tmg_system_copy, 2, 0, 0);
3675
 
  scm_new_procedure ("system-append", (FN) tmg_system_append, 2, 0, 0);
3676
3759
  scm_new_procedure ("system-remove", (FN) tmg_system_remove, 1, 0, 0);
3677
3760
  scm_new_procedure ("system-mkdir", (FN) tmg_system_mkdir, 1, 0, 0);
3678
3761
  scm_new_procedure ("system-search-score", (FN) tmg_system_search_score, 2, 0, 0);
3725
3808
  scm_new_procedure ("client-read", (FN) tmg_client_read, 0, 0, 0);
3726
3809
  scm_new_procedure ("client-write", (FN) tmg_client_write, 1, 0, 0);
3727
3810
  scm_new_procedure ("enter-secure-mode", (FN) tmg_enter_secure_mode, 0, 0, 0);
3728
 
  scm_new_procedure ("connection-declared?", (FN) tmg_connection_declaredP, 1, 0, 0);
 
3811
  scm_new_procedure ("connection-start", (FN) tmg_connection_start, 2, 0, 0);
3729
3812
  scm_new_procedure ("connection-status", (FN) tmg_connection_status, 2, 0, 0);
3730
 
  scm_new_procedure ("connection-start", (FN) tmg_connection_start, 3, 0, 0);
 
3813
  scm_new_procedure ("connection-write", (FN) tmg_connection_write, 3, 0, 0);
 
3814
  scm_new_procedure ("connection-cmd", (FN) tmg_connection_cmd, 3, 0, 0);
3731
3815
  scm_new_procedure ("connection-eval", (FN) tmg_connection_eval, 3, 0, 0);
3732
 
  scm_new_procedure ("connection-cmd", (FN) tmg_connection_cmd, 3, 0, 0);
3733
 
  scm_new_procedure ("connection-write", (FN) tmg_connection_write, 3, 0, 0);
3734
 
  scm_new_procedure ("connection-read", (FN) tmg_connection_read, 3, 0, 0);
 
3816
  scm_new_procedure ("connection-interrupt", (FN) tmg_connection_interrupt, 2, 0, 0);
 
3817
  scm_new_procedure ("connection-stop", (FN) tmg_connection_stop, 2, 0, 0);
3735
3818
  scm_new_procedure ("widget-hmenu", (FN) tmg_widget_hmenu, 1, 0, 0);
3736
3819
  scm_new_procedure ("widget-vmenu", (FN) tmg_widget_vmenu, 1, 0, 0);
3737
3820
  scm_new_procedure ("widget-tmenu", (FN) tmg_widget_tmenu, 2, 0, 0);