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

« back to all changes in this revision

Viewing changes to src/Plugins/Cocoa/mac_utilities.mm

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA, Kamaraju Kusumanchi, kohda
  • Date: 2008-04-06 15:11:41 UTC
  • mfrom: (1.1.7 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080406151141-w0sg20jnv86mlt6f
Tags: 1:1.0.6.14-1
[Kamaraju Kusumanchi <kamaraju@gmail.com>]
* New upstream release
* 01_american.dpatch is updated
* Since thread support in guile-1.8 is now disabled, the segmentation faults
  should not arise anymore. More info at #439923. (Closes: #450499, #458685)
[kohda]
* This version fixed menu problem.  (Closes: #447083)
* Reverted orig.tar.gz to the upstream tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/******************************************************************************
 
3
* MODULE     : mac_utilities.mm
 
4
* DESCRIPTION: Utilities for Mac OS X
 
5
* COPYRIGHT  : (C) 2007  Massimiliano Gubinelli
 
6
*******************************************************************************
 
7
* This software falls under the GNU general public license and comes WITHOUT
 
8
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
 
9
* If you don't have this file, write to the Free Software Foundation, Inc.,
 
10
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
11
******************************************************************************/
 
12
 
 
13
#include <Cocoa/Cocoa.h>
 
14
 
 
15
void mac_fix_paths()
 
16
{
 
17
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
18
  /* add appropriate TEXMACS_PATH to the current environment */
 
19
#if 0
 
20
  setenv("TEXMACS_PATH",
 
21
         [[[[NSBundle mainBundle] resourcePath] 
 
22
            stringByAppendingPathComponent:@"share/TeXmacs"] 
 
23
            cStringUsingEncoding:NSUTF8StringEncoding],
 
24
         1);
 
25
#endif
 
26
  /* add TeX directory */
 
27
  /* FIXME: make this user-defined */
 
28
  setenv("PATH",
 
29
         [[[NSString stringWithCString:getenv("PATH")] 
 
30
            stringByAppendingString:@":/usr/texbin"]
 
31
            cStringUsingEncoding:NSUTF8StringEncoding],
 
32
         1); 
 
33
  setenv("GUILE_LOAD_PATH","/opt/local/share/guile/1.8",1);
 
34
  system("printenv");
 
35
  [pool release];  
 
36
}