1 /* @(#)shcall.h 1.5 19/08/17 Copyright 2009-2019 J. Schilling */ 2 /* 3 * Abstraction from shcall.h 4 * 5 * Copyright (c) 2009-2019 J. Schilling 6 */ 7 /* 8 * The contents of this file are subject to the terms of the 9 * Common Development and Distribution License, Version 1.0 only 10 * (the "License"). You may not use this file except in compliance 11 * with the License. 12 * 13 * See the file CDDL.Schily.txt in this distribution for details. 14 * A copy of the CDDL is also available via the Internet at 15 * http://www.opensource.org/licenses/cddl1.txt 16 * 17 * When distributing Covered Code, include this CDDL HEADER in each 18 * file and include the License file CDDL.Schily.txt from this distribution. 19 */ 20 21 #ifndef _SCHILY_SHCALL_H 22 #define _SCHILY_SHCALL_H 23 24 #ifndef _SCHILY_MCONFIG_H 25 #include <schily/mconfig.h> 26 #endif 27 #ifndef _SCHILY_INTTYPES_H 28 #include <schily/inttypes.h> 29 #endif 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 #ifndef __sqfun_t_defined 36 typedef int (*sqfun_t) __PR((void *arg)); 37 #define __sqfun_t_defined 38 #endif 39 40 #ifndef __cbfun_t_defined 41 typedef int (*cbfun_t) __PR((int ac, char **argv)); 42 #define __cbfun_t_defined 43 #endif 44 45 #ifndef __squit_t_defined 46 47 typedef struct { 48 sqfun_t quitfun; /* Function to query for shell signal quit */ 49 void *qfarg; /* Generic arg for shell builtin quit fun */ 50 Int32_t flags; /* Flags to identify data beyond qfarg */ 51 cbfun_t callfun; /* Callback function for -call */ 52 void *__reserved[16]; /* For future extensions */ 53 } squit_t; 54 55 #define SQ_CALL 0x01 /* Use call feature */ 56 57 #define __squit_t_defined 58 #endif 59 60 typedef int (*shcall) __PR((int ac, char **av, char **ev, 61 FILE *std[3], squit_t *__quit)); 62 63 #ifdef __cplusplus 64 } 65 #endif 66 67 #endif /* _SCHILY_SHCALL_H */ 68