File: exec.c

package info (click to toggle)
fenix-plugins 0.0.20070803-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 36,404 kB
  • ctags: 573
  • sloc: sh: 8,736; ansic: 3,026; xml: 413; makefile: 257
file content (61 lines) | stat: -rw-r--r-- 2,249 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Exec Fenix DLL
 * Copyright (C) 2004 Álvaro Vilanova Vidal 
 * Modified & reduced by Pablo Navarro, compatible with Linux
 *
 * This library 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 library 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 library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

//------------------------------------------------------------------------------
// LAST RELEASE VERSION: 0.4a
// FENIX COMPATIBILITY: 0.84+
// LAST UPDATE: 04/07/2007
//------------------------------------------------------------------------------

#include <fenix/fxdll.h>

/* PluginVersion is used to identify the plugin structures against which
 * we're linking to prevent potential mismatches and segmentation faults
 */
unsigned int PluginVersion = FXDLL_VERSION;

//------------------------------------------------------------------------------
// FUNCTION: ShellEx
// VER: 1.0
// LAST UPDATE: 04/07/2007
// EXP: This function open any document.
//------------------------------------------------------------------------------
int _ShellEx(INSTANCE * my, int * params)
{
	const char * CmdLine = string_get(params[0]); 
	if(!system(CmdLine))
	{
		return -1;
	}
	return 0;
}
//------------------------------------------------------------------------------

//REGISTER FUCTIONS-------------------------------------------------------------
FENIX_MainDLL RegisterFunctions (COMMON_PARAMS) 
{

	FENIX_DLLImport
	
	FENIX_export ("SHELL","S",TYPE_DWORD,_ShellEx);

}
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------