-/**
- @file crazyparking.c
-
- Wrapper crazyparking launcher
- <p>
- Copyright (c) 2005 INdT. All eigths reserved.
-
- @author Andre Moreira Magalhaes <andre.magalhaes@indt.org.br>
+/*
+* This file is part of Mancala
+*
+* Idea from Crazyparking
+*
+* Copyright (c) 2009 Reto Zingg
+*
+* This software is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public License
+* as published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA
*/
#include <stdio.h>
#include <unistd.h>
-char *argh[] = { "/usr/games/wrapper/wrapper",
- "/home/opt/mancala/data/mancala.game",
- NULL };
+char *wrapper_args[] = {"/usr/games/wrapper/wrapper",
+ "/home/opt/mancala/data/mancala.game",
+ NULL};
int main(int argc, char *argv[])
{
- FILE *pFile;
-
- pFile = fopen ("/home/rzingg/mancala.debug", "a");
- if (pFile) {
- fprintf (pFile, "app launched...\n");
- fclose (pFile);
- }
-
- if (execv ("/usr/games/wrapper/wrapper", argh) == -1) {
- pFile = fopen ("/home/rzingg/mancala.debug", "a");
- if (pFile) {
- fprintf (pFile, "cannot execute wrapper...\n");
- fclose (pFile);
- }
+ if (execv ("/usr/games/wrapper/wrapper", wrapper_args) == -1) {
+ printf("Launching mancala wrapper failed\n");
}
return 0;