[cf7bbda] | 1 | // ************************************************************************************************************************************************** |
---|
| 2 | // Libreria: ogAdmLib |
---|
| 3 | // Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla |
---|
| 4 | // Fecha Creación: Marzo-2010 |
---|
| 5 | // Fecha Última modificación: Marzo-2010 |
---|
| 6 | // Nombre del fichero: ogAdmLib.h |
---|
| 7 | // Descripción: Este fichero implementa el archivo de cabecera de la libreria ogAdmLib |
---|
| 8 | // ************************************************************************************************************************************************** |
---|
| 9 | // ________________________________________________________________________________________________________ |
---|
| 10 | // Valores definidos |
---|
| 11 | // ________________________________________________________________________________________________________ |
---|
| 12 | #define LONSTD 1024 // Longitud de memoria estandar |
---|
| 13 | #define LONINT 16 // Longitud de memoria estandar para un número entero |
---|
| 14 | #define MAXPAR 128 // Maximo numero de particiones manejadas por el sistema, ahora con GPT es 128 |
---|
| 15 | |
---|
| 16 | #define ACCION_SINRESULTADO 0 // Sin resultado |
---|
| 17 | #define ACCION_EXITOSA 1 // Finalizada con éxito |
---|
| 18 | #define ACCION_FALLIDA 2 // Finalizada con errores |
---|
| 19 | |
---|
| 20 | #define ACCION_INICIADA 1 // Acción activa |
---|
| 21 | #define ACCION_DETENIDA 2 // Acción momentanemente parada |
---|
| 22 | #define ACCION_FINALIZADA 3 // Accion finalizada |
---|
| 23 | |
---|
| 24 | #define EJECUCION_COMANDO 1 |
---|
| 25 | #define EJECUCION_PROCEDIMIENTO 2 |
---|
| 26 | #define EJECUCION_TAREA 3 |
---|
| 27 | #define EJECUCION_RESERVA 4 |
---|
| 28 | |
---|
| 29 | #define AMBITO_CENTROS 0x01 |
---|
| 30 | #define AMBITO_GRUPOSAULAS 0x02 |
---|
| 31 | #define AMBITO_AULAS 0x04 |
---|
| 32 | #define AMBITO_GRUPOSORDENADORES 0x08 |
---|
| 33 | #define AMBITO_ORDENADORES 0x10 |
---|
| 34 | |
---|
| 35 | #define ANNOREF 2009 // Año de referencia base |
---|
| 36 | |
---|
| 37 | #define MAXHARDWARE 128 // Máximos elementos hardware a detectar |
---|
| 38 | #define MAXSOFTWARE 8096 // Máximos elementos software a detectar |
---|
| 39 | |
---|
| 40 | // ________________________________________________________________________________________________________ |
---|
| 41 | // Prototipo de funciones |
---|
| 42 | // ________________________________________________________________________________________________________ |
---|
| 43 | int splitCadena(char **,char *, char); |
---|
| 44 | char* rTrim(char *); |
---|
| 45 | char* escaparCadena(char *cadena); |
---|
| 46 | |
---|
| 47 | #include <stddef.h> /* for offsetof. */ |
---|
| 48 | |
---|
| 49 | #define container_of(ptr, type, member) ({ \ |
---|
| 50 | typeof( ((type *)0)->member ) *__mptr = (ptr); \ |
---|
| 51 | (type *)( (char *)__mptr - offsetof(type,member) );}) |
---|