~ubuntu-branches/ubuntu/saucy/texmacs/saucy-proposed

« back to all changes in this revision

Viewing changes to src/Texmacs/Texmacs/texmacs.cpp

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-01-27 15:09:22 UTC
  • mfrom: (4.1.19 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20130127150922-j3s80pjnmdcy0jxo
Tags: 1:1.0.7.16-1ubuntu1
* Make debian/fixsh operate on debian/texmacs instead of debian/tmp,
  and move it to binary-post-install/texmacs:: to keep consistency
  when not building arch-indep packages, as on the Dbeian buildds.
* Remove maxima_filter in clean to fix FTBFS on on non-i386 arches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
          url in  ("$PWD", argv[i-1]);
262
262
          url out ("$PWD", argv[ i ]);
263
263
          my_init_cmds= my_init_cmds * " " *
264
 
            "(texmacs-load-buffer " * scm_quote (as_string (in)) *
265
 
            " \"generic\" 0 #f) " *
 
264
            "(load-buffer " * scm_quote (as_string (in)) * " :strict) " *
266
265
            "(export-buffer " * scm_quote (as_string (out)) * ")";
267
266
        }
268
267
      }
327
326
  // (see as_double() in string.cpp)
328
327
  setlocale(LC_NUMERIC, "C");    
329
328
    
 
329
  string where= "";
330
330
  for (i=1; i<argc; i++) {
331
331
    if (argv[i] == NULL) break;
332
332
    string s= argv[i];
333
333
    if ((N(s)>=2) && (s(0,2)=="--")) s= s (1, N(s));
334
334
    if ((s[0] != '-') && (s[0] != '+')) {
335
335
      if (DEBUG_STD) cout << "TeXmacs] Loading " << s << "...\n";
336
 
      load_buffer (url_system (s), "generic", 1);
 
336
      url u= url_system (s);
 
337
      if (!is_rooted (u)) u= resolve (url_pwd (), "") * u;
 
338
      string b= scm_quote (as_string (u));
 
339
      string cmd= "(load-buffer " * b * " " * where * ")";
 
340
      where= " :new-window";
 
341
      exec_delayed (scheme_cmd (cmd));
337
342
    }
338
 
    if ((s == "-b") || (s == "-initialize-buffer") ||
339
 
        (s == "-c") || (s == "-convert") ||
340
 
        (s == "-fn") || (s == "-font") ||
341
 
        (s == "-i") || (s == "-initialize") ||
342
 
        (s == "-g") || (s == "-geometry") ||
343
 
        (s == "-x") || (s == "-execute") ||
344
 
        (s == "-log-file")) i++;
 
343
    if      ((s == "-c") || (s == "-convert")) i+=2;
 
344
    else if ((s == "-b") || (s == "-initialize-buffer") ||
 
345
             (s == "-fn") || (s == "-font") ||
 
346
             (s == "-i") || (s == "-initialize") ||
 
347
             (s == "-g") || (s == "-geometry") ||
 
348
             (s == "-x") || (s == "-execute") ||
 
349
             (s == "-log-file")) i++;
345
350
  }
346
351
  if (install_status == 1) {
347
352
    if (DEBUG_STD) cout << "TeXmacs] Loading welcome message...\n";
348
 
    load_buffer ("$TEXMACS_PATH/doc/about/welcome/first.en.tm", "help", 1);
 
353
    url u= "tmfs://help/plain/tm/doc/about/welcome/first.en.tm";
 
354
    string b= scm_quote (as_string (u));
 
355
    string cmd= "(load-buffer " * b * " " * where * ")";
 
356
    where= " :new-window";
 
357
    exec_delayed (scheme_cmd (cmd));
349
358
  }
350
359
  else if (install_status == 2) {
351
360
    if (DEBUG_STD) cout << "TeXmacs] Loading upgrade message...\n";
352
 
    load_buffer (
353
 
      "$TEXMACS_HOME_PATH/doc/about/changes/changes-recent.en.tm", "help", 1);
 
361
    url u= "tmfs://help/plain/tm/doc/about/changes/changes-recent.en.tm";
 
362
    string b= scm_quote (as_string (u));
 
363
    string cmd= "(load-buffer " * b * " " * where * ")";
 
364
    where= " :new-window";
 
365
    exec_delayed (scheme_cmd (cmd));
354
366
  }
355
 
  if (no_bufs ()) {
 
367
  if (number_buffers () == 0) {
356
368
    if (DEBUG_STD) cout << "TeXmacs] Creating 'no name' buffer...\n";
357
369
    open_window ();
358
370
  }