--- mon/src/main.cpp 1999/10/04 19:31:09 1.1 +++ mon/src/main.cpp 2004/02/12 17:18:03 1.10 @@ -1,20 +1,33 @@ /* - * main.cpp - "mon" main program + * main.cpp - Wrapper program for standalone cxmon * - * (C) 1997-1999 Christian Bauer + * cxmon (C) 1997-2004 Christian Bauer, Marc Hellwig + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include -#include -#include +#include "sysdeps.h" #include "mon.h" -#if __BEOS__ + +#ifdef __BEOS__ #include #include #include +#include // Detect if program was launched from Shell or Tracker static bool launched_from_tracker(void) @@ -50,14 +63,14 @@ static bool open_stdio(const char *title strcat(term_path, "/Terminal"); // Load "Terminal" - char *t_argv[6]; + const char *t_argv[6]; t_argv[0] = term_path; t_argv[1] = "-t"; t_argv[2] = (char *)title; t_argv[3] = "/bin/debug_glue"; t_argv[4] = key_name; t_argv[5] = sem_id_str; - thread_id th = load_image(6, t_argv, environ); + thread_id th = load_image(6, t_argv, (const char **)environ); if (th < 0) { delete_sem(glue_sem); return false; @@ -89,7 +102,7 @@ static bool open_stdio(const char *title // Main program int main(int argc, char **argv) { -#if __BEOS__ +#ifdef __BEOS__ // Launched from Tracker? Then open terminal window if (launched_from_tracker()) { if (!open_stdio("mon"))