diff --git a/ediv/0.1.txt b/ediv/0.1.txt new file mode 100644 index 0000000..74561d9 --- /dev/null +++ b/ediv/0.1.txt @@ -0,0 +1,8 @@ +>> cargar FNT de div2 + +>> hacer fuente 0 + +>> carga de map, pcx, bmp y jpg completa y decente + +>> size y angle + diff --git a/ediv/CHANGE_LOG.txt b/ediv/CHANGE_LOG.txt new file mode 100644 index 0000000..0aeb2a2 --- /dev/null +++ b/ediv/CHANGE_LOG.txt @@ -0,0 +1,686 @@ +6/9/2002 +-------- + * Mejorado ligeramente el sistema de indexado de variables, ya no estan + esos #defines tan engorrosos porke los identificadores van con enum. + Recordad recompilar si insertais alguna variable nueva. ¡Ojo! Tienen que + estar ordenadas por global, reserved y local, no vale saltearlas, de esta + forma se localizan mas rapidamente. (Er_Makina) + +27/6/2002 +--------- + * Modificado el formato de los exes en modo debug. En lugar de la ruta + absoluta hacia el prg, se guarda el codigo fuente completo comprimido + (primero el tamaño descomprimido, luego el tamaño comprimido y luego el + codigo comprimido) (Er_Makina) + +26/6/2002 +--------- + * El ediv_export daba error si se declaraban dos objetos con igual nombre en + distintos niveles de struct (problema con el "height" de la estructura + "video_modes" de la graphics.dll y la local "height" de edivstd.dll). + Creo que el problema está corregido (ver crea_objeto() en parser.c) pero + hace falta testearlo un poco más (Er_Makina) + +16/3/2002 +--------- + * El MOTD ya puede ser recibido correctamente en Linux, no es unicamente para + sistemas Windows (Daijo) + +22/2/2002 +--------- + * Corregido bug al leer las Dlls. Estas si contenian caracteres en mayúsculas + no las encontraba, solo encontraba aquellas cuyo nombre estaba escrito en + minusculas. Ahora las carga perfectamente, incluso en Linux, aunque es mas + probable ver mIDlL.dLL en Windows, que mISo.sO en lnx :). + (Daijo) + + * Por ahora pongo al trazador un textbox normal y corriente, sin resaltado ni + nada (lo del resaltado de sintaxis va a tener tela...) (Er_Makina) + + +21/2/2002 +--------- + * Quitados los archivos _ml.* y añadidos los utils.*, estos ultimos servirán + para albergar todas las rutinas utiles que creemos. Actualmente contiene + 'strcasecmp' y 'strncasecmp' definidas para Win32, en los sistemas **IX ya + existian. (Daijo) + + +19/2/2002 +--------- + + * Comenzada la debug.dll. Se trata de una aplicación Qt que se ejecuta con el + entrypoint "debug". Tiene prioridad -512, ya que nunca debe ser añadida + manualmente, el compilador la añade siempre automáticamente cuando se compila + con la opción -d. Sólo funciona con el stub que tiene el trazador activado + (*.dbg), recordad compilarlo antes de probar el trazador. También he añadido + el entrypoint "trace", útil para trazar el programa sentencia por sentencia. + Naturalmente, el trazador aun está en bragas x) tengo el diseño hecho aparte, + de momento es un calco del trazador de DIV2 pero luego le iremos añadiendo + cosas (quickwatches y cosas de esas molonas). (Er_Makina) + + * Corregidos algunos serios bugs relacionados con la carga de DLL's (otra vez + :P) (Er_Makina) + + +18/2/2002 +--------- + + * Ahora en la 2ª fase del compilador y en el stub se le añade la extensión a + una DLL antes de cargarla. Esto no taba problemas en Windows 2000, pero + podía darlos en Windows XP/9x/Me. (Er_Makina) + + * Añadido Call_Entrypoint. Teneis que recompilar todas las DLL's que tengais + para que funcionen correctamente. (Er_Makina) + + +17/2/2002 +--------- + + * Una nueva dll llamada prueba.dll, para hacer tonterias como escribir mensajes + y numeros en un archivo, y mostrar msgbox. (Er_Makina) + + * He conseguido que rule el prueba.prg ;) va perfectamente, voy a ver si es + capaz de ejecutar correctamente programas mas complejos, usando variables + globales, privadas, locales, etc (Er_Makina) + + * Añadido #ifndef _CABECERA_H - #define _CABECERA_H - ... - #endif para evitar + includes recursivos. No habia ningun problema con esto, pero es mejor + evitarlos desde un principio. (Daijo) + + +16/2/2002 +--------- + + * Completadas algunas instrucciones EML del intérprete. (Er_Makina) + + * Arreglado un bug por el cual no se cargaban las dlls adecuadas. (Er_Makina) + + +15/2/2002 +--------- + + * Bug arreglado: cuando en Win32 se encontraba la primera DLL, se contabilizaba + aunque no fuera válida. (Er_Makina) + + * Ahora el nombre de las DLL's se almacena sin extensión. (Er_Makina) + + * En el ediv.cfg ahora hay una sección llamada dll_priority, donde se pueden + ajustar prioridades a las DLL's, las cuales se superponen a las prioridades + por defecto de cada DLL. (Er_Makina) + + * Si una DLL tiene como prioridad 512 (P_SIEMPRE), se tomará siempre como + necesaria. Si tiene -512 (P_NUNCA), se ignora la DLL. (Er_Makina) + + * El directorio donde se encuentran las DLL's puede configurarse en el ediv.cfg + (Er_Makina) + + * En edivcentral.com he creado una carpeta llamada "actual" donde hay + documentos que cambian frecuentemente, útiles para mantenerse informado sobre + el desarrollo de eDIV. Allí están el TODO, el ChangeLog, el MOTD, y también + el language.txt. Se puede acceder a ellos en www.edivcentral.com/actual. El + changelog se puede ver rápidamente en changelog.edivcentral.com. + (Er_Makina + Daijo) + + * El sistema de prioridades de las DLL's ya funciona perfectamente, la tabla de + DLL's se ordena en memoria segun las prioridades antes de decidir cual se usa + y cual no. De esta forma se escriben ya ordenadas en el bytecode. (Er_Makina) + + +14/2/2002 +--------- + + * Bug arreglado: en WinNT el stub fallaba al cargar una DLL. He puesto + que use las funciones de windows (LoadLibrary y compañia), pero + dll_load.c sigue siendo necesaria para cargar dll's embebidas en el + exe. (Er_Makina) + + * El stub ya carga el indice de variables. OJO: aun no esta hecho lo de + las prioridades de las DLL's, por lo que es posible recibir ceros al + intentar localizar una variable, aunque pertenezca al edivstd. + (Er_Makina) + + +31/1/2002 +--------- + + * Ya rula el indexado de variables por el lado del compilador. Se guarda + el indice comprimido en el exe, justo despues del bytecode, asi que hay + que adaptar el stub en consecuencia. (Er_Makina) + + +23/1/2002 +--------- + + * Adaptado ediv_export.c al stub. Kizas me haya saltado algo y tenga + algunos bugs, ya me encargare de comprobarlo con algunas "chivatas" ;) + (Er_Makina) + + +13/1/2002 +--------- + + * El compilador lee un archivo de configuración (ediv.cfg) de donde + obtiene las opciones de compilación por defecto, el servidor para el + MOTD, un idioma forzado y el directorio de las dll's. Falta por incluir + una sección [dll_priority] donde indicar las prioridades por defecto de + las dll's. Éstas irán, por ahora, de -512 a 512. El valor por defecto + es 0. Una dll con 512 de prioridad se cargará siempre aunque no se + indique ninguna referencia a una función de la dll en el PRG (éste es + el caso de la edivstd y la graphics). Una prioridad de -512 hace que + la dll no se cargue nunca (útil para tener varias dll's que hagan lo + mismo, por ejemplo una sound que use fmod y otra que use sdl). + (Daijo & Er_Makina) + + * He incluido errores run-time leves y graves en el stub (mirar error.c). + En error.c explico también el planteamiento de poner msgbox en linux + para los errores. Los mensajes de error leves son los mismos que en + div2, esto es importante para mantener la compatibilidad con + ignore_error(). (Er_Makina) + + * He mejorado la comunicación HTTP/1.1 para obtener el MOTD. Ahora + detecta si la información recibida es de texto plano, y no admite fi- + cheros de más de 1024 bytes. (Er_Makina) + + * Implementado el sistema de entrypoints en el compilador y extern.h, + queda meterlo en el stub. (Er_Makina) + + * Carga de dll's a medio hacer en el stub (ya funciona la instrucción IMP), + le falta un ediv_export.c, por tanto no compila. El stub busca las dll's + primero en el directorio actual y luego en dll\ (so/ en el caso de Linux). + (Er_Makina) + + * dll_load.c y dll_load.h movidos a la carpeta shared. (Er_Makina) + + * Arreglado pequeño desastre con el fichero extern.h (Er_Makina) + + * Varios pequeños bugs arreglados. (Er_Makina) + + +1/12/2001 +--------- + + * Ligeramente modificado el SDK, las funciones ediv_export ya no retornan + un puntero C a los datos exportados, sino un puntero DIV, es decir, la + posición en mem[] o loc[] donde han sido colocados. Esto permitirá hacer + el sistema de indexado para que unas DLLs (o el stub) puedan acceder a + datos de otras, y para que se pueda acceder a los datos locales mediante + mem[id+offset]. (Er_Makina) + + * También he metido algunos #defines para hacer las funciones predefinidas + o autoejecutables de las DLL, se declararán con una función tipo + EDIV_Export_Auto(id_funcion,handle). Aun no tengo muy claro como fun- + cionará el asunto en general, imagino que todo se desencadenará a partir + de EDIV_post_process y a partir de ahí todas las DLLs irán llamando a las + correspondientes autoejecutables de las demás. Si alguien no entiende esto, + que me lo pregunte y me rallaré mas xD (Er_Makina) + + * Añadida capacidad para leer un MOTD situado en www.edivcentral.com/motd.txt + con la opción -n, --news (de momento sólo rula en Win32) (Daijo + Er_Makina) + + +30/11/2001 +---------- + + * Añadido archivo language.txt en el directorio raiz, para que sea mas facil + hacer traducciones. El que haga alguna traducción nueva, que la mande + a ediv@divsite.net para que la implementemos en el language.c. (Er_Makina) + + +29/11/2001 +---------- + + * Añadido soporte multi-idioma (ojo, la traduccion al portugues esta por + terminar, y el #ifdef de detectar_idioma lo puse mal como WIN322 o algo asi + pa probar como rularia en linux. Probad a trastear con la variable de + entorno LANG... ;) (Er_Makina) + + +26/11/2001 +---------- + * He limpiado el encrypt.c del proyecto encrypt, ahora es hasta legible xD. + (Daijo) + + * Los incluides, workspaces y librerias de ZLIB y SDL han sido eliminadas como + parte del codigo de eDiv. (Daijo) + + * El archivo 'ediv 2ª etapa.txt' tambien lo he quitado. (Daijo) + + * He arreglado unas incompatibilidades del STUB con las cabeceras de Windows, +en + concreto con WINBASE.H que tenia definiciones de lstrcpy, lstrcat y lstrlen. + Ahora si esta definido windows, las 'undefine' antes de ser vueltas a definir + en el stub :). (Daijo) + + * Nuevo workspace 'modules.dsw' en 'Visual C' con las DLL. (Daijo) + + * _ml.c lo voy a reescribir, por lo tanto he eliminado casi todo su codigo y el + codigo en ediv.c que utilizaban alguna funcion suya. (Daijo) + + * Hay unos cuantos folders menos que no usabamos (limpieza rules xD). (Daijo) + +21/11/2001 +---------- + * He comentado del kernel.c las lineas que servian para el programa de rebote +de + la bola. No las elimineis, ya que esas lineas estan en bien. Lo que aun no se + es porque cuando hay mas de un proceso activo el stub peta. Cuando lo +solucione + volvere a activar esas lineas. ( Riseven ) + +20/11/2001 +---------- + * Viendo la descripcion de las variables locales predefinidas, he visto que +exis- + ten variables locales privadas del interprete que sirven para el +funcionamien- + to del interprete. Estas variables cuinciden casi exactamente con las que + hice en procs_s[], esto debe ser buena señal no? al parecer el funcionamiento + interno del interprete de dani y el que estoy haciendo se parecen mas de lo + que hubiera imaginado en un principio. Mejor, asi es menos probable que nos + aparezcan errores inesperados de incompatibilidad :) + ( Riseven ) + + * He hecho que el stub cargue "bola.bmp" en imgs[0] para poder utilizar de +grafi- + co 0, todos los procesos se visualizan en la posicion que indice su X e Y. + El stub peta si al llegar al frame hay mas de un proceso activo, aun no muy + bien el motivo. ( Riseven ) + + * He notado que la iloc_len es mas pequeña de lo que deberia ser, solo en + variables locales predefinidas ya hay 42, mientras que iloc_len vale 37. + ( Riseven ) + + * He medido la velocidad del eDiv para modod 320x200, con un proceso cuyo graph + es una imagen de 25x25 pixels y e obtenido estos resultados: + CON DOUBLEBUFFERING SIN DOUBLEBUFFERING + Modo ventana: 106 fps 122 fps + Modo fullscreen: 64 fps 157 fps + ( Riseven ) + +19/11/2001 +---------- + * Ya funciona correctamente la eliminacion de procesos ( antes siempre se +elimi- + naba el primer proceso ) esto era debido a que interprete() estaba mal. + ( Riseven ) + + * Tras pelearme un poco con el ADA y JPF que ambos contenian fallos e +conseguido + que funcione correctamente el FROM :) No se muy bien que cosas soporta ya el + interprete, y que cosas utilizan mnemonicos no definidos aun. + ( Riseven ) + + * Se me olvidaba, es NECESARIO utilizar ya + que aun no he hecho ningun mnemonico optimizado. ( Riseven ) + + * En stdout.txt podreis ver un debugger improvisado ;) , en cada paso escribe + el indice de codigo ( imem ), el numero de proceso activo ( num_proc, no con- + fundir con Id del proceso ), el indice de pila ( sp ) y el valor actual de la + pila ( pila[sp] ) + ( Riseven ) + + * Añadidas las variables locales al interprete, falta testearlo. Se trata de +los + mnemonicos AID y CID. AID suma id a la pila, y CID carga id en la pila. Esto + es debido a k las variables locales funcionan sumando id+offset_variable, +donde + id es el offset donde empiezan las variables locales del proceso +correspondien- + te, y offset_variable es el offset relativo. Los offset_relativos son iguales + para distintos procesos, si el offset relativo de X para un proceso es 19, +para + otra variable tb sera 19. ( Riseven ) + + * RNG ya esta hecho, bueno, en realidad no hace nada, pero si esta definido +DEBUG + si que hacia algunas cosas que no e puesto, no se si nos seran necesarias +para + nuestro debugger, si esto es asi ya sabeis donde faltan algunas rutinas :P + ( Riseven ) + + * Ya se soporta SWITCHs :), los mnemonicos asociados son CSE Y CSR, y estan sin + testear. ( Riseven ) + + * Ya estan casi todos los menmonicos basicos, solo faltan algunos complicados +como + CPA, FUN o EXT, y algunos otros orientados unicamente a debug como RNG, DBG o +CHK. + Tecnicamente, si no se utilizan cadenas y utilizando la no_optimization, el + interprete ahora deberia estar preparado para soportarlo CASI TODO :). + ( Riseven ) + +18/11/2001 +---------- + * He metido unos 30+ mnemonicos de EML, la mayoria de ellos testeados. + ( Riseven ) + +16/11/2001 +---------- + * Creada procs_s[], esta estructura guarda informacion de los procesos activos, + posee datos como el indice actual del proceso ( en el k se quedo al llamar + a FRAME ), el graph, priority, x , y, id, y demas variables k tenga k + utilizar el kernel, para evitar tener k acceder a mem[] para buscar esos +datos. + Tambien guarda el tipo de proceso k es. ( Riseven ) + + * Incluidos los mnemonicos en el inte.h , copiados de compiler.h ( Riseven ) + + * Se inicializan las variables de posicion de codigo, globales, locales +publicas + y locales privadas. Se crea el proceso main y se mete a la lista de ejecucion + de procesos con lista_mete(). Creada la lista de ejecucion de procesos, se + llama proc_orden[], y guarda los procesos ordenados por priority, exactamente + lo que guarda es el indice correspondiente de procs_s[] ( Riseven ) + +15/11/2001 +---------- + + * He comentado todo el code en C del eDivNoid, no borreis los comentarios, k + me vienen bien para programar el interprete ( Riseven ) + +8/11/2001 +--------- + + * Implementada compilación cruzada: ahora es posible indicar el sistema + al que se quiere compilar con la opción -s, seguida del nombre del sistema + (deberá existir un fichero de stub con el nombre de ese sistema, ver si- + guiente punto) (Er_Makina) + + * Implementado sistema de doble stub: uno con extensión .rel para compila- + ciones definitivas y otro con extensión .dbg para compilaciones de debug. + Para elegir si compilar el .rel o el .dbg se debe elegir "Select + configuration..." en el menú Build de Visual C y elegir por ejemplo + "Win32 Debug" para la versión .rel y "Win32 Debug con trazador" para la + versión .dbg. La diferencia entre los dos es que el .dbg se compila con + la macro DBG definida, y por tanto se activan las rutinas de depurado de + eDIV. (Er_Makina) + + * El script makelib.bat también ha sido modificado para implementar lo de + los nuevos stubs y AHORA SE EJECUTA AUTOMÁTICAMENTE DESPUÉS DE COMPILAR + EL STUB, por lo que ya no hace falta hacerlo manualmente. Esto está + configurado en la pestaña "post-build step" en las opciones del proyecto + stub. (Er_Makina) + + * Añadidas rutinas de stub y kernel de Riseven y |RooT|. (Daijo) + + +7/11/2001 +--------- + + * Cambiado el 'magic' de la edivrun.lib de "dj!" a "eDIV Stub" (Er_Makina) + Nota: PROHIBIDO CAMBIARLO OTRA VEZ :PPPPPP + + * El stub ahora descomprime el código y lo guarda en memoria. (Er_Makina) + + * La clave de encriptación, el 'magic' de la edivrun.lib y otros datos + que son comunes a varios programas ahora se encuentran en el archivo + shared.h para poder modificar algun dato sin tener que hacerlo en varios + ficheros a la vez (Daijo) + + * encrypt.c ordenado con sangrados de texto (Daijo) + + * Nota: los programas que usan la zlib fallan al ejecutarlos en una makina + con micro AMD y Windows XP. No sucede cuando se compila con Visual C++ 7 + (Framework .NET beta2) (Daijo) + + +29/6/2001 +--------- + + * Corregidos miles de bugs de la versión para Win32. ':) Ahora se lee el + fichero prg en modo "rb" en vez de "r" ya que el gracioso de güindows + en modo "r" te sustituye los CRLF por LF a secas >:( y el programa no + resultaba tan grande como el tamaño del propio archivo, por lo que + encontraba "caracteres no reconocidos" (basura) antes de llegar al EOF + (el carácter de ASCII 0). + + * Añadida opción -c o --check que hace que no se guarde el exe. Útil para + comprobar sintaxis, sacar listados, etc sin sobreescribir el exe actual + o simplemente sin malgastar espacio (y el trabajo de borrar el exe) xD + + * Comenzada documentación... de solo mirar el indice ya da la sensación + de estar leyendo una tesis doctoral... xD También comencé una referencia + de EML pero me acabé aburriendo así que ya lo terminaré un día que esté + realmente aburrido y no tenga ganas de hacer otra cosa :p + Por cierto, la introducción me ha salido muy chunga, parece como si + hubiera escrito un anuncio del div3 o algo asi :( así que el que quiera + modificarla que lo haga por favor, o mejor dicho hacedlo, ke seguro ke + teneis mas inspiracion ke yo xD + + (Er_Makina) + + +28/6/2001 +--------- + + * Re-construidos proyectos para Win32, he puesto los includes de la zlib y + SDL en /inc, y sus libs correspondientes en /zlib. En /src/visual c está + el workspace con el ediv, stub y encrypt. Cada dll tiene su propio work- + space en el directorio de su source. + + * Añadida la ruta absoluta del PRG en Win32 al compilar en modo debug. + + * Ligeramente modificado el formato de los EXE, ahora se añade el tamaño de + los datos comprimidos después del tamaño de los datos descomprimidos. El + numerito tiene formato de unsigned long, que no recuerdo ahora mismo + cuantos bytes eran. + + * Parece que hay un fallo en Win32 al reconocer qué DLLs se usan en el PRG. + Al compilar C.PRG, sólo reconoce que se usa edivstd.dll, cuando en reali- + dad debería usar también sample.dll. Esto se puede arreglar con una + sesión de debug pero ahora no tengo tiempo, mañana me ocuparé de eso. + (o esta noche si no me entra sueño xD) + + * He modificado un poco el export.h para hacerlo más compatible con win32. + He comentarizado también el asunto del DllMain, tanto en el export.h como + en las DLLs, ya que aparte de darme problemas en win32, no tenía utilidad + en Linux. + + (Er_Makina) + + +27/6/2001 +--------- + + * Arreglado un bug por el cual se echaba a perder todo el eml. En un sitio + escribí mem en vez de imem y... ^_^ También he arreglado la generación de + la rutina de carga de DLLs, ahora recuerdo que no se puede volver de un + JMP con un RET xD + + * Arreglado ELSEIF. No volveré a ser tan chapuzas, lo juro xD + Y esta vez lo he comprobado bien, repasando el desensamblado y todo :) + + * Se escribe stub_size al final del ejecutable + + * La opción -d (--debug) ya funciona. El formato del ejecutable de debug es + el siguiente: primero el stub y el EML, como en los ejecutables normales. + Luego, la ruta absoluta del PRG (hay que terminar la función escribe_lin + para hacer esto en win32). Luego la información que relaciona el bytecode + con el texto (lin), es decir, indica donde empieza y donde termina cada + sentencia tanto en el bytecode (mem[]) como en el prg. Naturalmente esto + es útil para el trazador. Luego viene la tabla de objetos (dbg), como en el + fichero .tab pero más críptico, obviamente. Primero está el volcado de la + tabla de objetos, sustituyendo los nombres por offsets a su nombre + correspondiente en el volcado de vnom (vector de nombres), que es lo que + viene justo después. Por último, se escriben 3 valores: el comienzo de la + sección "lin" en el fichero (justo donde termina el bytecode y empieza la + ruta del prg), el comienzo de la sección "dbg", y stub_size. Ah, el + ejecutable se marca como debug en el bit 6 de mem[0] (+64). + + (Er_Makina) + + +26/6/2001 +--------- + + * Opciones de línea de comando. Ahora se puede elegir generar una tabla de + objetos *.tab (--table) y/o el listado EML (--list). La opción --debug no + está disponible todavia. He metido estas nuevas opciones en listados.c + + * Arreglado el estropicio que borró todos los mensajes de error a partir + del 55, por un despiste mio, que me puse un ediv.c que me pasó daijo y no + estaba actualizado + + * Desactivado el sistema de "multi-error", lo he metido en #ifdefs por si + alguien en algun futuro quiere activarlo o por si le hace ilu. + + * Arreglado horrible bug por el cual no se borraba vhash[] y las propias + dlls daban errores del tipo "el nombre no es nuevo" después de la + precompilación. + + y creo ke ya ta... (Er_Makina) + + +25/6/2001 +--------- + + * Terminado el proceso de remcompilación para ahorrar la memoria de las + DLLs no usadas + + * Ya se crea el EXE, por ahora tiene la misma estructura que los EXE de + DIV2 + + (Er_Makina) + + +24/6/2001 +--------- + + * Modularizadas las rutinas de carga de DLLs (Daijo) + + * Terminada sección PRIVATE, código principal y PROCESOS (función + sintactico()). (Er_Makina) + + * Terminadas todas las sentencias (función sentencia()) y añadido ELSEIF, + ojo que LTLEX.DEF ha sido modificado, y obviamente los #defines de p_xxxx + de PARSER.H tambien (Er_Makina) + + +22/6/2001 +--------- + + * Completadas las variables y constantes predefinidas en edivstd.dll + + * Terminada sección LOCAL + + * He comprobado y arreglado algunos errores, el 39 y algun otro que no me + acuerdo + + (Er_Makina) + + +21/6/2001 +--------- + + * Terminada sección GLOBAL con todas sus declaraciones. ':) + + * Corregidos algunos detalles y fallos de las expresiones constantes. + + * POR HACER: Provocar y comprobar TODOS los errores :p + + * Ah he hecho un icono del ediv, ediv.ico ^_^ + + (Er_Makina) + + +20/6/2001 +--------- + + * EVALUADOR DE EXPRESIONES CONSTANTES TERMINADO :D + Bueno, en realidad casi, tan sólo falta comprobar todos los errores. Como + el DIV original detenía la compilación al encontrar un error y eDIV no, + hay que añadir código después de las llamadas a error() para hacer que el + parsing siga como si no hubiera pasado nada. A veces esto se arregla con + poner simplemente lexico(); pero la mayoría de las veces hay que hacer + algo más para ignorar el error. + + * Tambien he incluido el generador de código y el optimizador peephole, y + de hecho ya sería capaz de compilar cosas, aunque sólo a la memoria (es + decir, al buffer mem[]). De momento solo reconoce el compiler_options. + Paciencia. + + * Como podeis ver, ya hay unos cuantos mensajes de error, un problema es + que no sabemos cómo tenía el DIV original organizados los errores, así + que hay que investigar por qué se produce el error y qué mensaje le + viene bien. He usado mensajes originales del DIV2, fijándome en el + errores.html que me hice a partir de la ayuda del DIV2. Por desgracia no + están en orden :( + + * En el DIV2 hay errores que tienen varios códigos para un solo mensaje, + esto es para que la ayuda de ese error sea más específica en el contexto + en que se ha producido el error. Aquí yo he puesto un solo código para + cada mensaje, si más tarde queremos hacer la ayuda multi-contexto ya se + cambiará. + + * Aun no podemos considerar expresion.c terminado, ya que queda el código + para la evaluación de sentencias de asignación, expresiones variables y + condiciones. + + * Se que el codigo, tal como esta ahora es ilegible, (especialmente + expresion.c y parser.c), pero me hubiera llevado semanas ordenarlo tal + como lo he hecho con plexico() por ejemplo, ya me pondré un día a hacerlo + y de paso destriparlo bien y poner todos los comentarios que pueda (por + ahora he puesto comentarios a todos los errores, para saber cuáles son) + + * Ah, y he hecho una dll llamada "edivstd" se que ya la odiais de solo ver + el nombre, pero es necesaria una libreria "estandar" para cosas tan basicas + e inclasificables como las opciones de compilacion (ya implementadas, por + cierto :D ), la estructura local reserved, las locales father, smallbro, + bigbro, etc. Estas cosas pertenecen al gestor de procesos y eso es algo + que viene incluido en el stub. + + (Er_Makina) + + +18/6/2001 +--------- + + * La versión de Linux ya carga y registra los *.so al igual que la de win + hacía con las *.dll. Terminado el ediv_export.c, ya soporta datos locales + aunque aún hay que retocar un poco la exportación de funciones. Por + cierto, se me olvidó decir que eliminé el rollo del /src/gcc-linux porque + ahora que tenemos makefiles decentes ya no sirve para nada. (Er_Makina) + + +17/6/2001 +--------- + + * La versión de Linux ya tiene todos sus makefiles y ya encuentra las *.so. + He modificado ligeramente el export.h para hacerlo compatible y he inclu- + ido una dll de muestra, sample. Aun no he probado a compilarla en win32. + (Er_Makina) + + +15/6/2001 +--------- + + * Incluyo los ficheros necesarios para compilar bajo Linux, en src/gcc-linux + Hay que leer el archivo "MUY IMPORTANTE" que se encuentra en ese directorio. + Estos archivos solo son para desarrollo, es decir que requieren las rutas + relativas del CVS y por tanto NO DEBEN SER INCLUIDOS EN LOS PAQUETES DIS- + TRIBUIDOS. Algún día meteré ahí un directorio con un script que genere + automáticamente el paquete de código fuente para Linux, al estilo GNU. + (Er_Makina) + + +14/6/2001 +--------- + + * Pakeo rapido, version con soporte para linux aunque aun por terminar. Ya esta + hecha la sustitucion de _findfirst y _findnext aunque aun queda por terminar +de + implementar el soporte .so. + Por hacer: terminar soporte .so y hacer el SDK para los .so (quizas haga + falta un export.h distinto?) a ser posible que se pueda utilizar el mismo src + para hacer una .dll y un .so, please mejor dicho esto es OBLIGATORIO + (Er_Makina) + + +15/04/2001 +---------- + + * Añadido CheckWindowsVersion a Dll_Load.c. Ahora esta funcion se + llama justo antes de InitialiceDllLoad para ajustar g_bIsWinNT a + 1 o 0, dependiendo si usamos WINNT/WIN2K o Win'9x/Me. (Daijo). + diff --git a/ediv/Soporte Div2.txt b/ediv/Soporte Div2.txt new file mode 100644 index 0000000..bbb24e7 --- /dev/null +++ b/ediv/Soporte Div2.txt @@ -0,0 +1,101 @@ ++---------------+ +| | +| * Hecho | +| ! Atencion | +| >> Por hacer | +| | ++---------------+ + +******************* FUNCIONES ************************************************************* + + ! collision graphics.dll + De momento solo calcula colisiones entre surfaces, falta hacer que discrimine los puntos trasparentes. + * get_angle math.dll + * get_dist math.dll + * get_distx math.dll + * get_disty math.dll + * get_id edivstd.dll +>> let_me_alone edivstd.dll +>> signal edivstd.dll + + ! advance graphics.dll + De momento esta en la graphics.dll, pero debera definirse en edivstd.dll, desde donde llamara a la funcion requerida segun el ctype. + * fget_angle math.dll + * fget_dist math.dll + * near_angle math.dll + ! xadvance graphics.dll + De momento esta en la graphics.dll, pero debera definirse en edivstd.dll, desde donde llamara a la funcion requerida segun el ctype. + + * abs math.dll +>> acos math.dll +>> asin math.dll +>> atan math.dll +>> atan2 math.dll + * cos math.dll + * pow math.dll + * sin math.dll + * sqrt math.dll + * tan math.dll + * rand math.dll + * rand_seed math.dll + + * clear_screen graphics.dll + * get_pixel graphics.dll + * map_block_copy graphics.dll + * map_get_pixel graphics.dll + * map_put_pixel graphics.dll +>> map_xput graphics.dll + * new_map graphics.dll + * put graphics.dll + * put_pixel graphics.dll + * put_screen graphics.dll + * screen_copy graphics.dll +>> xput graphics.dll + + ! draw graphics.dll + ! move_draw graphics.dll + draw y move_draw de momento solo dibujan Rectangulos rellenos + * delete_draw graphics.dll + + * define_region edivstd.dll + ! out_region graphics.dll + La he metido en la graphics porque necesita acceder a la informacion del graph, sin embargo esto podria meterse en la edivstd si la graphics hiciese publicos los mapas + + ! get_point graphics.dll + ! get_real_point graphics.dll + ! graphic_info graphics.dll + falta probarlas + + * load_fnt text.dll + * write text.dll + * write_int text.dll + * move_text text.dll + * delete_text text.dll + + * fopen file.dll + * fwrite file.dll + * fread file.dll +>> filelength file.dll + Como se hace esto con streams??? se me ocurre una forma haciendo : + temp = ftell() ; + fseek(seek_end) ; + length = ftell() ; + fseek( temp ) ; + return length ; + Pero no hay nada mas sencillo k esto??? + * fseek file.dll + * flush file.dll + * fclose file.dll + + * malloc dinmem.dll + * free dinmem.dll + + + + + + + + + + diff --git a/ediv/authors.txt b/ediv/authors.txt new file mode 100644 index 0000000..294fa40 --- /dev/null +++ b/ediv/authors.txt @@ -0,0 +1,65 @@ +Programadores +------------- + +- Er_Makina (ermakina@ya.com) +- Riseven (riseven@hotmail.com) +- |RooT| (alfaher@terra.es) +- Daijo (daijo@softhome.net) + + +Traductores +----------- + +- CicTec (italiano) (francesco.amato4@tin.it) +- tareko (português) (miauz@clix.pt) +- Er_Makina (inglés) (ermakina@ya.com) +- BenKo (català) (benkojedi@hotmail.com) +- Jorge Urreta (euskera) (jurreta@navegalia.com) +- Bb_LaRiOs (francés) (daniel@danielesteban.com) + +Betatesters +----------- + +- Matías Iacono (gmakers@yahoo.com) +- EHSN (EHSN@softhome.net) +- chinodiv (zacsoft@hotmail.com) +- [hallg] (hallg_@hotmail.com) +- loxo (loxo_war@ono.com) +- djpipo (djpipo@mundofree.com) +- Tomás Baenas (tomas.baenas@terra.es) +- Pato (pgsimon@yahoo.com) +- Jags Andrew (jags90@yahoo.com) +- BenKo (benkojedi@hotmail.com) +- Ferminho +- Bb_LaRiOs (daniel@danielesteban.com) +- CicTec (francesco.amato@tin.it) +- Satv +- Joyal +- SHeLe +- fidojones +- Paradigma Studios (mx.geocities.com/paradigma_studios) + + +Webmaster +--------- + +- Er_Makina (ermakina@ya.com) + + +Agradecimientos +--------------- + +- Daijo +- Daniel Navarro +- José Luis Cebrián +- Beorn +- Equipo de Hammer Technologies: + + · Juanjo Garrido + · Luis Fernando Fernández + · Fernando Pérez + · Antonio Marchal + · Luis Sureda + · Manuel Cabañas + · Daniel Muñoz + · etc... diff --git a/ediv/bin/BILL1.FNT b/ediv/bin/BILL1.FNT new file mode 100644 index 0000000..3fc956f Binary files /dev/null and b/ediv/bin/BILL1.FNT differ diff --git a/ediv/bin/bum.prg b/ediv/bin/bum.prg new file mode 100644 index 0000000..f57bebf --- /dev/null +++ b/ediv/bin/bum.prg @@ -0,0 +1,29 @@ +program bum; +private + numprocs; + +begin + rand_seed(343); + load_bmp("hola.bmp"); + load_fnt("system.fnt"); + write_int(1,0,0,0,&numprocs); + loop + if(key(_space)) cosa(); numprocs++; end + frame; + end +end + +process cosa() +begin + graph=1000; + + x=rand(0,319); + y=rand(0,199); + + loop + frame; + x+=rand(-1,1); + y+=rand(-1,1); + end +end + diff --git a/ediv/bin/colorido.prg b/ediv/bin/colorido.prg new file mode 100644 index 0000000..a6a636e --- /dev/null +++ b/ediv/bin/colorido.prg @@ -0,0 +1,60 @@ +PROGRAM colorido; +LOCAL + i1 , i2 ; + r , g , b ; + fondo ; + vx , vy ; + angulo ; + graf_barra[200] ; + +BEGIN + rand_seed( 0 ) ; + + from i2 = 36 to 165 ; + for ( i1 = 160 - ((( i2-36 ) * 75 ) / 129 ) ; i1 < 160 + ((( i2-36 ) * 75 ) / 129 ) ; i1++ ) + r = 255 - 2*fget_dist( i1 , i2 , 160 , 36 ) ; if ( r< 0) r = 0 ; end + g = 255 - 2*fget_dist( i1 , i2 , 85 , 165 ) ; if ( g< 0) g = 0 ; end + b = 255 - 2*fget_dist( i1 , i2 , 245 , 165 ) ; if ( b< 0) b = 0 ; end + put_pixel( i1 , i2 , rgb(r,g,b) ) ; + end + FRAME; + end + + fondo = new_map( 320 , 200 , 0 , 0 , 0 ) ; + screen_copy( 0 , 0 , fondo , 0 , 0 , 320 , 200 ) ; + map_block_copy( 0 , graph , 0 , 0 , fondo , 85 , 36 , 150 , 126 ) ; + clear_screen() ; + angle = 1500 ; + from i1 = 0 to 199 ; + angle+= 3000 ; + graf_barra[i1] = new_map( 320 , 1 , 0 , 0 , 0 ) ; + map_block_copy( 0 , graf_barra[i1] , 0 , 0 , fondo , 0 , i1*1 , 320 , 1 ) ; + end + + vx = rand( -3 , 3 ) ; + vy = rand( -3 , 3 ) ; + + flags = 4 ; + transparency = 128 ; + + loop + angle+= 15000 ; + from i1 = 0 to 199 ; + put( 0 , graf_barra[i1] , cos(angle+i1*6000) / 50 , i1 *1 ) ; + end + + frame; + clear_screen() ; + end +end + + +PROCESS barra( graph , angle , y ) ; +BEGIN + + LOOP + angle += 15000 ; + x = cos(angle+i1*30000) / 50 ; + FRAME; + END +END diff --git a/ediv/bin/draw.txt b/ediv/bin/draw.txt new file mode 100644 index 0000000..473a0f4 diff --git a/ediv/bin/ediv.cfg b/ediv/bin/ediv.cfg new file mode 100644 index 0000000..4227b8d --- /dev/null +++ b/ediv/bin/ediv.cfg @@ -0,0 +1,35 @@ +[general] +;lang=en ; Idioma forzado +motd_host=divsite.net ; Hostname de donde coger el motd + +[default_compiler_options] +max_process=20 ; Por poner algo xD +free_sintax=0 ; No hay sintaxis libre +extended_conditions=0 ; No hay condiciones extendidas +case_sensitive=0 ; Sin case sensitive +ignore_errors=0 ; No ignorar errores +no_strfix=0 ; +no_id_check=0 ; +no_optimization=1 ; Para las pruebas de momento ;) +no_range_check=0 ; +no_null_check=0 ; +no_check=0 ; + +[dll] +windll=dll ; Subdirectorio o path a las dll de win +nixdll=so ; Subdirectorio o path a las dll de Linux + +; PRIORIDADES DE LAS DLLs +; La prioridad por defecto es 0. +; Con prioridad 512, la librer¡a siempre se carga. +; Con prioridad -512, la librer¡a se desactiva. + +[dll_priority] +edivstd=512 +graphics=512 +sample=-512 +prueba=-512 +video=-512 +;graphics=-512 +;video=512 +;prueba=-512 diff --git a/ediv/bin/hola.bmp b/ediv/bin/hola.bmp new file mode 100644 index 0000000..fbfadbf Binary files /dev/null and b/ediv/bin/hola.bmp differ diff --git a/ediv/bin/hola.prg b/ediv/bin/hola.prg new file mode 100644 index 0000000..8856ac9 --- /dev/null +++ b/ediv/bin/hola.prg @@ -0,0 +1,16 @@ +program hola; +private + fuente; + +begin + graph=load_bmp("hola.bmp"); + x=160; + y=100; + fuente=load_fnt("system.fnt"); + write(fuente,160,40,4,"HOLA"); + loop + frame; + size+=10; + end +end + diff --git a/ediv/bin/makelib.bat b/ediv/bin/makelib.bat new file mode 100644 index 0000000..a45dab6 --- /dev/null +++ b/ediv/bin/makelib.bat @@ -0,0 +1,21 @@ +@echo off + +:: Esto crea EDIVRUN.LIB, a partir de STUB.EXE + +if [%1]==[] goto err3 +if exist temp.dj! del temp.dj! +if not exist stub.exe goto err1 +if not exist encrypt.exe goto err2 +if exist %1 del %1 +encrypt.exe %1 +if not exist %1 echo algo ha pasao, porque no se ha creado la %1... +goto fin +:err1 +echo no encuentro STUB.EXE ¨lo has compilado? +goto fin +:err2 +echo no encuentro ENCRYPT.EXE ¨lo has compilado? +goto fin +:err3 +echo debes indicar el nombre de la libreria a crear (p.ej. WIN32.REL) +:fin diff --git a/ediv/bin/makelib.sh b/ediv/bin/makelib.sh new file mode 100644 index 0000000..cfdae36 --- /dev/null +++ b/ediv/bin/makelib.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Esto es igual que MAKELIB.BAT, solo que para Linux + +# OBSOLETO # ACTUALIZAR ! + +if ! test -f "stub"; then + echo "no encuentro el fichero \"stub\" ¿lo has compilado?"; + exit 1; +fi + +if ! test -f "encrypt"; then + echo "no encuentro el programa \"encrypt\" ¿lo has compilado?"; + exit 1; +fi + +./encrypt + +if ! test -f "edivrun.a"; then + echo "algo ha pasao, porque no se ha creado el \"edivrun.a\"..."; + exit 1; +fi diff --git a/ediv/bin/system.fnt b/ediv/bin/system.fnt new file mode 100644 index 0000000..d86800a Binary files /dev/null and b/ediv/bin/system.fnt differ diff --git a/ediv/bin/system/ltlex.def b/ediv/bin/system/ltlex.def new file mode 100644 index 0000000..46fb1cd --- /dev/null +++ b/ediv/bin/system/ltlex.def @@ -0,0 +1,136 @@ + +;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ +; Definiciones de tokens +;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ +; Si se declaran dos o m s s¡mbolos con el mismo identificador, solo se +; reconocer  el primero (sean tokens u objetos de la tabla) +; Limitaci¢n, no mezclar s¡mbolos con car cteres de identificador en un +; solo token (los car cteres de ident. son los que est n en lower[]). +; Est n libres para ser redefinidos los c¢digos de token &01..&77 (hex) +;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ + +&01program ;Program +&02const ;Const +&03global ;Global +&04local ;Local +&05begin ;Begin +&06end ;End +&07process ;Process +&08private ;Private +&09struct ;Struct +&0Aimport ;Import +&0Bsetup_program ;Setup_program + +&0Cstring ;String +&0Dbyte ;Byte +&0Eword ;Word +&0Fint ;Int + +&10compiler_options ;Compiler_options +&11function ;Function + +&15until ;Until (antes &16) +&16else ;Else (antes &17) +&17elseif ;Elseif (NUEVO) + +&18return ;Return + +&19from ;From +&1Ato ;To +&1Bstep ;Step + +&20if ;If + +&21loop ;Loop +&22while ;While +&23repeat ;Repeat +&24for ;For + +&25switch ;Switch +&26case ;Case +&27default ;Default + +&28frame ;Frame + +&29break ;Break +&2Acontinue ;Continue + +&2Bclone ;Clone + +&2Cdebug ;Debug + +&30; &30: ;Separador de sentencias +&31, ;Separador de expresiones + +&32[ ;Indirecci¢n, inicio +&33] ;Indirecci¢n, final + +&38= &38:= ;Asignaci¢n + +&3Cdup ;Dup + +&40( ;Par‚ntesis, apertura +&41) ;Par‚ntesis, cierre + +;&44add ;Suma exclusivamente binaria, pasa a + en tab_exp +;&45sub ;Resta exclusivamente binaria, pasa a - + +&46>> ;Rotaci¢n a la derecha +&47<< ;Rotaci¢n a la izquierda + +&48or &48|| &48| ;Or l¢gico +&49xor &49^^ ;Xor l¢gico +&4Aand &4A&& ;And l¢gico + +&4B^ ;Pointer (unario) o bien xor l¢gico (binario) +&4C& ;Offset (unario) o bien and l¢gico (binario) + +&4Eneg ;Signo menos unario +&4Fpointer ;Operador de indirecci¢n, unario + +&50offset ;Desplazamiento unaria +&51! &51not ;Negaci¢n l¢gica unaria + § +&52+ ;Suma binaria, usado como unario es ignorado +&53- ;Resta binaria, usado como unario equivale a neg + +&54* ;Multiplicaci¢n, usado como unario equivale a pointer +&55/ ;&55div ;Divisi¢n entera, cociente +&56% &56mod ;M¢dulo, resto de divisi¢n entera +;&57mul ;Multiplicaci¢n exclusivamente binaria, pasa a * + +&58++ ;Incremento +&59-- ;Decremento + +&5B== &5B_eq ;Igual, operador binario de comparaci¢n +&5C<> &5C!= &5C_ne ;Diferente + +&5D> &5D_gt ;Mayor +&5E< &5E_lt ;Menor +&5F<= &5F=< &5F_le ;Menor o igual +&60>= &60=> &60_ge ;Mayor o igual + +&66sizeof ;Funci¢n sizeof() interna, devuelve longitud + +&67type ;Operando que significa el c¢digo del proceso ejecutado + +&68id &68whoami ;Operando que significa el c¢digo del proceso ejecutado + +&69. &69-> ;Operador de acceso a variables ajenas (ej.: nave.x) + +&6A.. ;Especificador de rango (dentro de un case) + +&6B+= ;Asignaciones operativas (abreviaturas de C) +&6C-= +&6D*= +&6E/= +&6F%= +&70&= +&71|= +&72^= +&73>>= +&74<<= + +;ÄÄÄ C¢digos de token especiales o reservados ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ + +&00 \ No newline at end of file diff --git a/ediv/bin/test/colorido.prg b/ediv/bin/test/colorido.prg new file mode 100644 index 0000000..a6a636e --- /dev/null +++ b/ediv/bin/test/colorido.prg @@ -0,0 +1,60 @@ +PROGRAM colorido; +LOCAL + i1 , i2 ; + r , g , b ; + fondo ; + vx , vy ; + angulo ; + graf_barra[200] ; + +BEGIN + rand_seed( 0 ) ; + + from i2 = 36 to 165 ; + for ( i1 = 160 - ((( i2-36 ) * 75 ) / 129 ) ; i1 < 160 + ((( i2-36 ) * 75 ) / 129 ) ; i1++ ) + r = 255 - 2*fget_dist( i1 , i2 , 160 , 36 ) ; if ( r< 0) r = 0 ; end + g = 255 - 2*fget_dist( i1 , i2 , 85 , 165 ) ; if ( g< 0) g = 0 ; end + b = 255 - 2*fget_dist( i1 , i2 , 245 , 165 ) ; if ( b< 0) b = 0 ; end + put_pixel( i1 , i2 , rgb(r,g,b) ) ; + end + FRAME; + end + + fondo = new_map( 320 , 200 , 0 , 0 , 0 ) ; + screen_copy( 0 , 0 , fondo , 0 , 0 , 320 , 200 ) ; + map_block_copy( 0 , graph , 0 , 0 , fondo , 85 , 36 , 150 , 126 ) ; + clear_screen() ; + angle = 1500 ; + from i1 = 0 to 199 ; + angle+= 3000 ; + graf_barra[i1] = new_map( 320 , 1 , 0 , 0 , 0 ) ; + map_block_copy( 0 , graf_barra[i1] , 0 , 0 , fondo , 0 , i1*1 , 320 , 1 ) ; + end + + vx = rand( -3 , 3 ) ; + vy = rand( -3 , 3 ) ; + + flags = 4 ; + transparency = 128 ; + + loop + angle+= 15000 ; + from i1 = 0 to 199 ; + put( 0 , graf_barra[i1] , cos(angle+i1*6000) / 50 , i1 *1 ) ; + end + + frame; + clear_screen() ; + end +end + + +PROCESS barra( graph , angle , y ) ; +BEGIN + + LOOP + angle += 15000 ; + x = cos(angle+i1*30000) / 50 ; + FRAME; + END +END diff --git a/ediv/bin/test/test_regiones.prg b/ediv/bin/test/test_regiones.prg new file mode 100644 index 0000000..5fb81f5 --- /dev/null +++ b/ediv/bin/test/test_regiones.prg @@ -0,0 +1,41 @@ +PROGRAM regiones; +GLOBAL + grafico ; + cuad ; + tras = 0 ; +LOCAL + i1 , i2 ; +BEGIN + define_region(1 , 0 , 0 , 200 , 200 ) ; + region = 1 ; +// cuad = draw( 3 , rgb(0,255,0) , 14 , 0 , 10 , 10 , 20 , 20 ) ; + graph = load_bmp("sion.bmp") ; + file = load_fpg("test.fpg") ; + put_screen(file,1) ; + detras() ; + //graph = 1 ; + LOOP + +// tras = (tras+1) % 16 ; +// if ( tras > 15 ) tras = 0 ; end +// move_draw( cuad , rgb(0,255,0) , tras , 10+tras , 10+tras*2 , 20+tras*2 , 20+tras*4 ) ; + if ( key(_right)) x+=5 ; end + if ( key(_left)) x-=5 ; end + if ( key(_up)) y-= 5 ; end + if ( key(_down)) y+=5 ; end +// if ( key(_d)) delete_draw( cuad ) ; end + FRAME; + END +END + +PROCESS detras() +BEGIN + + graph = load_bmp("ediv.bmp") ; + x = 160 ; + y = 100 ; + z = 10 ; + LOOP + FRAME; + END +END diff --git a/ediv/bin/test/triangulo_putpixel.prg b/ediv/bin/test/triangulo_putpixel.prg new file mode 100644 index 0000000..69c646f --- /dev/null +++ b/ediv/bin/test/triangulo_putpixel.prg @@ -0,0 +1,22 @@ +PROGRAM colorido; +LOCAL + i1 , i2 ; + r , g , b ; +BEGIN + + + from i2 = 36 to 165 ; + for ( i1 = 160 - ((( i2-36 ) * 75 ) / 129 ) ; i1 < 160 + ((( i2-36 ) * 75 ) / 129 ) ; i1++ ) + r = 255 - 2*fget_dist( i1 , i2 , 160 , 36 ) ; if ( r< 0) r = 0 ; end + g = 255 - 2*fget_dist( i1 , i2 , 85 , 165 ) ; if ( g< 0) g = 0 ; end + b = 255 - 2*fget_dist( i1 , i2 , 245 , 165 ) ; if ( b< 0) b = 0 ; end + put_pixel( i1 , i2 , rgb(r,g,b) ) ; + end + end + + + + loop + frame; + end +end \ No newline at end of file diff --git a/ediv/bin/test_regiones.prg b/ediv/bin/test_regiones.prg new file mode 100644 index 0000000..5fb81f5 --- /dev/null +++ b/ediv/bin/test_regiones.prg @@ -0,0 +1,41 @@ +PROGRAM regiones; +GLOBAL + grafico ; + cuad ; + tras = 0 ; +LOCAL + i1 , i2 ; +BEGIN + define_region(1 , 0 , 0 , 200 , 200 ) ; + region = 1 ; +// cuad = draw( 3 , rgb(0,255,0) , 14 , 0 , 10 , 10 , 20 , 20 ) ; + graph = load_bmp("sion.bmp") ; + file = load_fpg("test.fpg") ; + put_screen(file,1) ; + detras() ; + //graph = 1 ; + LOOP + +// tras = (tras+1) % 16 ; +// if ( tras > 15 ) tras = 0 ; end +// move_draw( cuad , rgb(0,255,0) , tras , 10+tras , 10+tras*2 , 20+tras*2 , 20+tras*4 ) ; + if ( key(_right)) x+=5 ; end + if ( key(_left)) x-=5 ; end + if ( key(_up)) y-= 5 ; end + if ( key(_down)) y+=5 ; end +// if ( key(_d)) delete_draw( cuad ) ; end + FRAME; + END +END + +PROCESS detras() +BEGIN + + graph = load_bmp("ediv.bmp") ; + x = 160 ; + y = 100 ; + z = 10 ; + LOOP + FRAME; + END +END diff --git a/ediv/bin/text.txt b/ediv/bin/text.txt new file mode 100644 index 0000000..a888d9b --- /dev/null +++ b/ediv/bin/text.txt @@ -0,0 +1,3 @@ +Leidos 2072 bytes +Size of image: 50652 bytes +Leidos 50652 bytes diff --git a/ediv/bin/time.txt b/ediv/bin/time.txt new file mode 100644 index 0000000..473a0f4 diff --git a/ediv/bin/triangulo_putpixel.prg b/ediv/bin/triangulo_putpixel.prg new file mode 100644 index 0000000..69c646f --- /dev/null +++ b/ediv/bin/triangulo_putpixel.prg @@ -0,0 +1,22 @@ +PROGRAM colorido; +LOCAL + i1 , i2 ; + r , g , b ; +BEGIN + + + from i2 = 36 to 165 ; + for ( i1 = 160 - ((( i2-36 ) * 75 ) / 129 ) ; i1 < 160 + ((( i2-36 ) * 75 ) / 129 ) ; i1++ ) + r = 255 - 2*fget_dist( i1 , i2 , 160 , 36 ) ; if ( r< 0) r = 0 ; end + g = 255 - 2*fget_dist( i1 , i2 , 85 , 165 ) ; if ( g< 0) g = 0 ; end + b = 255 - 2*fget_dist( i1 , i2 , 245 , 165 ) ; if ( b< 0) b = 0 ; end + put_pixel( i1 , i2 , rgb(r,g,b) ) ; + end + end + + + + loop + frame; + end +end \ No newline at end of file diff --git a/ediv/bin/wrin.txt b/ediv/bin/wrin.txt new file mode 100644 index 0000000..6817055 --- /dev/null +++ b/ediv/bin/wrin.txt @@ -0,0 +1 @@ +valor: 130 diff --git a/ediv/bugs.txt b/ediv/bugs.txt new file mode 100644 index 0000000..45e373f --- /dev/null +++ b/ediv/bugs.txt @@ -0,0 +1,3 @@ +fallo de rango en Rand +teclado -> se sale solo +teclado -> se bloquea ( ¿todo o solo el teclado? ) diff --git a/ediv/doc/DLL_sdk.txt b/ediv/doc/DLL_sdk.txt new file mode 100644 index 0000000..3703655 --- /dev/null +++ b/ediv/doc/DLL_sdk.txt @@ -0,0 +1,54 @@ + COMO CREAR UNA DLL +==================== + +1. Creamos un proyecto de DLL (logico) + +2. Metemos el export.h y el .c principal + +3. Añadimos el .DEF al proyecto con el siguiente contenido: + + LIBRARY nombre_de_la_libreria + EXPORTS + ExportaFuncs + +3. Metemos en dllmain (vacio, debe devolver TRUE) + +4. Creamos la función ExportaFuncs: + + int ExportaFuncs(TYPEOF_EDIV_Export *pEDIV_Export) + { + EDIV_Export=pEDIV_Export; // ojo, esto es obligatorio + } + + +PARA AÑADIR FUNCIONES: + +5. Hacemos las funciones de la siguiente forma: + + int nombre_funcion (FUNCTION_PARAMS) + { + param_n=getparm(); + ... + param_2=getparm(); + param_1=getparm(); + + // todo el código de la funcion + + return valor_de_retorno; + } + + para coger los parametros, lo hacemos del ultimo al primero con getparm() + para leer strings, bastara con poner param=(char*)getparm(); + +6. Declaramos la funcion (en el .h o en el .c), lo digo porque esto suele olvidarse + +7. Y por último, añadimos el EDIV_Export correspondiente en la función ExportaFuncs. Se usa de esta manera: + + EDIV_Export ("cadena",nparametros,nombre_funcion); + + - "cadena" es la cadena a comparar en el programa (el nombre que tendrá la función en el lenguaje) + + - nparametros es el número de parámetros que recibe la función + + - nombre_funcion es el nombre de la función en la DLL (es decir, aquí se pasa un puntero a la función) + diff --git a/ediv/doc/ExportaFuncs.txt b/ediv/doc/ExportaFuncs.txt new file mode 100644 index 0000000..5c5367e --- /dev/null +++ b/ediv/doc/ExportaFuncs.txt @@ -0,0 +1,242 @@ + ** EXPORTACIÓN DE DATOS EN UNA DLL DE eDIV ** + +POR HACER: Cómo utilizar datos declarados en otras DLLs + +En DIV 1 y 2 existen los llamados "objetos predefinidos". Estos objetos +se declaran en el archivo LTOBJ.DEF, y hacen alusión a los datos que +más tarde manejará la librería DIV32RUN.DLL. + +En eDIV no existen objetos predefinidos, ya que absolutamente todas las +funciones se tratan como externas, en DLLs independientes, es decir, +no hay una librería omnipresente como la DIV32RUN.DLL. + +Como es de todos sabido, desde una DLL para DIV 1 ó 2 se pueden exportar +funciones, indicándolo con la función COM_Export, que se llama desde +divmain. Ambas están declaradas en el fichero DIV.H. + +En eDIV existe un equivalente del DIV.H, es el EXPORT.H, aunque las +funciones y datos que pone a disposición de la DLL son más numerosos, +ya que en eDIV necesitamos una total funcionalidad para las DLLs. Por +tanto, el equivalente de divmain es ExportaFuncs, y el de COM_Export es +EDIV_Export, pero no nos quedamos ahí, ya que para cubrir los objetos +predefinidos de DIV necesitamos exportar muchos tipos de datos: +EDIV_Export_Const, EDIV_Export_Global, etc. + +Como los nombres de las funciones resultaron muy largos, hemos incluido +en EXPORT.H una serie de #defines que hacen que la declaración de datos +a exportar sea más cómoda, y de paso más parecida a la sintaxis que se +utiliza en el LTOBJ.DEF o en el propio DIV. + +A continuación damos una descripción de las sentencias que hay que utilizar en la función +ExportaFuncs para exportar objetos: + + +DECLARACIÓN DE FUNCIONES +-------------------------- + +Las funciones pueden retornar tanto ints como cadenas (dependiendo de cómo se interprete). +Los parámetros, de igual forma, también pueden ser ints o cadenas. + +* FUNCTION + +Sintaxis: FUNCTION ( "nombre_funcion", n_parametros, nombre_interno ) ; + +Equivalente a: Function nombre_funcion(n_parametros); + +"nombre_funcion" es el nombre que la función tendrá dentro de eDIV. +n_parametros es el número de parámetros de la función. +nombre_interno es el nombre que tiene la función dentro del código fuente de la DLL. + +Ejemplo: FUNCTION ("load_map",1,DIV_Load_Map); + + + DECLARACIÓN DE CONSTANTES +--------------------------- + +Las constantes sólo pueden ser de tipo int. + +* CONST + +Sintaxis: CONST ( "nombre", valor ) ; + +Equivalente a: Const nombre=valor; + +"nombre" es el nombre que tendrá la constante dentro de eDIV. +valor es el valor que tendrá la constante. + +Ejemplo: CONST ("m320x200",320200); + + + + DECLARACIÓN DE DATOS GLOBALES +------------------------------- + +* GLOBAL + +Exporta una variable global. Sólo pueden ser de tipo int. + +Sintaxis: GLOBAL ("nombre", valor ) ; + +Equivalente a: Global nombre(=valor); + +"nombre" es el nombre que tendrá la variable dentro de eDIV. +valor es el valor que tendrá por defecto la variable. + +Ejemplo: GLOBAL ("max_process_time",500); + + +* GLOBAL_ARRAY + +Exporta un array (tabla) global. Sólo pueden ser de tipo int (o punteros a char). +No se puede inicializar la tabla. Todos sus registros serán automáticamente inicializados a 0 (aunque se puede modificar después). +Desde eDIV, siempre se podrá acceder al primer registro de la tabla escribiendo simplemente el nombre, o bien nombre[0] + +Sintaxis: GLOBAL_ARRAY ( "nombre", numero_de_registros ) ; + +Equivalente a: Global nombre[numero_de_registros]; + +"nombre" es el nombre que tendrá la tabla dentro de eDIV. +numero_de_registros es el número de registros de la tabla. + +Ejemplo: GLOBAL_ARRAY ("timer",9); + +* GLOBAL_STRUCT + +Exporta una estructura o tabla de estructuras global. +Al igual que en las tablas de int, desde eDIV siempre se podrá acceder a la primera estructura de la tabla escribiendo simplemente el nombre, o bien nombre[0] + +Sintaxis: GLOBAL_STRUCT ( "nombre", numero_de_registros ) ; + + // Declaraciones de miembros (ver más abajo) + + END_STRUCT ; + +Equivalente a: Global Struct nombre[numero_de_registros] + // declaraciones + End + +"nombre" es el nombre de la estructura dentro de eDIV. +numero_de_registros es el número de registros de la tabla de estructuras, o bien 0 para que sea un único registro. + +Ejemplo: GLOBAL_STRUCT ("video_modes",31); + _INT("wide",0); + _INT("height",0); + _INT("mode",0); + END_STRUCT; + + + + DECLARACIÓN DE DATOS LOCALES +------------------------------- + +* LOCAL + +Exporta una variable local. Sólo pueden ser de tipo int. + +Sintaxis: LOCAL ("nombre", valor ) ; + +Equivalente a: Local nombre(=valor); + +"nombre" es el nombre que tendrá la variable dentro de eDIV. +valor es el valor que tendrá por defecto la variable en todos los procesos. + +Ejemplo: LOCAL ("graph",0); + + +* LOCAL_ARRAY + +Exporta un array (tabla) local. Sólo pueden ser de tipo int (o punteros a char). +No se puede inicializar la tabla. Todos sus registros serán automáticamente inicializados a 0 (aunque se puede modificar después). +Desde eDIV, siempre se podrá acceder al primer registro de la tabla escribiendo simplemente el nombre, o bien nombre[0] + +NOTA: ESTE TIPO DE DATOS NO SE UTILIZA (DE FORMA PREDEFINIDA) EN DIV2. Lo hemos incluido en eDIV por su posible utilidad en DLLs personalizadas. + +Sintaxis: LOCAL_ARRAY ( "nombre", numero_de_registros ) ; + +Equivalente a: Local nombre[numero_de_registros]; + +"nombre" es el nombre que tendrá la tabla dentro de eDIV. +numero_de_registros es el número de registros de la tabla. + + +* LOCAL_STRUCT + +Exporta una estructura o tabla de estructuras local. +Al igual que en las tablas de int, desde eDIV siempre se podrá acceder a la primera estructura de la tabla escribiendo simplemente el nombre, o bien nombre[0] + +Sintaxis: LOCAL_STRUCT ( "nombre", numero_de_registros ) ; + + // Declaraciones de miembros (ver más abajo) + + END_STRUCT ; + +Equivalente a: Local Struct nombre[numero_de_registros] + // declaraciones + End + +"nombre" es el nombre de la estructura dentro de eDIV. +numero_de_registros es el número de registros de la tabla de estructuras, o bien 0 para que sea un único registro. + +Ejemplo: LOCAL_STRUCT ("reserved",0); + _INT("process_id",0); + _INT("id_scan",0); + _INT("process_type",0); + _INT("type_scan",0); + // etc etc etc + END_STRUCT; + + + + DECLARACIÓN DE MIEMBROS DE ESTRUCTURAS +---------------------------------------- + +Las declaraciones de estructuras dentro del código fuente de la DLL funcionan como bloques, parecido a como se declaran las estructuras en DIV. + +* _INT + +Declara un miembro de tipo int. + +Sintaxis: _INT ( "nombre", valor ) ; + +Equivalente a: Int nombre(=valor); + +"nombre" es el nombre del miembro de la estructura, dentro de eDIV. +valor es el valor que el miembro toma por defecto en la estructura. Si la estructura tiene varios registros (es decir, si es una tabla de estructuras), el miembro será inicializado con ese valor en todos los registros de la tabla. + +Ejemplo: _INT("distance",64); + + +* _STRING + +Declara un miembro de tipo string. + +Sintaxis: _STRING ( "nombre", tamaño ) ; + +Equivalente a: String nombre[tamaño]; + +"nombre" es el nombre del miembro de la estructura, dentro de eDIV. +tamaño es el tamaño máximo que se reservará para la cadena. + +Ejemplo: _STRING("fullpath",254); + + +* _ARRAY + +Declara un miembro como tabla de ints o punteros a char. +No se puede inicializar la tabla. Todos sus registros serán automáticamente inicializados a 0, en todos los registros de la estructura de la que es miembro (aunque esto se puede modificar después). +Desde eDIV, siempre se podrá acceder al primer registro de la tabla escribiendo simplemente el nombre, o bien nombre[0] + +Sintaxis: _ARRAY ( "nombre", numero_de_registros ) ; + +Equivalente a: Int nombre[numero_de_registros]; + +"nombre" es el nombre del miembro de la estructura, dentro de eDIV. +numero_de_registros es el número de registros de la tabla. + +Ejemplo: _ARRAY("name",1024); + + + +(c) Sion Entertainment, 2001 +Redactado por Er_Makina (makinatotal@yahoo.es) +Este documento pertenece al proyecto eDIV SDK \ No newline at end of file diff --git a/ediv/doc/Leeme.txt b/ediv/doc/Leeme.txt new file mode 100644 index 0000000..07e878d --- /dev/null +++ b/ediv/doc/Leeme.txt @@ -0,0 +1,14 @@ +Aquii esta todo lo necesario para poder compilar ediv y demas +componentes. + +para que ediv cree exes hay que hacer esto: (Act. no disponible) +- compilar ediv (claro) +- compilar encrypt +- compilar stub +- en el directorio /bin, ejecutar makelib.bat + +Esto creará el edivrun.lib, que es el stub comprimido y encriptado. +y nada más. Hasta Luego + +Er_Makina +Sion Entertainment \ No newline at end of file diff --git a/ediv/doc/doku.c b/ediv/doc/doku.c new file mode 100644 index 0000000..b27b069 --- /dev/null +++ b/ediv/doc/doku.c @@ -0,0 +1,554 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + +// esta es la tabla donde se almacenan los nombres de las directivas y los textos +// por los que deben ser sustituidas, definidos en template.txt +struct _sust { + char de[20]; + char a[1024]; +} sust[20]; + +// esta funcion recibe un nombre de fichero (actual) y, consultando el index.dok, +// devuelve el documento anterior, el siguiente y el superior. Evidentemente esto +// se usa para generar los enlaces de navegacion. +void situame(char* actual, char* ant, char* sig, char* sup); + +// esta funcion abre el fichero indicado en fixero1 y busca en el el texto +// encerrado entre las directivas <%title%> y <%/title%>, y lo devuelve en +// el puntero "titulo" +void lee_titulo(char* fixero1, char* titulo); + +// esta es llamada cuando nos encontramos con la directiva <%index%>. Parsea +// el arbolito ese con los signos '+' y genera una unordered list mu potita. +void procesa_indice(); + +// esta es llamada cuando encontramos <%subindex%>. Se le indica el fichero +// actual y busca la entrada correspondiente en el index.dok. Entonces parsea +// la porcion de arbol que engloba y genera un subíndice como los de SGML. +void procesa_subindice(char* actual); + + +FILE *f; +int i,tamano; +char* buffer; + +int main(int argc, char* argv[]) +{ + int c,num=-1,j,sw; + char nomfich[256]; + char tag[20]; + int flag=0; + + if(argc!=2) { + printf("Modo de uso: %s \n",argv[0]); + exit(1); + } + + for(i=0;i') i+=2; + c=0; + if(!strcmp(sust[num].de,"index") || !strcmp(sust[num].de,"/index") || + !strcmp(sust[num].de,"subindex")) { + printf("Error en template.txt: \"%s\" es una directiva reservada\n",sust[num].de); + exit(10); + } + } + if(buffer[i]=='"') { + i++; + while(1) { + if(buffer[i]=='"' && buffer[i-1]!='\\') break; + if(buffer[i]=='\\' && buffer[i+1]=='n') + buffer[++i]='\n'; + else if(buffer[i]=='\\' && buffer[i+1]=='"') + buffer[++i]='"'; + sust[num].a[c++]=buffer[i++]; + } + } + } + + free(buffer); + + strcpy(nomfich,argv[1]); + strcat(nomfich,".dok"); + + if((f=fopen(nomfich,"r"))==NULL) { + printf("Error abriendo fichero %s\n",nomfich); + exit(4); + } + + fseek(f,0,SEEK_END); + tamano=ftell(f); + fseek(f,0,SEEK_SET); + + if((buffer=(char*)malloc(tamano+1))==NULL) { + printf("Error: memoria insuficiente\n"); + exit(5); + } + + tamano=fread(buffer,1,tamano,f); + fclose(f); + + buffer[tamano]=0; + + strcpy(nomfich,argv[1]); + strcat(nomfich,".html"); + + if((f=fopen(nomfich,"w"))==NULL) { + printf("Error creando fichero %s\n",nomfich); + exit(7); + } + + printf("Procesando...\n"); + + fprintf(f,"\n"); + for(i=0;i') i+=2; + else { + fclose(f); + printf("Error en tag %s, byte %d\n",tag,i); + exit(8); + } + flag=i; + sw=0; + for(j=0;j<=num;j++) + if(!strcmp(sust[j].de,tag)) { + sw=1; + fwrite(sust[j].a,1,strlen(sust[j].a),f); + break; + } + if(!sw) { + if(!strcmp(tag,"index")) { + procesa_indice(); + flag=i; + } + else if(!strcmp(tag,"subindex")) { + procesa_subindice(argv[1]); + } + else { + fclose(f); + printf("Error: tag no reconocido %s en byte %d\n",tag,i); + exit(9); + } + } + if(!strcmp(tag,"/title") && strcmp(argv[1],"index")) { + char ant[256], sig[256], sup[256]; + char tant[512], tsig[512], tsup[512], tidx[512]; + situame(argv[1],ant,sig,sup); + lee_titulo(ant,tant); + lee_titulo(sig,tsig); + lee_titulo(sup,tsup); + lee_titulo("index",tidx); + fprintf(f,"\n\n\n\n\n
"); + if(*ant!=0) fprintf(f,"Anterior
%s",ant,tant); + else fprintf(f,"Anterior
 "); + fprintf(f,"
"); + if(*sup!=0) fprintf(f,"Subir
%s",sup,tsup); + else fprintf(f,"Subir
%s",tidx); + fprintf(f,"
Contenido" + "
%s
",tidx); + if(*sig!=0) fprintf(f,"Siguiente
%s",sig,tsig); + else fprintf(f,"Siguiente
 "); + fprintf(f,"

\n"); + } + } + } + + fwrite(&buffer[flag],1,strlen(&buffer[flag]),f); + + fclose(f); + + printf("Guardado %s\n",nomfich); + + return 0; +} + +void situame(char* actual, char* ant, char* sig, char* sup) +{ + FILE* fi; + char* buf,tag[20],fixero[256]; + int tam,p,c; + + int nivel=0,ni; + char anterior[256],superior[20][256]; + const char fin[]="<%/index%>"; + int j,sw=0,pillasig=0; + + *ant=0; *sig=0; *sup=0; + + if((fi=fopen("index.dok","r"))==NULL) { + printf("Error: no puedo abrir index.dok\n"); + exit(13); + } + + fseek(fi,0,SEEK_END); + tam=ftell(fi); + fseek(fi,0,SEEK_SET); + + if((buf=(char*)malloc(tam+1))==NULL) { + printf("Error: memoria insuficiente\n"); + exit(14); + } + + tam=fread(buf,1,tam,fi); + fclose(fi); + + buf[tam]=0; + + for(p=0;p') p+=2; + else { + printf("Error en fichero index.dok, tag %s, byte %d\n",tag,p); + exit(15); + } + if(!strcmp(tag,"index")) { + sw=1; + break; + } + } + } + + if(!sw) { + printf("Error: no se encuentra directiva <%index%> en index.dok\n"); + exit(16); + } + + memset(fixero,0,256); + memset(anterior,0,256); + memset(superior,0,256*20); + + for(;pnivel) { + if(ni==20) { + printf("Error: el indice no puede tener mas de 20 niveles\n"); + exit(17); + } + + if(!pillasig) { nivel=ni; strcpy(superior[nivel],fixero); } + } + if(ni31 && buf[p]!='<') + fixero[c++]=buf[p++]; + fixero[c]=0; + if(buf[p]=='<') p--; + if(pillasig) { + strcpy(ant,anterior); + strcpy(sig,fixero); + strcpy(sup,superior[nivel]); + fclose(fi); + free(buf); + return; + } + if(!strcmp(actual,fixero)) pillasig=1; + else strcpy(anterior,fixero); + } + if(pillasig) { + strcpy(ant,anterior); + strcpy(sup,superior[nivel]); + fclose(fi); + free(buf); + return; + } + printf("Error: el documento no esta listado en el indice\n"); + exit(18); +} + +void lee_titulo(char* fixero1, char* titulo) +{ + FILE* fi; + char* buf,tag[20],fixero[256]; + int tam,p,c; + + strcpy(fixero,fixero1); + strcat(fixero,".dok"); + + if((fi=fopen(fixero,"rb"))==NULL) { + sprintf(titulo,"[Error al abrir \"%s\"]",fixero); + return; + } + + fseek(fi,0,SEEK_END); + tam=ftell(fi); + fseek(fi,0,SEEK_SET); + + if((buf=(char*)malloc(tam+1))==NULL) { + printf("Error: memoria insuficiente\n"); + exit(11); + } + + tam=fread(buf,1,tam,fi); + fclose(fi); + + buf[tam]=0; + + for(p=0;p') p+=2; + else { + printf("Error en fichero %s, tag %s, byte %d\n",fixero,tag,p); + exit(13); + } + if(!strcmp(tag,"title")) { + c=0; + while(p"); + fprintf(f,"\n"); + i+=10; + return; + } + while(buffer[i]=='+') { ni++; i++; } + if(ni>nivel) { + if(ni==20) { + printf("Error: el indice no puede tener mas de 20 niveles\n"); + exit(25); + } + for(j=nivel;j"); + fprintf(f,"\n"); + nivel=ni; + } + if(ni"); + fprintf(f,"\n"); + nivel=ni; + } + c=0; + while(buffer[i]>31 && buffer[i]!='<') + fixero[c++]=buffer[i++]; + fixero[c]=0; + if(buffer[i]=='<') i--; + lee_titulo(fixero,titulo); + if(nivel==0) + fprintf(f,"

%s

\n",fixero,titulo); + else + fprintf(f,"
  • %s
  • \n",fixero,titulo); + } +} + +void procesa_subindice(char* actual) +{ + FILE* fi; + char* buf,tag[20],fixero[256],titulo[512]; + int tam,p,c; + + int nivel=0,ni,iniv; + const char fin[]="<%/index%>"; + int j,sw=0,pilla=0; + + if((fi=fopen("index.dok","r"))==NULL) { + printf("Error: no puedo abrir index.dok\n"); + exit(19); + } + + fseek(fi,0,SEEK_END); + tam=ftell(fi); + fseek(fi,0,SEEK_SET); + + if((buf=(char*)malloc(tam+1))==NULL) { + printf("Error: memoria insuficiente\n"); + exit(20); + } + + tam=fread(buf,1,tam,fi); + fclose(fi); + + buf[tam]=0; + + for(p=0;p') p+=2; + else { + printf("Error en fichero index.dok, tag %s, byte %d\n",tag,p); + exit(21); + } + if(!strcmp(tag,"index")) { + sw=1; + break; + } + } + } + + if(!sw) { + printf("Error: no se encuentra directiva <%index%> en index.dok\n"); + exit(22); + } + + for(;pnivel) { + if(ni==20) { + printf("Error: el indice no puede tener mas de 20 niveles\n"); + exit(23); + } + if(pilla && ni==iniv+1) { + //for(j=nivel;j"); + fprintf(f,"\n"); + } + nivel=ni; + } + if(ni"); + // fprintf(f,"\n"); + //} + nivel=ni; + if(pilla && nivel<=iniv) break; + } + c=0; + while(buf[p]>31 && buf[p]!='<') + fixero[c++]=buf[p++]; + fixero[c]=0; + if(buf[p]=='<') p--; + if(!strcmp(actual,fixero)) { + pilla=1; + fprintf(f,"
      "); + iniv=nivel; + } + if(pilla && nivel<=iniv+1) { + lee_titulo(fixero,titulo); + fprintf(f,"
    • %s
    • \n",fixero,titulo); + } + } + if(pilla) { + //for(j=iniv;j<=nivel;j++) + fprintf(f,"
    "); + /*if(nivel"); + fprintf(f,"\n"); + return; + } + printf("Error: el documento no esta listado en el indice\n"); + exit(24); +} \ No newline at end of file diff --git a/ediv/doc/doku.txt b/ediv/doc/doku.txt new file mode 100644 index 0000000..634cebe --- /dev/null +++ b/ediv/doc/doku.txt @@ -0,0 +1,71 @@ + +Doku + +Este es el programa para hacer los documentos de eDIV. Espero que +sepais perdonar el codigo guarrindongo, desordenado y descomentarizado :P +Voy a explicar un poco como funciona: +Los documentos se crean en archivos .dok, que son basicamente archivos +HTML con ciertas directivas especiales encerradas en <% y %> (para +que el dreamweaver los muestre como directivas ASP :) ). SIEMPRE +debe haber un fichero index.dok. Básicamente su estructura es la +siguiente: + +<%title%>Titulo del indice<%/title%> +Logo, texto de presentacion, etc +<%index%> +prologo +capitulo1 ++parte1 ++parte2 +++semiacto1 +++semiacto2 +capitulo2 ++parte1 ++etc +epilogo +<%/index%> +<%end%> + +Yo creo que se entiende ¿no? :P Los signos '+' delante de los apartados +indican los niveles y subniveles. OJO, que lo que se indica en el indice +son NOMBRES DE ARCHIVO .dok sin extension, no los titulos de los apartados. +Asi, el apartado "capitulo1" se leera del fichero capitulo1.dok y generara +un fichero capitulo1.html, aunque este se pueda titular "Capítulo I: El +embargo de Largo" (el titulo se indica dentro de los .dok, entre las +directivas <%title%> y <%/title%>. +La estructura de un .dok que no sea el indice, como podeis imaginar, sera +algo tal que asi: + +<%title%>Título del documento<%/title%> +Texto html de lo que quieras explicar ;P +<%end%> + +Queda muy bonito poner una directiva <%subindex%> justo antes del <%end%> en +los documentos que tengan sub-apartados, ya que generara un sub-indice de +los mismos, como el SGML ;) +Ah, y en los documentos que no son el indice, se colocan arriba unos enlaces +muy chulos de atrás, siguiente, subir... ¡¡como el SGML!! xDD + +EXPLICACION DETALLADA DEL FURRULAMIENTO DE ESTO + +- Primero lee el template.txt, donde se definen algunas directivas. Se pueden + añadir directivas propias al gusto del consumidor ;) hasta un maximo de 20. + ¡OJO! En el template.txt hay que tener mucho cuidado de no equivocarse con + la sintaxis, ya que la rutina no advierte de los errores. Para los otros + ficheros sí se comprueban un poco más, pero no te fíes (¿qué creías? este + programa está hecho en un par de tardes) :P +- Luego se abre el .dok en cuestion y se sustituyen todas las directivas por + su texto html correspondiente, tal como lo haria un interprete de PHP o ASP, + pero mucho mas sencillo, claro. <%title%> inserta el texto que le corresponde + y luego mete los enlaces de navegacion, si no estamos en el index.dok, Otras + directivas, como <%index%> o <%subindex%> no sustituyen texto sino que llaman + a funciones especiales. +- para mas detalles, mira las descripciones de las funciones en el source :P + +para pasar todos los dok del directorio a html, hay ke usar el script makedok +(ver leeme-doc.txt). si se modifica el indice, HAY que rular el script para que +todos los enlaces de navegacion se actualicen. Trankilos, el proceso es muy +rapido ;) + +Er_Makina + diff --git a/ediv/doc/html/aproximacion.dok b/ediv/doc/html/aproximacion.dok new file mode 100644 index 0000000..3f96695 --- /dev/null +++ b/ediv/doc/html/aproximacion.dok @@ -0,0 +1,5 @@ +<%title%>Primera aproximación a eDIV<%/title%> +

    Primera aproximación a eDIV

    +

    Esta sección es muy importante para aquellos que nunca hayan tenido anteriormente ningún contacto con eDIV (o incluso con ningún compilador). Incluso si ya has utilizado otros compiladores de DIV, como DIV Games Studio o Fenix, puede que te resulte necesario saber estas cosas básicas para poder manejar eDIV (y aún más si quieres modificar eDIV o programar DLLs).

    +<%subindex%> +<%end%> \ No newline at end of file diff --git a/ediv/doc/html/clean.bat b/ediv/doc/html/clean.bat new file mode 100644 index 0000000..25ac21e --- /dev/null +++ b/ediv/doc/html/clean.bat @@ -0,0 +1 @@ +del *.htm \ No newline at end of file diff --git a/ediv/doc/html/compilador.dok b/ediv/doc/html/compilador.dok new file mode 100644 index 0000000..731969b --- /dev/null +++ b/ediv/doc/html/compilador.dok @@ -0,0 +1,5 @@ +<%title%>El compilador (ediv)<%/title%> +

    El compilador (ediv)

    +

    El compilador en sí es un ejecutable llamado ediv. Se encuentra en la carpeta bin y, naturalmente, es el programa encargado de compilar un archivo de código fuente .prg en lenguaje DIV para crear un ejecutable independiente a partir de él.

    +
    +<%end%> \ No newline at end of file diff --git a/ediv/doc/html/crear_dlls_vc6.dok b/ediv/doc/html/crear_dlls_vc6.dok new file mode 100644 index 0000000..9f8530d --- /dev/null +++ b/ediv/doc/html/crear_dlls_vc6.dok @@ -0,0 +1,9 @@ +<%title%>Cómo hacer una nueva librería para eDIV (Visual C++ 6.0)<%/title%> +

    Cómo hacer una nueva librería para eDIV (Visual C++ 6.0)

    +

    Paso 1: Crear el proyecto

    +

    Antes de nada, lógicamente hay que crear un proyecto para nuestra DLL. Si la DLL va a ser distribuida por nosotros mismos, lo mejor es crear para ella un workspace independiente, en una carpeta separada de la de eDIV. Si va a ser una DLL estándar de eDIV (p.ej. si contiene funciones de DIV2), hay un workspace destinado para este tipo de DLLs, que se encuentra en /ediv/src/visual c/modules.dsw, por lo que tendremos que abrir este workspace para crear alli nuestro proyecto.

    +

    En cualquier caso, elegiremos la opción New... del menú File para crear nuestro proyecto. En la ventana que aparece elegiremos la pestaña Projects y seleccionaremos un proyecto de DLL (Win32 Dynamic-Link Library). En el caso de que la DLL sea independiente de eDIV, elegiremos la opción Create new workspace y elegiremos el nombre y la carpeta para el proyecto que más nos guste. Si, en cambio, queremos que la DLL forme parte de eDIV, elegiremos Add to current workspace (suponiendo que ya tenemos abierto modules.dsw, y guardaremos el proyecto en una carpeta tipo /ediv/src/dlls/nombre_dll.

    +

    A continuación debemos ajustar algunas opciones del nuevo proyecto. Para ello hacemos click derecho con el ratón en el nombre del proyecto en la ventana de FileView y en el menú contextual seleccionamos Settings.... +

    + +<%end%> \ No newline at end of file diff --git a/ediv/doc/html/ediv-docs.css b/ediv/doc/html/ediv-docs.css new file mode 100644 index 0000000..3914f6a --- /dev/null +++ b/ediv/doc/html/ediv-docs.css @@ -0,0 +1,5 @@ +body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12; color: #0000CC} +a { text-decoration: none} +a:hover { text-decoration: underline} +table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12; color: #000000} + diff --git a/ediv/doc/html/finalidad.dok b/ediv/doc/html/finalidad.dok new file mode 100644 index 0000000..0f77e81 --- /dev/null +++ b/ediv/doc/html/finalidad.dok @@ -0,0 +1,52 @@ +<%title%>Finalidad del proyecto<%/title%> +

    Finalidad del proyecto

    +

    He aquí una lista de los objetivos que nos hemos impuesto para el desarrollo de eDIV según su avance por las distintas versiones:

    +

    • Versión 0.1

      +
      • Capacidad completa de compilar programas creados para DIV2 generando su correspondiente código EML (excepto las funciones predefinidas)
      • +
      • Generación de archivos ejecutables a partir de un stub (*.rel o *.dbg), con información de depurado o sin ella
      • +
      • Ejecución de programas sin optimizar, gestión de procesos, ejecución de funciones en las DLL
      • +
      • SDK
      • +
      • Soporte de algunas funcionalidades básicas (sprites y algunas funciones)
      • +
    • Versión 0.2

      +
      • Trazador de programas
      • +
      • Soporte completo para gráficos 2D
      • +
      • Ejecución de programas optimizados
      • +
      • Soporte completo de datos de tipo STRING, BYTE y WORD
      • +
      • Arreglo de bugs que existiesen en el compilador de DIV2
      • +
    • Versión 0.3

      +
      • IDE que como mínimo pueda editar programas y llamar al compilador
      • +
      • Ejecución perfecta de cualquier programa que no use scroll, modo-7, modo-8, búsqueda de caminos ni red
      • +
      • Trazador completo
      • +
      • Soporte para DLLs embebidas en el ejecutable
      • +
    • Versión 0.4

      +
      • IDE que pueda administrar proyectos, programas, MAPs, FPGs, FNTs, WAVs, etc (no necesariamente poder editarlos)
      • +
      • Soporte de scroll y búsqueda de caminos
      • +
      • Mejoras del trazador
      • +
      • Soporte para packfiles
      • +
      • Soporte de ficheros de música (MOD, S3M, XM)
      • +
    • Versión 0.5

      +
      • IDE que pueda editar algunos tipos de archivo (como MAP, FPG, FNT), al menos de forma sencilla, y que sea capaz de modificar el ediv.cfg.
      • +
      • Soporte de modos 7 y 8
      • +
      • Soporte de juego en red
      • +
      • Compatibilidad al 100% con cualquier programa hecho para DIV2
      • +
    • Versión 0.6

      +
      • IDE con un editor gráfico decente
      • +
      • Implementación de mejoras en el lenguaje
      • +
      • Implementación de nuevas funciones
      • +
      • Soporte completo de gráficos de 16 y 24 bits
      • +
      • Soporte para OGG, MP3, IT
      • +
    • Versión 0.7

      +
      • IDE con capacidad completa para editar MAPs, FPGs, FNTs, PALs, y con capacidad de modificación básica de WAVs y WLDs
      • +
      • Más funciones nuevas
      • +
      • Soporte de canal Alpha (gráficos de 32 bits)
      • +
    • Versión 0.8

      +
      • IDE con capacidad completa para editar WAVs y WLDs
      • +
      • Soporte de modo-6
      • +
      • Capacidad para renderizar los modos 7 y 8 usando OpenGL
      • +
    • Versión 0.9

      +
      • IDE completo
      • +
      • Soporte de sprites 3D (modo 6 y 9 con ctype=c_screen)
      • +
    • Versión 1.0

      +
      • Soporte completo de modo-9
      • +
    +<%end%> \ No newline at end of file diff --git a/ediv/doc/html/img/ediv-mini.gif b/ediv/doc/html/img/ediv-mini.gif new file mode 100644 index 0000000..49a1406 Binary files /dev/null and b/ediv/doc/html/img/ediv-mini.gif differ diff --git a/ediv/doc/html/img/logo2_ediv-sdk.jpg b/ediv/doc/html/img/logo2_ediv-sdk.jpg new file mode 100644 index 0000000..8aa1757 Binary files /dev/null and b/ediv/doc/html/img/logo2_ediv-sdk.jpg differ diff --git a/ediv/doc/html/img/logo2_ediv.jpg b/ediv/doc/html/img/logo2_ediv.jpg new file mode 100644 index 0000000..9b3c0aa Binary files /dev/null and b/ediv/doc/html/img/logo2_ediv.jpg differ diff --git a/ediv/doc/html/img/sion-mini.gif b/ediv/doc/html/img/sion-mini.gif new file mode 100644 index 0000000..78086c3 Binary files /dev/null and b/ediv/doc/html/img/sion-mini.gif differ diff --git a/ediv/doc/html/img/sion.gif b/ediv/doc/html/img/sion.gif new file mode 100644 index 0000000..0c2de72 Binary files /dev/null and b/ediv/doc/html/img/sion.gif differ diff --git a/ediv/doc/html/index.dok b/ediv/doc/html/index.dok new file mode 100644 index 0000000..e11e1c7 --- /dev/null +++ b/ediv/doc/html/index.dok @@ -0,0 +1,138 @@ +<%title%>Índice general<%/title%> +
    +

    +

    +

    ¿Vas a limitarte a jugar?

    +

     

    +

    eDIV Docs - Índice general
    + Versión beta 0.0.1

    +
    +<%index%> +introduccion ++que_es_ediv ++finalidad ++licencia +aproximacion ++compilador ++interprete ++librerias ++ide +lenguaje ++historia ++conceptos_basicos +++programa +++dato +++expresiones +++nombres +++objetos_predef +++sentencias +++condiciones +++comentarios +++funciones_predef +++procesos ++estructura_prog +++cabecera +++decl_const +++decl_datos +++decl_procesos +++rel_sentencias ++++asignacion ++++if ++++switch ++++while ++++repeat ++++loop ++++for ++++from ++++break ++++continue ++++return ++++frame ++++clone ++++debug ++avanzados +++tipos_procesos +++id_procesos +++obtener_id +++llamada_proceso +++jerarquia_procesos +++senales +++eval_expresiones +++eval_condiciones +++angulos +++compiler_options +++decl_datos_av +++parametros +++function +++alineacion +recursos ++prg ++map ++fpg ++pal ++wld ++fnt ++wav ++mod +sdk ++descripcion_dll ++func_dll_compilador ++func_dll_juego ++crear_dlls +++crear_dlls_linux +++crear_dlls_vc6 +++crear_dlls_vc7 ++diferencias_so ++diferencias_compiladores ++estructura_dll ++export_h +explicacion_source ++compilador_ediv +++ediv_c +++parser_c +++expresion_c +++extern_h +++ediv_export_c +++dll_load_c +++compiler_c +++encrypt_c +++modulos_c +++_ml_c ++interprete_stub +++stub_c +++inte_c +++kernel_c ++tool_encrypt +++tool_encrypt_c +++makelib_sh ++entorno_ide +++PORHACER +formato_exes ++fmt_stub ++fmt_cabecera ++fmt_bytecode +++referencia_eml ++fmt_debug +++lin +++dbg +distribucion ++generador_instalaciones ++formas_presentacion +++cd +++disquetes +++autoextraible +++zip +++zip_source ++packfiles ++formas_distribucion +++soft_comercial +++shareware +++internet +++otras_vias ++licencia_distribucion +consid_finales ++conclusion ++autores +<%/index%> +

     

    +<%end%> diff --git a/ediv/doc/html/introduccion.dok b/ediv/doc/html/introduccion.dok new file mode 100644 index 0000000..cb5cbbf --- /dev/null +++ b/ediv/doc/html/introduccion.dok @@ -0,0 +1,5 @@ +<%title%>Introducción<%/title%> +

    Introducción

    +

    POR HACER (lo ideal seria que esto lo escribiera Daniel Navarro, jejejeje)

    +<%subindex%> +<%end%> \ No newline at end of file diff --git a/ediv/doc/html/licencia.dok b/ediv/doc/html/licencia.dok new file mode 100644 index 0000000..e936d90 --- /dev/null +++ b/ediv/doc/html/licencia.dok @@ -0,0 +1,427 @@ +<%title%>Licencia<%/title%> +

    Licencia Pública GNU

    +eDIV está cubierto por la GNU Public License (GPL), versión 2 (de junio + de 1.991), cuya traducción transcribimos a continuación. + La licencia oficial se encuentra aquí. Para más información visita www.gnu.org o es.gnu.org. +
     
    +
    Los autores de esta traducción son: + +
    +

    NOTA IMPORTANTE:

    + Esta es una traducción no oficial al español de la GNU General Public + License. No ha sido publicada por la Free Software Foundation, y no + establece legalmente las condiciones de distribución para el software + que usa la GNU GPL. Estas condiciones se establecen solamente por + el texto original, en inglés, de la GNU GPL. Sin embargo, esperamos + que esta traducción ayude a los hispanohablantes a entender mejor la + GNU GPL. +
     
    +

    IMPORTANT NOTICE:

    + This is an unofficial translation of the GNU General Public License + into Spanish. It was not published by the Free Software + Foundation, and does not legally state the distribution terms for + software that uses the GNU GPL--only the original English text of + the GNU GPL does that. However, we hope that this translation will + help Spanish speakers understand the GNU GPL better. +
     
    + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, EEUU + Se permite la copia y distribución de copias literales de este + documento, pero no se permite su modificación. +
     
    +

    Preámbulo

    +Las licencias que cubren la mayor parte del software están +diseñadas para quitarle a usted la libertad de compartirlo y +modificarlo. Por el contrario, la Licencia Pública General de GNU +pretende garantizarle la libertad de compartir y modificar software libre, +para asegurar que el software es libre para todos sus usuarios. Esta +Licencia Pública General se aplica a la mayor parte del software del +la Free Software Foundation y a cualquier otro programa si sus autores se +comprometen a utilizarla. (Existe otro software de la Free Software +Foundation que está cubierto por la Licencia Pública General +de GNU para Bibliotecas). Si quiere, también puede aplicarla a sus +propios programas. +
     
    +Cuando hablamos de software libre, estamos refiriéndonos a libertad, +no a precio. Nuestras Licencias Públicas Generales están +diseñadas para asegurarnos de que tenga la libertad de distribuir +copias de software libre (y cobrar por ese servicio si quiere), de que +reciba el código fuente o que pueda conseguirlo si lo quiere, de +que pueda modificar el software o usar fragmentos de él en nuevos +programas libres, y de que sepa que puede hacer todas estas cosas. +
     
    +Para proteger sus derechos necesitamos algunas restricciones que prohiban +a cualquiera negarle a usted estos derechos o pedirle que renuncie a ellos. +Estas restricciones se traducen en ciertas obligaciones que le afectan +si distribuye copias del software, o si lo modifica. +
     
    +Por ejemplo, si distribuye copias de uno de estos programas, sea +gratuitamente, o a cambio de una contraprestación, debe dar a los +receptores todos los derechos que tiene. Debe asegurarse de que ellos +también reciben, o pueden conseguir, el código fuente. Y debe +mostrarles estas condiciones de forma que conozcan sus derechos. +
     
    +Protegemos sus derechos con la combinación de dos medidas: +
     
    +
      +
    1. Ponemos el software bajo copyright +
    2. le ofrecemos esta licencia, que le da permiso legal para copiar, + distribuir y/o modificar el software. +
    +
     
    +También, para la protección de cada autor y la nuestra propia, +queremos asegurarnos de que todo el mundo comprende que no se proporciona +ninguna garantía para este software libre. Si el software se modifica +por cualquiera y éste a su vez lo distribuye, queremos que sus +receptores sepan que lo que tienen no es el original, de forma que cualquier +problema introducido por otros no afecte a la reputación de los +autores originales. +
     
    +Por último, cualquier programa libre está constantemente +amenazado por patentes sobre el software. Queremos evitar el peligro de +que los redistribuidores de un programa libre obtengan patentes por su +cuenta, convirtiendo de facto el programa en propietario. Para evitar esto, +hemos dejado claro que cualquier patente debe ser pedida para el uso libre +de cualquiera, o no ser pedida. +
     
    +Los términos exactos y las condiciones para la copia, +distribución y modificación se exponen a continuación. +
     
    +

    Términos y condiciones para la copia, distribución y +modificación

    +
      +
    1. Esta Licencia se aplica a cualquier programa u otro tipo de trabajo + que contenga una nota colocada por el tenedor del copyright + diciendo que puede ser distribuido bajo los términos de esta Licencia + Pública General. En adelante, «Programa» se + referirá a cualquier programa o trabajo que cumpla esa + condición y «trabajo basado en el Programa» se + referirá bien al Programa o a cualquier trabajo derivado de + él según la ley de copyright. Esto es, un trabajo que + contenga el programa o una proción de él, bien en forma + literal o con modificaciones y/o traducido en otro lenguaje. Por lo tanto, + la traducción está incluida sin limitaciones en el + término «modificación». Cada concesionario + (licenciatario) será denominado «usted». +
       
      + Cualquier otra actividad que no sea la copia, distribución o + modificación no está cubierta por esta Licencia, está + fuera de su ámbito. El acto de ejecutar el Programa no está + restringido, y los resultados del Programa están cubiertos + únicamente si sus contenidos constituyen un trabajo basado en el + Programa, independientemente de haberlo producido mediante la + ejecución del programa. El que esto se cumpla, depende de lo que + haga el programa. +
       
      +
    2. Usted puede copiar y distribuir copias literales del código + fuente del Programa, según lo has recibido, en cualquier medio, + supuesto que de forma adecuada y bien visible publique en cada copia un + anuncio de copyright adecuado y un repudio de garantía, mantenga + intactos todos los anuncios que se refieran a esta Licencia y a la ausencia + de garantía, y proporcione a cualquier otro receptor del programa + una copia de esta Licencia junto con el Programa. + + Puede cobrar un precio por el acto físico de transferir una copia, + y puede, según su libre albedrío, ofrecer garantía + a cambio de unos honorarios. + +
    3. Puede modificar su copia o copias del Programa o de cualquier + porción de él, formando de esta manera un trabajo basado en + el Programa, y copiar y distribuir esa modificación o trabajo bajo + los términos del apartado 1, antedicho, supuesto que además + cumpla las siguientes condiciones: +
       
      +
        +
      1. Debe hacer que los ficheros modificados lleven anuncios prominentes + indicando que los ha cambiado y la fecha de cualquier cambio. +
      2. Debe hacer que cualquier trabajo que distribuya o publique y que en + todo o en parte contenga o sea derivado del Programa o de cualquier + parte de él sea licenciada como un todo, sin carga alguna, a + todas las terceras partes y bajo los términos de esta Licencia. +
      3. Si el programa modificado lee normalmente órdenes + interactivamente cuando es ejecutado, debe hacer que, cuando + comience su ejecución para ese uso interactivo de la forma + más habitual, muestre o escriba un mensaje que incluya un + anuncio de copyright y un anuncio de que no se ofrece ninguna + garantía (o por el contrario que sí se ofrece + garantía) y que los usuarios pueden redistribuir el programa + bajo estas condiciones, e indicando al usuario cómo ver una + copia de esta licencia. (Excepción: si el propio programa es + interactivo pero normalmente no muestra ese anuncio, no se requiere + que su trabajo basado en el Programa muestre ningún anuncio). +
      + + Estos requisitos se aplican al trabajo modificado como un todo. Si partes + identificables de ese trabajo no son derivadas del Programa, y pueden, + razonablemente, ser consideradas trabajos independientes y separados por + ellos mismos, entonces esta Licencia y sus términos no se aplican + a esas partes cuando sean distribuidas como trabajos separados. Pero cuando + distribuya esas mismas secciones como partes de un todo que es un trabajo + basado en el Programa, la distribución del todo debe ser según + los términos de esta licencia, cuyos permisos para otros + licenciatarios se extienden al todo completo, y por lo tanto a todas y cada + una de sus partes, con independencia de quién la escribió. +
       
      + Por lo tanto, no es la intención de este apartado reclamar derechos + o desafiar sus derechos sobre trabajos escritos totalmente por usted mismo. + El intento es ejercer el derecho a controlar la distribución de + trabajos derivados o colectivos basados en el Programa. +
       
      + Además, el simple hecho de reunir un trabajo no basado en el + Programa con el Programa (o con un trabajo basado en el Programa) en un + volumen de almacenamiento o en un medio de distribución no hace + que dicho trabajo entre dentro del ámbito cubierto por esta Licencia. + + +
    4. Puede copiar y distribuir el Programa (o un trabajo basado en él, + según se especifica en el apartado 2, como código objeto + o en formato ejecutable según los términos de los apartados + 1 y 2, supuesto que además cumpla una de las siguientes condiciones: + +
        +
      1. Acompañarlo con el código fuente completo + correspondiente, en formato electrónico, que debe ser + distribuido según se especifica en los apartados 1 y 2 de esta + Licencia en un medio habitualmente utilizado para el intercambio de + programas, o + +
      2. Acompañarlo con una oferta por escrito, válida durante + al menos tres años, de proporcionar a cualquier tercera parte + una copia completa en formato electrónico del código + fuente correspondiente, a un coste no mayor que el de realizar + físicamente la distribución del fuente, que será + distribuido bajo las condiciones descritas en los apartados 1 y 2 + anteriores, en un medio habitualmente utilizado para el intercambio + de programas, o +
      3. Acompañarlo con la información que recibiste ofreciendo + distribuir el código fuente correspondiente. (Esta opción + se permite sólo para distribución no comercial y + sólo si usted recibió el programa como código + objeto o en formato ejecutable con tal oferta, de acuerdo con el + apartado b anterior). +
      + + Por código fuente de un trabajo se entiende la forma preferida del + trabajo cuando se le hacen modificaciones. Para un trabajo ejecutable, + se entiende por código fuente completo todo el código fuente + para todos los módulos que contiene, más cualquier fichero + asociado de definición de interfaces, más los guiones + utilizados para controlar la compilación e instalación del + ejecutable. + + Como excepción especial el código fuente distribuido no + necesita incluir nada que sea distribuido normalmente (bien como fuente, + bien en forma binaria) con los componentes principales (compilador, kernel + y similares) del sistema operativo en el cual funciona el ejecutable, a no + ser que el propio componente acompañe al ejecutable. + + Si la distribución del ejecutable o del código objeto + se hace mediante la oferta acceso para copiarlo de un cierto lugar, entonces + se considera la oferta de acceso para copiar el código fuente del + mismo lugar como distribución del código fuente, incluso + aunque terceras partes no estén forzadas a copiar el fuente junto + con el código objeto. + + No puede copiar, modificar, sublicenciar o distribuir el Programa excepto + como prevé expresamente esta Licencia. Cualquier intento de copiar, + modificar sublicenciar o distribuir el Programa de otra forma es + inválida, y hará que cesen automáticamente los derechos + que te proporciona esta Licencia. En cualquier caso, las partes que hayan + recibido copias o derechos de usted bajo esta Licencia no cesarán en + sus derechos mientras esas partes continúen cumpliéndola. + +
    5. No está obligado a aceptar esta licencia, ya que no la ha firmado. + Sin embargo, no hay hada más que le proporcione permiso para modificar + o distribuir el Programa o sus trabajos derivados. Estas acciones + están prohibidas por la ley si no acepta esta Licencia. Por lo + tanto, si modifica o distribuye el Programa (o cualquier trabajo basado en + el Programa), está indicando que acepta esta Licencia para poder + hacerlo, y todos sus términos y condiciones para copiar, distribuir + o modificar el Programa o trabajos basados en él. + +
    6. Cada vez que redistribuya el Programa (o cualquier trabajo basado en + el Programa), el receptor recibe automáticamente una licencia del + licenciatario original para copiar, distribuir o modificar el Programa, + de forma sujeta a estos términos y condiciones. No puede imponer + al receptor ninguna restricción más sobre el ejercicio de + los derechos aquí garantizados. No es usted responsable de hacer + cumplir esta licencia por terceras partes. +
       
      +
    7. Si como consecuencia de una resolución judicial o de una + alegación de infracción de patente o por cualquier otra + razón (no limitada a asuntos relacionados con patentes) se le + imponen condiciones (ya sea por mandato judicial, por acuerdo o por + cualquier otra causa) que contradigan las condiciones de esta Licencia, + ello no le exime de cumplir las condiciones de esta Licencia. Si no puede + realizar distribuciones de forma que se satisfagan simultáneamente + sus obligaciones bajo esta licencia y cualquier otra obligación + pertinente entonces, como consecuencia, no puede distribuir el Programa de + ninguna forma. Por ejemplo, si una patente no permite la + redistribución libre de derechos de autor del Programa por parte de + todos aquellos que reciban copias directa o indirectamente a través + de usted, entonces la única forma en que podría satisfacer + tanto esa condición como esta Licencia sería evitar + completamente la distribución del Programa. +
       
      + Si cualquier porción de este apartado se considera inválida + o imposible de cumplir bajo cualquier circunstancia particular ha de + cumplirse el resto y la sección por entero ha de cumplirse en + cualquier otra circunstancia. + + No es el propósito de este apartado inducirle a infringir ninguna + reivindicación de patente ni de ningún otro derecho deç + propiedad o impugnar la validez de ninguna de dichas reivindicaciones. Este + apartado tiene el único propósito de proteger la integridad + del sistema de distribución de software libre, que se realiza + mediante prácticas de licencia pública. Mucha gente ha hecho + contribuciones generosas a la gran variedad de software distribuido mediante + ese sistema con la confianza de que el sistema se aplicará + consistentemente. Será el autor/donante quien decida si quiere + distribuir software mediante cualquier otro sistema y una licencia no puede + imponer esa elección. +
       
      + Este apartado pretende dejar completamente claro lo que se cree que + es una consecuencia del resto de esta Licencia. + +
    8. Si la distribución y/o uso de el Programa está restringida + en ciertos países, bien por patentes o por interfaces bajo copyright, + el tenedor del copyright que coloca este Programa bajo esta Licencia puede + añadir una limitación explícita de distribución + geográfica excluyendo esos países, de forma que la + distribución se permita sólo en o entre los países no + excluidos de esta manera. En ese caso, esta Licencia incorporará la + limitación como si estuviese escrita en el cuerpo de esta Licencia. + +
    9. La Free Software Foundation puede publicar versiones revisadas y/o nuevas + de la Licencia Pública General de tiempo en tiempo. Dichas nuevas + versiones serán similares en espíritu a la presente + versión, pero pueden ser diferentes en detalles para considerar + nuevos problemas o situaciones.
      &nbps;
      + + Cada versión recibe un número de versión que la + distingue de otras. Si el Programa especifica un número de + versión de esta Licencia que se refiere a ella y a «cualquier + versión posterior», tienes la opción de seguir los + términos y condiciones, bien de esa versión, bien de + cualquier versión posterior publicada por la Free Software + Foundation. Si el Programa no especifica un número de versión + de esta Licencia, puedes escoger cualquier versión publicada por la + Free Software Foundation. +
       
      +
    10. Si quiere incorporar partes del Programa en otros programas libres cuyas + condiciones de distribución son diferentes, escribe al autor para + pedirle permiso. Si el software tiene copyright de la Free Software + Foundation, escribe a la Free Software Foundation: algunas veces hacemos + excepciones en estos casos. Nuestra decisión estará guiada + por el doble objetivo de de preservar la libertad de todos los derivados de + nuestro software libre y promover el que se comparta y reutilice el software + en general. +
    +
     
    +

    AUSENCIA DE GARANTÍA

    +
      +
    1. Como el programa se licencia libre de cargas, no se ofrece ninguna + garantía sobre el programa, en todas la extensión + permitida por la legislación aplicable. Excepto cuando se indique + de otra forma por escrito, los tenedores del copyright y/u otras partes + proporcionan el programa «tal cual», sin garantía de + ninguna clase, bien expresa o implícita, con inclusión, pero + sin limitación a las garantías mercantiles implícitas + o a la conveniencia para un propósito particular. Cualquier riesgo + referente a la calidad y prestaciones del programa es asumido por usted. + Si se probase que el Programa es defectuoso, asume el coste de cualquier + servicio, reparación o corrección. +
       
      +
    2. En ningún caso, salvo que lo requiera la legislaciónç + aplicable o haya sido acordado por escrito, ningún tenedor del + copyright ni ninguna otra parte que modifique y/o redistribuya el Programa + según se permite en esta Licencia será responsable ante usted + por daños, incluyendo cualquier daño general, especial, + incidental o resultante producido por el uso o la imposibilidad de uso del + Programa (con inclusión, pero sin limitación a la + pérdida de datos o a la generación incorrecta de datos o a + pérdidas sufridas por usted o por terceras partes o a un fallo del + Programa al funcionar en combinación con cualquier otro programa), + incluso si dicho tenedor u otra parte ha sido advertido de la posibilidad + de dichos daños. +
    +
     
    +FIN DE TÉRMINOS Y CONDICIONES +
     
    +

    Apéndice: Cómo aplicar estos términos a sus nuevos +programas.

    +para el público en general, la mejor forma de conseguirlo es +convirtiéndolo en software libre que cualquiera pueda redistribuir y +cambiar bajo estos términos. +
     
    +Para hacerlo, añada los siguientes anuncios al programa. Lo más +seguro es añadirlos al principio de cada fichero fuente para transmitir +lo más efectivamente posible la ausencia de garantía. +Además cada fichero debería tener al menos la línea de +«copyright» y un indicador a dónde puede encontrarse el +anuncio completo. +
     
    +<una línea para indicar el nombre +del programa y una rápida idea de qué hace.> +
     
    +Copyright (C) 19aa <nombre del autor +Este programa es software libre. Puede redistribuirlo y/o modificarlo bajo +los términos de la Licencia Pública General de GNU según +es publicada por la Free Software Foundation, bien de la versión 2 de +dicha Licencia o bien (según su elección) de cualquier +versión posterior.
    &bnsp;
    +
     
    +Este programa se distribuye con la esperanza de que sea útil, +pero SIN NINGUNA GARANTÍA, incluso sin la garantía MERCANTIL +implícita o sin garantizar la CONVENIENCIA PARA UN PROPÓSITO +PARTICULAR. Véase la Licencia Pública General de GNU para +más detalles.
     
    +
     
    +Debería haber recibido una copia de la Licencia Pública +General junto con este programa. Si no ha sido así, escriba a la +Free Software Foundation, Inc., en 675 Mass Ave, Cambridge, MA 02139, EEUU. +
     
    +Añada también información sobre cómo contactar +con usted mediante correo electrónico y postal.
    +
     
    +Si el programa es interactivo, haga que muestre un pequeño anuncio +como el siguiente, cuando comienza a funcionar en modo interactivo: +
     
    +Gnomovision versión 69, Copyright (C) 19aa nombre del autor
      +
    +
     
    +Gnomovision no ofrece ABSOLUTAMENTE NINGUNA GARANTÍA. Para +más detalles escriba «show w». +
     
    +Los comandos hipotéticos «show w» y «show c» +deberían mostrar las partes adecuadas de la Licencia Pública +General. Por supuesto, los comandos que use pueden llamarse de cualquier +otra manera. Podrían incluso ser pulsaciones del ratón o +elementos de un menú (lo que sea apropiado para su programa). +
     
    +También deberías conseguir que su empleador (si trabaja +como programador) o tu Universidad (si es el caso) firme un «renuncia +de copyright» para el programa, si es necesario. A continuación +se ofrece un ejemplo, altere los nombres según sea conveniente:

    +
     
    +
    + Yoyodyne, Inc. mediante este documento renuncia a cualquier interés + de derechos de copyright con respecto al programa Gnomovision (que hace + pasadas a compiladores) escrito por Pepe Programador. +
     
    + <firma de Pepito Grillo>, 20 de diciembre de 1996 +
     
    + Pepito Grillo, Presidente de Asuntillos Varios. +
    +
     
    +Esta Licencia Pública General no permite que incluya sus programas en +programas propietarios. Si su programa es una biblioteca de subrutinas, puede +considerar más útil el permitir el enlazado de aplicaciones +propietarias con la biblioteca. Si este es el caso, use la Licencia +Pública General de GNU para Bibliotecas en lugar de esta Licencia. +
     
    +<%end%> \ No newline at end of file diff --git a/ediv/doc/html/makebat95.vbs b/ediv/doc/html/makebat95.vbs new file mode 100644 index 0000000..cbe7535 --- /dev/null +++ b/ediv/doc/html/makebat95.vbs @@ -0,0 +1,13 @@ +dim fs,f,bat,fil,c +Set fs=CreateObject("Scripting.FileSystemObject") +Set f=fs.getfolder(".").files +set bat=fs.opentextfile("makedok95.bat",2,true) +c=0 +for each fil in f +if lcase(fs.getextensionname(fil.path))="dok" or lcase(fs.getextensionname(fil.path))="doku" then +bat.write "..\doku.exe " & fil.name & vbcrlf +c=c+1 +end if +next +bat.close +msgbox "Encontrados " & c & " fichero(s)" diff --git a/ediv/doc/html/makedokNT.bat b/ediv/doc/html/makedokNT.bat new file mode 100644 index 0000000..ac4e830 --- /dev/null +++ b/ediv/doc/html/makedokNT.bat @@ -0,0 +1 @@ +for %%i in (*.dok) do ..\doku %%i diff --git a/ediv/doc/html/que_es_ediv.dok b/ediv/doc/html/que_es_ediv.dok new file mode 100644 index 0000000..2db46ce --- /dev/null +++ b/ediv/doc/html/que_es_ediv.dok @@ -0,0 +1,29 @@ +<%title%>¿Qué es eDIV?<%/title%> +

    ¿Qué es eDIV?

    +

    eDIV es una herramienta de programación diseñada +para el desarrollo de videojuegos. Para ello se vale de un compilador de lenguaje +DIV, un entorno de desarrollo y un conjunto de librerías dinámicas +que contienen una gran cantidad de rutinas y funciones que pretenden cubrir +todos los aspectos de un videojuego: manejo de gráficos, sonido, dispositivos +de entrada, manejo de archivos, memoria, funciones matemáticas... Todo +esto está orientado a la programación de videojuegos de una +forma sencilla y rápida. Las rutinas más complejas y las funciones +a bajo nivel se encuentran ya hechas por lo que el programador puede centrarse +en el desarrollo del videojuego en sí, con lo que da la posibilidad +de que cualquier usuario, iniciado en la programación o no, sea capaz +de desarrollar sus propios videojuegos. Gran parte de esta sencillez se la +debemos al lenguaje DIV, utilizado en esta herramienta por su magnífica +relación entre sencillez, potencia y facilidad de aprender.

    +

    En resumen, eDIV dispone de todos los recursos necesarios para +realizar un videojuego completo, desde el punto de vista de la programación, +el diseño de gráficos, música, etc. eDIV es una herramienta +flexible que permite a cualquier usuario programar un videojuego, o si lo +prefiere, cualquier tipo de programas, presentaciones, demos, aplicaciones +multimedia... La lista de utilidades que los recursos de eDIV ofrecen al usuario +no tiene fin, ya que es el usuario quien crea la idea y la programa, dando +rienda suelta a su imaginación.

    +

    El proyecto eDIV

    +

    El proyecto comenzó de las manos de la antigua freelance Young Corporation antes incluso de la aparición de DIV2 en el mercado. Al principio se llamaba FreeDIV, tenía como objetivo mejorar el lenguaje DIV añadiéndole funciones y rebajando limitaciones por medio de DLLs. Más tarde el proyecto se orientó a la creación de un compilador nuevo de lenguaje DIV, con lo que pasó a llamarse VisualDIV (ojo, no tiene nada que ver con la librería Sion VisualDIV), pero el proyecto no tuvo mucha aceptación. Hasta que ocurrió algo que supuso el verdadero impulso del desarrollo: debido a los problemas que estaba sufriendo Hammer Technologies, y a que se había desvanecido toda esperanza sobre la aparición de una tercera versión oficial de DIV, Daniel Navarro (el creador del DIV original) entregó el código fuente de DIV2 a los coordinadores del proyecto VisualDIV.

    +

    Aquí comienza la etapa más importante y activa del desarrollo del compilador, al que se le dio el nuevo nombre de E/DIV. Al proyecto se incorporaron Echosoft, MultiGames, Yerok Studios y Sfera Soft. Al principio de esta etapa se trabajó usando como base otros compiladores, principalmente de lenguaje BASIC. El programa tuvo que reescribirse varias veces hasta alcanzar la potencia y flexibilidad planeadas desde un principio.

    +

    Al cabo de un tiempo Echosoft se separó del grupo y comenzó a desarrollar un compilador propio, llamado WxDiv. Todos los grupos de programadores que participaban en el proyecto decidieron unirse, dando lugar a la actual Sion Entertainment. Por fin el proyecto acabó adquiriendo el nombre de eDIV, se basó el desarrollo en el compilador original de DIV2 (que es el que, hasta ahora, ha dado mejores resultados), se le impuso la licencia GNU de código abierto, y se construyó la página oficial de eDIV, www.edivcentral.com, donde se informa continuamente sobre el desarrollo del programa, y se muestran otras noticias y documentos interesantes acerca de eDIV y el mundo DIV.

    +<%end%> \ No newline at end of file diff --git a/ediv/doc/html/referencia_eml.dok b/ediv/doc/html/referencia_eml.dok new file mode 100644 index 0000000..1ede4bb --- /dev/null +++ b/ediv/doc/html/referencia_eml.dok @@ -0,0 +1,432 @@ +<%title%>Referencia del código EML<%/title%> +
    +

    Referencia del código EML

    +

    El bytecode de los ejecutables creados con eDIV usan el sistema + EML, del cual por ahora no conocemos su verdadero autor y no sabemos si tiene + un origen anterior a DIV, probablemente ésta sea una variante de un + código anterior, y es el sistema que se utilizó en DIV Games + Studio 1 y 2. Sería perfectamente posible compilar un programa DIV + a nivel de código máquina, pero dado su alto nivel y la complejidad + que requeriría generar un stub en tiempo de compilación, vemos + que es más viable y sencillo usar un código intermedio que el + stub pueda ejecutar, a modo de máquina virtual. Esto nos permite, además, + la capacidad de migrar ejecutables entre DIV 2, eDIV para Linux y eDIV para + Windows, ya que el código EML que utilizan es el mismo, y tan sólo + habría que cambiarle el stub por el de la plataforma adecuada y encontrar + las librerías equivalentes.

    +

    El código EML utiliza una serie de mnemónicos + que son los tratados en el código fuente de eDIV (véase compiler.h), + y son también los utilizados para generar el desensamblado EML desde + el compilador. A continuación se incluye una referencia completa (o + casi) de todas las instrucciones utilizadas en el código EML de eDIV.

    +

    Para comprender las operaciones que realiza cada comando, hace + falta conocer los siguientes términos:

    + + + + + + + + + + + + + + + + + + + + + +
    mem[] +

    Memoria de la máquina destino. Contiene el bytecode, + los valores de cada variable, etc. Funciona de forma similar al buffer + de memoria de un emulador. Cada posición en mem[] equivale a + 4 bytes.

    +
    ipPuntero de código. Apunta a la posición + actual en mem[] del código que se está ejecutando.
    pila[]Pila usada para calcular expresiones y pasar parámetros + a los procesos y funciones.
    spPuntero de pila. Apunta a la última posición + en la pila.
    idIdentificador del proceso actual.
    +

     

    +

    [Instrucciones básicas] - [Instrucciones optimizadas] + - [Manejo de caracteres]
    + [Manejo de cadenas] - [Manejo de Words] - [Miscelánea]

    +

     

    +

    INSTRUCCIONES BÁSICAS

    + + + + + + + + + + +
    NOP
    No operación
    No realiza ninguna operación.
    +
    + + + + + + + + + + +
    CAR <valor>
    Carga una constante en la pila
    +

    pila[++sp]=mem[ip++];

    +
    +
    + + + + + + + + + + +
    ASI
    Asignación
    + Saca de la pila un valor y un offset, y mete el valor en el offset
    +

    pila[sp-1]=mem[pila[sp-1]]=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    ORI
    OR lógico
    + Saca un valor de la pila y realiza un OR lógico con el actual valor + en la pila
    +

    pila[sp-1]|=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    XOR
    OR exclusivo
    + Saca un valor de la pila y realiza un OR exclusivo con el actual valor + en la pila
    +

    pila[sp-1]^=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    AND
    AND lógico
    + Saca un valor de la pila y realiza un AND lógico con el actual + valor en la pila
    +

    pila[sp-1]&=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    IGU
    Igual, operador lógico de comparación
    + Saca dos valores de la pila y carga verdadero si son iguales
    +

    pila[sp-1]=pila[sp-1]==pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    DIS
    Distinto
    + Saca dos valores de la pila y carga verdadero si son distintos
    +

    pila[sp-1]=pila[sp-1]!=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    MAY
    Mayor, comparación con signo
    + Saca dos valores de la pila y carga verdadero si el primero es mayor que + el segundo
    +

    pila[sp-1]=pila[sp-1]>pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    MEN
    Menor, comparación con signo
    + Saca dos valores de la pila y carga verdadero si el primero es menor que + el segundo
    +

    pila[sp-1]=pila[sp-1]<pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    MEI
    Menor o igual
    + Saca dos valores de la pila y carga verdadero si el primero es menor o + igual que el segundo
    +

    pila[sp-1]=pila[sp-1]<=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    MAI
    Mayor o igual
    + Saca dos valores de la pila y carga verdadero si el primero es mayor o + igual que el segundo
    +

    pila[sp-1]=pila[sp-1]>=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    ADD
    Suma dos constantes
    + Saca dos valores de la pila y carga la suma
    +

    pila[sp-1]+=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    SUB
    Resta, operación binaria
    + Saca dos valores de la pila y carga la diferencia del primero con el segundo
    +

    pila[sp-1]-=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + +
    MUL
    Multiplicación
    + Saca dos valores de la pila y carga el producto
    +

    pila[sp-1]*=pila[sp];
    + sp--;

    +
    +
    + + + + + + + + + + + + + +
    DIV
    División de enteros
    + Saca dos valores de la pila y carga el cociente del primero con el segundo
    +

    pila[sp-1]/=pila[sp];
    + sp--;

    +
    Si el valor actual en la pila + es 0, se producirá un error "División entre cero"
    +
    + + + + + + + + + + + + + +
    MOD
    Módulo
    + Saca dos valores de la pila y carga el resto de la división del + primero con el segundo
    +

    pila[sp-1]%=pila[sp];
    + sp--;

    +
    Si el valor actual en la pila + es 0, se producirá un error "División entre cero"
    +
    + + + + + + + + + + +
    NEG
    Negación
    + Cambia de signo el valor actual en la pila
    +

    pila[sp]=-pila[sp];

    +
    +
    + + + + + + + + + + +
    PTR
    Puntero
    + Saca un offset de la pila y carga el valor que hay en ese offset
    +

    pila[sp]=mem[pila[sp]];

    +
    +
    + + + + + + + + + + +
    NOT
    Negación binaria, bit a bit
    + Alterna (XOR) todos los bits del valor actual en la pila
    +

    pila[sp]^=-1;

    +
    +
    + + + + + + + + + + +
    AID
    Suma id al valor en la pila
    +

    pila[sp]+=id;

    +
    +
    + + + + + + + + + + +
    CID
    Carga id en la pila
    +

    pila[++sp]=id;

    +
    +
    + + + + + + + + + + +
    RNG <rango>
    Comprobación de rango
    + Sólo efectiva en modo de depurado.
    +

    pila[++sp]=id;

    +
    +

     

    +

     

    +
    +<%end%> \ No newline at end of file diff --git a/ediv/doc/html/template.txt b/ediv/doc/html/template.txt new file mode 100644 index 0000000..878760f --- /dev/null +++ b/ediv/doc/html/template.txt @@ -0,0 +1,13 @@ +<%title%> "\n\neDIV docs - " +<%/title%> "\n" + "\n\n\n" + "\n" + "" +<%end%> "

    Ir arriba
    \n" + "Esta documentación ha sido escrita por el equipo de\n" + "Sion Entertainment y forma parte del proyecto eDIV. Las actualizaciones de esta\n" + "documentación pueden obtenerse en www.edivcentral.com.\nSi ve algún error o anomalía " + "en cualquiera de los documentos que\nse incluyen en este proyecto, por favor " + "comuníquenoslo a bugs@edivcentral.com. " + "Gracias.
    \n© Copyleft Sion Entertainment, 2000-2002
    \n\n\n" diff --git a/ediv/doc/leeme-doc.txt b/ediv/doc/leeme-doc.txt new file mode 100644 index 0000000..64e54e6 --- /dev/null +++ b/ediv/doc/leeme-doc.txt @@ -0,0 +1,27 @@ +La documentación de eDIV se encuentra en el directorio html en formato DOK. +Este es un formato propio que simplifica un poco la creación y el indexado +de los documentos (algo así como un SGML pero en pequeño). +Nunca deben editarse los HTML directamente, sino los .dok ya que son los +ficheros fuente de la documentación. Estos pueden editarse con cualquier +editor de HTML que respete las directivas ASP (recomiendo Macromedia +Dreamweaver). +Para obtener los HTML a partir de los .dok hay que usar el programa DOKU +aquí incluido. En vez de ir ejecutando Doku una vez para cada archivo, +puedes usar los scripts que hay en el directorio html. +-> Para Windows Me/NT/2000/XP: ejecuta makedokNT.bat +-> Para Windows 95/98: ejecuta primero makebat95.vbs y luego makedok95.bat +-> Para Linux: ejecuta makedok.sh + +Si usais antivirus, es posible que os avise de que hay riesgo de virus al +ejecutar makebat95.vbs (a mi el norton me lo hace :P) podeis ignorar el +aviso ya que os garantizo que el fichero no es un virus (encima lo he +programao yo.. ya me direis ke clase de virus seria yo capaz de hacer en +vbs xP) + +Antes de empaketar el source del ediv es aconsejable ejecutar clean.bat +para ahorrar espacio :) + +Para más información acerca de la utilización de Doku y de los ficheros +.dok, preguntadme a mi (ya haré con Doku la documentación de Doku =) + +Er_Makina \ No newline at end of file diff --git a/ediv/ediv-020906.ace b/ediv/ediv-020906.ace new file mode 100644 index 0000000..fbac08c Binary files /dev/null and b/ediv/ediv-020906.ace differ diff --git a/ediv/ediv.ico b/ediv/ediv.ico new file mode 100644 index 0000000..fd7385d Binary files /dev/null and b/ediv/ediv.ico differ diff --git a/ediv/edivxp.ico b/ediv/edivxp.ico new file mode 100644 index 0000000..d648abb Binary files /dev/null and b/ediv/edivxp.ico differ diff --git a/ediv/el_stub.txt b/ediv/el_stub.txt new file mode 100644 index 0000000..1c5dbd6 --- /dev/null +++ b/ediv/el_stub.txt @@ -0,0 +1,21 @@ + ********************** + * EL STUB DEL eDiv * + ********************** + + +9/7/2001 +--------- + + +He empezado el STUB, ja que soy el encargado de las DLL's y queria provar las Dll's de +un modo que no fuera autoejecutables (la manera que haciamos antes , añadir al DLL_MAIN +las instrucciones) y entonces me he puesto a trabajar en el STUB, por el momento lo unico +que he hecho ha sido cojer codigo de las dll's del eDIV y adaptarlo al STUB, seguramente se +puede sacar mucho codigo, pero por si acaso lo dejo, ja que los encargados son ER_MAKINA y +RISEVEN, lo que el STUB hace ahora es busca las Dlls, las carga y bueno se pueden ejecutar +instrucciones de la DLL mediante la funcion ejecuta(void *proceso,int numero_parametros); +en el Source se detalla como se puede ejecutar una funcion. Supongo que algo de aqui sera util, +ja que se necesitaran rutinas para el uso de la DLL ;) + + |RooT| + diff --git a/ediv/explica_entrypoints.txt b/ediv/explica_entrypoints.txt new file mode 100644 index 0000000..b016797 --- /dev/null +++ b/ediv/explica_entrypoints.txt @@ -0,0 +1,60 @@ +[14:10] > veamos +[14:10] > alguna vez has hecho una dll para div2? +[14:10] > o has visto el source de una? +[14:10] > (div2 o div1) :p +[14:11] [@Daijo] varias / si +[14:11] [@Daijo] pero el cd del div2 lo tengo jodio +[14:11] [@Daijo] y asi poco puedo rekordar komo era xD +[14:11] > ok +[14:12] > a ver +[14:12] > kizas recuerdes +[14:12] > ke habia dlls +[14:12] > como la hboy o la polys, por ejemplo +[14:12] > que dibujaban cosas en la pantalla +[14:12] > modificando el buffer +[14:12] [@Daijo] sips +[14:12] > en una funcion llamada post_process_buffer +[14:12] > pues bien, esa funcion es un entrypoint +[14:12] > que div ejecuta +[14:13] > justo antes de actualizar el buffer en la memoria de video +[14:13] > ese tipo de funciones +[14:14] > se exportan a div con DIV_export("nombre_de_funcion",puntero_a_la_funcion); +[14:14] > DIV las guarda en una tabla +[14:14] > y cuando llega el momento de ejecutar cierta funcion +[14:14] > por ejemplo, ha terminado de dibujar los graficos y debe llamar a post_process_buffer +[14:14] > lo hace asi: +[14:15] > puntero=DIV_import("post_process_buffer"); +[14:15] > puntero(); +[14:15] > sentiende hasta ahora? +[14:16] [@Daijo] mas o menos +[14:16] > weno +[14:16] > pues ojo al dato porke lo ke viene ahora es un poco complicao +[14:17] > en eDIV +[14:17] > la implementacion seria como sigue: +[14:17] > para que la exportacion/importacion sea mas rapida, usamos ints en lugar de cadenas +[14:17] > esos son los #defines que puse en el mail +[14:18] > por ejemplo EDIV_post_process_buffer es 13 +[14:18] > para que no haya errores, las funciones se prototipan en el export.h +[14:18] > ya que deben tener unos parametros determinados +[14:19] > entonces en la dll se mete una funcion llamada post_process_buffer() +[14:19] > y ahi se mete el codigo ke se kiera +[14:20] > en el exportafuncs, exportamos la funcion con EDIV_Export_Entrypoint(EDIV_post_process_buffer,post_process_buffer); +[14:20] [@Daijo] ahá +[14:20] > El stub recoge esa exportacion y la guarda en una tabla de entrypoints +[14:21] > entonces, nos situamos en la graphics.dll +[14:21] > hemos pintado el fondo y todos los procesos en el buffer +[14:21] > y toca llamar a post_process_buffer +[14:22] > de esta manera: +[14:22] > Call_Entrypoint(EDIV_post_process_buffer); +[14:23] > La funcion Call_Entrypoint recorre la tabla de entrypoints y va ejecutando uno a uno los que corresponden a EDIV_post_process_buffer (13) +[14:24] > eso es, basicamente como funciona todo el sistema +[14:24] > como ya comentaba en el mail +[14:24] > podemos añadir un entrypoint llamado EDIV_frame +[14:24] > que se llama POR EL STUB en cada frame +[14:25] > de forma que podemos colocar todas las rutinas de dibujado en graphics.dll +[14:25] > ya que ésta tendra en su función frame() las rutinas necesarias +[14:25] > y a su vez llamará a otros entrypoints, como buffer_to_video, put_sprite, o post_process_buffer +[14:26] > pillas la cosa? :) +[14:26] [@Daijo] sips +[14:26] [@Camvoya] xDDDDDDDDDDDDDD +[14:26] > ea, pos eso es to diff --git a/ediv/ideQT/RCa01644 b/ediv/ideQT/RCa01644 new file mode 100644 index 0000000..391ec8e Binary files /dev/null and b/ediv/ideQT/RCa01644 differ diff --git a/ediv/ideQT/RCb01644 b/ediv/ideQT/RCb01644 new file mode 100644 index 0000000..391ec8e Binary files /dev/null and b/ediv/ideQT/RCb01644 differ diff --git a/ediv/ideQT/about.cpp b/ediv/ideQT/about.cpp new file mode 100644 index 0000000..778315c --- /dev/null +++ b/ediv/ideQT/about.cpp @@ -0,0 +1,90 @@ +#include "about.h" +#include "ideqtwindow.h" + +#include +#include +#include + +#include "gif/about.h" +#include "gif/about_png.h" +#include "gif/sion.h" + +About::About( QWidget* parent, const char* name, WFlags fl, QWidget* padre ) + : QWidget( parent, name, fl ) +{ + setCaption("Acerca de eDIV"); + setFixedSize(450,300); + + QPixmap *icono=pillagif(about_gif); + setIcon(*icono); + + if(padre) + move(padre->x()+padre->width()/2-width()/2,padre->y()+padre->height()/2-height()/2); + + QVBoxLayout* vbox1 = new QVBoxLayout(this); + + QPixmap* imagen=pillagif(about_png); + + QLabel* imagenlabel = new QLabel(this); + imagenlabel->setPixmap(*imagen); + imagenlabel->setAlignment(Qt::AlignCenter); + vbox1->addWidget(imagenlabel); + + QHBoxLayout* hbox1 = new QHBoxLayout(this); + vbox1->addLayout(hbox1); + hbox1->setSpacing(10); + hbox1->setMargin(15); + + imagen=pillagif(sion_png); + QLabel* imagen2label = new QLabel(this); + imagen2label->setPixmap(*imagen); + imagen2label->setAlignment(Qt::AlignCenter); + hbox1->addWidget(imagen2label); + + QTextView* texto = new QTextView(this); + texto->setText("
    eDIV ha llegado a tus manos gracias a Sion, Ltd.

    " + "Programadores

    " + "Er_Makina
    " + "Riseven
    " + "|RooT|
    " + "Daijo

    " + "Traductores

    " + "CicTec (italiano)
    " + "Tareko (portugués)
    " + "Er_Makina (inglés)
    " + "BenKo (catalán)
    " + "Jorge Urreta (euskera)
    " + "Bb_LaRiOs (francés)

    " + "Betatesters

    " + "Matías Iacono
    " + "EHSN
    " + "chinodiv
    " + "[hallg]
    " + "loxo
    " + "djpipo
    " + "Tomás Baenas
    " + "Pato
    " + "Jags Andrew
    " + "BenKo
    " + "Ferminho
    " + "Bb_LaRiOs
    " + "CicTec
    " + "Satv
    " + "Joyal
    " + "SHeLe
    " + "fidojones
    " + "Paradigma Studios

    " + "Webmasters

    " + "Er_Makina
    " + "[Kony]

    " + "Diseño del logo

    " + "Donan

    " + "Agradecimientos

    " + "Daniel Navarro
    " + "José Luis Cebrián
    " + "Beorn
    " + "Slàinte
    " + "Equipo de Hammer Technologies
    (excepto Wario)
    "); + hbox1->addWidget(texto); + +} \ No newline at end of file diff --git a/ediv/ideQT/about.h b/ediv/ideQT/about.h new file mode 100644 index 0000000..3235b75 --- /dev/null +++ b/ediv/ideQT/about.h @@ -0,0 +1,14 @@ +#ifndef __ABOUT_H__ +#define __ABOUT_H__ + +#include + +class About : public QWidget +{ + Q_OBJECT + +public: + About( QWidget* parent = 0, const char* name = 0, WFlags fl = 0, QWidget* padre = 0 ); +}; + +#endif //__ABOUT_H__ diff --git a/ediv/ideQT/aimpl.cpp b/ediv/ideQT/aimpl.cpp new file mode 100644 index 0000000..dd6a142 --- /dev/null +++ b/ediv/ideQT/aimpl.cpp @@ -0,0 +1,22 @@ +#include "aimpl.h" + +/* + * Constructs a aImp1 which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +aImp1::aImp1( QWidget* parent, const char* name, bool modal, WFlags fl ) + : Form1( parent, name, modal, fl ) +{ +} + +/* + * Destroys the object and frees any allocated resources + */ +aImp1::~aImp1() +{ + // no need to delete child widgets, Qt does it all for us +} + diff --git a/ediv/ideQT/aimpl.h b/ediv/ideQT/aimpl.h new file mode 100644 index 0000000..e51484c --- /dev/null +++ b/ediv/ideQT/aimpl.h @@ -0,0 +1,15 @@ +#ifndef AIMP1_H +#define AIMP1_H +#include "a.h" + +class aImp1 : public Form1 +{ + Q_OBJECT + +public: + aImp1( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~aImp1(); + +}; + +#endif // AIMP1_H diff --git a/ediv/ideQT/ayuda.cpp b/ediv/ideQT/ayuda.cpp new file mode 100644 index 0000000..2d3eb2a --- /dev/null +++ b/ediv/ideQT/ayuda.cpp @@ -0,0 +1,90 @@ +/**************************************************************************** +** Form implementation generated from reading ui file '.\ayuda.ui' +** +** Created: Wed Jul 10 21:15:41 2002 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "ayuda.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a Form1 which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +Form1::Form1( QWidget* parent, const char* name, bool modal, WFlags fl ) + : QDialog( parent, name, modal, fl ) +{ + if ( !name ) + setName( "Form1" ); + resize( 463, 405 ); + setProperty( "caption", tr( "Form1" ) ); + Form1Layout = new QVBoxLayout( this ); + Form1Layout->setSpacing( 6 ); + Form1Layout->setMargin( 11 ); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setProperty( "title", tr( "GroupBox1" ) ); + GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->layout()->setSpacing( 0 ); + GroupBox1->layout()->setMargin( 0 ); + GroupBox1Layout = new QHBoxLayout( GroupBox1->layout() ); + GroupBox1Layout->setAlignment( Qt::AlignTop ); + GroupBox1Layout->setSpacing( 6 ); + GroupBox1Layout->setMargin( 11 ); + + Layout2 = new QHBoxLayout; + Layout2->setSpacing( 6 ); + Layout2->setMargin( 0 ); + + Layout1 = new QGridLayout; + Layout1->setSpacing( 6 ); + Layout1->setMargin( 0 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + Layout1->addWidget( LineEdit1, 0, 1 ); + + LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); + + Layout1->addWidget( LineEdit2, 1, 1 ); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setProperty( "text", tr( "TextLabel1" ) ); + + Layout1->addWidget( TextLabel1, 0, 0 ); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setProperty( "text", tr( "TextLabel2" ) ); + + Layout1->addWidget( TextLabel2, 1, 0 ); + Layout2->addLayout( Layout1 ); + + ListBox1 = new QListBox( GroupBox1, "ListBox1" ); + ListBox1->insertItem( tr( "New Item" ) ); + Layout2->addWidget( ListBox1 ); + GroupBox1Layout->addLayout( Layout2 ); + Form1Layout->addWidget( GroupBox1 ); +} + +/* + * Destroys the object and frees any allocated resources + */ +Form1::~Form1() +{ + // no need to delete child widgets, Qt does it all for us +} + diff --git a/ediv/ideQT/ayuda.h b/ediv/ideQT/ayuda.h new file mode 100644 index 0000000..4fbd3b3 --- /dev/null +++ b/ediv/ideQT/ayuda.h @@ -0,0 +1,45 @@ +/**************************************************************************** +** Form interface generated from reading ui file '.\ayuda.ui' +** +** Created: Wed Jul 10 21:15:41 2002 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef FORM1_H +#define FORM1_H + +#include +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QGroupBox; +class QLabel; +class QLineEdit; +class QListBox; +class QListBoxItem; + +class Form1 : public QDialog +{ + Q_OBJECT + +public: + Form1( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~Form1(); + + QGroupBox* GroupBox1; + QLineEdit* LineEdit1; + QLineEdit* LineEdit2; + QLabel* TextLabel1; + QLabel* TextLabel2; + QListBox* ListBox1; + +protected: + QVBoxLayout* Form1Layout; + QHBoxLayout* GroupBox1Layout; + QHBoxLayout* Layout2; + QGridLayout* Layout1; +}; + +#endif // FORM1_H diff --git a/ediv/ideQT/ediv.ico b/ediv/ideQT/ediv.ico new file mode 100644 index 0000000..93c174a Binary files /dev/null and b/ediv/ideQT/ediv.ico differ diff --git a/ediv/ideQT/gif/AVI.h b/ediv/ideQT/gif/AVI.h new file mode 100644 index 0000000..6e32905 --- /dev/null +++ b/ediv/ideQT/gif/AVI.h @@ -0,0 +1,54 @@ +static unsigned char AVI_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,72,184,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,5,0,44,0,0,0,0,32,0,32,0,7,8, +227,0,11,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,10,0,160,177,99,71,142,25,1,36, +188,248,209,163,73,144,27,45,98,132,184,209,164,199,136,41,17,146,100,137, +210,101,75,142,34,71,98,212,88,211,37,202,156,15,119,134,180,201,147,167, +202,141,56,137,134,164,169,19,105,75,165,73,129,6,45,9,213,168,76,161, +79,137,254,60,74,83,41,82,156,77,187,86,5,219,180,104,213,144,101,135, +158,141,121,213,105,207,147,76,219,138,213,154,49,128,84,131,36,205,106,181, +187,48,175,90,151,1,236,222,149,155,212,99,96,136,5,41,42,158,168,241, +240,224,2,0,6,72,158,76,185,242,0,142,142,71,78,38,64,64,114,231, +1,157,57,119,190,136,216,162,231,211,159,83,75,46,221,215,179,104,208,167, +97,95,118,24,89,118,234,207,178,31,63,140,125,219,245,104,218,150,131,79, +214,141,119,177,113,135,1,1,0,59 +}; diff --git a/ediv/ideQT/gif/BMP.h b/ediv/ideQT/gif/BMP.h new file mode 100644 index 0000000..3abc16c --- /dev/null +++ b/ediv/ideQT/gif/BMP.h @@ -0,0 +1,59 @@ +static unsigned char BMP_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,8,3,0,35,35,35,88,88,88,158,158,158,31,33,31,247,247,244, +230,230,221,138,139,134,182,182,182,253,253,254,83,90,74,216,216,216,138,137, +136,187,188,164,0,52,3,0,36,3,218,219,206,187,188,164,0,25,2,239, +239,246,156,158,124,0,43,4,6,16,0,17,36,9,9,29,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,29,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,59,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,145,35,128,132,23,59,138, +20,249,113,224,0,2,3,6,134,28,201,50,99,73,2,4,10,24,72,217, +97,101,203,145,31,97,202,60,64,179,38,198,155,35,117,26,64,217,211,38, +208,141,66,97,18,40,104,244,104,82,152,6,155,222,124,186,244,225,207,140, +8,18,4,85,176,96,40,84,132,70,25,100,77,192,160,108,217,6,92,29, +60,128,89,18,236,213,178,8,32,144,45,27,65,194,2,181,48,93,130,124, +43,22,2,4,186,19,32,72,88,75,64,99,91,171,25,203,38,240,155,32, +194,132,9,20,32,84,40,188,241,48,211,159,22,22,203,69,224,248,66,228, +10,29,45,95,22,160,57,1,2,12,19,46,92,240,155,129,228,94,210,16, +86,39,192,176,26,66,4,13,34,3,136,38,120,81,117,236,216,20,40,108, +200,173,123,97,239,218,126,253,118,12,160,123,119,212,0,23,18,72,55,141, +96,35,115,136,76,41,106,151,168,241,250,110,0,193,195,139,65,31,31,28, +128,0,239,32,41,112,88,31,156,67,123,245,236,41,92,196,110,81,253,251, +245,236,221,219,167,111,28,190,254,255,254,149,231,16,120,0,22,40,158,115, +81,5,104,159,125,250,9,216,16,120,228,69,232,32,67,219,85,136,96,65, +1,1,0,59 +}; diff --git a/ediv/ideQT/gif/CDA.h b/ediv/ideQT/gif/CDA.h new file mode 100644 index 0000000..8853899 --- /dev/null +++ b/ediv/ideQT/gif/CDA.h @@ -0,0 +1,60 @@ +static unsigned char CDA_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,218,218,218,158,158,158,170,170,170,242,242,242,166,133,0,169,136,4, +172,141,9,175,145,15,179,151,22,172,140,9,183,157,30,191,168,45,205,187, +84,168,136,4,171,141,9,175,146,15,179,152,22,184,157,29,190,168,44,215, +201,120,242,238,210,212,197,97,171,140,9,175,146,16,179,151,21,184,158,29, +243,239,214,221,209,129,208,191,74,221,209,130,208,191,75,210,195,73,214,202, +81,169,136,3,211,195,74,215,201,81,219,208,89,210,195,74,214,201,80,219, +207,88,224,214,97,183,157,29,190,168,45,215,202,81,219,207,89,224,214,96, +229,220,103,179,152,21,220,208,89,229,220,104,233,227,111,219,208,88,228,221, +104,233,227,112,237,233,118,212,198,97,214,201,81,220,208,88,233,226,111,237, +232,117,229,221,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,64,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,129,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,113,227,0,0,9,47,118, +28,57,18,100,72,140,2,8,168,92,201,178,37,1,1,31,79,146,156,169, +209,36,66,145,36,7,12,8,80,160,103,1,149,48,109,26,196,153,146,128, +207,158,1,6,8,48,208,81,232,80,148,52,97,242,4,26,243,38,84,143, +83,141,38,229,232,180,32,81,149,5,182,210,172,250,240,106,84,174,22,205, +158,205,72,246,233,218,146,105,223,238,164,218,21,200,196,168,42,197,102,116, +10,241,0,130,4,10,22,64,92,59,128,238,64,0,7,252,50,8,220,192, +193,3,0,99,129,102,12,96,18,241,1,8,17,36,76,160,80,193,194,5, +12,144,59,22,126,57,153,242,225,203,25,52,108,224,208,185,131,135,15,161, +55,74,22,16,128,178,77,196,8,50,104,142,120,1,68,8,17,35,98,115, +172,13,209,43,137,204,19,138,67,252,80,194,196,9,225,165,139,15,141,160, +96,245,109,20,41,84,172,16,78,188,174,64,0,10,38,176,85,104,161,28, +128,139,23,48,98,132,238,190,16,128,12,10,45,60,71,52,49,3,6,141, +26,23,109,59,4,16,191,131,111,17,38,216,0,195,13,56,92,36,221,126, +15,244,22,2,10,244,173,112,67,13,57,28,232,208,119,58,48,183,3,15, +3,246,224,131,119,251,1,176,67,125,63,224,199,225,132,118,73,68,162,65, +1,1,0,59 +}; diff --git a/ediv/ideQT/gif/FLC.h b/ediv/ideQT/gif/FLC.h new file mode 100644 index 0000000..dfb4253 --- /dev/null +++ b/ediv/ideQT/gif/FLC.h @@ -0,0 +1,54 @@ +static unsigned char FLC_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,72,184,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,4,0,44,0,0,0,0,32,0,32,0,7,8, +222,0,9,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,10,0,160,177,99,71,142,25,1,36, +188,248,209,163,73,144,27,45,98,132,184,209,164,199,136,41,17,146,100,137, +210,101,75,142,34,71,98,212,88,211,37,202,156,15,119,134,180,201,147,167, +202,141,56,137,134,164,169,19,105,75,165,73,129,6,45,9,213,168,76,161, +79,137,254,60,74,83,41,82,156,77,187,86,5,219,180,104,213,144,101,135, +158,141,121,213,105,207,147,76,219,138,213,154,49,128,84,131,36,205,106,181, +187,48,175,90,151,1,236,222,149,155,212,99,96,136,5,41,42,158,168,241, +240,96,2,0,6,72,158,76,185,242,0,142,142,71,74,150,120,153,114,196, +203,130,251,110,246,60,57,114,233,199,120,55,67,28,205,122,179,67,211,166, +91,199,190,252,186,245,229,213,183,35,163,78,109,185,183,235,134,139,131,239, +46,24,16,0,59 +}; diff --git a/ediv/ideQT/gif/FLI.h b/ediv/ideQT/gif/FLI.h new file mode 100644 index 0000000..574fc56 --- /dev/null +++ b/ediv/ideQT/gif/FLI.h @@ -0,0 +1,54 @@ +static unsigned char FLI_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,72,184,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,4,0,44,0,0,0,0,32,0,32,0,7,8, +220,0,9,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,10,0,160,177,99,71,142,25,1,36, +188,248,209,163,73,144,27,45,98,132,184,209,164,199,136,41,17,146,100,137, +210,101,75,142,34,71,98,212,88,211,37,202,156,15,119,134,180,201,147,167, +202,141,56,137,134,164,169,19,105,75,165,73,129,6,45,9,213,168,76,161, +79,137,254,60,74,83,41,82,156,77,187,86,5,219,180,104,213,144,101,135, +158,141,121,213,105,207,147,76,219,138,213,154,49,128,84,131,36,205,106,181, +187,48,175,90,151,1,236,222,149,155,212,99,96,136,5,41,42,158,168,241, +240,96,2,0,6,72,158,76,185,242,0,142,142,71,74,150,120,153,114,196, +203,130,251,110,246,92,57,242,229,199,120,55,67,28,77,250,178,67,211,166, +89,79,134,253,90,246,233,213,159,81,167,182,204,123,243,235,197,192,29,6, +4,0,59 +}; diff --git a/ediv/ideQT/gif/FNT.h b/ediv/ideQT/gif/FNT.h new file mode 100644 index 0000000..a0f0b95 --- /dev/null +++ b/ediv/ideQT/gif/FNT.h @@ -0,0 +1,62 @@ +static unsigned char FNT_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,132,132,132,49, +49,41,255,255,255,255,255,247,255,247,247,148,140,99,247,247,247,247,247,239, +239,239,231,239,231,222,231,222,214,247,239,231,222,214,198,189,181,140,239,231, +214,231,231,214,255,222,165,255,222,156,255,222,173,255,214,148,231,222,206,255, +214,140,222,222,206,255,231,181,255,231,198,255,239,206,222,214,189,255,247,214, +214,206,189,214,206,181,214,198,173,255,239,198,255,231,189,206,198,173,206,198, +165,198,189,156,198,181,156,189,181,148,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,39,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,79,8,28,72,176,160,193,131,8,19,42,92,200,176,33,195,0,2, +34,74,156,24,209,97,65,1,3,50,106,204,72,160,64,1,3,2,44,14, +196,184,145,227,129,3,31,7,132,20,73,114,99,1,2,39,17,24,40,128, +96,165,195,150,25,11,196,68,32,51,129,130,5,54,25,182,236,184,19,1, +3,3,63,27,56,8,170,144,36,204,162,12,18,128,164,216,16,163,78,152, +60,163,38,136,170,160,171,130,7,76,17,10,128,73,51,43,130,4,9,0, +0,232,10,1,2,208,170,58,121,158,213,10,32,130,4,181,110,33,132,61, +40,224,128,92,173,105,39,216,165,64,65,109,133,189,6,5,100,69,139,22, +192,4,193,18,8,91,0,112,1,241,69,158,91,27,99,120,60,152,194,228, +195,85,163,210,205,128,1,67,4,181,145,39,55,176,76,80,128,86,5,0, +52,144,158,0,96,1,0,201,0,86,87,69,11,91,131,108,12,0,42,92, +184,237,25,192,6,214,35,125,198,230,32,27,0,4,225,196,39,119,64,46, +80,64,111,230,26,130,95,128,142,219,3,245,19,2,98,251,121,206,174,182, +124,116,0,31,190,3,0,145,161,125,134,16,33,56,75,136,92,92,4,117, +0,238,223,195,55,29,33,2,97,220,35,32,135,159,126,230,21,120,30,9, +172,225,7,95,8,148,9,215,192,131,27,120,224,193,109,22,76,86,130,101, +3,194,167,221,131,13,108,208,129,132,34,80,56,153,9,136,225,7,130,134, +14,66,248,161,8,34,140,32,34,0,75,29,180,30,129,16,81,68,17,0, +22,20,39,64,0,6,25,216,80,129,34,5,41,228,144,2,5,4,0,59 + +}; diff --git a/ediv/ideQT/gif/FPG.h b/ediv/ideQT/gif/FPG.h new file mode 100644 index 0000000..b3594d5 --- /dev/null +++ b/ediv/ideQT/gif/FPG.h @@ -0,0 +1,64 @@ +static unsigned char FPG_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,187,188,164,230,230,230,218,218,218,122,122,122,134,134,134,182,182,182, +227,227,219,158,158,158,30,0,0,26,26,26,244,148,0,194,110,0,234,141, +0,228,136,0,224,131,0,221,128,0,207,119,0,187,102,0,133,61,0,144, +70,0,154,76,0,159,82,0,167,87,0,171,91,0,159,255,255,127,210,204, +179,98,0,154,255,253,93,153,156,48,62,62,61,53,52,15,29,21,210,255, +255,174,93,0,128,250,247,50,50,50,194,188,188,110,201,204,174,231,231,136, +133,133,162,162,162,98,98,99,146,146,146,216,125,0,210,210,204,167,167,167, +136,145,142,154,224,147,85,85,85,115,156,108,110,247,104,7,4,7,62,62, +62,84,154,76,107,227,101,65,65,65,33,58,32,125,55,0,118,48,0,113, +45,0,173,173,173,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,64,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,129,8,28,72,16,0,0,130,8,19,42,76,104,48,64,0,131,11, +35,42,108,40,160,162,128,135,7,37,70,164,104,177,35,70,141,12,3,116, +28,105,241,35,72,32,0,6,144,92,89,209,164,196,148,4,8,176,92,233, +114,226,128,2,5,98,206,36,89,179,224,77,156,57,101,238,244,8,17,97, +74,160,64,117,14,45,153,113,224,81,164,73,133,46,29,208,20,229,79,168, +81,135,14,48,80,245,41,86,164,74,73,110,61,208,245,234,87,176,82,43, +110,69,80,213,106,130,179,95,149,174,85,208,22,64,0,3,3,222,194,133, +74,96,45,91,134,56,239,230,133,187,96,1,78,191,10,24,0,41,236,20, +169,96,189,72,23,52,104,80,184,178,101,7,14,22,8,4,128,245,113,228, +201,147,31,64,136,32,97,194,4,204,20,52,163,60,235,25,167,228,10,176, +45,88,184,128,33,131,134,212,141,225,122,126,189,97,3,135,223,189,59,116, +80,189,25,193,94,193,11,30,88,240,240,1,68,8,17,31,70,116,32,65, +124,51,0,227,186,23,64,176,80,194,196,9,1,39,76,160,163,160,144,161, +58,16,3,92,175,19,150,96,33,5,0,21,43,88,0,248,224,0,67,117, +5,45,90,160,55,136,29,234,2,23,24,188,0,192,9,48,156,0,64,12, +14,92,96,158,2,248,233,151,94,127,174,77,128,129,12,0,204,160,130,124, +52,76,96,129,121,2,49,152,223,126,234,69,152,65,13,54,0,112,131,9, +0,224,160,33,135,3,121,232,32,127,5,44,224,128,6,57,0,160,131,0, +42,0,176,131,11,21,176,72,144,139,32,46,64,129,112,152,57,96,154,11, +18,240,224,35,66,64,10,57,93,6,24,96,32,27,108,60,244,208,195,146, +76,226,183,192,116,150,117,217,131,15,88,38,164,192,15,140,45,196,88,64, +0,59 +}; diff --git a/ediv/ideQT/gif/GIF.h b/ediv/ideQT/gif/GIF.h new file mode 100644 index 0000000..892904a --- /dev/null +++ b/ediv/ideQT/gif/GIF.h @@ -0,0 +1,59 @@ +static unsigned char GIF_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,8,3,0,35,35,35,88,88,88,158,158,158,31,33,31,247,247,244, +230,230,221,138,139,134,182,182,182,253,253,254,83,90,74,216,216,216,138,137, +136,187,188,164,0,52,3,0,36,3,218,219,206,187,188,164,0,25,2,239, +239,246,156,158,124,0,43,4,6,16,0,17,36,9,9,29,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,29,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,59,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,145,35,128,132,23,59,138, +20,249,113,224,0,2,3,6,134,28,201,50,99,73,2,4,10,24,72,217, +97,101,203,145,31,97,202,60,64,179,38,198,155,35,117,26,64,217,211,38, +208,141,66,97,18,40,104,244,104,82,152,6,155,222,124,186,244,225,207,140, +8,18,4,85,176,96,40,84,132,70,25,100,77,192,160,108,217,6,92,29, +60,128,89,18,236,213,178,8,32,144,45,27,65,194,2,181,48,93,130,124, +43,22,2,4,186,19,32,72,88,75,64,99,91,171,25,203,38,240,155,32, +194,132,9,20,32,84,40,188,241,48,211,159,22,22,203,69,224,248,66,228, +10,29,45,95,22,160,57,1,2,12,19,46,92,240,155,129,228,94,210,16, +86,39,192,176,26,66,4,13,34,3,136,38,120,81,117,236,216,20,40,108, +200,173,123,97,239,218,126,253,118,12,160,123,119,212,0,23,18,72,55,141, +96,35,115,136,76,41,106,151,168,241,250,110,0,193,195,139,66,31,31,28, +128,0,239,32,195,115,88,79,97,61,135,246,236,41,92,196,110,49,248,123, +241,247,239,151,119,206,212,190,255,246,246,197,199,95,127,0,22,152,159,120, +3,242,166,30,123,238,21,88,158,67,224,145,39,225,131,13,109,103,97,130, +3,5,4,0,59 +}; diff --git a/ediv/ideQT/gif/IT.h b/ediv/ideQT/gif/IT.h new file mode 100644 index 0000000..895bffe --- /dev/null +++ b/ediv/ideQT/gif/IT.h @@ -0,0 +1,56 @@ +static unsigned char IT_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,255,212,142,220,146,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +142,42,241,247,67,222,30,93,43,220,77,220,40,115,226,161,7,62,151,249, +124,58,245,134,24,145,59,239,29,93,58,116,230,214,127,99,10,15,239,219, +249,120,218,232,177,7,4,0,59 +}; diff --git a/ediv/ideQT/gif/JPG.h b/ediv/ideQT/gif/JPG.h new file mode 100644 index 0000000..2aa6a05 --- /dev/null +++ b/ediv/ideQT/gif/JPG.h @@ -0,0 +1,59 @@ +static unsigned char JPG_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,8,3,0,35,35,35,88,88,88,158,158,158,31,33,31,247,247,244, +230,230,221,138,139,134,182,182,182,253,253,254,83,90,74,216,216,216,138,137, +136,187,188,164,0,52,3,0,36,3,218,219,206,187,188,164,0,25,2,239, +239,246,156,158,124,0,43,4,6,16,0,17,36,9,9,29,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,29,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,59,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,145,35,128,132,23,59,138, +20,249,113,224,0,2,3,6,134,28,201,50,99,73,2,4,10,24,72,217, +97,101,203,145,31,97,202,60,64,179,38,198,155,35,117,26,64,217,211,38, +208,141,66,97,18,40,104,244,104,82,152,6,155,222,124,186,244,225,207,140, +8,18,4,85,176,96,40,84,132,70,25,100,77,192,160,108,217,6,92,29, +60,128,89,18,236,213,178,8,32,144,45,27,65,194,2,181,48,93,130,124, +43,22,2,4,186,19,32,72,88,75,64,99,91,171,25,203,38,240,155,32, +194,132,9,20,32,84,40,188,241,48,211,159,22,22,203,69,224,248,66,228, +10,29,45,95,22,160,57,1,2,12,19,46,92,240,155,129,228,94,210,16, +86,39,192,176,26,66,4,13,34,3,136,38,120,81,117,236,216,20,40,108, +200,173,123,97,239,218,126,253,118,12,160,123,119,212,0,23,18,72,55,141, +96,35,115,136,76,41,106,151,168,241,250,110,0,193,195,139,66,31,31,28, +128,0,239,32,195,115,224,64,97,61,251,224,238,41,92,196,110,81,60,251, +247,247,197,211,55,110,191,253,122,248,0,58,23,85,123,0,190,7,32,129, +2,50,5,223,127,6,46,200,94,130,188,145,39,97,120,16,170,180,221,133, +14,5,4,0,59 +}; diff --git a/ediv/ideQT/gif/MAP.h b/ediv/ideQT/gif/MAP.h new file mode 100644 index 0000000..3d115a1 --- /dev/null +++ b/ediv/ideQT/gif/MAP.h @@ -0,0 +1,58 @@ +static unsigned char MAP_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,8,3,0,35,35,35,88,88,88,158,158,158,31,33,31,247,247,244, +230,230,221,138,139,134,182,182,182,253,253,254,83,90,74,216,216,216,138,137, +136,187,188,164,0,52,3,0,36,3,218,219,206,187,188,164,0,25,2,239, +239,246,156,158,124,0,43,4,6,16,0,17,36,9,9,29,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,28,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,57,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,145,35,128,132,23,59,138, +20,249,113,224,0,2,3,6,134,28,201,50,99,73,2,4,10,24,72,201, +97,101,203,145,31,97,202,60,64,179,38,198,155,35,117,26,64,217,211,38, +208,141,66,97,18,40,104,244,104,82,152,6,155,222,124,186,244,225,207,140, +8,18,4,85,176,96,40,84,132,70,25,100,77,192,160,108,217,6,92,29, +60,128,89,18,236,213,178,8,32,144,45,27,65,194,2,181,48,93,130,124, +43,22,2,4,186,19,32,72,88,75,64,99,91,171,25,203,38,240,155,32, +194,132,9,20,32,84,40,188,241,48,211,159,22,22,203,69,224,248,66,228, +10,29,45,95,22,160,57,1,2,12,19,46,92,240,155,129,228,94,210,16, +86,39,192,176,26,66,4,13,34,3,136,38,120,81,117,236,216,20,40,108, +200,173,123,97,239,218,126,253,118,12,160,123,119,212,0,23,18,72,55,141, +96,35,115,136,76,41,106,151,168,241,250,110,0,201,195,139,60,15,15,64, +128,119,144,16,192,167,247,11,145,125,251,244,205,141,167,143,184,126,189,122, +240,216,25,226,103,63,191,61,253,244,14,237,103,31,127,234,177,23,96,125, +2,10,104,96,67,5,142,231,160,115,81,109,39,161,67,1,1,0,59 +}; diff --git a/ediv/ideQT/gif/MIDI.h b/ediv/ideQT/gif/MIDI.h new file mode 100644 index 0000000..2285a57 --- /dev/null +++ b/ediv/ideQT/gif/MIDI.h @@ -0,0 +1,57 @@ +static unsigned char MIDI_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,255,212,142,220,146,0,158,158,158,170,170,170, +242,242,242,255,212,142,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,12,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,25,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,68,6,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,80,192,187,183,239,223,182,89,231, +214,172,96,65,111,227,200,23,24,47,110,123,184,194,221,202,139,35,103,206, +220,184,107,135,213,179,47,159,30,154,32,244,227,217,179,119,21,31,248,157, +247,116,229,219,109,55,196,8,188,125,239,241,29,105,203,95,31,16,0,59 + +}; diff --git a/ediv/ideQT/gif/MOD.h b/ediv/ideQT/gif/MOD.h new file mode 100644 index 0000000..5a9251b --- /dev/null +++ b/ediv/ideQT/gif/MOD.h @@ -0,0 +1,61 @@ +#ifndef __MOV_H__ +#define __MOV_H__ + +static unsigned char MOD_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,255,212,142,220,146,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +254,45,115,247,111,227,18,139,11,87,184,123,34,113,226,200,143,191,126,222, +188,56,245,223,13,49,94,143,206,61,123,117,234,200,31,22,11,247,238,187, +60,246,215,180,211,103,15,8,0,59 +}; + +#endif //__MOV_H__ \ No newline at end of file diff --git a/ediv/ideQT/gif/MOV.h b/ediv/ideQT/gif/MOV.h new file mode 100644 index 0000000..704df9a --- /dev/null +++ b/ediv/ideQT/gif/MOV.h @@ -0,0 +1,54 @@ +static unsigned char MOV_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,72,184,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,5,0,44,0,0,0,0,32,0,32,0,7,8, +224,0,11,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,10,0,160,177,99,71,142,25,1,36, +188,248,209,163,73,144,27,45,98,132,184,209,164,199,136,41,17,146,100,137, +210,101,75,142,34,71,98,212,88,211,37,202,156,15,119,134,180,201,147,167, +202,141,56,137,134,164,169,19,105,75,165,73,129,6,45,9,213,168,76,161, +79,137,254,60,74,83,41,82,156,77,187,86,5,219,180,104,213,144,101,135, +158,141,121,213,105,207,147,76,219,138,213,154,49,128,84,131,36,205,106,181, +187,48,175,90,151,1,236,222,149,155,212,99,96,136,5,41,42,158,168,241, +240,224,2,0,6,72,158,76,185,242,0,142,142,71,14,32,48,153,243,102, +207,156,57,95,68,108,241,179,105,208,155,83,147,238,155,58,116,234,214,170, +29,70,246,12,251,181,231,199,15,95,219,166,125,91,182,229,223,147,113,227, +93,76,220,97,64,0,59 +}; diff --git a/ediv/ideQT/gif/MP3.h b/ediv/ideQT/gif/MP3.h new file mode 100644 index 0000000..2144fa2 --- /dev/null +++ b/ediv/ideQT/gif/MP3.h @@ -0,0 +1,56 @@ +static unsigned char MP3_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,212,255,142,122,185,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +254,109,116,183,68,153,15,145,11,87,104,188,57,241,231,196,93,59,140,30, +61,249,239,221,191,27,98,132,110,188,183,113,237,221,145,67,13,191,142,28, +188,239,243,217,95,211,94,175,61,32,0,59 +}; diff --git a/ediv/ideQT/gif/MPG.h b/ediv/ideQT/gif/MPG.h new file mode 100644 index 0000000..2e4d243 --- /dev/null +++ b/ediv/ideQT/gif/MPG.h @@ -0,0 +1,54 @@ +static unsigned char MPG_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,72,184,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,5,0,44,0,0,0,0,32,0,32,0,7,8, +228,0,11,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,10,0,160,177,99,71,142,25,1,36, +188,248,209,163,73,144,27,45,98,132,184,209,164,199,136,41,17,146,100,137, +210,101,75,142,34,71,98,212,88,211,37,202,156,15,119,134,180,201,147,167, +202,141,56,137,134,164,169,19,105,75,165,73,129,6,45,9,213,168,76,161, +79,137,254,60,74,83,41,82,156,77,187,86,5,219,180,104,213,144,101,135, +158,141,121,213,105,207,147,76,219,138,213,154,49,128,84,131,36,205,106,181, +187,48,175,90,151,1,236,222,149,155,212,99,96,136,5,41,42,158,168,241, +240,224,2,0,6,72,158,76,185,242,0,142,142,71,14,32,48,153,51,129, +207,146,63,115,190,136,216,226,102,207,158,67,115,158,92,186,239,230,215,168, +83,191,126,252,240,117,104,219,182,71,59,140,188,26,54,101,209,151,119,91, +30,206,122,247,226,227,14,3,2,0,59 +}; diff --git a/ediv/ideQT/gif/OGG.h b/ediv/ideQT/gif/OGG.h new file mode 100644 index 0000000..4de95a2 --- /dev/null +++ b/ediv/ideQT/gif/OGG.h @@ -0,0 +1,56 @@ +static unsigned char OGG_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,212,255,142,122,185,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +150,249,208,104,113,226,187,127,11,87,184,59,121,243,168,201,145,191,254,77, +156,122,241,230,205,27,98,164,110,189,186,243,223,218,157,71,15,151,136,60, +251,116,223,232,67,19,164,205,94,253,192,128,0,59 +}; diff --git a/ediv/ideQT/gif/PAK.h b/ediv/ideQT/gif/PAK.h new file mode 100644 index 0000000..02a0809 --- /dev/null +++ b/ediv/ideQT/gif/PAK.h @@ -0,0 +1,57 @@ +static unsigned char PAK_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,255,255,255,255,255,204,255, +255,153,255,255,102,255,255,51,255,255,0,255,204,255,255,204,204,255,204,153, +255,204,102,255,204,51,255,204,0,255,153,255,255,153,204,255,153,153,255,153, +102,255,153,51,255,153,0,255,102,255,255,102,204,255,102,153,255,102,102,255, +102,51,255,102,0,255,51,255,255,51,204,255,51,153,255,51,102,255,51,51, +255,51,0,255,0,255,255,0,204,255,0,153,255,0,102,255,0,51,255,0, +0,204,255,255,204,255,204,204,255,153,204,255,102,204,255,51,204,255,0,204, +204,255,204,204,204,204,204,153,204,204,102,204,204,51,204,204,0,204,153,255, +204,153,204,204,153,153,204,153,102,204,153,51,204,153,0,204,102,255,204,102, +204,204,102,153,204,102,102,204,102,51,204,102,0,204,51,255,204,51,204,204, +51,153,204,51,102,204,51,51,204,51,0,204,0,255,204,0,204,204,0,153, +204,0,102,204,0,51,204,0,0,153,255,255,153,255,204,153,255,153,153,255, +102,153,255,51,153,255,0,153,204,255,153,204,204,153,204,153,153,204,102,153, +204,51,153,204,0,153,153,255,153,153,204,153,153,153,153,153,102,153,153,51, +153,153,0,153,102,255,153,102,204,153,102,153,153,102,102,153,102,51,153,102, +0,153,51,255,153,51,204,153,51,153,153,51,102,153,51,51,153,51,0,153, +0,255,153,0,204,153,0,153,153,0,102,153,0,51,153,0,0,102,255,255, +102,255,204,102,255,153,102,255,102,102,255,51,102,255,0,102,204,255,102,204, +204,102,204,153,102,204,102,102,204,51,102,204,0,102,153,255,102,153,204,102, +153,153,102,153,102,102,153,51,102,153,0,102,102,255,102,102,204,102,102,153, +102,102,102,102,102,51,102,102,0,102,51,255,102,51,204,102,51,153,102,51, +102,102,51,51,102,51,0,102,0,255,102,0,204,102,0,153,102,0,102,102, +0,51,102,0,0,51,255,255,51,255,204,51,255,153,51,255,102,51,255,51, +51,255,0,51,204,255,51,204,204,51,204,153,51,204,102,51,204,51,51,204, +0,51,153,255,51,153,204,51,153,153,51,153,102,51,153,51,51,153,0,51, +102,255,51,102,204,51,102,153,51,102,102,51,102,51,51,102,0,51,51,255, +51,51,204,51,51,153,51,51,102,51,51,51,51,51,0,51,0,255,51,0, +204,51,0,153,51,0,102,51,0,51,51,0,0,0,255,255,0,255,204,0, +255,153,0,255,102,0,255,51,0,255,0,0,204,255,0,204,204,0,204,153, +0,204,102,0,204,51,0,204,0,0,153,255,0,153,204,0,153,153,0,153, +102,0,153,51,0,153,0,0,102,255,0,102,204,0,102,153,0,102,102,0, +102,51,0,102,0,0,51,255,0,51,204,0,51,153,0,51,102,0,51,51, +0,51,0,0,0,255,0,0,204,0,0,153,0,0,102,0,0,51,238,0, +0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0,0,68, +0,0,34,0,0,17,0,0,0,238,0,0,221,0,0,187,0,0,170,0, +0,136,0,0,119,0,0,85,0,0,68,0,0,34,0,0,17,0,0,0, +238,0,0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0, +0,68,0,0,34,0,0,17,238,238,238,221,221,221,187,187,187,170,170,170, +136,136,136,119,119,119,85,85,85,68,68,68,34,34,34,17,17,17,0,0, +0,33,249,4,1,0,0,0,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,1,8,28,72,176,160,193,131,8,19,42,92,152,48,81,34,131,14, +25,34,116,136,96,70,68,0,14,103,88,124,40,81,32,69,141,32,19,121, +65,64,178,226,70,134,31,65,130,244,50,35,64,73,146,26,47,66,76,100, +82,229,12,47,56,65,186,124,25,147,163,71,154,54,53,226,28,106,115,103, +201,158,24,107,170,28,202,52,104,203,151,38,255,97,76,180,148,105,83,167, +79,73,38,146,58,144,170,213,175,88,85,250,156,90,241,171,213,176,55,103, +32,248,39,53,145,209,178,102,89,58,101,249,50,64,91,47,111,111,130,181, +73,183,164,93,174,30,241,242,60,187,82,173,223,173,6,71,226,204,75,52, +109,221,140,128,7,142,20,42,248,168,23,145,143,69,178,140,44,112,242,74, +193,152,47,143,12,224,176,41,103,0,158,171,106,68,48,180,244,217,211,169, +157,178,142,155,19,54,130,43,87,176,206,166,61,195,246,149,0,44,114,219, +220,29,183,119,226,219,44,2,8,10,74,220,172,241,130,147,175,8,90,62, +156,118,237,153,48,101,243,238,125,250,103,118,149,205,115,114,32,71,73,83, +105,115,141,108,59,122,55,185,27,125,119,137,20,73,202,77,175,126,34,80, +250,245,21,34,206,207,127,97,64,0,59 +}; diff --git a/ediv/ideQT/gif/PAL.h b/ediv/ideQT/gif/PAL.h new file mode 100644 index 0000000..d006567 --- /dev/null +++ b/ediv/ideQT/gif/PAL.h @@ -0,0 +1,56 @@ +static unsigned char PAL_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,218,218,218,158,158,158,170,170,170,242,242,242,14,14,14,142,212,255, +0,122,185,72,184,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,113,227,0,0,9,47,118, +28,57,18,100,72,140,2,8,168,92,201,178,37,1,1,31,79,146,156,169, +209,36,66,145,36,7,12,8,80,160,103,1,149,48,109,26,196,153,146,128, +207,158,1,6,8,48,208,81,232,80,148,52,97,242,4,26,243,38,84,143, +83,141,38,229,232,180,32,81,149,5,182,210,172,250,240,106,84,174,22,205, +158,205,72,246,233,218,146,105,223,238,164,218,117,32,209,153,42,197,102,180, +121,160,175,223,191,126,163,14,160,43,240,0,2,4,134,17,39,72,112,96, +241,129,153,131,95,102,12,96,50,177,101,199,142,71,70,214,24,128,242,64, +192,160,251,118,4,58,153,178,80,203,135,27,51,86,160,224,49,201,206,16, +13,162,86,188,186,245,72,216,117,23,132,6,205,17,183,66,213,192,89,31, +16,206,217,52,67,224,142,133,19,247,221,112,55,96,227,14,117,39,111,173, +188,117,238,223,211,135,83,111,29,157,160,243,191,221,195,135,2,15,8,0, +59 +}; diff --git a/ediv/ideQT/gif/PCX.h b/ediv/ideQT/gif/PCX.h new file mode 100644 index 0000000..0a24b37 --- /dev/null +++ b/ediv/ideQT/gif/PCX.h @@ -0,0 +1,58 @@ +static unsigned char PCX_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,8,3,0,35,35,35,88,88,88,158,158,158,31,33,31,247,247,244, +230,230,221,138,139,134,182,182,182,253,253,254,83,90,74,216,216,216,138,137, +136,187,188,164,0,52,3,0,36,3,218,219,206,187,188,164,0,25,2,239, +239,246,156,158,124,0,43,4,6,16,0,17,36,9,9,29,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,28,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,57,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,145,35,128,132,23,59,138, +20,249,113,224,0,2,3,6,134,28,201,50,99,73,2,4,10,24,72,201, +97,101,203,145,31,97,202,60,64,179,38,198,155,35,117,26,64,217,211,38, +208,141,66,97,18,40,104,244,104,82,152,6,155,222,124,186,244,225,207,140, +8,18,4,85,176,96,40,84,132,70,25,100,77,192,160,108,217,6,92,29, +60,128,89,18,236,213,178,8,32,144,45,27,65,194,2,181,48,93,130,124, +43,22,2,4,186,19,32,72,88,75,64,99,91,171,25,203,38,240,155,32, +194,132,9,20,32,84,40,188,241,48,211,159,22,22,203,69,224,248,66,228, +10,29,45,95,22,160,57,1,2,12,19,46,92,240,155,129,228,94,210,16, +86,39,192,176,26,66,4,13,34,3,136,38,120,81,117,236,216,20,40,108, +200,173,123,97,239,218,126,253,118,12,160,123,119,212,0,23,18,72,55,141, +96,35,115,136,76,41,106,151,168,241,250,110,0,201,195,139,58,15,15,64, +128,119,144,16,34,38,87,15,62,125,250,230,198,221,187,111,239,183,61,120, +236,12,239,67,172,47,126,127,122,135,247,145,39,224,124,0,202,183,222,126, +246,253,215,16,125,227,53,232,92,84,219,69,232,80,64,0,59 +}; diff --git a/ediv/ideQT/gif/PNG.h b/ediv/ideQT/gif/PNG.h new file mode 100644 index 0000000..6b5f11d --- /dev/null +++ b/ediv/ideQT/gif/PNG.h @@ -0,0 +1,59 @@ +static unsigned char PNG_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,8,3,0,35,35,35,88,88,88,158,158,158,31,33,31,247,247,244, +230,230,221,138,139,134,182,182,182,253,253,254,83,90,74,216,216,216,138,137, +136,187,188,164,0,52,3,0,36,3,218,219,206,187,188,164,0,25,2,239, +239,246,156,158,124,0,43,4,6,16,0,17,36,9,9,29,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,29,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,59,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,145,35,128,132,23,59,138, +20,249,113,224,0,2,3,6,134,28,201,50,99,73,2,4,10,24,72,217, +97,101,203,145,31,97,202,60,64,179,38,198,155,35,117,26,64,217,211,38, +208,141,66,97,18,40,104,244,104,82,152,6,155,222,124,186,244,225,207,140, +8,18,4,85,176,96,40,84,132,70,25,100,77,192,160,108,217,6,92,29, +60,128,89,18,236,213,178,8,32,144,45,27,65,194,2,181,48,93,130,124, +43,22,2,4,186,19,32,72,88,75,64,99,91,171,25,203,38,240,155,32, +194,132,9,20,32,84,40,188,241,48,211,159,22,22,203,69,224,248,66,228, +10,29,45,95,22,160,57,1,2,12,19,46,92,240,155,129,228,94,210,16, +86,39,192,176,26,66,4,13,34,3,136,38,120,81,117,236,216,20,40,108, +200,173,123,97,239,218,126,253,118,12,160,123,119,212,0,23,18,72,55,141, +96,35,115,136,76,41,106,151,168,241,250,110,0,193,195,139,65,31,31,28, +128,0,239,32,41,112,88,31,156,67,251,246,236,47,98,183,168,254,61,123, +247,238,195,207,55,174,158,125,253,251,239,57,23,85,125,225,229,135,95,128, +14,129,151,223,123,4,174,231,158,128,76,145,39,161,126,9,110,103,161,67, +1,1,0,59 +}; diff --git a/ediv/ideQT/gif/PRG.h b/ediv/ideQT/gif/PRG.h new file mode 100644 index 0000000..73436cd --- /dev/null +++ b/ediv/ideQT/gif/PRG.h @@ -0,0 +1,60 @@ +static unsigned char PRG_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,2,0,0,0,0,194,194,194,255, +255,255,218,218,218,158,158,158,115,0,0,170,170,170,255,142,142,242,242,242, +185,0,0,255,240,212,255,184,72,220,146,0,187,188,164,211,213,198,215,216, +203,177,179,151,187,188,176,209,210,196,230,230,221,240,240,236,197,198,179,182, +182,182,167,168,138,104,105,78,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,25,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,51,8,28,72,176,160,193,131,8,19,42,92,200,176,225,65,0,16, +35,74,156,72,81,33,128,0,2,50,106,220,200,113,227,0,0,9,47,118, +28,57,18,100,72,140,2,8,168,92,201,178,37,1,1,31,79,146,156,169, +209,100,134,2,6,69,146,28,48,32,128,129,159,6,84,194,4,89,224,0, +78,130,58,83,18,0,250,51,192,0,1,8,58,66,60,144,32,193,209,129, +73,105,246,12,250,18,128,2,1,86,115,162,228,184,85,165,1,167,53,21, +44,96,96,179,96,82,179,104,75,170,101,43,147,230,70,175,107,33,90,28, +75,19,47,219,161,33,39,146,244,11,160,230,67,0,13,28,56,120,240,0, +2,68,142,132,3,8,141,137,180,65,4,197,18,30,76,160,48,161,65,225, +140,145,159,26,198,106,249,178,196,9,15,36,120,22,64,88,227,128,201,38, +17,87,168,16,193,38,68,9,14,34,120,182,144,55,227,235,151,25,3,196, +158,93,193,54,128,8,200,117,3,176,96,161,240,111,141,1,132,11,148,61, +27,36,68,226,202,37,42,133,46,220,54,132,239,197,1,16,91,175,224,185, +240,103,142,209,245,34,253,206,158,120,249,172,220,213,187,109,64,159,125,249, +233,218,5,164,111,59,159,126,125,219,13,204,230,217,126,12,33,230,159,103, +88,177,231,152,124,11,1,112,193,131,254,69,84,31,4,8,58,52,221,131, +24,30,24,161,133,72,97,224,33,134,32,242,199,33,68,30,150,136,1,131, +28,34,53,81,138,3,5,4,0,59 +}; diff --git a/ediv/ideQT/gif/S3M.h b/ediv/ideQT/gif/S3M.h new file mode 100644 index 0000000..b5da0b5 --- /dev/null +++ b/ediv/ideQT/gif/S3M.h @@ -0,0 +1,56 @@ +static unsigned char S3M_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,255,212,142,220,146,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +150,41,241,247,67,226,200,61,186,86,184,123,119,239,230,197,151,163,38,238, +220,56,242,223,191,27,98,140,90,29,187,243,230,218,161,127,14,63,142,221, +123,120,223,232,179,191,166,205,94,123,64,0,59 +}; diff --git a/ediv/ideQT/gif/WAV.h b/ediv/ideQT/gif/WAV.h new file mode 100644 index 0000000..4198565 --- /dev/null +++ b/ediv/ideQT/gif/WAV.h @@ -0,0 +1,61 @@ +#ifndef __WAV_H__ +#define __WAV_H__ + +static unsigned char WAV_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,212,255,142,122,185,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +254,109,116,247,111,227,187,147,11,87,152,188,56,113,226,205,93,59,132,14, +93,34,245,208,4,147,107,127,142,92,38,246,129,205,189,115,14,23,255,187, +33,70,223,232,203,191,166,205,222,124,64,0,59 +}; + +#endif //__WAV_H__ diff --git a/ediv/ideQT/gif/WMA.h b/ediv/ideQT/gif/WMA.h new file mode 100644 index 0000000..710f66f --- /dev/null +++ b/ediv/ideQT/gif/WMA.h @@ -0,0 +1,56 @@ +static unsigned char WMA_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,212,255,142,122,185,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +254,45,115,247,110,226,191,143,123,116,173,208,120,241,228,15,145,27,15,61, +208,57,113,229,208,141,55,196,152,93,186,119,234,213,191,63,14,199,14,190, +163,239,243,191,183,211,94,95,126,65,64,0,59 +}; diff --git a/ediv/ideQT/gif/XM.h b/ediv/ideQT/gif/XM.h new file mode 100644 index 0000000..7e4f873 --- /dev/null +++ b/ediv/ideQT/gif/XM.h @@ -0,0 +1,56 @@ +static unsigned char XM_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,255,212,142,220,146,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +150,185,155,248,111,163,197,127,11,87,152,124,119,241,135,191,155,135,30,152, +252,184,113,231,200,27,98,68,110,189,121,246,215,198,175,115,13,39,174,189, +186,111,222,211,169,211,94,175,61,32,0,59 +}; diff --git a/ediv/ideQT/gif/abort.gif b/ediv/ideQT/gif/abort.gif new file mode 100644 index 0000000..b1462c8 Binary files /dev/null and b/ediv/ideQT/gif/abort.gif differ diff --git a/ediv/ideQT/gif/abort.h b/ediv/ideQT/gif/abort.h new file mode 100644 index 0000000..f16d88f --- /dev/null +++ b/ediv/ideQT/gif/abort.h @@ -0,0 +1,9 @@ +static unsigned char abort_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,128,0,0,127,127,127,0, +0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,62,72,170,211, +189,144,185,57,34,113,36,136,32,33,38,66,120,125,227,18,10,88,85,154, +225,83,186,10,32,0,234,91,103,155,87,193,141,16,61,46,210,34,56,26, +104,56,29,201,227,164,212,41,142,69,11,101,98,25,82,171,88,75,2,0, +59 +}; diff --git a/ediv/ideQT/gif/about.gif b/ediv/ideQT/gif/about.gif new file mode 100644 index 0000000..ae14d1d Binary files /dev/null and b/ediv/ideQT/gif/about.gif differ diff --git a/ediv/ideQT/gif/about.h b/ediv/ideQT/gif/about.h new file mode 100644 index 0000000..9184822 --- /dev/null +++ b/ediv/ideQT/gif/about.h @@ -0,0 +1,57 @@ +static unsigned char about_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,255,255,255,255,255,204,255, +255,153,255,255,102,255,255,51,255,255,0,255,204,255,255,204,204,255,204,153, +255,204,102,255,204,51,255,204,0,255,153,255,255,153,204,255,153,153,255,153, +102,255,153,51,255,153,0,255,102,255,255,102,204,255,102,153,255,102,102,255, +102,51,255,102,0,255,51,255,255,51,204,255,51,153,255,51,102,255,51,51, +255,51,0,255,0,255,255,0,204,255,0,153,255,0,102,255,0,51,255,0, +0,204,255,255,204,255,204,204,255,153,204,255,102,204,255,51,204,255,0,204, +204,255,204,204,204,204,204,153,204,204,102,204,204,51,204,204,0,204,153,255, +204,153,204,204,153,153,204,153,102,204,153,51,204,153,0,204,102,255,204,102, +204,204,102,153,204,102,102,204,102,51,204,102,0,204,51,255,204,51,204,204, +51,153,204,51,102,204,51,51,204,51,0,204,0,255,204,0,204,204,0,153, +204,0,102,204,0,51,204,0,0,153,255,255,153,255,204,153,255,153,153,255, +102,153,255,51,153,255,0,153,204,255,153,204,204,153,204,153,153,204,102,153, +204,51,153,204,0,153,153,255,153,153,204,153,153,153,153,153,102,153,153,51, +153,153,0,153,102,255,153,102,204,153,102,153,153,102,102,153,102,51,153,102, +0,153,51,255,153,51,204,153,51,153,153,51,102,153,51,51,153,51,0,153, +0,255,153,0,204,153,0,153,153,0,102,153,0,51,153,0,0,102,255,255, +102,255,204,102,255,153,102,255,102,102,255,51,102,255,0,102,204,255,102,204, +204,102,204,153,102,204,102,102,204,51,102,204,0,102,153,255,102,153,204,102, +153,153,102,153,102,102,153,51,102,153,0,102,102,255,102,102,204,102,102,153, +102,102,102,102,102,51,102,102,0,102,51,255,102,51,204,102,51,153,102,51, +102,102,51,51,102,51,0,102,0,255,102,0,204,102,0,153,102,0,102,102, +0,51,102,0,0,51,255,255,51,255,204,51,255,153,51,255,102,51,255,51, +51,255,0,51,204,255,51,204,204,51,204,153,51,204,102,51,204,51,51,204, +0,51,153,255,51,153,204,51,153,153,51,153,102,51,153,51,51,153,0,51, +102,255,51,102,204,51,102,153,51,102,102,51,102,51,51,102,0,51,51,255, +51,51,204,51,51,153,51,51,102,51,51,51,51,51,0,51,0,255,51,0, +204,51,0,153,51,0,102,51,0,51,51,0,0,0,255,255,0,255,204,0, +255,153,0,255,102,0,255,51,0,255,0,0,204,255,0,204,204,0,204,153, +0,204,102,0,204,51,0,204,0,0,153,255,0,153,204,0,153,153,0,153, +102,0,153,51,0,153,0,0,102,255,0,102,204,0,102,153,0,102,102,0, +102,51,0,102,0,0,51,255,0,51,204,0,51,153,0,51,102,0,51,51, +0,51,0,0,0,255,0,0,204,0,0,153,0,0,102,0,0,51,238,0, +0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0,0,68, +0,0,34,0,0,17,0,0,0,238,0,0,221,0,0,187,0,0,170,0, +0,136,0,0,119,0,0,85,0,0,68,0,0,34,0,0,17,0,0,0, +238,0,0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0, +0,68,0,0,34,0,0,17,238,238,238,221,221,221,187,187,187,170,170,170, +136,136,136,119,119,119,85,85,85,68,68,68,34,34,34,17,17,17,0,0, +0,33,249,4,1,0,0,0,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,1,8,28,72,176,160,193,131,8,19,42,92,200,176,161,195,135,16, +31,254,155,56,49,226,65,138,101,50,150,217,241,207,162,64,138,53,52,138, +228,24,113,226,198,29,59,106,212,216,161,17,229,140,142,13,77,142,68,57, +243,37,195,137,40,85,138,156,185,99,6,2,152,8,101,158,76,201,50,35, +75,148,61,17,44,155,2,180,224,191,144,59,105,26,61,57,195,231,178,62, +76,13,226,76,9,117,231,208,164,8,118,244,249,209,244,99,75,164,35,135, +86,69,176,49,193,152,28,101,255,121,109,185,145,170,207,176,9,18,8,200, +97,115,160,220,185,103,93,34,64,192,77,91,16,1,136,251,154,245,122,84, +173,79,110,133,131,136,173,26,183,177,101,164,107,17,4,209,102,120,202,50, +159,149,105,30,69,218,243,238,198,8,83,250,92,29,92,22,192,191,25,164, +49,103,110,171,183,207,221,138,90,17,84,221,157,25,193,152,49,121,17,11, +216,241,179,245,71,166,131,147,179,254,247,59,199,143,31,130,141,19,252,183, +140,162,245,41,57,178,59,191,45,221,111,234,165,99,84,127,37,255,206,221, +33,245,183,63,198,144,87,142,91,34,2,237,217,147,83,244,232,250,31,251, +246,244,63,206,207,207,191,191,255,255,0,38,20,16,0,59 +}; diff --git a/ediv/ideQT/gif/about.png b/ediv/ideQT/gif/about.png new file mode 100644 index 0000000..79de0cc Binary files /dev/null and b/ediv/ideQT/gif/about.png differ diff --git a/ediv/ideQT/gif/about_png.h b/ediv/ideQT/gif/about_png.h new file mode 100644 index 0000000..3847d68 --- /dev/null +++ b/ediv/ideQT/gif/about_png.h @@ -0,0 +1,6226 @@ +static unsigned char about_png[]={ +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,167, +0,0,0,204,8,2,0,0,0,88,201,251,226,0,0,0,7,116,73,77, +69,7,210,7,8,13,51,30,226,10,40,123,0,0,32,0,73,68,65,84, +120,156,172,189,123,172,109,219,89,31,246,61,198,24,115,206,181,214,126,159, +115,246,61,247,225,123,237,107,251,98,2,23,240,5,59,164,17,144,54,84, +49,65,69,21,45,69,69,162,81,21,209,210,74,40,149,80,154,127,42,80, +212,63,82,37,74,37,162,38,149,128,86,9,184,50,80,199,6,23,204,43, +208,138,84,17,4,28,243,50,247,225,107,251,190,206,115,159,189,247,218,107, +173,57,231,120,124,223,215,63,198,90,235,236,123,30,41,86,59,180,181,53, +247,92,99,205,57,230,28,223,247,27,191,239,53,54,126,233,118,6,0,102, +86,85,219,52,68,4,0,68,12,193,165,84,234,49,34,214,79,189,119,146, +10,17,137,136,170,58,231,0,160,148,34,34,174,9,170,234,189,103,70,17, +171,95,20,17,43,210,182,161,31,6,102,70,68,102,38,130,182,165,243,179, +168,170,68,228,156,203,57,3,64,211,52,34,34,34,62,184,113,88,156,159, +159,142,227,232,156,3,197,148,74,211,120,85,5,0,0,32,162,58,42,0, +80,45,240,152,86,59,92,110,102,70,140,102,246,112,207,192,78,85,85,181, +14,82,68,204,140,153,69,180,246,39,162,122,133,122,236,28,171,234,182,27, +0,212,227,122,224,28,33,162,115,142,153,139,36,51,83,121,244,144,208,33, +35,58,5,44,170,197,118,247,247,118,14,246,217,187,219,47,127,69,16,174, +62,125,221,77,90,37,244,140,37,137,35,46,154,187,198,231,36,133,32,90, +62,191,152,231,33,98,204,35,40,169,117,62,72,46,102,194,222,13,57,153, +163,89,2,104,124,210,130,6,90,164,235,186,108,18,165,160,35,79,172,99, +106,157,79,41,77,118,102,99,78,177,228,105,104,199,97,216,237,166,101,140, +183,111,223,158,236,238,236,30,29,172,250,126,127,54,77,41,153,25,110,30, +156,28,59,231,6,84,21,241,2,1,200,59,183,92,173,102,123,187,67,28, +213,1,27,136,136,11,33,230,228,156,11,64,50,196,166,107,179,200,250,85, +155,53,77,83,74,33,231,74,125,65,255,159,155,33,144,115,89,74,49,245, +196,13,50,139,165,213,96,109,67,68,117,130,170,156,51,115,140,209,5,31, +99,116,206,121,118,57,103,102,102,192,113,28,41,52,117,190,82,74,211,233, +116,24,6,17,105,219,54,15,49,180,109,150,130,76,57,103,2,140,195,184, +59,155,245,90,8,128,153,199,113,220,221,221,29,86,189,247,245,202,65,85, +99,140,147,201,68,68,170,238,136,72,87,80,208,212,51,54,94,76,69,132, +0,25,176,152,62,32,177,219,231,122,244,243,42,62,220,249,242,49,51,87, +209,45,165,148,82,66,104,171,198,33,98,41,165,170,127,85,168,82,74,85, +234,122,198,123,223,247,189,115,174,170,127,69,9,68,172,157,141,144,144,15, +175,92,69,224,218,71,81,136,200,178,32,147,1,169,170,129,220,190,121,227, +236,238,109,48,81,227,71,142,255,97,141,216,140,95,182,160,180,29,161,170, +50,251,250,14,235,159,21,115,234,224,137,168,78,241,229,47,34,187,118,50, +125,207,179,207,79,119,166,41,25,255,173,191,253,99,245,117,60,114,4,136, +107,17,217,226,139,153,137,40,232,131,74,206,204,77,211,20,149,13,128,130, +115,84,138,196,24,17,81,139,56,231,205,192,121,199,204,204,36,162,49,102, +48,244,222,215,113,215,11,110,231,105,50,245,170,26,227,216,52,77,74,41, +167,50,157,206,114,78,245,169,234,144,234,129,170,2,60,8,97,143,124,173, +219,139,171,41,0,212,75,109,63,82,85,45,82,159,232,210,195,74,41,165, +78,57,128,33,2,34,152,213,59,90,197,250,10,196,219,215,104,102,245,202, +206,241,118,180,34,5,0,8,25,47,181,45,112,35,152,228,2,6,196,190, +160,245,37,181,179,29,11,110,54,219,105,246,102,97,103,34,14,87,227,200, +193,15,37,163,119,163,195,36,106,166,222,59,98,215,143,253,197,197,5,59, +23,201,144,201,16,141,80,193,92,8,10,6,132,228,184,128,25,33,58,166, +224,5,65,8,200,59,143,148,115,118,204,228,29,48,13,146,205,17,4,206, +42,134,40,4,198,228,167,157,159,77,208,59,117,20,53,143,90,128,9,29, +23,83,68,36,102,51,3,71,100,208,250,160,96,2,6,76,234,105,212,226, +197,192,204,147,67,53,54,240,72,32,234,0,163,138,18,40,88,8,129,145, +84,85,9,163,10,63,70,250,191,218,134,235,121,0,4,16,145,148,51,18, +250,182,41,132,70,8,76,197,180,152,42,130,128,249,182,41,96,232,24,152, +178,136,34,36,41,198,228,39,109,86,21,176,88,50,7,63,164,136,142,21, +1,152,52,56,1,75,57,51,145,170,162,115,24,92,68,115,196,69,4,137, +20,33,149,146,85,50,26,6,151,139,0,211,246,82,125,28,57,120,69,112, +222,11,65,65,83,176,162,106,170,96,64,128,151,165,249,93,40,246,88,57, +199,135,59,195,37,181,173,31,213,6,0,165,136,153,85,193,174,2,191,133, +179,173,58,111,191,85,74,217,94,13,46,17,32,85,5,68,223,52,59,59, +187,136,196,236,20,84,213,212,132,145,0,24,16,204,12,129,198,177,95,174, +86,42,138,248,46,168,185,60,206,199,156,135,10,118,117,60,85,95,68,132, +217,213,177,85,22,85,21,208,204,42,3,219,130,99,61,54,51,53,0,164, +131,131,163,182,11,57,155,3,32,128,218,3,235,221,183,10,111,102,49,230, +205,218,184,214,228,245,50,101,66,96,200,132,198,102,38,96,6,134,8,102, +104,134,170,149,236,128,25,2,16,34,147,167,49,39,0,40,41,139,200,108, +103,34,96,99,202,40,208,52,77,125,221,117,196,170,154,115,110,154,38,198, +53,189,90,44,22,57,231,198,183,219,137,217,178,206,218,65,85,153,31,253, +214,42,107,123,80,116,204,234,195,154,110,245,3,192,16,12,136,222,37,34, +245,157,86,225,184,44,70,91,225,168,171,205,118,121,169,31,85,146,184,189, +72,61,22,45,204,108,239,94,195,183,151,37,52,51,43,0,236,72,20,196, +64,24,3,19,119,1,68,99,76,28,188,99,118,4,140,20,99,132,73,3, +34,141,243,80,204,76,26,110,58,31,72,172,109,124,73,89,64,44,23,71, +16,135,1,17,61,145,58,4,49,45,66,14,99,73,2,198,128,109,219,146, +90,131,14,0,134,213,16,218,134,128,208,48,199,236,112,189,26,153,65,8, +33,171,12,125,15,136,206,147,103,103,102,154,11,35,18,33,170,33,98,233, +35,17,33,154,22,97,239,188,247,57,23,15,212,48,154,153,2,136,72,8, +193,204,162,138,111,131,140,145,92,16,83,32,180,98,57,166,102,111,182,74, +131,255,127,89,188,254,188,173,65,78,57,51,98,240,14,25,11,150,170,219, +68,78,74,97,102,135,228,154,0,0,195,48,100,217,88,15,204,67,63,236, +236,239,13,195,160,170,195,48,56,23,68,213,59,215,132,96,170,132,200,222, +139,72,54,67,181,198,123,2,148,92,0,192,8,235,50,72,106,142,136,192, +141,41,17,162,228,2,162,160,232,60,135,206,199,24,25,201,17,155,104,112, +62,150,162,184,38,36,155,229,15,164,98,197,125,113,125,151,200,60,242,121, +31,0,187,75,127,86,126,64,107,178,178,230,10,142,121,173,110,149,34,193, +102,205,78,41,85,14,88,73,83,149,124,102,214,181,46,174,7,179,49,176, +180,164,220,118,19,83,52,36,67,64,96,102,204,170,162,64,100,128,108,132, +100,234,125,179,25,213,87,55,193,204,174,146,16,128,58,16,118,206,57,23, +82,74,27,210,183,70,195,45,9,171,68,181,106,110,253,14,34,198,92,42, +76,139,128,170,186,138,11,219,215,116,153,251,108,237,184,122,173,119,47,2, +36,98,136,64,228,42,46,164,84,82,42,93,215,150,34,245,78,41,229,250, +90,85,53,4,151,51,84,50,100,102,222,1,162,51,107,72,215,124,167,254, +246,30,136,120,24,48,198,56,157,181,57,89,125,6,231,156,201,187,22,174, +71,206,238,99,218,195,130,98,219,145,212,5,225,18,253,2,217,180,58,248, +250,248,117,185,123,55,187,132,203,98,81,209,237,50,35,70,172,11,128,110, +145,23,113,189,30,60,220,12,144,200,21,145,40,37,137,186,224,199,113,4, +0,35,239,28,91,1,135,104,192,146,192,147,83,208,34,10,106,136,32,10, +49,69,73,25,178,149,92,68,139,148,226,67,67,236,66,227,226,48,58,36, +52,28,179,4,100,48,115,192,9,164,113,174,164,44,67,86,83,223,132,10, +211,136,136,170,164,214,144,147,156,0,201,1,86,158,110,165,132,224,137,72, +165,48,145,154,34,98,133,191,92,50,3,118,46,32,174,245,159,0,75,41, +160,218,132,144,215,12,22,205,192,35,100,149,72,22,53,239,249,48,20,81, +149,130,38,23,253,106,185,132,224,56,48,60,214,81,241,213,53,85,37,64, +64,132,34,70,228,217,173,233,147,26,25,128,168,153,229,34,102,70,6,142, +185,90,157,37,229,73,215,149,49,118,161,41,165,32,32,137,161,161,20,73, +101,64,51,53,97,102,50,11,204,128,90,159,212,123,239,189,143,57,49,51, +104,169,239,193,204,28,145,115,174,202,18,33,131,104,201,5,213,210,48,6, +239,199,113,12,236,12,136,16,43,131,35,36,171,236,129,200,54,38,20,108, +132,252,225,197,251,221,237,190,252,111,22,117,0,128,250,92,91,43,164,138, +34,17,1,160,136,166,148,1,176,122,150,188,247,245,139,136,100,86,37,28, +85,141,8,189,247,213,22,222,10,121,85,112,34,34,48,102,111,8,165,20, +0,7,0,192,0,64,102,166,96,213,162,82,4,23,60,17,217,227,137,252, +227,158,171,154,219,245,94,245,238,91,213,171,168,183,165,23,155,231,213,13, +110,225,22,235,85,173,126,61,231,156,179,0,128,123,224,229,86,62,185,189, +171,115,142,136,182,152,90,63,165,205,116,230,156,235,49,17,133,16,188,39, +213,251,3,218,106,59,0,84,206,152,82,9,193,1,192,197,69,84,85,209, +50,107,167,136,152,115,174,87,238,123,219,194,74,223,143,82,202,116,58,173, +126,61,17,93,173,86,77,227,183,112,124,121,216,143,151,134,175,174,229,156, +199,113,76,41,85,148,175,107,72,101,108,176,65,189,181,167,0,145,153,75, +81,0,184,76,179,239,147,127,0,231,214,254,5,34,82,43,206,57,41,15, +26,32,245,128,137,12,64,192,246,246,14,12,193,57,87,114,118,237,52,163, +33,2,57,87,20,84,117,163,99,92,68,80,173,160,145,71,239,167,40,153, +188,115,72,89,115,240,77,42,165,105,154,101,223,183,33,152,154,15,94,75, +22,51,84,75,41,9,26,34,120,239,157,66,1,235,83,36,34,36,84,128, +162,74,170,0,208,134,166,148,18,75,169,242,234,189,119,236,98,140,222,145, +22,17,211,250,188,136,88,13,234,88,50,51,43,154,243,30,137,208,20,17, +77,84,76,13,160,113,1,180,96,159,188,234,100,103,178,202,145,99,241,100, +59,179,89,185,88,229,85,218,195,208,26,7,23,74,137,255,191,204,99,68, +69,2,102,202,57,155,20,239,189,18,212,181,19,192,100,35,207,96,198,68, +165,20,38,2,0,231,156,33,20,17,203,153,136,56,248,216,71,239,61,16, +34,81,237,169,96,162,194,136,102,54,228,84,74,105,154,166,128,169,170,137, +32,51,0,100,41,102,214,120,95,165,218,204,170,225,108,102,236,152,140,128, +73,17,98,201,106,72,136,107,151,58,81,85,89,116,76,151,164,250,207,47, +219,143,235,121,31,6,54,170,189,181,150,214,238,185,251,54,19,111,72,241, +125,39,82,69,22,184,196,132,182,114,219,182,109,59,233,156,115,165,36,21, +19,84,52,203,57,119,46,32,174,45,27,51,96,102,4,82,36,250,42,213, +244,50,155,131,75,32,88,41,234,214,69,91,91,29,231,101,5,188,108,29, +138,72,74,73,68,16,217,109,31,251,178,205,184,61,179,13,113,132,224,1, +32,231,74,109,48,103,185,180,110,192,198,189,85,105,93,168,128,184,197,2, +239,93,140,169,105,88,85,219,150,155,134,87,171,24,66,240,190,27,87,227, +116,218,86,243,118,58,109,134,33,151,82,118,118,58,231,32,23,24,250,210, +117,77,223,247,170,154,198,236,189,191,60,181,15,120,25,190,218,183,89,191, +184,141,78,108,30,51,84,71,164,247,94,182,238,246,141,134,95,238,185,37, +249,91,167,228,246,133,212,5,182,158,191,220,51,231,108,250,32,93,173,109, +109,8,51,249,38,88,74,146,203,88,122,183,119,56,162,245,57,161,26,43, +113,117,54,131,169,26,26,144,243,177,228,98,128,193,21,130,108,138,57,3, +89,157,130,49,69,31,252,88,114,215,180,73,165,160,65,145,64,100,132,206, +81,150,2,134,104,168,129,77,192,28,3,98,44,133,153,8,201,234,244,121, +71,96,70,40,96,38,98,8,136,168,96,98,234,156,35,230,82,74,1,35, +68,85,113,76,9,148,153,251,146,76,180,105,26,83,40,42,45,187,84,10, +140,169,191,123,118,113,227,14,21,61,124,226,218,189,213,197,105,146,238,112, +207,41,188,250,135,127,162,103,203,15,60,255,254,80,108,88,172,208,187,175, +78,45,30,55,191,158,75,76,222,16,28,123,34,67,204,41,21,48,18,196, +234,196,33,170,107,109,211,52,106,86,229,93,170,11,41,248,82,202,152,35, +43,147,119,138,80,67,34,177,228,42,24,86,176,164,194,222,147,103,242,148, +76,45,151,192,140,170,137,204,57,103,217,0,0,189,27,199,209,17,27,0, +56,46,102,72,88,164,120,239,251,20,185,9,64,68,197,28,146,128,109,41, +138,17,18,19,168,60,188,186,63,82,114,182,159,62,242,228,150,172,212,51, +91,105,175,6,44,0,84,155,177,226,69,181,171,182,212,111,43,207,85,35, +182,250,178,213,56,85,141,57,173,13,65,5,8,228,136,170,143,200,177,51, +68,16,48,133,234,165,84,176,203,36,244,171,106,213,216,170,42,86,199,150, +115,174,22,250,214,186,186,252,123,203,75,106,115,206,197,156,139,72,125,52, +102,38,85,40,101,29,133,116,110,77,253,42,161,101,102,0,98,102,68,238, +251,24,99,81,133,113,76,195,144,183,253,67,96,102,100,230,16,130,115,142, +200,17,129,136,33,178,42,168,66,219,58,102,112,206,85,97,91,173,202,217, +217,74,21,82,42,139,197,96,142,206,87,125,232,90,116,124,190,92,133,137, +159,237,116,171,126,84,131,190,31,115,198,82,156,119,179,197,69,4,66,32, +49,168,49,46,6,100,3,82,195,250,3,132,10,166,96,134,96,8,98,42, +166,134,80,79,214,243,85,99,139,138,152,154,161,115,193,144,12,41,103,1, +1,0,50,164,148,82,74,9,152,98,201,81,139,121,238,173,244,86,208,249, +36,90,12,4,48,171,101,53,69,202,186,142,15,84,167,120,13,163,5,98, +20,221,44,53,160,10,34,21,52,60,152,107,144,141,112,41,201,90,143,136, +129,24,29,39,6,82,129,146,61,82,215,4,70,72,195,216,58,23,138,118, +234,144,156,18,59,99,73,18,17,18,0,22,104,20,219,0,190,243,197,148, +8,219,208,25,66,98,200,42,226,104,4,17,198,108,224,66,27,99,78,169, +76,56,120,239,181,114,207,24,39,128,129,48,230,177,148,28,98,113,139,81, +199,88,74,182,152,202,56,38,182,11,150,65,75,41,5,68,147,74,98,88, +197,81,193,198,146,141,41,151,50,142,99,117,219,142,90,50,131,83,192,44, +37,38,70,170,210,153,65,133,113,144,108,8,89,164,105,154,198,121,188,182, +199,79,30,106,145,131,231,158,233,199,120,231,141,27,30,220,181,231,158,189, +157,250,101,74,45,134,199,201,125,206,121,237,52,64,168,241,25,37,44,96, +4,168,69,76,148,0,75,202,136,104,76,73,133,170,160,32,6,98,203,98, +185,48,179,17,18,98,98,40,14,117,76,44,102,142,146,137,39,86,67,98, +79,228,0,8,4,64,192,131,235,92,11,98,100,24,216,75,42,168,230,137, +199,85,175,185,56,231,36,103,29,226,201,91,55,206,110,220,14,134,90,10, +17,57,226,220,143,1,25,83,177,164,158,3,34,3,177,207,224,50,120,37, +7,92,98,33,69,39,168,67,54,179,36,133,153,39,147,73,213,207,181,233, +99,166,132,230,217,60,23,130,140,38,8,130,192,236,75,81,101,46,68,194, +28,205,70,85,101,22,81,0,76,170,25,161,16,22,128,164,138,236,4,172, +16,160,65,241,132,6,137,65,85,11,26,155,129,42,7,23,53,103,84,63, +105,82,138,142,8,216,200,35,58,5,150,36,177,143,131,33,27,178,81,137, +101,204,98,236,187,152,48,11,142,169,0,17,182,126,186,179,55,244,5,204, +38,13,230,178,28,202,170,16,164,146,205,0,129,152,185,70,44,157,71,102, +19,3,5,188,252,35,6,69,77,17,30,249,99,72,69,205,144,128,88,12, +144,29,57,47,6,197,52,73,17,176,98,154,85,4,44,171,40,2,50,23, +85,67,204,34,134,168,0,228,92,204,89,85,219,182,29,251,97,210,132,60, +70,183,93,22,182,14,62,92,103,150,108,73,16,16,81,211,52,149,29,171, +214,181,34,109,92,248,32,98,149,236,120,15,227,88,170,17,92,163,180,170, +58,142,154,82,98,70,51,103,102,93,119,63,228,28,66,16,83,231,214,212, +84,197,134,33,78,219,198,57,151,196,188,247,193,55,68,104,107,8,55,68, +182,199,248,197,224,82,182,13,108,2,55,112,41,174,122,217,227,86,255,28, +114,52,89,59,62,61,59,35,44,165,212,209,199,49,86,23,190,39,54,16, +83,51,149,73,211,170,106,28,35,34,54,33,32,96,41,165,90,163,34,98, +8,132,4,136,74,232,218,70,68,156,115,213,235,87,169,226,58,10,164,10, +140,140,72,106,150,75,1,36,38,71,96,170,109,59,65,239,216,59,114,108, +142,134,156,18,65,26,71,104,61,1,154,106,240,30,29,170,26,33,18,98, +28,84,16,2,49,21,99,177,128,30,81,124,104,144,57,231,92,212,156,67, +40,82,167,38,174,70,0,173,110,74,85,202,57,139,200,106,181,90,156,143, +187,20,0,32,50,32,98,35,32,170,57,16,43,0,123,77,89,17,18,104, +152,116,32,186,76,89,60,56,36,52,160,181,111,219,140,144,189,75,10,0, +80,45,71,83,117,206,85,31,159,111,92,8,33,180,77,64,190,242,236,83, +165,243,97,210,189,247,249,247,149,157,201,149,54,204,66,107,185,180,109,59, +95,45,221,164,45,117,133,122,84,107,154,6,222,237,225,170,243,90,64,41, +56,2,172,125,114,206,200,20,136,77,212,17,105,17,128,181,141,41,185,32, +2,128,35,4,2,116,213,20,53,213,34,146,149,124,144,92,214,238,11,17, +80,83,213,100,209,135,48,142,99,13,67,33,226,103,62,243,153,79,125,234, +83,195,176,250,129,31,248,193,239,250,174,239,186,121,243,230,199,62,246,177, +82,202,175,253,218,175,61,245,212,83,0,80,1,17,17,13,89,17,82,201, +142,195,106,28,175,76,119,99,78,81,138,128,85,15,90,204,133,8,81,52, +248,154,171,16,99,140,236,28,17,181,77,99,53,66,162,128,136,72,172,170, +168,6,102,165,100,71,44,169,100,41,245,145,201,0,196,0,214,49,55,2, +52,53,71,140,72,105,24,67,27,178,41,154,73,202,78,192,0,208,136,0, +149,0,152,74,74,149,84,50,96,181,51,86,227,80,74,105,219,144,179,117, +221,148,41,199,24,137,28,146,138,72,205,98,169,105,103,33,184,49,174,38, +180,219,175,98,219,52,96,58,142,17,4,25,27,53,231,156,154,217,48,196, +174,107,205,16,129,106,156,19,31,229,151,255,183,112,216,173,218,214,182,181, +159,188,247,213,245,180,93,14,171,13,139,239,142,65,151,82,182,134,60,0, +148,146,98,204,86,145,8,0,106,122,206,150,187,86,131,203,204,152,157,200, +250,124,41,235,91,138,72,211,120,17,25,199,113,155,252,145,115,78,201,16, +217,204,154,134,204,32,37,217,14,17,209,54,223,133,109,94,158,115,144,134, +181,49,24,130,23,241,57,149,204,46,165,180,59,157,100,96,203,182,14,137, +52,1,84,84,5,225,209,249,62,219,7,187,252,178,108,19,63,189,124,190, +254,142,57,25,226,110,104,193,179,136,228,148,149,145,197,100,147,222,97,102, +158,56,247,163,99,174,215,99,36,0,107,67,83,45,247,156,51,218,58,147, +192,204,172,168,49,153,90,81,49,179,128,92,105,121,211,52,136,88,131,33, +204,12,8,68,232,149,73,12,144,8,17,0,29,0,32,103,21,6,110,219, +54,103,17,177,33,167,243,97,185,235,166,86,51,129,74,81,181,88,4,17, +137,27,99,200,169,24,226,116,234,37,131,26,58,64,17,76,41,55,1,93, +1,40,230,0,145,8,9,77,173,245,129,136,74,73,170,210,120,111,230,198, +113,174,170,211,110,234,20,43,8,54,228,130,162,25,130,162,75,66,80,200, +192,53,129,216,226,152,114,76,211,166,69,64,25,19,170,57,114,14,16,13, +205,76,135,180,224,210,56,175,34,192,174,148,162,78,64,148,16,87,195,152, +103,19,232,90,14,142,136,11,195,176,234,15,124,24,72,213,211,10,138,145, +14,101,76,108,100,165,160,53,143,119,84,108,227,105,200,180,93,158,201,185, +146,146,0,104,145,201,100,130,165,48,146,103,238,115,105,66,35,185,228,156, +93,96,231,61,34,131,40,48,213,233,82,66,51,115,72,6,230,28,101,213, +156,115,8,1,54,134,97,149,234,234,83,86,149,16,194,47,255,242,47,127, +226,19,159,120,231,157,183,156,115,31,255,248,207,126,248,195,223,244,239,254, +149,239,8,77,243,217,207,254,202,19,79,28,3,88,74,201,113,227,216,45, +86,171,201,108,218,175,70,96,50,80,223,132,62,199,152,18,7,207,132,217, +132,0,5,12,136,180,8,154,230,146,17,145,107,94,103,41,16,19,27,168, +170,226,58,185,10,12,100,157,108,160,109,211,106,74,157,11,165,148,6,40, +151,172,170,174,109,73,85,204,164,84,129,71,54,244,196,165,136,1,0,113, +96,231,17,128,128,212,192,44,57,108,125,96,53,2,36,0,80,64,160,108, +102,10,193,55,193,183,171,213,74,5,171,245,218,117,157,42,143,195,178,144, +170,106,211,120,118,160,170,147,73,235,57,180,190,233,151,125,211,58,231,173, +107,218,172,46,46,33,76,13,12,16,25,12,84,193,177,247,174,45,148,101, +147,98,242,216,105,126,84,219,130,18,108,92,76,213,200,77,41,1,192,22, +1,97,195,114,182,14,202,138,131,206,185,152,70,5,51,197,113,28,153,55, +110,148,170,150,91,31,223,101,159,215,165,232,245,125,207,253,54,165,3,0, +170,129,93,157,5,204,84,195,195,91,55,191,153,117,29,207,231,43,102,246, +222,215,32,102,253,202,106,21,21,234,159,62,4,240,190,201,185,9,12,206, +77,114,134,156,164,148,130,138,206,185,16,66,206,17,84,31,23,248,222,250, +218,182,15,95,207,108,98,17,247,93,129,181,77,218,206,16,202,98,28,64, +124,215,4,34,65,115,72,53,87,171,72,17,162,224,60,123,103,162,222,251, +81,114,41,169,26,245,98,130,128,217,68,77,105,147,222,233,106,192,8,141, +28,139,72,82,65,64,112,20,181,32,34,120,46,170,132,134,4,170,82,227, +18,140,160,8,2,42,69,67,8,130,230,26,143,200,105,209,123,53,103,206, +146,88,192,152,51,0,76,155,224,61,10,120,17,85,131,98,48,228,210,52, +190,31,101,210,178,12,26,218,118,76,137,129,23,167,231,121,53,148,82,208, +49,77,154,253,131,3,207,156,82,78,41,141,227,88,36,117,93,55,157,78, +25,157,137,250,40,195,98,5,158,219,174,225,162,195,201,69,140,113,97,217, +21,35,128,166,105,252,108,146,61,181,187,179,208,180,164,134,111,159,141,171, +85,81,141,222,169,35,55,105,219,253,29,223,54,168,224,200,197,148,57,112, +86,137,38,8,230,145,103,161,117,147,137,170,70,51,71,132,141,71,180,146, +180,20,101,166,162,230,28,171,25,55,193,16,8,17,30,147,165,92,179,151, +177,138,181,129,109,51,41,250,120,118,239,228,234,241,177,58,52,51,67,200, +82,82,201,20,154,34,162,166,216,248,12,22,115,108,140,156,90,132,98,0, +53,211,176,166,88,163,1,16,25,18,0,11,129,136,0,1,48,150,34,76, +236,189,119,142,83,210,79,126,242,147,191,248,139,191,120,227,198,219,222,251, +43,87,174,60,251,236,179,111,188,241,198,206,238,238,15,252,192,15,252,254, +239,255,190,153,61,245,212,83,136,120,237,240,184,155,78,142,142,175,229,156, +57,120,100,50,51,102,111,41,121,239,201,57,5,43,69,136,89,171,126,49, +20,176,66,208,52,97,237,22,49,42,166,232,61,25,155,72,245,132,41,130, +1,16,81,44,153,76,138,233,78,59,169,153,165,69,213,57,215,143,99,104, +27,98,206,81,188,247,37,149,84,74,227,131,170,24,66,148,194,228,86,37, +179,119,53,15,100,140,9,17,53,23,98,38,226,234,246,145,156,152,185,122, +177,218,118,150,115,110,219,70,181,92,92,92,16,185,201,100,182,90,173,152, +17,64,135,97,184,115,231,214,201,189,59,223,254,87,190,235,207,94,254,227, +63,253,147,63,250,200,71,95,250,147,63,254,131,127,231,47,127,199,225,254, +83,211,6,68,68,138,54,77,171,10,42,128,142,154,208,13,171,229,3,58, +187,229,113,143,195,65,132,251,161,137,218,182,137,132,91,39,219,154,130,32, +122,239,193,106,166,196,26,91,107,52,178,174,28,204,92,23,21,239,155,109, +202,117,133,51,170,169,27,176,14,223,96,181,103,225,221,38,48,0,164,148, +106,192,94,55,149,9,68,52,157,118,125,159,42,179,85,213,201,164,67,132, +190,31,107,224,177,246,172,240,12,0,88,109,67,5,209,172,170,171,85,37, +168,38,72,109,235,78,231,23,140,220,52,157,107,200,8,107,254,20,179,215, +242,104,173,216,66,219,118,144,219,51,151,13,219,237,239,126,190,152,236,204, +134,147,179,222,195,212,237,59,242,209,164,17,30,82,44,166,62,4,21,233, +251,222,19,175,86,171,43,135,71,91,46,89,31,97,58,157,214,184,71,61, +19,144,9,109,181,88,138,105,55,157,2,24,121,174,38,124,223,247,34,50, +157,78,75,41,57,103,215,122,20,240,128,96,166,68,70,40,102,74,56,164, +168,4,51,127,48,13,237,89,44,247,222,190,85,192,102,174,185,80,228,157, +9,51,199,20,231,243,145,102,93,245,189,246,41,113,19,82,41,142,116,136, +232,187,174,207,17,26,87,150,113,177,88,204,56,28,93,185,26,201,230,253, +114,126,239,244,236,246,221,107,207,61,27,130,59,62,62,158,159,159,159,158, +158,106,204,77,211,180,220,132,34,39,119,238,153,103,63,235,108,57,150,187, +243,189,189,189,195,253,29,71,100,162,134,112,54,159,47,53,191,119,103,198, +6,239,124,249,205,253,195,125,110,119,103,109,203,204,253,48,36,41,37,38, +0,80,134,24,211,242,100,238,175,56,11,172,140,38,74,196,111,253,217,23, +95,248,232,135,9,29,154,141,82,74,20,6,76,8,88,140,137,107,130,164, +154,49,96,206,5,240,177,206,238,237,114,5,213,237,47,235,224,146,156,245, +231,111,221,121,234,202,117,97,236,251,209,121,239,189,3,128,85,26,3,178, +115,14,60,175,114,36,38,137,114,247,141,119,246,158,125,154,136,0,17,130, +211,156,137,88,114,1,70,41,66,196,162,38,107,243,12,12,208,0,65,245, +252,244,226,167,126,234,167,62,241,115,255,219,206,206,78,215,182,231,231,231, +57,141,247,78,78,62,243,75,159,190,118,237,218,39,255,247,159,175,165,11, +49,70,102,38,161,33,198,159,254,167,255,235,139,31,126,201,57,26,134,161, +113,77,25,251,179,59,39,123,123,123,24,156,243,190,65,246,228,84,19,101, +177,16,68,69,20,10,224,152,50,170,181,62,120,162,85,201,129,29,34,161, +26,40,18,16,32,16,49,121,83,51,0,136,57,45,151,203,201,108,42,104, +228,137,148,74,41,140,46,73,65,199,134,6,76,182,118,83,129,178,121,239, +139,10,34,22,84,19,157,250,134,4,4,177,42,123,22,49,4,16,35,231, +75,41,165,104,240,147,146,35,179,174,86,11,231,217,132,82,74,247,238,221, +125,229,213,47,124,235,183,126,180,235,154,166,105,254,205,231,254,112,119,127, +239,27,191,225,155,127,235,183,222,254,217,143,127,254,189,207,61,249,163,255, +205,15,125,247,95,255,222,239,249,238,255,164,155,77,47,230,61,0,228,92, +61,12,107,143,228,214,90,221,106,226,26,248,30,83,116,162,118,159,27,222, +151,1,128,74,204,187,174,83,213,148,82,41,165,102,146,148,44,219,48,180, +153,133,16,214,158,37,201,64,104,134,41,165,253,253,3,254,145,31,253,177, +122,173,109,94,95,181,64,55,9,59,247,249,93,5,190,77,200,114,157,36, +125,57,95,198,57,30,134,88,157,71,0,128,72,53,125,166,109,93,41,82, +227,101,33,248,174,243,34,80,179,67,154,198,59,118,77,67,41,149,24,163, +136,150,148,152,125,245,93,49,49,17,18,113,42,41,142,163,93,174,187,121, +0,245,224,65,230,188,5,187,203,120,7,27,67,169,191,125,111,111,103,87, +238,206,187,131,93,55,109,3,185,1,181,83,204,227,104,169,236,78,102,101, +24,39,161,65,51,137,121,210,182,154,11,170,129,232,36,52,32,74,106,154, +114,32,70,239,60,114,64,194,84,210,197,202,82,153,132,166,243,33,176,75, +203,222,41,52,228,48,11,21,13,200,1,72,65,93,209,160,88,82,6,38, +37,4,66,102,110,133,157,243,179,166,219,15,157,156,44,239,126,249,173,179, +147,123,123,123,123,196,110,255,224,128,212,96,72,195,197,114,127,127,159,212, +112,72,224,120,111,230,73,56,144,3,83,239,105,185,26,230,23,23,77,104, +52,21,239,66,97,130,54,76,166,179,131,102,118,126,227,206,206,211,199,0, +200,68,222,123,15,116,122,231,222,201,237,219,19,223,164,211,197,197,252,98, +186,183,55,219,223,119,134,122,222,207,118,118,39,71,7,208,132,208,117,228, +189,57,215,78,167,193,55,113,190,234,192,45,177,20,48,99,2,231,48,120, +104,2,116,13,52,158,16,125,210,249,237,187,147,208,178,171,113,65,227,36, +111,254,225,203,47,188,248,245,88,204,37,101,231,146,170,51,242,236,217,140, +145,76,21,204,192,0,12,16,32,176,171,243,248,168,249,221,100,167,171,129, +154,103,102,34,38,234,34,156,156,222,187,122,237,26,56,206,165,116,77,107, +169,72,202,211,110,38,125,146,152,145,56,137,56,163,73,198,120,235,108,239, +248,10,196,18,83,228,38,168,153,43,106,169,56,231,48,107,195,222,114,113, +64,108,160,169,56,64,77,69,77,127,253,215,127,253,127,250,199,255,232,240, +240,240,250,245,235,167,167,167,211,105,71,68,183,110,221,62,62,62,62,56, +56,56,58,58,242,222,239,239,239,239,239,239,207,102,179,131,157,61,96,92, +13,253,111,254,214,111,254,233,159,252,241,123,159,126,122,152,207,175,237,237, +205,239,156,78,66,19,136,39,161,89,94,44,32,149,9,7,82,67,5,70, +148,148,189,115,78,161,1,10,138,24,115,10,228,217,113,49,136,197,137,57, +5,200,5,178,20,21,203,165,99,159,150,195,106,185,156,237,236,144,99,49, +61,160,54,247,99,231,27,45,66,134,141,15,193,135,213,106,21,200,91,44, +200,14,198,12,196,24,139,119,1,21,124,1,77,197,55,205,218,209,71,68, +64,8,88,36,181,109,171,10,67,63,122,239,251,97,241,234,107,47,31,29, +237,121,223,1,104,211,248,207,255,225,231,22,139,249,241,241,241,206,206,222, +254,254,193,47,125,230,23,62,252,77,31,254,142,239,248,142,127,249,127,255, +206,215,127,253,11,165,12,63,241,15,255,254,252,236,246,75,127,241,219,66, +240,69,204,192,218,142,8,96,28,134,139,249,217,54,75,249,223,226,203,123, +184,61,16,56,54,51,85,169,246,98,245,235,85,116,75,41,153,193,22,205, +42,19,172,185,19,109,231,137,189,136,133,166,61,60,220,231,31,249,209,31, +219,96,28,108,221,129,219,194,142,45,136,86,131,183,210,197,154,50,6,27, +227,183,105,214,128,106,6,219,20,101,220,100,225,117,93,139,8,149,96,214, +26,53,68,202,185,152,89,219,54,203,229,64,196,34,144,115,170,99,101,98, +85,105,38,45,0,136,170,20,96,38,51,237,199,94,75,161,199,85,180,92, +58,189,117,222,109,235,37,182,35,223,46,23,118,178,112,204,119,94,249,242, +236,202,65,98,96,192,1,69,46,250,225,230,157,225,116,222,159,205,135,243, +69,3,20,128,210,178,167,162,101,53,216,152,199,249,50,24,217,152,250,179, +139,229,189,243,189,118,178,132,2,89,198,243,139,124,177,194,92,48,9,139, +177,194,234,228,108,126,251,100,117,239,156,179,46,79,206,150,39,103,65,113, +60,187,0,208,116,182,144,243,85,63,95,48,115,181,128,76,116,249,234,219, +26,179,12,241,226,214,61,59,95,89,204,190,109,118,175,92,105,20,119,166, +179,243,91,119,113,57,98,44,59,211,217,155,175,189,126,235,139,95,25,250, +184,56,153,91,31,79,111,222,113,70,41,166,174,109,207,207,231,130,218,134, +166,157,76,18,25,116,129,16,113,72,183,94,254,210,238,7,158,241,222,199, +49,94,156,159,239,52,221,222,108,103,117,190,88,156,158,229,49,130,227,217, +241,17,77,91,50,232,231,139,204,48,56,88,72,28,114,74,82,220,164,237, +166,211,220,143,139,59,247,14,218,233,236,112,119,22,90,15,136,49,235,106, +140,243,197,234,228,108,56,57,15,59,147,80,236,226,237,219,46,201,242,252, +34,206,151,233,238,121,186,117,58,113,225,248,233,39,223,126,237,75,233,116, +238,66,112,77,112,72,69,101,93,144,76,136,132,206,123,181,141,239,2,31, +109,233,20,51,174,94,11,85,4,116,204,38,154,98,164,98,134,208,237,204, +16,17,138,148,229,112,118,243,78,58,95,196,69,127,243,245,55,242,178,191, +118,237,26,17,221,125,243,157,213,87,110,230,219,103,179,195,253,139,91,119, +47,206,206,187,217,148,138,218,197,48,220,59,71,181,120,50,207,23,171,213, +201,153,246,227,252,214,221,197,157,123,174,232,249,205,59,139,18,255,254,63, +248,31,0,224,248,248,248,237,183,223,158,207,207,246,246,246,246,247,247,175, +92,57,122,250,233,167,0,76,164,32,130,170,204,102,211,182,109,134,213,98, +119,127,231,15,62,247,185,59,119,111,191,242,133,63,253,167,63,249,147,159, +253,244,47,125,227,135,254,194,142,155,76,155,54,174,122,15,52,191,119,58, +191,115,50,204,23,23,247,78,239,189,117,51,0,229,213,32,171,65,86,99, +62,95,142,39,231,227,201,185,187,178,203,89,199,211,249,242,230,73,58,189, +72,103,139,254,238,217,226,206,189,208,52,253,221,179,9,251,56,95,228,97, +60,58,56,168,225,163,211,47,124,121,117,247,172,97,215,95,44,52,101,7, +152,134,241,237,175,188,113,224,38,139,59,247,28,210,217,27,55,28,243,242, +198,221,174,109,203,197,106,241,206,157,229,252,98,178,51,19,198,140,70,68, +104,224,145,134,180,18,145,174,157,166,148,39,211,182,239,23,127,246,103,127, +244,250,151,94,253,154,23,190,110,50,109,66,227,166,211,238,143,254,232,143, +158,122,234,25,66,255,190,247,125,240,244,228,230,173,27,119,95,248,224,139, +79,62,245,204,199,63,254,51,127,227,7,255,211,215,95,251,194,191,250,151, +191,125,245,169,247,127,232,67,31,202,165,56,231,153,17,13,114,26,47,230, +167,239,210,217,63,31,240,61,220,205,204,0,161,166,199,233,166,18,163,122, +141,182,165,35,213,152,221,250,235,0,213,192,74,49,231,194,225,193,149,117, +206,75,141,43,109,179,120,42,2,110,203,173,42,94,110,111,207,204,227,24, +47,103,15,230,156,107,7,68,28,134,193,204,112,162,162,222,0,0,32,0, +73,68,65,84,218,118,157,133,231,28,156,159,175,188,231,182,109,153,161,239, +51,109,154,115,181,148,132,226,24,1,168,235,130,247,200,0,195,80,22,139, +165,247,13,51,151,172,53,243,217,123,95,208,44,63,218,194,101,166,203,217, +149,181,85,248,223,222,14,54,118,186,153,89,204,22,179,47,118,184,183,127, +194,25,0,200,59,68,236,111,158,28,30,30,158,157,207,143,14,14,222,121, +253,141,227,235,79,12,167,231,71,239,217,89,44,23,93,215,13,231,171,197, +50,34,162,148,162,49,54,7,218,204,26,39,118,222,15,208,199,189,102,18, +115,94,220,61,29,67,240,134,7,212,12,195,192,203,104,243,85,96,62,228, +246,157,211,123,196,144,239,205,227,152,178,202,116,54,11,59,172,0,165,148, +89,198,188,24,167,179,189,195,102,26,64,46,210,137,6,46,104,103,111,221, +108,124,184,243,230,155,51,242,0,48,105,187,114,190,124,98,182,79,126,2, +6,195,189,57,130,221,249,202,91,79,60,247,20,251,48,243,77,143,5,28, +136,153,56,84,198,161,95,29,22,124,250,232,26,50,141,57,117,77,211,196, +110,113,113,209,32,239,180,147,101,146,118,22,176,11,60,105,151,146,186,198, +181,251,59,126,210,218,254,204,121,214,148,61,144,128,229,156,119,119,119,241, +188,63,185,113,171,252,201,121,215,117,6,48,230,84,8,220,164,221,187,122, +116,116,124,245,54,202,180,155,236,133,174,41,16,199,129,188,235,148,66,212, +5,192,197,233,249,120,126,209,250,46,47,122,223,5,108,3,34,250,38,136, +170,34,148,82,140,41,171,56,36,199,100,250,104,174,183,53,109,108,179,159, +197,56,12,23,23,23,62,129,159,180,243,197,69,42,57,245,163,172,6,138, +229,233,39,158,188,88,245,51,112,141,18,173,18,178,226,144,124,148,70,184, +191,115,58,191,121,59,145,181,207,190,199,5,191,26,22,233,100,110,99,214, +229,88,109,37,191,179,147,230,115,34,58,56,106,69,150,255,243,39,62,254, +218,107,175,61,255,252,243,125,223,207,231,103,47,189,244,82,211,52,103,103, +103,71,71,71,102,182,183,183,55,12,195,235,175,191,254,226,139,47,138,200, +233,233,105,206,49,96,243,212,211,199,243,249,226,228,222,221,153,15,127,239, +239,254,93,103,122,118,251,238,193,206,238,157,27,55,210,225,160,57,127,254, +247,126,255,95,255,238,239,157,157,157,125,239,199,254,131,227,217,254,36,248, +229,114,25,135,49,15,163,203,186,211,78,26,69,204,82,230,171,241,238,89, +99,228,66,67,165,184,82,118,209,159,159,94,20,12,113,62,79,41,14,167, +115,107,125,70,147,187,115,118,12,243,126,121,118,111,178,183,211,118,51,23, +186,126,182,183,184,121,183,159,95,28,238,238,93,172,226,12,253,233,221,179, +222,249,187,55,111,239,132,182,176,49,81,198,154,83,205,190,24,18,191,252, +242,23,22,139,225,163,31,249,75,222,183,23,23,23,211,217,228,165,111,254, +166,95,253,181,207,156,220,187,125,112,176,231,28,61,253,204,147,187,187,187, +175,188,242,202,183,127,219,95,45,69,191,237,47,127,251,63,251,103,191,240, +157,223,153,223,247,220,215,6,183,243,143,127,226,159,92,63,126,66,198,254, +231,127,225,19,127,237,175,125,12,192,33,90,223,15,158,137,120,237,113,123, +36,138,61,14,1,31,176,216,182,146,128,4,53,131,175,110,86,210,247,61, +34,118,93,55,244,227,166,64,96,157,132,88,251,164,188,34,38,231,168,148, +18,99,194,87,111,172,235,231,219,182,173,168,87,47,27,99,172,21,178,49, +198,154,178,75,12,117,131,10,102,14,190,73,41,155,89,211,4,85,235,251, +158,136,186,174,187,119,243,230,152,98,140,185,155,77,15,15,174,144,243,57, +103,32,242,148,74,41,236,195,116,218,230,172,113,204,2,134,136,158,60,17, +245,125,31,66,240,158,115,206,21,127,39,29,173,86,105,51,250,92,74,25, +199,241,226,226,2,74,162,119,215,204,109,217,28,110,156,20,213,243,181,142, +180,248,251,104,184,5,68,34,50,209,138,230,102,166,90,106,190,97,206,249, +246,237,219,155,244,14,221,250,80,107,84,164,22,162,212,227,237,126,21,78, +204,33,229,134,41,150,33,96,147,173,56,180,44,190,229,26,244,148,49,17, +226,43,95,248,179,15,124,224,3,205,164,27,115,129,205,6,51,98,213,252, +111,69,196,129,20,165,231,95,248,80,211,206,84,245,238,157,91,154,6,207, +116,245,137,103,50,90,97,100,68,76,210,177,159,204,220,124,149,187,214,15, +231,171,195,253,233,42,170,4,24,98,156,160,187,245,198,91,163,23,91,151, +190,41,51,107,46,173,15,160,182,116,105,22,109,156,181,57,165,29,229,8, +144,150,125,25,163,98,121,64,200,54,14,1,217,38,153,111,163,91,0,0, +219,114,209,119,47,194,151,235,139,47,159,71,196,231,158,123,174,134,219,244, +161,13,38,16,17,96,115,65,84,0,160,75,142,61,4,221,94,13,165,16, +251,58,5,228,221,48,38,239,189,33,20,5,68,100,88,47,233,42,82,111, +145,75,49,85,71,190,74,50,18,27,2,16,181,10,61,74,201,50,35,143, +136,3,130,170,182,130,52,245,49,103,17,67,114,102,150,53,3,234,167,63, +253,233,255,241,31,254,247,207,61,245,222,22,219,52,166,39,159,124,146,58, +132,86,192,219,206,126,35,35,226,64,16,25,133,20,33,67,46,80,82,92, +73,177,229,114,92,45,7,21,121,242,201,39,191,252,229,215,223,120,243,13, +240,244,77,223,244,210,247,125,239,247,237,237,237,157,158,158,254,248,143,255, +248,213,107,7,99,63,92,204,135,159,252,169,255,229,165,143,124,52,101,205, +98,102,210,52,77,46,169,29,113,17,172,43,216,249,208,151,84,24,65,244, +238,191,250,227,235,223,250,226,104,130,158,153,25,147,152,153,57,82,71,16, +199,46,52,0,144,115,46,166,200,68,204,2,134,73,189,247,206,133,243,243, +139,157,157,157,24,7,102,52,51,1,246,14,86,203,249,180,107,114,18,215, +180,136,77,22,237,151,247,62,243,153,79,125,231,191,255,239,93,189,114,93, +196,123,223,196,180,250,63,255,175,223,56,220,229,111,254,150,143,13,121,112, +216,222,124,251,213,207,125,254,119,190,251,123,254,243,163,167,159,210,197,240, +247,254,193,143,254,173,31,249,239,36,151,223,254,23,159,221,235,142,174,61, +225,255,206,223,249,175,103,147,227,207,254,198,239,102,235,150,105,112,161,35, +37,84,125,245,149,223,207,155,13,156,46,67,222,187,5,239,190,47,30,31, +95,125,32,98,222,251,90,28,81,17,163,202,70,219,134,90,202,73,155,26, +170,217,108,150,115,30,134,97,186,51,235,251,190,157,116,95,243,194,215,185, +10,121,184,169,33,131,77,236,195,214,105,31,196,204,206,177,153,129,129,115, +108,22,152,185,100,113,206,17,97,41,2,0,117,255,156,24,227,222,193,238, +242,157,155,125,191,36,79,253,176,100,23,154,166,153,76,28,152,83,85,67, +72,209,198,49,170,42,249,80,239,66,4,33,132,166,89,87,67,19,97,41, +58,12,186,29,6,34,59,183,14,7,211,165,24,246,229,165,64,55,187,208, +216,38,231,198,214,59,68,221,135,188,237,51,138,8,26,1,108,226,128,64, +53,97,106,24,134,26,18,186,188,188,108,217,238,214,100,222,6,149,16,81, +28,154,218,40,185,35,202,57,55,228,141,144,136,86,57,58,194,65,50,128, +6,231,143,158,190,142,211,118,17,71,101,86,205,22,83,8,1,208,121,231, +146,72,146,28,24,208,187,104,66,104,2,54,106,49,212,164,242,30,31,28, +193,69,26,144,221,164,235,52,230,213,170,168,106,175,202,179,238,206,162,47, +166,49,21,36,106,90,223,236,76,251,229,153,111,130,110,2,217,90,83,156, +138,56,68,15,60,22,177,84,12,32,169,196,146,173,20,242,143,144,188,203, +226,248,192,25,122,72,94,31,144,221,71,98,223,229,206,15,124,11,55,187, +163,32,16,160,170,33,109,140,92,3,170,193,11,68,84,239,165,134,122,205, +4,144,130,199,224,135,56,78,192,151,92,92,8,49,197,166,105,114,201,104, +40,34,48,13,144,77,106,198,150,163,182,235,198,156,144,105,72,185,120,199, +193,171,128,136,100,66,116,92,178,201,170,119,206,129,65,25,83,219,182,12, +162,102,159,250,196,207,29,29,92,105,67,179,60,91,222,185,117,251,137,39, +175,57,231,38,7,211,233,254,52,113,223,76,153,178,119,226,25,216,16,11, +101,193,34,203,153,10,228,92,110,188,117,235,243,159,251,195,59,39,183,247, +119,247,62,242,45,31,89,246,171,179,187,39,63,255,137,159,123,245,139,95, +20,145,195,195,67,102,218,217,155,61,113,252,244,209,149,131,97,24,144,124, +227,221,197,114,168,106,48,180,196,158,7,72,194,154,137,10,218,52,52,135, +47,60,87,24,13,57,163,57,83,66,35,68,32,28,115,154,176,139,185,56, +231,216,7,79,52,166,168,69,213,148,161,82,129,50,153,180,53,9,161,178, +37,239,252,56,44,62,255,249,207,31,95,61,250,192,251,95,208,234,32,67, +154,78,167,207,60,243,204,235,175,191,126,116,120,188,117,141,125,240,131,31, +252,55,255,250,183,190,230,67,203,110,167,179,130,199,199,215,231,243,197,233, +233,249,254,241,19,179,233,244,125,239,123,191,228,242,127,252,210,63,255,185, +79,252,204,179,79,190,247,233,39,187,143,124,243,135,95,126,229,110,191,138, +97,54,245,62,228,82,28,6,50,67,166,135,101,224,178,192,60,64,250,46, +107,250,3,109,171,137,91,109,245,222,119,93,151,210,88,217,95,29,249,56, +142,227,56,110,125,130,117,33,23,145,245,56,106,93,219,150,52,17,81,213, +255,24,163,136,137,104,206,57,198,152,162,212,52,180,97,24,82,74,117,35, +169,156,51,17,170,234,56,142,185,36,102,244,158,83,26,151,203,11,98,245, +1,251,97,0,0,17,75,81,199,49,153,33,115,227,216,7,207,53,96,36, +34,49,150,148,238,3,77,206,25,224,62,78,49,251,173,123,17,46,25,170, +151,145,232,114,188,98,139,74,166,8,70,96,132,192,166,168,2,42,96,235, +45,15,214,41,56,181,164,4,54,241,223,141,131,224,254,53,47,163,30,94, +74,3,68,196,76,150,113,93,215,201,204,4,136,69,25,177,195,208,186,150, +50,56,96,73,114,176,127,100,2,165,104,67,46,32,59,67,15,84,98,146, +148,75,76,100,192,5,32,203,254,116,15,204,64,237,112,239,80,147,122,160, +187,247,238,25,161,2,68,19,243,160,129,71,54,237,124,26,99,205,121,94, +173,86,253,124,161,253,120,251,205,119,86,231,23,100,104,197,36,75,73,69, +178,168,24,0,18,177,87,196,88,156,130,71,242,28,234,252,186,16,46,35, +212,187,133,140,0,168,110,153,243,238,227,7,23,234,205,92,64,253,1,192, +250,123,251,131,72,136,180,222,228,102,211,97,123,47,179,75,213,144,138,0, +160,118,31,124,13,214,126,9,50,192,44,78,9,146,122,129,70,25,146,6, +229,98,160,72,67,202,228,67,31,147,155,76,250,82,132,89,251,204,98,84, +180,65,14,198,152,69,198,84,134,136,10,146,178,138,212,228,100,137,89,83, +65,53,243,220,167,172,132,202,152,165,20,145,159,253,217,159,185,121,243,157, +253,157,93,85,221,61,152,125,227,183,124,195,225,245,253,246,160,245,19,134, +198,252,94,8,135,190,189,214,180,215,155,246,186,111,174,115,247,4,183,199, +238,248,185,163,230,192,91,208,217,193,228,3,95,251,254,111,252,240,55,60, +251,222,247,32,26,26,76,218,233,151,190,248,165,171,71,87,158,121,234,233, +16,92,8,97,58,157,190,242,202,43,223,255,253,223,127,243,237,119,60,115, +26,227,209,193,1,154,33,80,52,113,171,132,6,74,72,141,39,49,57,93, +132,131,29,20,101,3,46,234,20,90,163,70,96,98,60,83,102,246,98,32, +6,49,151,152,75,89,23,52,112,173,11,42,37,229,28,1,148,8,106,45, +86,205,193,0,128,215,94,123,173,86,167,174,83,107,93,248,224,7,191,230, +203,95,254,242,56,142,106,165,148,34,197,158,120,226,73,80,65,180,166,235, +98,42,77,211,230,88,134,213,208,133,174,105,154,195,253,163,126,177,252,158, +191,254,177,239,251,15,191,251,135,127,232,63,123,227,141,87,110,188,249,149, +175,251,134,143,228,66,37,111,225,9,178,102,239,249,97,225,121,152,196,252, +57,155,110,246,229,172,112,81,129,168,38,123,84,21,174,187,150,0,64,141, +117,84,15,32,34,171,170,171,60,104,99,235,233,182,112,2,0,42,123,220, +128,225,166,74,217,8,54,59,52,32,98,189,34,34,48,243,116,58,29,134, +185,146,37,205,113,177,236,135,149,106,209,131,3,239,61,83,23,165,198,79, +49,132,166,148,50,142,137,136,130,115,206,145,234,186,90,208,54,219,55,85, +84,6,64,213,188,25,152,107,219,118,88,196,7,180,244,97,107,11,46,185, +129,182,152,40,155,77,196,42,210,213,58,104,81,48,220,110,18,71,228,88, +198,181,95,128,46,213,231,110,175,121,153,176,172,255,68,96,164,128,168,99, +242,14,227,249,197,96,165,113,222,29,76,83,74,141,247,165,20,118,78,84, +129,40,76,59,19,19,17,242,174,26,248,105,83,218,9,41,183,109,139,76, +98,38,4,232,157,11,30,192,238,189,117,227,250,241,21,238,38,253,24,75, +159,25,48,16,149,162,202,132,142,251,28,99,201,0,182,90,173,90,114,74, +232,129,250,85,63,153,77,61,59,5,99,230,44,130,102,83,246,195,249,156, +167,71,136,94,139,228,146,135,97,133,106,142,239,155,171,15,144,187,135,169, +28,0,200,163,82,12,12,96,187,47,158,93,202,154,4,128,186,45,143,2, +200,125,152,51,216,88,178,155,206,245,27,151,222,51,208,182,72,195,0,9, +45,137,122,246,69,229,252,222,233,206,254,129,243,62,165,140,228,140,177,168, +249,224,71,41,224,40,130,138,35,116,228,4,17,48,231,140,64,139,197,162, +233,90,116,158,157,67,130,156,6,69,112,202,206,123,178,2,64,104,60,106, +79,141,43,72,209,178,11,254,247,126,247,15,126,226,159,252,163,227,227,171, +77,211,180,161,105,39,205,206,254,46,78,108,186,211,78,14,58,106,208,90, +116,196,1,67,205,242,21,40,98,230,9,198,243,97,239,137,233,238,209,206, +73,119,154,36,77,154,54,143,49,101,243,158,99,204,239,121,246,153,197,114, +153,82,60,62,62,94,44,231,175,190,250,106,55,153,190,244,225,151,78,239, +221,125,226,218,245,197,114,101,102,190,9,42,2,142,198,155,167,118,109,55, +142,3,51,7,160,213,157,211,157,23,222,195,165,86,57,130,35,214,152,198, +229,202,183,141,111,155,49,22,85,224,224,213,80,84,9,29,87,245,118,213, +82,41,111,189,253,230,149,43,87,118,119,246,234,50,35,170,147,174,121,241, +197,23,127,253,87,127,101,177,88,236,29,30,121,239,13,41,231,120,237,218, +53,0,88,46,47,124,152,18,174,247,202,12,193,221,190,125,19,130,83,101, +246,205,225,225,161,103,46,195,240,202,141,183,254,197,111,254,246,47,127,234, +215,246,166,218,54,246,45,223,240,245,139,249,233,237,219,119,254,171,191,253, +31,115,152,46,135,212,205,28,49,160,129,106,9,173,239,23,227,86,78,30, +169,89,127,206,102,155,125,19,42,124,85,95,92,245,254,111,177,171,110,85, +80,207,135,208,230,146,84,181,140,241,244,244,116,189,134,215,119,185,221,14, +15,145,235,10,79,196,34,146,82,101,94,235,122,3,21,168,125,42,62,136, +88,140,85,175,93,77,79,105,219,54,132,192,204,195,216,95,44,230,162,101, +177,72,213,251,104,102,204,224,253,122,43,151,148,82,206,235,152,73,165,75, +245,117,16,59,53,19,213,90,79,89,75,47,219,201,180,142,144,200,17,57, +51,220,142,121,11,82,176,217,108,139,222,189,31,195,150,69,214,79,75,209, +154,64,151,147,148,172,53,116,83,202,253,13,147,107,183,45,179,219,190,74, +219,56,185,42,43,196,162,78,140,146,44,110,157,112,44,121,177,10,138,87, +166,187,131,228,66,48,72,6,207,171,113,200,160,171,113,48,128,62,199,121, +191,204,82,134,56,114,240,6,64,204,90,141,113,131,100,2,76,234,40,153, +12,57,129,227,27,239,220,154,159,247,245,61,47,23,125,204,66,196,185,40, +137,137,233,88,114,104,27,51,35,64,69,176,224,64,244,236,238,73,142,201, +68,210,184,78,2,103,239,99,63,222,120,235,70,26,83,229,250,132,86,93, +153,107,29,186,68,232,214,63,15,149,48,175,107,156,55,239,252,50,13,68, +228,7,36,210,54,73,78,112,41,245,253,18,49,52,49,19,51,5,20,48, +1,147,75,7,235,110,134,186,161,129,162,32,142,132,57,139,93,172,250,126, +53,102,53,98,159,77,57,22,159,53,20,243,89,93,18,235,163,203,234,139, +101,149,49,69,231,67,204,233,98,185,8,77,87,131,122,73,10,5,239,67, +27,75,245,127,57,51,75,41,5,101,159,212,101,221,11,157,23,251,237,95, +249,213,6,249,169,43,87,92,195,212,194,236,112,18,118,121,247,234,206,100, +191,157,29,118,228,161,243,237,196,79,186,166,157,118,93,215,53,147,201,100, +103,58,219,155,238,29,61,185,63,61,236,168,195,221,227,217,251,255,194,243, +215,223,123,237,224,201,131,235,207,61,241,158,231,159,186,254,204,213,171,215, +15,66,235,159,124,250,250,164,235,94,127,237,139,47,124,224,107,142,175,95, +123,251,157,55,127,248,191,248,161,211,123,119,23,231,115,79,62,197,146,115, +14,2,241,124,49,155,76,61,146,12,177,101,191,60,61,143,49,26,97,42, +25,0,128,48,75,89,44,22,23,139,5,48,117,228,88,204,84,25,215,174, +103,0,32,171,122,138,162,229,230,205,119,94,126,249,11,41,215,125,4,152, +153,87,171,213,206,206,206,100,50,185,125,251,118,205,255,48,171,193,36,186, +122,245,234,98,177,64,172,133,246,45,0,149,148,231,243,57,179,159,238,238, +45,22,243,213,106,177,55,107,209,210,106,117,79,242,240,95,254,205,191,81, +242,98,232,23,63,253,211,63,121,58,63,255,222,255,232,7,191,238,197,151, +208,251,186,133,2,106,245,99,16,251,238,97,200,131,203,49,198,135,170,9, +30,135,122,149,226,85,163,179,239,251,26,77,173,30,170,109,193,133,174,203, +100,125,141,246,138,152,115,161,109,91,68,118,219,184,109,237,183,209,121,48, +219,238,75,67,0,149,28,162,136,16,169,247,62,103,105,91,87,202,253,202, +184,16,66,41,165,136,230,34,49,229,156,138,129,142,171,94,82,246,196,236, +101,119,119,119,58,229,154,148,135,88,11,131,20,16,182,214,232,54,124,199, +204,34,42,98,136,239,218,43,181,150,158,92,134,158,45,150,225,198,239,190, +73,21,92,111,115,2,80,247,236,217,22,228,26,192,54,245,250,82,125,159, +128,104,169,14,209,203,138,186,13,107,208,166,210,165,2,162,109,50,162,205, +140,137,125,104,178,65,67,110,49,68,37,88,44,22,211,73,8,72,57,38, +137,61,197,212,78,38,141,153,143,177,1,163,149,236,57,88,44,123,223,106, +25,134,118,50,97,239,242,189,11,97,226,227,231,155,217,68,140,250,69,73, +239,156,134,163,131,153,177,204,87,89,45,48,175,78,23,153,122,156,116,171, +213,98,39,155,223,157,210,233,188,155,205,250,155,119,39,147,233,124,62,247, +147,182,219,223,99,37,6,38,242,181,248,90,1,84,129,136,179,104,77,21, +49,147,245,118,50,112,159,44,95,110,149,127,173,151,31,34,0,132,53,77, +131,45,5,123,192,11,83,43,5,31,230,137,200,235,69,212,172,26,182,149, +217,17,108,243,43,109,155,173,82,47,101,5,128,108,179,195,13,96,141,105, +76,7,56,189,115,147,138,118,11,113,214,151,139,113,178,191,135,104,247,222, +188,81,163,79,200,148,165,64,45,142,116,110,92,174,180,72,115,229,74,60, +185,87,46,22,187,71,207,220,188,125,171,143,227,100,54,221,187,114,232,189, +221,125,235,46,249,86,3,167,97,76,125,156,92,221,91,173,86,37,235,100, +218,254,252,39,127,254,119,62,251,27,95,251,158,231,116,49,192,177,111,118, +39,97,199,79,15,58,63,101,244,70,132,59,59,83,103,129,8,106,214,106, +5,125,69,64,196,140,99,253,39,4,33,4,219,131,213,249,194,11,116,251, +147,220,151,253,39,118,151,243,225,232,218,209,189,59,103,4,252,145,143,252, +69,207,46,233,40,89,223,124,253,205,91,111,189,179,127,112,5,173,254,47, +7,144,87,222,41,55,79,221,179,125,187,88,233,124,65,87,17,238,94,232, +91,39,126,119,151,199,193,53,1,49,193,124,9,167,203,140,75,227,118,153, +227,50,14,126,218,77,15,247,83,138,237,238,110,73,153,16,114,41,206,145, +247,124,112,176,247,202,43,175,124,232,67,31,106,194,196,76,113,179,135,232, +245,235,215,223,121,231,157,103,223,247,60,84,219,142,155,24,47,118,119,119, +231,23,103,0,53,78,234,152,154,186,133,146,130,101,73,69,114,19,32,248, +252,234,203,127,240,233,95,250,228,183,253,165,143,222,188,241,230,173,155,111, +170,194,106,37,135,215,158,249,155,63,252,223,10,82,17,240,77,131,168,255, +15,101,111,30,107,91,122,213,7,174,181,190,97,15,231,156,59,191,121,170, +242,171,87,85,46,151,93,120,110,207,102,112,192,24,176,221,52,73,43,208, +130,52,233,134,102,8,65,173,142,136,210,234,65,29,165,131,18,41,136,150, +58,66,208,81,167,19,16,168,19,129,33,216,24,211,12,182,193,3,182,11, +79,101,251,213,244,230,119,223,157,239,61,231,236,225,27,214,234,63,190,125, +246,61,247,190,247,12,222,186,186,218,247,220,125,246,240,237,239,91,227,111, +253,86,140,66,8,128,6,80,207,203,53,184,207,159,232,39,213,95,107,250, +245,144,146,222,90,74,223,178,86,199,24,147,3,218,159,164,109,219,225,112, +33,209,127,113,128,186,174,187,138,180,158,28,169,103,139,78,84,110,169,88, +23,17,1,66,191,236,83,226,194,218,50,21,102,243,140,247,173,170,42,97, +85,77,93,140,50,28,46,48,135,233,193,184,174,235,253,253,125,84,181,72, +52,217,9,230,160,20,50,71,165,49,47,114,141,233,234,208,71,22,164,195, +22,118,121,134,222,45,18,65,36,176,214,166,222,5,73,155,245,171,110,62, +213,152,228,20,206,249,92,253,152,66,95,100,162,8,0,16,52,18,0,162, +0,8,16,67,183,40,123,95,251,152,108,157,127,91,105,71,91,227,218,16, +130,155,52,181,84,19,135,146,15,114,28,230,25,42,215,180,57,233,107,55, +94,62,177,178,186,241,226,245,165,165,165,157,241,120,121,109,133,219,38,144, +241,7,147,112,48,109,92,27,38,85,158,231,237,230,222,210,137,19,97,82, +25,91,16,10,55,174,0,213,238,77,227,214,193,222,139,55,217,168,225,112, +88,111,237,120,160,88,22,213,248,96,58,173,46,62,126,121,231,229,91,97, +113,113,111,253,110,40,7,142,163,48,223,25,143,155,170,174,198,147,98,113, +100,140,73,105,226,186,109,76,68,155,151,109,12,177,229,66,48,132,96,72, +65,240,189,9,6,115,84,169,68,20,239,107,162,34,51,202,147,78,64,165, +44,196,172,12,153,30,194,234,154,156,7,32,20,4,1,72,140,56,146,106, +172,96,246,142,4,143,17,163,71,64,226,35,130,79,34,28,108,239,195,180, +69,31,195,184,222,216,217,30,44,47,122,18,104,3,17,21,195,65,227,218, +133,165,197,173,157,157,229,229,229,186,109,220,189,221,16,194,116,115,103,186, +63,173,218,230,118,49,188,179,126,87,153,172,206,247,131,243,26,233,206,213, +107,195,114,32,153,110,170,58,107,161,6,191,177,177,113,225,226,35,127,250, +241,143,255,159,191,242,175,31,189,242,40,228,106,56,24,222,110,238,92,56, +121,206,14,181,42,208,20,152,149,5,51,23,89,137,40,73,220,33,34,35, +32,39,115,151,72,8,16,148,81,2,145,132,202,229,66,13,128,153,125,221, +34,171,42,162,69,115,198,158,26,239,76,22,134,139,123,219,59,187,211,241, +153,19,231,202,60,255,249,127,240,115,255,248,159,252,79,171,39,79,169,34, +219,220,221,41,111,111,250,24,111,220,184,161,14,26,110,156,82,202,20,185, +109,226,230,230,141,105,112,163,229,69,14,81,51,44,100,69,229,91,118,254, +238,75,47,81,145,101,97,8,10,182,199,251,101,153,59,215,2,51,144,5, +96,99,225,226,165,243,47,188,120,181,170,170,178,88,100,22,22,206,179,204, +181,213,185,115,231,110,222,184,157,101,25,17,41,4,224,46,40,116,112,112, +0,40,193,135,24,153,136,172,49,69,81,196,24,17,216,100,228,195,244,55, +126,253,223,252,233,39,254,184,106,15,110,63,254,202,55,60,243,198,243,23, +206,100,118,248,236,151,95,252,175,127,226,103,23,79,62,182,57,221,35,0, +160,110,245,113,4,16,5,148,29,243,106,143,45,210,99,11,22,238,139,92, +205,31,35,179,44,101,178,214,103,115,56,36,18,170,254,128,132,92,169,235, +86,144,69,68,155,44,181,76,232,234,86,82,227,155,249,43,37,90,118,107, +109,226,204,138,49,204,98,255,201,26,234,42,144,17,161,170,192,24,212,90, +7,97,173,53,130,154,78,167,34,82,20,133,82,170,158,86,229,130,174,170, +73,93,15,73,129,54,56,62,104,219,224,181,30,85,181,239,173,89,162,195, +242,15,196,142,206,51,70,6,152,145,26,70,48,198,36,169,135,115,27,204, +8,5,231,131,113,189,213,54,119,206,57,219,240,48,157,148,216,92,16,17, +9,117,136,14,103,16,112,68,76,41,148,254,132,189,16,236,83,198,30,69, +161,152,60,95,61,117,2,23,74,18,144,133,162,5,217,177,193,230,214,163, +26,60,113,177,24,46,132,213,65,150,23,92,47,180,10,124,75,237,168,52, +75,185,214,58,67,104,219,182,17,49,70,21,23,207,155,139,39,247,152,163, +176,62,183,2,205,174,227,184,186,242,212,232,194,217,54,134,188,28,196,19, +163,76,155,60,207,227,248,96,231,27,47,101,231,79,156,24,0,17,45,47, +231,133,205,246,170,73,182,186,52,218,111,150,227,178,87,9,64,174,125,240, +9,56,89,100,217,137,179,167,37,207,36,6,163,141,52,162,148,114,109,131, +164,250,17,235,213,70,47,245,230,103,88,63,89,143,77,211,110,142,206,137, +173,99,190,201,49,173,222,93,8,0,128,228,208,114,60,50,227,17,145,145, +104,46,180,183,83,128,156,91,225,73,45,181,47,134,163,225,90,89,174,44, +78,91,103,198,181,49,134,148,210,32,249,104,152,43,86,11,35,25,67,49, +60,171,0,131,243,39,31,61,239,156,227,178,64,242,139,203,203,211,102,90, +47,216,232,67,179,144,45,157,90,21,163,108,227,23,77,209,40,127,114,120, +209,27,253,210,214,93,181,178,16,71,121,83,40,26,168,139,171,23,117,174, +138,129,29,140,242,98,88,138,72,153,229,200,34,198,51,33,42,64,69,32, +36,10,129,81,132,73,8,132,242,129,17,193,208,248,40,161,200,11,0,150, +81,230,106,127,126,180,232,15,216,141,195,231,63,253,133,183,190,241,109,90, +104,245,236,226,250,237,245,211,167,79,223,185,126,103,109,101,217,123,223,112, +16,4,56,181,104,87,134,247,160,89,48,165,14,197,120,53,119,180,186,75, +192,166,140,108,195,242,112,127,127,63,39,189,184,184,56,222,221,153,64,125, +114,113,169,88,94,24,71,183,177,126,247,27,215,94,202,139,204,90,139,2, +10,129,197,33,5,109,0,0,214,215,215,181,42,180,202,189,120,215,98,12, +109,146,119,136,88,85,21,105,3,1,139,50,75,72,35,173,53,138,14,33, +18,81,89,150,203,203,171,121,158,31,236,79,110,223,248,198,198,198,93,141, +229,119,126,199,219,215,55,111,61,245,248,211,247,110,221,158,76,14,62,251, +220,151,190,247,3,63,242,221,223,247,159,239,30,196,209,210,40,56,112,77, +80,196,68,36,12,34,68,120,36,123,54,63,49,230,39,204,188,38,38,122, +176,54,77,126,43,204,64,90,137,226,200,90,27,163,239,157,223,195,32,254, +108,90,243,140,228,85,115,34,233,101,97,151,144,47,208,186,70,130,24,99, +60,11,42,165,12,78,167,173,214,218,57,79,68,130,42,186,152,101,198,251, +56,24,20,0,32,2,68,250,96,223,151,101,233,253,184,40,212,116,234,53, +130,15,97,220,180,101,94,184,86,150,180,202,180,153,142,39,107,171,167,167, +7,173,82,102,101,80,182,173,75,97,72,233,40,237,5,145,148,234,250,120, +200,140,243,10,64,245,127,218,108,8,88,9,112,148,64,40,194,20,2,91, +155,55,109,4,128,16,163,82,74,107,43,34,41,88,198,18,57,245,247,72, +116,79,170,99,127,139,16,69,80,161,74,173,136,152,99,219,84,32,62,17, +226,3,128,214,189,97,8,34,169,186,78,102,161,76,36,210,201,48,50,17, +68,41,239,189,12,51,20,86,75,195,244,86,70,33,125,219,231,121,62,13, +78,13,138,22,128,134,5,51,15,202,82,68,180,181,9,17,153,151,154,153, +97,48,82,75,11,104,73,77,61,196,104,50,51,24,13,93,91,11,168,218, +187,114,176,80,51,208,234,42,43,213,0,231,229,106,222,182,187,192,60,28, +76,92,203,43,75,129,101,97,180,0,46,212,11,44,177,35,118,229,16,51, +99,19,235,92,133,181,58,183,36,33,24,50,33,66,17,212,216,87,193,162, +225,89,72,14,49,153,111,145,5,56,104,60,44,243,62,34,236,248,184,56, +75,127,243,44,112,151,4,30,206,2,121,25,102,8,10,65,129,144,8,182, +44,198,100,62,132,52,153,73,20,38,202,42,6,230,32,34,202,36,214,19, +16,145,8,170,151,149,25,83,97,243,202,70,48,102,130,108,23,6,222,251, +76,17,44,13,226,76,43,142,125,99,135,165,227,144,13,138,192,16,0,160, +200,106,0,176,217,20,120,120,98,201,131,152,81,73,129,149,151,165,19,203, +106,177,168,57,152,178,104,5,35,20,142,171,114,128,191,251,123,191,253,200, +201,51,133,88,99,116,49,208,229,162,202,135,54,27,230,38,183,164,145,140, +98,20,50,2,160,59,16,79,156,141,3,1,128,0,39,174,111,6,16,109, +112,168,139,206,146,104,121,104,87,154,198,153,188,2,195,223,249,222,247,196, +10,62,249,145,223,127,247,247,190,247,11,127,245,199,0,208,232,160,150,243, +154,60,233,76,192,192,26,41,194,147,209,194,2,17,81,240,14,10,29,136, +148,202,109,244,162,37,31,217,60,207,55,15,182,135,171,11,206,57,119,113, +101,210,70,162,65,97,4,201,239,237,174,159,58,121,158,176,16,108,56,2, +176,246,190,61,123,246,236,246,206,250,217,179,103,91,39,0,92,181,193,88, +114,177,57,104,246,111,220,186,94,22,35,34,205,174,241,206,34,168,225,194, +232,238,221,155,89,62,84,38,159,180,224,67,113,114,105,120,251,218,151,254, +228,207,62,244,149,175,126,233,252,217,39,94,253,244,235,158,127,225,57,155, +157,50,164,158,123,246,147,215,174,221,124,195,187,191,239,71,254,254,207,99, +118,42,84,222,77,88,196,27,69,138,140,136,68,241,54,83,214,107,6,76, +208,87,173,41,25,101,12,17,17,65,230,35,36,29,90,98,94,14,30,219, +23,142,221,116,21,6,66,109,13,0,164,136,39,11,84,77,139,164,178,44, +175,235,154,144,124,8,198,230,222,53,70,105,228,216,84,211,46,185,155,232, +229,157,147,62,25,140,179,110,24,89,86,204,112,115,41,99,139,77,227,37, +130,82,152,250,191,164,248,16,51,215,53,231,89,209,54,78,43,147,218,145, +16,181,202,80,169,109,219,182,163,197,37,107,243,24,99,89,102,147,170,169, +107,81,10,123,135,250,152,188,239,161,213,253,191,58,9,40,198,90,11,192, +72,12,233,17,103,28,176,56,151,133,156,101,39,130,177,186,55,220,210,1, +169,19,74,86,102,49,74,240,33,29,108,108,23,181,68,232,158,244,184,45, +243,144,64,67,242,196,239,63,248,129,254,53,206,193,9,113,6,145,73,255, +85,104,180,214,194,157,75,40,12,90,235,182,70,23,28,135,104,140,177,26, +38,147,86,3,197,24,202,194,174,174,173,153,60,171,218,70,69,177,70,19, +33,33,121,2,177,69,140,177,37,2,84,160,129,1,36,68,107,45,114,141, +134,2,162,160,33,17,174,33,250,168,128,30,246,92,127,147,140,218,195,60, +148,249,63,249,144,178,204,128,34,140,81,43,67,168,82,44,15,81,84,122, +183,36,204,6,88,194,172,155,104,226,160,237,183,16,93,202,177,36,130,69, +207,76,247,25,149,243,151,38,82,247,223,12,0,120,18,8,108,52,229,163, +65,36,16,129,192,44,2,28,69,107,253,169,79,254,249,120,188,191,50,92, +176,133,37,11,89,97,82,153,189,181,214,24,163,181,6,122,240,69,15,95, +52,48,206,240,61,162,132,184,195,90,233,28,69,84,161,114,36,210,226,157, +88,22,248,47,254,246,15,142,43,55,153,76,6,131,193,175,252,218,175,158, +63,127,214,121,142,117,157,161,118,26,1,68,16,153,35,37,53,38,2,29, +235,71,7,58,171,235,58,121,157,124,180,24,43,69,129,152,153,37,132,216, +128,40,165,76,2,11,77,167,211,16,2,66,242,240,152,153,99,16,96,153, +161,56,98,153,47,236,236,110,88,149,43,131,153,177,194,193,85,83,231,194, +254,193,250,95,124,234,79,126,239,63,253,246,120,122,239,210,165,75,111,126, +211,91,155,202,111,221,219,57,117,97,245,224,96,79,101,131,55,189,227,61, +63,253,15,127,225,228,169,115,59,219,227,229,165,145,175,3,244,221,98,19, +1,165,72,81,20,125,216,29,251,30,91,81,190,201,116,187,127,126,62,204, +231,237,230,219,156,143,2,0,125,130,180,175,78,99,102,231,99,143,19,86, +51,176,72,119,177,16,66,42,231,74,228,40,233,22,251,11,151,101,145,101, +153,49,157,83,157,196,74,140,177,170,220,116,218,58,199,211,166,245,222,43, +77,2,44,40,227,106,218,52,77,219,250,233,116,170,45,40,101,122,199,243, +152,91,221,203,172,153,1,24,251,144,95,140,17,65,161,78,236,6,201,90, +192,4,192,233,179,212,189,97,76,179,230,158,90,235,162,40,178,44,75,41, +99,102,78,45,74,227,28,65,124,239,38,203,67,182,111,50,202,247,223,127, +159,225,233,69,94,191,223,243,222,36,237,146,190,146,6,214,152,44,153,147, +233,137,140,201,68,4,172,158,132,214,73,220,221,155,106,99,66,8,154,212, +198,250,198,126,104,14,154,170,13,94,68,56,196,58,184,26,162,179,84,176, +42,193,228,172,50,109,203,114,96,179,28,51,75,121,230,14,42,69,164,108, +230,21,180,10,194,81,222,252,7,109,248,144,159,35,3,50,247,103,7,6, +232,211,187,233,183,82,134,72,163,54,100,180,86,134,148,70,69,164,21,146, +66,82,128,90,72,9,41,6,141,160,0,149,206,114,157,229,202,102,202,102, +100,108,250,65,109,180,178,8,74,4,163,116,89,251,192,236,99,12,12,243, +63,81,144,129,24,142,180,67,157,191,79,47,224,82,220,80,153,233,164,86, +168,13,25,110,99,78,134,162,252,229,103,62,107,141,90,92,25,149,35,83, +249,241,112,37,47,203,50,43,138,44,203,148,233,98,65,72,199,103,195,177, +25,146,176,80,105,85,163,78,69,153,26,45,177,18,202,144,12,13,23,135, +171,39,86,171,166,102,128,63,248,200,71,62,240,3,239,143,16,63,254,137, +79,252,232,223,251,177,255,244,59,191,109,25,138,40,78,65,84,24,21,70, +2,199,1,8,97,6,170,64,196,233,116,122,239,222,189,171,87,175,166,213, +145,112,185,208,53,104,214,101,89,166,248,210,188,221,64,68,125,241,21,0, +120,23,137,116,66,101,112,4,2,76,63,117,221,46,45,174,48,50,65,177, +0,0,32,0,73,68,65,84,221,187,183,177,48,28,230,90,109,220,190,126, +227,165,231,190,252,185,79,142,235,157,223,250,143,255,126,109,109,229,187,190, +243,189,174,69,4,99,77,126,246,236,217,243,103,86,254,226,51,159,174,162, +249,192,15,253,248,227,175,122,51,97,54,202,75,12,209,90,157,102,114,106, +114,150,126,68,176,103,107,159,145,180,119,129,93,120,144,226,252,38,235,238, +97,91,159,220,128,57,250,165,46,235,168,148,244,225,248,212,220,200,207,21, +177,246,254,176,82,202,181,161,105,98,242,135,153,185,174,107,107,109,150,101, +222,115,140,222,24,21,66,240,190,85,42,53,87,6,231,5,80,105,101,167, +109,77,4,11,229,64,36,166,34,54,165,212,112,56,68,210,147,9,183,109, +107,114,3,68,24,143,164,29,142,77,214,94,30,73,95,14,33,128,136,65, +88,98,32,2,76,241,245,57,75,234,216,154,68,236,218,30,247,214,162,36, +49,141,172,84,42,59,209,73,35,117,32,193,251,224,104,223,92,183,244,23, +133,251,98,19,48,71,233,220,111,243,152,68,152,107,44,169,180,49,218,166, +190,233,0,32,130,90,25,32,21,32,26,69,85,211,28,76,39,109,211,44, +20,3,16,217,223,222,57,243,170,43,190,105,83,111,89,163,13,75,152,250, +182,14,174,117,148,105,35,145,49,178,5,106,39,213,100,60,158,10,76,118, +183,47,60,85,224,66,209,248,208,2,136,24,109,134,136,18,196,61,240,185, +30,222,119,85,250,167,62,242,92,115,1,26,153,225,149,1,0,72,9,18, +2,197,192,172,40,173,52,193,174,198,6,59,134,12,33,64,65,5,34,105, +0,230,79,158,6,85,41,29,1,93,0,100,32,77,168,4,69,29,83,236, +243,119,213,19,49,30,145,71,34,74,25,3,34,33,198,232,39,59,123,133, +177,28,226,246,173,187,202,228,219,227,205,143,125,228,15,30,185,116,46,203, +205,245,155,47,63,253,182,167,193,136,201,50,99,85,146,119,140,128,0,44, +66,15,74,124,247,226,21,0,0,25,101,102,241,161,144,144,40,33,66,66, +229,154,74,3,41,146,209,210,8,67,91,79,166,31,254,240,135,255,217,191, +248,223,255,183,127,254,207,206,157,58,247,127,255,95,191,246,216,233,139,39, +23,215,86,159,190,2,0,33,196,220,88,207,222,183,142,153,81,169,244,88, +90,235,44,203,110,221,186,165,148,138,177,135,82,17,17,41,80,195,225,240, +238,221,59,233,102,140,53,193,11,51,27,77,201,212,82,74,5,134,60,207, +157,111,124,168,1,96,180,48,176,154,56,120,163,21,232,232,188,179,6,118, +55,239,126,253,171,159,187,125,235,250,230,198,250,246,246,230,187,190,251,187, +222,123,241,202,149,43,79,126,226,19,159,248,142,111,127,79,81,154,223,250, +205,223,120,242,201,43,31,250,157,255,120,247,238,222,255,240,11,255,252,45, +223,254,253,123,83,136,209,47,12,52,65,96,80,206,185,36,127,170,170,73, +194,186,109,91,163,51,239,186,30,29,243,189,113,239,23,121,247,207,188,111, +190,18,239,63,44,206,154,129,0,128,49,70,43,116,177,77,152,190,195,150, +230,56,215,126,13,103,184,54,99,102,164,181,68,169,98,212,90,165,53,4, +135,204,73,104,36,194,3,8,129,165,139,241,43,65,72,101,94,158,163,132, +216,182,109,49,88,64,84,2,160,149,174,170,26,149,18,70,31,189,86,118, +54,61,1,0,37,81,14,33,32,28,154,96,48,39,92,4,18,143,160,242, +226,72,72,73,250,87,26,40,153,7,175,0,128,82,42,204,12,74,236,193, +201,204,64,88,22,57,51,240,236,5,132,190,29,73,248,214,212,11,162,154, +179,207,59,236,5,118,249,169,84,147,32,233,222,0,146,5,36,34,73,26, +34,145,22,73,67,173,20,105,80,20,133,83,49,73,148,128,90,17,42,91, +183,210,78,23,6,107,6,179,76,219,5,202,15,182,183,195,230,62,77,124, +220,159,134,157,169,65,82,57,36,10,74,21,217,55,1,181,52,85,85,79, +171,194,216,140,116,102,11,165,212,214,151,175,53,203,19,244,202,33,35,74, +244,24,3,162,34,124,72,238,245,161,148,94,247,29,159,222,17,114,236,245, +211,252,231,0,196,128,62,242,120,90,241,12,11,21,99,4,53,35,241,70, +66,156,189,123,17,32,60,126,230,164,174,8,90,23,57,10,32,166,134,141, +93,247,140,57,45,133,48,175,117,142,239,164,67,84,20,110,28,180,33,179, +182,68,189,152,149,17,220,62,16,41,245,220,151,191,130,194,195,225,80,66, +106,111,160,109,110,141,85,90,107,84,136,40,136,32,200,8,216,133,240,30, +180,9,72,226,151,78,101,197,9,210,31,33,42,5,169,122,133,44,153,96, +154,125,183,186,180,124,227,218,11,211,233,244,205,111,123,235,31,253,209,31, +77,15,198,163,203,165,81,84,77,198,184,176,108,167,206,123,239,218,198,44, +45,20,121,54,105,106,32,140,40,8,152,140,187,149,149,149,231,159,127,222, +123,175,148,97,230,174,151,147,8,131,216,60,171,219,38,10,3,34,115,132, +142,152,243,136,205,219,184,214,26,210,38,155,86,77,110,140,82,168,144,16, +98,237,118,239,221,189,115,253,230,215,239,222,161,204,170,182,221,207,12,95, +121,236,252,43,46,63,83,102,246,217,191,250,210,100,220,104,173,175,93,127, +190,28,80,136,245,250,221,221,159,252,153,127,244,189,31,252,187,85,163,89, +104,113,65,87,227,201,176,204,42,23,34,8,34,184,8,46,134,65,62,32, +69,196,186,203,174,50,70,137,135,30,219,183,190,61,204,12,76,88,148,94, +92,164,203,17,145,247,30,164,139,36,106,173,181,49,154,89,102,221,48,15, +79,218,197,11,124,151,71,115,206,89,107,17,209,185,56,30,183,86,153,16, +61,0,107,157,44,38,82,10,64,160,105,167,201,67,213,198,32,176,119,65, +68,4,117,227,90,23,252,120,60,45,10,80,198,150,165,170,170,192,156,186, +147,118,87,236,197,92,50,219,122,113,12,115,93,122,137,116,150,151,77,83, +197,232,5,152,17,148,96,154,130,243,128,149,222,212,98,31,122,223,126,118, +134,100,90,131,72,151,250,209,90,59,159,250,108,118,250,231,152,5,241,77, +70,121,254,230,251,75,204,91,175,247,31,134,179,194,222,174,178,152,136,58, +76,185,226,8,140,8,136,192,93,255,42,191,51,190,183,181,179,66,131,201, +193,20,6,131,93,217,187,115,243,134,59,216,119,119,182,167,219,59,7,155, +219,193,123,178,6,51,67,131,60,43,115,5,138,124,12,187,147,122,99,171, +105,67,46,100,129,32,178,54,102,60,158,130,69,53,40,148,209,222,133,24, +89,163,122,216,115,37,83,229,1,79,122,148,255,238,208,188,234,250,52,207, +143,85,135,76,5,33,97,140,12,204,194,204,33,13,59,104,17,0,142,1, +162,136,16,204,112,170,15,97,18,211,0,206,57,193,46,106,145,180,133,82, +8,124,100,210,206,223,216,177,157,180,169,136,227,253,169,159,214,11,131,97, +219,250,189,189,3,12,172,148,33,69,191,255,225,223,187,116,233,18,17,221, +187,119,239,149,79,63,133,172,50,157,25,99,82,47,11,33,160,244,106,80, +0,81,142,134,53,142,12,17,206,4,31,128,64,170,248,134,20,93,201,108, +97,201,34,98,110,139,106,191,253,183,255,230,223,102,101,113,241,210,249,223, +252,173,223,2,5,16,60,115,248,165,95,254,87,255,224,167,126,118,113,97, +101,82,87,211,182,153,28,140,207,60,114,129,0,68,81,4,49,72,49,6, +231,58,119,97,111,111,111,121,121,181,91,41,194,32,49,73,147,228,223,40, +180,49,70,66,67,164,0,66,106,117,198,204,90,103,145,57,74,64,9,77, +53,86,90,182,183,238,109,220,221,216,216,216,220,59,184,49,153,84,74,169, +203,79,60,177,191,187,23,89,86,79,157,190,242,248,101,231,180,176,247,28, +179,34,95,92,28,125,253,235,235,175,121,230,233,143,126,228,15,191,255,3, +63,250,131,127,251,199,3,22,202,42,11,96,16,242,60,23,165,99,237,243, +44,15,129,93,27,8,181,34,10,94,172,177,106,214,74,144,25,165,235,42, +145,150,67,188,223,85,58,54,194,127,19,135,119,62,10,199,51,246,60,165, +84,8,158,80,245,249,92,45,2,136,232,157,131,25,123,104,18,49,29,188, +155,64,102,52,205,9,33,156,78,154,101,198,176,65,226,217,252,131,16,132, +153,171,182,242,190,109,219,186,211,234,33,42,165,188,23,136,173,214,122,48, +24,4,6,77,148,114,24,89,94,166,158,50,15,120,170,185,112,76,255,47, +145,174,39,177,182,70,121,149,26,254,50,66,159,181,236,13,189,249,98,148, +20,28,196,84,248,5,208,113,26,27,76,176,245,254,228,73,234,245,149,82, +127,237,248,166,141,231,152,145,230,93,236,249,51,207,157,31,14,33,47,222, +167,5,156,254,28,106,155,236,65,238,122,71,146,72,84,202,44,172,173,120, +173,56,211,197,218,210,193,120,50,26,12,243,181,165,139,175,188,188,87,85, +94,163,93,30,13,139,188,28,12,162,198,137,111,157,247,102,109,52,40,202, +193,197,147,231,68,8,80,35,17,145,107,90,181,63,150,34,243,134,40,203, +98,211,236,133,253,166,241,8,129,31,154,165,121,48,227,83,207,127,119,76, +25,164,200,76,103,235,38,187,189,243,239,32,10,43,99,135,195,5,80,4, +146,128,238,212,4,65,22,102,150,84,171,22,153,36,50,51,204,178,16,243, +131,41,34,4,0,164,216,71,1,159,186,12,18,9,145,142,15,147,218,112, +68,42,29,234,161,200,1,4,16,163,66,204,109,139,108,114,61,60,181,186, +191,187,19,36,2,161,53,57,129,89,24,46,145,65,163,10,164,212,3,10, +89,152,1,146,130,237,23,226,253,145,141,217,104,72,31,42,17,100,148,196, +83,153,41,165,67,211,64,3,165,50,74,124,78,197,202,153,211,123,123,123, +138,224,93,111,127,103,85,85,33,4,199,97,229,194,41,79,16,21,82,110, +111,111,172,15,78,174,216,178,171,106,72,107,56,113,106,142,70,163,36,200, +98,236,18,154,204,44,208,65,172,152,57,225,16,148,82,0,20,103,141,65, +68,132,20,5,246,206,53,90,133,187,119,111,127,233,139,207,126,233,11,159, +31,12,70,231,206,156,95,91,93,222,222,218,122,219,219,223,141,160,239,220, +222,126,219,59,222,187,181,189,177,185,93,189,234,252,168,106,54,167,213,222, +59,223,245,246,63,252,232,71,115,195,255,225,255,253,237,55,190,238,29,63, +249,211,255,35,227,208,183,162,53,160,248,233,184,21,101,29,30,199,220,137, +64,219,182,131,65,78,164,251,69,138,160,68,142,52,59,191,95,198,253,13, +189,218,126,59,44,238,234,24,63,187,70,102,121,158,107,133,201,159,136,49, +234,100,245,165,209,76,146,46,242,12,84,53,67,252,102,153,85,202,18,129, +115,209,24,179,184,88,78,246,157,49,10,133,67,112,136,8,160,170,106,226, +92,208,6,202,81,233,67,43,140,204,172,80,91,107,93,27,34,119,173,61, +156,115,74,105,102,4,194,99,75,107,94,198,25,53,11,84,204,146,62,233, +191,204,76,132,68,4,132,40,152,94,115,16,86,49,38,202,0,53,199,30, +170,148,114,49,88,107,103,185,230,46,233,161,181,102,246,89,150,137,112,226, +176,98,73,18,19,65,238,127,97,223,12,44,222,167,50,230,237,187,222,142, +59,246,104,50,71,228,223,127,171,187,132,86,233,165,11,35,32,66,202,230, +42,218,177,236,150,139,201,64,149,131,209,240,204,50,2,14,78,14,162,53, +69,59,8,85,169,156,11,32,99,132,38,248,26,37,26,90,50,22,102,66, +63,169,168,44,203,188,132,108,85,97,70,140,32,236,92,24,135,56,5,104, +57,178,64,254,45,205,170,121,96,221,177,57,250,96,195,71,208,251,40,34, +202,26,66,149,200,190,77,102,83,174,134,36,82,231,179,114,154,145,62,28, +178,60,204,15,169,18,102,230,166,105,56,48,41,38,133,0,41,59,252,96, +179,26,143,74,231,195,223,90,13,151,22,204,34,42,99,196,183,108,40,34, +73,148,197,229,133,162,44,147,106,108,154,6,65,73,128,82,15,4,219,238, +245,165,54,196,40,130,93,232,17,238,91,147,136,8,135,106,224,80,240,1, +137,38,69,104,219,186,33,134,81,49,140,59,82,102,229,207,252,212,207,252, +175,191,244,139,143,61,126,217,106,3,28,130,107,80,35,2,14,87,22,135, +167,215,76,219,34,209,75,247,110,79,219,38,27,13,66,12,179,172,151,153, +86,137,143,178,232,139,11,58,121,60,171,185,212,135,189,98,83,204,42,68, +14,169,104,33,205,207,233,116,124,251,206,141,253,253,123,215,94,188,58,24, +228,79,94,121,98,80,12,67,224,103,159,253,170,34,19,157,24,155,191,233, +205,223,190,189,179,179,181,217,188,253,93,239,190,179,177,254,249,207,255,201, +227,143,95,188,118,253,197,157,221,173,123,183,175,191,246,53,111,250,39,255, +248,159,58,179,164,172,142,12,49,180,150,66,150,155,59,59,7,43,167,215, +234,113,168,235,14,245,225,189,79,11,157,57,141,24,209,140,206,227,175,181, +46,238,247,180,190,185,52,60,230,29,166,223,90,235,214,5,142,172,48,141, +149,210,64,228,66,152,157,11,68,128,35,166,148,54,115,204,114,208,218,18, +73,140,210,186,160,13,137,200,222,222,52,207,115,1,112,62,22,197,160,110, +90,102,47,168,86,214,70,123,59,180,115,176,213,212,142,37,228,121,30,57, +236,238,79,0,96,56,88,25,31,212,218,76,150,151,151,83,69,100,239,237, +205,223,243,236,81,129,161,235,55,212,41,174,152,246,21,11,49,75,89,12, +235,233,164,106,154,68,30,103,64,167,198,102,32,34,132,140,160,51,203,204, +81,4,56,70,239,146,172,105,219,38,203,50,165,172,136,76,235,88,71,135, +40,109,219,174,46,47,237,239,239,35,233,200,201,214,67,128,84,133,53,27, +237,89,116,254,248,18,154,37,236,36,225,134,4,0,128,20,105,173,58,144, +231,92,157,156,86,26,0,156,115,32,232,125,208,214,68,97,6,33,66,142, +12,104,34,3,65,234,81,214,117,50,1,52,216,202,130,45,98,221,218,114, +33,56,102,101,144,202,54,0,170,200,32,142,69,68,140,49,25,82,219,56, +20,204,86,180,107,93,7,50,76,45,17,184,1,128,150,181,142,212,214,85, +150,219,182,137,13,35,96,170,211,62,132,94,31,113,43,228,80,243,245,7, +0,64,12,161,159,112,73,253,72,23,20,86,49,50,98,170,107,12,136,136, +132,49,50,144,10,9,24,17,37,176,235,244,60,139,40,23,155,118,96,138, +166,109,245,176,24,183,78,161,198,192,49,38,243,60,24,173,37,68,23,3, +32,170,220,214,141,31,55,13,36,72,83,104,98,132,128,132,8,93,92,18, +121,230,95,207,218,93,75,183,236,59,59,187,83,58,12,90,132,160,1,1, +118,168,53,2,122,22,1,40,178,161,11,97,217,228,5,217,34,91,208,229, +80,45,54,94,237,148,100,137,133,56,162,38,102,18,66,64,2,32,144,212, +56,161,155,29,221,181,64,142,44,198,67,202,44,137,129,34,214,160,21,11, +76,227,129,25,186,232,173,183,250,252,153,147,209,243,223,122,207,251,38,211, +253,150,221,165,203,23,174,190,116,51,144,173,33,68,202,144,162,30,68,207, +251,28,86,48,26,101,99,11,193,121,147,153,5,137,45,70,110,235,41,136, +146,104,4,35,32,11,180,8,18,131,0,106,210,40,170,141,141,33,163,64, +19,54,13,77,43,217,222,120,249,43,159,191,190,190,181,187,181,187,127,240, +194,169,147,195,211,171,23,46,191,242,205,109,219,86,245,120,127,115,123,210, +242,104,113,121,233,228,233,34,31,220,188,121,115,253,222,157,83,231,151,246, +14,110,75,123,80,64,118,97,229,21,207,191,240,21,77,241,149,175,121,227, +207,253,252,47,198,242,12,32,7,31,81,4,65,57,209,206,193,112,176,212, +30,248,133,145,110,26,135,160,140,130,150,104,50,153,22,197,160,170,156,46, +7,17,81,66,76,13,65,68,128,33,85,101,119,96,181,217,236,66,69,20, +99,4,161,185,137,217,189,99,156,53,129,60,38,22,165,35,46,75,94,166, +16,234,224,153,80,183,141,39,210,90,27,212,172,128,38,147,105,7,158,40, +138,2,32,181,172,238,136,57,19,149,64,219,86,117,221,90,107,181,178,194, +200,34,90,227,194,194,128,25,16,65,107,149,200,242,0,192,90,219,52,62, +41,243,44,203,90,199,169,94,45,1,71,188,143,203,203,203,139,139,139,34, +210,245,229,72,139,106,46,103,55,111,235,246,105,22,153,229,40,0,32,89, +157,222,179,48,43,163,243,60,207,141,229,40,206,117,213,114,243,34,63,125, +37,85,38,240,172,208,2,102,68,251,208,105,197,67,162,170,217,152,30,218, +14,243,250,164,207,130,31,179,254,238,183,201,251,204,201,49,43,53,198,7, +179,64,167,111,165,18,227,254,86,211,150,92,114,153,11,216,135,16,210,109, +114,116,49,28,102,174,147,227,172,102,27,204,148,222,225,108,128,35,1,199, +36,25,82,226,5,30,164,63,231,133,96,255,167,204,197,94,251,87,51,219, +79,48,242,67,107,125,126,155,135,22,165,116,57,228,25,0,37,76,101,115, +48,13,40,62,122,131,84,65,28,168,172,157,52,34,146,21,57,38,132,83, +21,4,145,35,68,22,37,145,25,128,16,68,88,144,230,226,140,29,132,19, +0,0,162,4,60,220,4,176,147,76,52,71,81,159,68,59,2,9,64,130, +25,0,128,201,205,43,95,245,212,176,200,61,58,77,196,152,35,40,6,133, +66,128,44,194,221,42,188,47,240,116,168,33,31,180,165,148,77,10,67,10, +68,68,97,10,64,252,150,183,188,165,174,188,115,174,40,138,171,223,120,161, +245,77,86,44,167,70,157,136,38,89,43,29,220,68,136,217,163,6,160,136, +2,28,67,20,103,208,8,132,192,160,117,214,69,183,131,11,46,26,52,24, +49,198,56,40,105,111,114,80,85,205,181,23,190,118,237,107,127,21,124,115, +254,209,43,43,107,39,217,243,185,243,79,93,123,233,107,66,213,254,254,248, +244,217,83,119,111,236,222,188,121,243,196,137,147,207,124,219,235,234,186,222, +223,27,47,46,46,189,252,242,203,87,174,172,14,6,131,235,87,95,120,237, +235,158,126,249,250,87,158,251,218,87,46,62,250,228,251,127,240,199,72,103, +94,2,194,161,190,60,92,68,136,193,139,209,25,51,199,174,151,49,134,224, +4,187,240,206,204,82,78,77,1,24,4,238,183,238,251,153,115,236,243,126, +1,30,29,246,238,93,200,125,62,71,127,87,222,123,215,212,29,114,35,125, +152,184,247,180,54,115,72,55,110,219,86,107,131,36,90,101,204,12,128,90, +107,231,92,93,31,38,74,6,131,124,58,109,18,67,50,34,180,109,155,38, +119,234,211,1,0,68,84,85,85,226,115,75,86,30,116,253,253,100,238,249, +15,111,119,222,190,56,182,32,69,196,57,142,49,100,198,22,197,160,173,155, +105,221,32,139,247,209,146,237,3,103,48,115,241,16,49,233,252,132,218,3, +65,142,146,42,76,96,38,5,250,208,47,207,149,172,29,27,50,152,139,146, +206,175,106,0,80,250,56,26,25,186,248,35,61,248,60,168,65,16,4,82, +248,14,1,132,17,65,33,170,24,37,121,109,125,234,38,105,173,32,76,12, +145,25,81,115,12,0,136,164,83,114,112,118,185,174,109,19,81,199,157,51, +115,187,21,64,74,37,119,153,132,100,238,196,24,133,17,132,83,126,185,31, +115,56,122,199,199,238,124,246,200,136,152,110,239,80,48,138,32,16,179,48, +0,17,34,119,119,149,174,73,49,34,0,120,47,169,177,114,140,32,194,19, +174,44,16,11,82,150,129,64,102,116,112,222,162,106,98,141,1,164,242,109, +140,172,178,136,1,69,172,104,176,18,36,117,172,6,16,5,169,15,47,66, +18,116,136,8,40,200,73,205,164,72,63,35,2,18,207,205,37,17,17,226, +110,15,160,143,207,69,16,65,141,121,89,250,200,130,48,90,26,133,16,202, +124,96,84,96,200,4,32,34,161,72,202,100,72,226,81,128,227,171,14,231, +160,103,247,111,2,17,16,1,84,226,15,140,232,81,1,88,143,10,62,242, +7,191,255,3,239,251,0,41,97,230,162,24,252,203,127,245,75,231,206,63, +226,156,211,90,1,74,90,113,208,25,56,130,10,219,182,37,64,66,102,20, +208,18,197,9,168,24,4,176,171,145,147,16,75,107,116,140,0,242,245,175, +255,213,238,254,254,189,245,77,144,168,11,253,198,183,190,131,108,185,95,249, +55,189,229,77,194,91,95,253,234,23,31,123,226,220,149,43,87,158,127,233, +235,183,111,223,124,215,119,124,251,215,175,61,191,181,181,119,250,212,217,19, +107,195,63,251,179,63,123,234,169,167,70,163,197,207,124,250,83,167,87,151, +238,173,95,255,232,31,254,238,149,39,95,255,222,239,253,187,107,39,158,24, +44,44,76,218,61,11,35,128,67,45,216,219,95,136,198,24,156,214,190,157, +54,169,180,129,65,10,155,215,161,209,218,2,123,96,232,130,48,216,177,148, +29,91,122,105,227,25,223,7,28,69,32,31,243,78,102,23,197,99,7,244, +239,136,136,148,50,160,210,4,34,61,111,7,245,215,70,196,36,20,131,23, +34,5,128,222,71,102,54,166,11,211,100,153,105,219,54,81,21,41,165,218, +54,132,16,218,182,93,93,93,29,12,138,155,55,175,251,144,122,107,242,112, +184,224,156,11,129,171,170,82,38,179,214,246,72,197,228,20,28,153,52,179, +157,25,64,250,208,67,76,251,12,204,49,178,209,70,103,68,218,251,104,149, +58,182,98,123,106,45,34,138,128,61,79,193,44,63,67,198,152,62,139,146, +148,64,10,124,2,116,208,255,251,183,227,66,225,175,219,120,86,66,55,175, +0,17,177,111,247,58,255,74,148,82,202,152,100,41,37,224,155,34,2,0, +101,12,25,155,120,114,188,143,38,179,136,36,64,136,152,250,240,198,24,19, +31,42,64,199,22,25,98,12,49,246,38,24,192,12,56,35,194,17,147,121, +149,176,216,208,45,221,7,27,113,243,82,187,163,24,0,145,110,77,167,172, +185,36,39,56,217,199,56,123,150,25,106,27,136,80,4,35,83,136,40,34, +62,64,140,64,132,49,34,179,20,58,147,218,77,198,251,154,20,104,221,196, +152,25,19,2,230,11,102,114,111,219,31,212,88,148,184,160,29,160,120,182, +182,112,126,63,68,240,17,84,10,35,128,48,131,32,36,18,128,153,14,193, +121,70,3,0,4,38,129,212,141,80,146,145,23,143,216,98,135,104,27,147, +89,6,12,2,197,96,100,172,30,12,11,173,57,212,1,74,47,212,157,68, +132,145,4,100,14,13,56,55,55,30,184,104,231,142,73,71,116,3,40,24, +89,35,100,241,252,249,179,223,243,61,127,107,101,109,101,253,222,29,34,237, +163,88,155,79,167,117,86,88,72,61,51,181,245,129,3,71,4,98,16,66, +131,32,214,88,76,69,37,140,0,148,151,133,120,137,49,160,184,166,30,239, +110,221,221,217,188,243,233,157,123,119,111,223,217,62,184,181,182,118,114,97, +97,225,153,103,94,255,185,191,252,124,213,66,153,229,103,206,158,157,142,247, +62,247,217,79,46,46,157,88,59,121,246,229,235,55,138,65,241,206,119,191, +235,249,175,126,67,208,60,250,200,229,186,174,191,248,197,47,46,45,45,14, +135,195,171,87,175,250,54,12,70,248,209,143,253,201,153,243,87,126,248,191, +250,239,150,151,207,50,209,206,254,56,31,230,236,143,244,193,232,103,251,100, +92,155,60,235,187,249,8,66,12,190,109,83,149,142,18,136,169,254,32,132, +160,141,34,162,180,30,251,92,31,204,236,140,56,215,130,177,23,115,247,91, +39,199,214,212,177,15,37,145,137,89,77,164,189,247,194,210,9,32,165,14, +43,177,102,181,253,10,0,134,195,44,70,208,10,196,88,231,157,115,142,8, +22,23,7,46,128,22,67,90,213,109,235,156,43,203,18,21,69,225,157,157, +29,155,152,66,21,36,14,175,241,120,236,156,91,92,92,110,154,38,47,125, +106,97,41,34,72,20,66,152,111,137,117,84,178,224,44,228,135,179,223,136, +72,69,110,166,211,186,105,26,17,1,52,68,30,181,66,47,48,199,2,221, +75,73,165,148,112,7,54,132,25,180,101,62,255,144,254,21,99,144,251,164, +240,195,6,180,191,201,116,206,36,37,103,38,184,0,36,224,20,198,212,191, +121,102,80,206,34,63,148,232,53,97,206,86,7,0,165,148,214,102,166,51, +211,37,18,207,149,74,213,69,206,123,231,156,201,138,153,188,233,249,200,102, +134,140,116,81,219,35,210,106,230,113,243,172,232,58,221,230,17,95,91,8, +14,37,96,183,36,65,164,203,36,31,57,21,38,251,77,88,16,187,144,89, +103,252,33,10,73,199,170,18,147,147,174,36,145,54,162,117,145,68,164,13, +24,2,16,1,51,134,32,106,231,192,143,171,102,247,160,200,202,98,52,184, +183,177,49,200,242,122,111,114,226,149,231,111,125,253,70,142,214,44,66,24, +250,88,150,62,248,73,104,61,133,218,49,123,150,24,21,138,82,202,115,156, +27,118,68,146,217,104,11,36,150,83,129,116,159,169,51,116,178,142,147,216, +193,46,2,72,169,10,24,145,170,166,125,239,251,222,255,135,31,254,208,239, +255,193,71,167,227,201,223,255,111,127,124,181,92,28,14,150,27,220,70,64, +146,25,176,145,103,65,207,249,198,189,243,243,22,31,150,251,6,17,33,32, +129,8,34,12,62,106,225,76,148,166,179,231,207,53,83,103,77,110,243,108, +90,183,62,162,177,37,98,140,145,99,223,246,55,72,226,7,5,209,32,28, +189,72,244,26,236,194,96,81,34,76,170,41,202,120,115,115,99,253,222,173, +205,141,245,157,205,141,179,103,206,156,58,117,138,101,229,169,215,62,53,42, +139,79,127,234,83,159,248,211,63,127,236,201,87,95,121,242,181,119,55,54, +239,173,111,21,58,86,117,91,100,165,205,134,107,171,39,167,245,206,213,23, +175,238,238,236,60,253,134,55,222,219,218,42,138,124,90,29,156,57,115,198, +181,53,135,248,232,163,143,126,254,217,255,239,244,217,199,254,155,159,248,133, +188,88,209,69,177,55,222,90,90,62,1,156,51,184,148,158,192,89,32,60, +41,133,98,80,2,0,98,238,188,15,204,214,90,107,141,32,52,222,33,98, +8,204,49,2,16,161,86,74,201,125,6,242,188,128,59,246,73,250,176,95, +197,247,175,208,249,149,213,31,99,140,98,230,192,204,17,242,60,211,204,64, +132,206,57,68,36,74,52,39,177,183,42,39,19,207,204,34,145,20,24,99, +172,213,74,145,8,4,207,49,72,12,62,207,179,224,217,104,229,93,28,148, +163,118,58,157,76,38,204,156,250,24,100,89,54,25,87,253,173,116,57,226, +24,83,16,42,198,120,20,89,122,40,113,230,83,177,189,229,130,136,105,30, +32,37,242,119,211,48,128,247,33,122,75,89,239,155,195,140,116,144,136,218, +170,237,93,46,223,233,19,8,161,227,203,75,231,12,93,100,244,1,65,1, +56,46,139,143,171,157,99,95,153,151,137,189,13,213,63,87,66,39,37,49, +149,246,19,110,89,41,51,251,239,92,71,142,142,73,65,11,80,140,177,118, +109,222,113,226,1,3,106,129,84,211,67,68,28,33,41,213,4,23,103,134, +132,215,159,163,2,72,79,215,101,205,152,57,113,0,193,28,131,49,28,149, +236,15,251,188,183,97,231,13,195,116,254,24,5,32,97,83,0,64,146,246, +9,162,27,15,49,114,227,193,57,70,236,226,122,166,24,180,45,87,166,245, +214,64,57,172,71,117,49,90,148,188,220,219,111,61,102,163,209,162,83,170, +29,215,194,2,164,27,23,0,219,166,13,18,88,98,84,4,20,37,48,67, +175,24,169,95,33,221,142,158,121,60,51,237,150,60,125,244,44,136,66,52, +27,22,22,68,65,64,163,139,55,255,103,111,59,123,246,236,63,253,95,254, +231,19,167,78,237,236,236,93,124,244,34,112,200,98,38,148,78,139,130,40, +200,34,9,194,125,36,240,50,55,63,30,226,225,34,10,43,33,68,86,41, +205,196,138,209,200,104,105,228,29,43,176,183,111,223,190,120,225,145,111,188, +240,98,34,253,103,6,158,85,76,166,196,43,0,136,32,183,13,137,33,20, +31,61,66,64,136,219,155,119,119,118,167,187,59,47,109,110,222,27,12,202, +75,151,206,15,6,249,210,210,210,226,234,218,197,87,92,158,84,32,161,62, +125,226,220,181,27,55,141,45,158,127,225,229,225,194,232,137,199,175,252,249, +159,127,140,180,125,252,137,167,151,151,78,92,187,121,107,184,172,149,82,75, +203,171,147,105,189,122,98,237,197,23,190,177,184,56,58,123,246,228,243,87, +175,142,6,131,23,159,255,70,144,236,239,252,240,79,140,150,46,85,46,132, +214,41,37,86,27,140,16,25,145,168,211,145,137,191,72,68,4,28,123,102, +182,89,150,231,89,8,49,6,105,98,112,206,45,15,135,90,219,38,78,132, +65,169,100,163,96,219,182,185,53,48,179,69,224,104,84,26,238,19,121,247, +175,187,254,176,7,218,221,105,222,58,231,24,48,132,160,84,236,60,220,84, +163,199,44,9,255,161,181,182,86,137,168,233,164,205,50,83,55,142,200,100, +153,65,4,64,30,79,38,101,57,108,154,80,20,5,34,12,135,197,116,218, +182,109,91,20,197,202,202,202,198,198,186,214,58,178,22,145,162,40,64,142, +244,108,236,129,196,199,146,15,247,139,146,254,169,210,187,79,82,44,180,65, +41,173,148,213,74,89,147,213,164,17,125,106,57,150,192,34,243,7,207,71, +250,210,105,123,107,72,186,34,223,195,32,32,115,132,25,179,249,253,58,100, +30,137,34,179,237,1,147,123,38,230,232,62,38,231,217,135,0,247,209,211, +39,209,198,44,201,129,21,160,200,16,162,0,66,136,221,19,185,54,184,224, +189,139,164,149,8,74,242,122,57,10,99,50,224,157,115,89,150,55,222,181, +193,247,131,76,68,132,196,194,196,32,18,9,81,36,122,23,66,8,192,145, +136,68,14,123,86,29,153,88,212,51,137,30,154,148,132,8,164,146,228,77, +148,24,51,131,179,11,38,38,81,27,25,65,16,153,98,140,218,65,192,16, +99,156,182,226,61,0,8,51,48,163,195,0,214,168,19,171,156,101,227,162, +8,184,178,171,53,107,29,57,14,47,15,77,89,250,186,141,10,131,139,197, +176,156,182,83,8,18,152,16,148,64,4,22,1,140,12,64,170,187,227,152, +222,90,63,224,18,15,99,76,64,148,246,5,17,8,146,237,159,204,85,64, +74,7,96,83,55,154,204,99,143,61,245,115,255,240,191,95,191,123,235,147, +31,255,227,165,165,165,43,87,174,160,151,84,218,203,42,68,21,88,5,193, +32,16,143,177,168,222,191,2,143,109,44,8,130,194,148,160,108,2,34,200, +162,19,75,146,31,79,39,159,127,246,11,222,183,128,170,105,156,162,204,113, +75,168,129,48,68,86,218,36,59,186,245,110,80,0,187,224,234,246,96,127, +235,197,231,191,248,181,175,214,211,170,21,204,12,133,139,151,46,93,188,120, +177,106,155,16,225,194,163,79,144,178,183,238,220,51,197,232,226,201,211,187, +155,235,124,45,12,22,6,39,78,159,219,223,219,250,227,143,253,238,96,97, +244,244,211,175,30,22,75,55,110,221,61,113,230,76,237,183,54,183,55,206, +45,95,88,90,94,184,121,243,134,115,205,147,143,191,226,234,213,175,237,237, +238,222,220,127,25,81,189,255,131,63,149,15,78,80,102,66,27,10,93,122, +231,20,82,240,21,144,57,150,112,152,45,52,10,44,128,236,61,135,192,41, +12,73,104,181,86,29,55,176,28,6,97,230,199,16,239,135,19,220,55,194, +223,68,186,221,127,206,126,33,40,165,172,177,174,245,28,165,143,10,117,153, +7,99,76,146,178,41,33,75,168,19,252,167,40,50,68,152,86,227,178,204, +135,195,114,60,110,69,164,109,91,17,155,74,100,152,185,44,205,246,198,126, +211,52,201,71,30,143,199,85,85,25,157,213,117,189,178,82,32,162,247,62, +203,50,99,76,98,124,238,165,64,47,218,123,1,223,7,227,104,198,102,156, +246,149,209,18,165,170,42,69,228,98,96,230,16,93,136,30,129,250,60,70, +95,81,7,0,86,217,30,172,216,183,118,244,222,43,107,66,8,41,12,148, +88,88,68,34,51,107,58,18,37,156,151,188,243,227,216,159,127,158,51,6, +238,11,61,244,242,98,110,231,1,253,64,137,104,158,193,33,89,172,9,251, +210,179,36,244,197,194,64,42,101,141,170,170,242,28,51,43,51,113,47,51, +241,221,161,178,251,139,50,179,70,98,102,69,29,237,98,136,157,212,235,167, +236,252,157,35,34,105,213,63,17,204,226,193,34,210,215,174,204,43,42,17, +137,66,204,66,4,32,40,172,132,33,145,173,212,77,136,76,204,220,58,14, +33,125,5,0,8,43,206,68,15,178,92,4,234,177,47,85,30,218,80,80, +118,96,188,181,182,242,33,42,88,40,203,208,52,164,177,242,117,145,12,127, +210,34,140,169,58,34,5,56,251,26,18,228,89,48,132,1,32,114,250,156, +17,19,17,149,36,153,72,136,136,169,30,6,1,35,162,16,1,17,104,84, +138,116,211,180,207,188,246,245,175,121,245,83,26,225,67,31,250,208,7,126, +32,127,228,202,101,193,32,42,48,212,136,141,32,71,133,253,99,244,175,242, +129,42,240,200,38,148,188,99,1,16,65,36,17,66,86,210,52,85,34,254, +37,162,95,254,229,95,110,35,62,242,232,147,85,229,65,129,82,138,64,226, +140,64,151,153,155,166,185,241,210,115,183,111,222,169,199,147,229,165,65,8, +227,197,197,98,237,196,226,217,115,143,84,251,254,133,151,94,156,78,219,87, +60,254,68,57,92,189,183,121,128,148,159,58,123,89,25,186,117,247,229,47, +127,229,139,175,122,250,137,209,66,185,126,239,230,244,96,251,204,201,209,210, +201,243,95,249,171,207,191,246,219,206,158,90,62,217,4,247,149,175,126,233, +242,133,115,103,87,207,223,221,218,186,125,251,230,165,139,103,215,55,239,109, +110,172,135,16,72,225,123,190,243,59,7,195,87,48,250,54,214,58,83,211, +154,51,42,67,235,149,110,131,116,110,74,191,46,210,124,8,28,153,57,70, +12,33,70,1,140,49,132,168,181,77,254,150,82,74,56,166,21,151,37,182, +164,120,164,63,87,127,182,94,127,207,155,129,50,231,66,201,220,139,64,60, +132,0,203,161,218,235,190,21,2,147,238,94,147,206,75,203,204,85,83,35, +146,49,134,72,131,204,18,43,40,131,161,109,26,151,64,21,33,132,60,43, +141,81,85,213,0,164,136,88,108,218,170,44,139,170,26,3,112,221,128,136, +31,141,6,59,59,59,174,13,75,139,43,204,92,85,149,49,166,10,14,217, +12,180,22,210,46,138,11,140,130,64,224,163,98,105,32,249,43,108,216,131, +64,176,25,74,148,99,75,139,153,107,102,196,152,226,163,100,12,138,143,209, +215,181,7,0,173,186,70,232,233,43,125,116,175,114,211,46,19,18,152,153, +155,105,221,73,207,58,138,68,84,33,70,223,180,149,247,129,72,131,80,3, +209,104,45,34,133,205,188,247,154,80,56,40,165,144,186,98,154,190,216,67, +41,234,28,78,17,132,67,168,74,119,223,8,168,186,154,82,1,72,36,166, +137,169,47,112,84,200,66,81,88,64,8,81,49,75,140,169,141,28,135,16, +36,37,159,89,249,182,177,214,238,237,237,133,16,66,112,11,195,50,134,64, +226,34,243,238,193,110,228,40,34,62,180,77,27,167,213,84,68,162,183,205, +180,74,197,39,50,11,110,166,161,83,137,169,65,98,219,214,142,125,235,106, +17,33,234,250,219,22,249,160,169,27,153,245,211,32,2,230,81,85,77,202, +178,76,84,186,198,106,231,61,9,116,76,159,130,129,81,4,133,21,3,2, +64,51,99,201,1,224,16,66,170,123,97,102,11,249,212,81,89,150,92,7, +17,69,100,171,0,0,32,0,73,68,65,84,12,83,2,96,210,1,141,2, +105,53,212,210,142,242,146,167,14,27,46,243,108,210,212,131,204,74,83,19, +97,4,242,53,27,42,185,21,43,220,225,7,163,87,40,192,81,0,116,106, +203,135,81,35,105,64,137,12,0,168,40,0,6,225,188,19,218,243,57,25, +4,128,132,151,197,46,52,121,136,150,80,8,78,19,138,145,168,8,245,155, +222,245,61,170,92,249,141,95,255,119,63,250,129,239,190,240,200,37,107,45, +201,98,61,206,116,150,167,114,136,253,149,155,214,234,198,213,218,32,35,147, +86,109,235,73,169,12,181,107,124,166,10,137,66,68,164,169,141,53,42,96, +80,2,140,16,82,115,50,102,31,193,129,118,207,125,238,198,99,143,63,245, +239,254,159,95,255,161,31,249,123,43,103,30,107,155,232,124,20,240,6,23, +125,91,19,57,75,214,87,147,45,247,245,219,183,110,236,108,239,249,208,158, +59,127,241,252,197,11,181,107,157,206,159,121,221,27,64,204,206,238,129,57, +149,191,247,213,111,253,210,95,126,244,185,47,124,252,212,217,167,30,189,116, +209,5,191,191,125,16,171,29,165,156,151,8,86,239,110,79,150,87,78,157, +90,189,184,55,222,121,246,11,127,250,250,55,190,117,52,88,217,221,221,58, +152,238,172,12,150,80,134,251,211,56,153,236,100,86,47,148,197,221,155,215, +99,91,13,202,149,55,188,227,187,108,121,42,81,10,130,215,24,66,174,88, +196,55,30,114,85,244,30,213,49,235,76,152,132,1,149,50,134,192,123,173, +49,179,102,58,157,76,106,171,108,233,226,182,247,141,209,196,18,156,107,60, +203,192,218,148,170,238,195,208,0,208,155,41,243,130,108,22,28,147,25,12, +99,78,179,8,244,45,92,250,207,187,111,19,153,204,38,164,74,158,229,58, +53,82,40,203,65,236,72,157,124,167,9,1,140,81,187,187,251,195,225,48, +209,44,207,104,154,115,165,148,49,166,109,3,0,40,141,121,174,136,134,136, +8,192,83,0,231,92,219,182,61,62,11,186,48,62,42,212,8,18,124,171, +73,105,148,200,209,104,27,189,39,17,97,135,17,40,37,218,216,67,136,173, +63,172,76,234,229,58,10,100,54,239,0,138,140,18,65,161,182,58,67,68, +133,49,225,25,231,191,133,136,60,155,217,130,194,200,160,102,47,134,85,135, +29,6,45,134,172,2,0,228,8,185,201,247,15,118,141,193,182,173,65,34, +40,75,202,36,137,127,76,167,165,45,179,89,74,69,165,192,104,31,142,124, +152,242,71,36,17,8,33,8,68,14,81,43,59,28,14,173,181,200,8,0, +200,72,66,210,81,170,51,0,7,239,21,17,25,67,168,131,243,222,123,137, +44,130,6,73,17,8,163,66,197,132,98,50,17,204,181,33,64,133,36,164, +230,135,142,1,13,104,68,1,52,164,17,53,24,72,160,22,68,164,24,35, +1,22,217,192,90,203,17,152,161,110,28,132,150,132,218,182,149,25,69,143, +136,32,74,20,20,65,134,164,167,65,4,3,119,185,209,120,148,40,45,93, +61,10,11,97,229,234,128,49,43,243,224,155,22,25,140,90,8,186,242,173, +34,133,141,151,170,109,157,67,69,118,80,72,120,48,170,241,97,91,65,186, +163,45,16,72,51,196,34,153,251,168,110,230,239,106,110,145,28,26,11,204, +145,153,133,67,140,72,4,218,228,79,189,234,53,63,244,95,254,240,111,254, +230,175,149,101,249,194,139,87,63,248,193,15,174,172,172,92,185,114,185,40, +10,231,156,117,75,42,98,169,10,224,56,173,15,116,102,74,157,71,230,198, +85,131,193,160,109,91,212,8,74,77,170,113,66,194,98,96,239,156,206,115, +147,41,14,28,130,16,234,66,229,79,62,253,76,136,2,218,188,239,251,190, +63,181,93,10,236,179,194,162,223,222,61,184,87,213,123,47,126,227,179,147, +233,158,68,206,243,188,44,203,55,190,225,29,211,186,26,141,70,113,119,103, +52,26,237,237,237,199,128,139,75,171,148,15,54,54,214,189,247,147,170,121, +195,35,151,198,227,233,206,222,246,210,232,228,133,11,151,127,247,247,254,131, +49,246,220,217,71,215,78,92,216,63,152,190,124,237,165,40,205,197,11,143, +101,182,188,117,235,214,218,218,218,173,219,99,84,106,237,196,202,230,198,238, +193,222,254,99,175,184,184,189,185,113,235,214,157,19,39,47,62,241,228,183, +13,23,150,19,73,37,204,66,207,71,108,145,25,161,241,225,100,99,134,89, +109,107,111,151,165,99,18,195,91,250,122,42,17,211,90,3,170,8,9,141, +208,189,181,25,76,85,122,194,228,99,162,128,249,97,133,148,15,221,98,8, +74,169,20,33,141,49,234,132,153,195,89,153,237,204,68,236,30,47,203,178, +162,80,109,43,85,53,37,34,99,52,0,40,50,227,73,45,34,195,97,9, +8,211,169,111,219,38,185,198,74,153,133,133,165,16,120,119,119,183,170,154, +84,3,200,44,4,74,147,34,142,211,253,93,230,128,192,222,251,19,39,78, +172,14,87,72,113,12,154,153,9,141,68,96,105,145,124,112,89,63,148,243, +243,53,149,109,206,158,63,231,197,33,164,232,149,28,159,211,127,205,70,58, +178,7,72,90,133,56,66,85,53,227,241,244,238,189,189,173,245,221,83,167, +151,90,108,20,9,5,80,84,248,24,187,62,232,115,49,199,100,241,73,55, +122,135,133,205,157,124,126,200,91,65,68,234,156,77,11,40,131,193,232,210, +165,71,138,124,192,177,99,63,101,102,192,14,57,24,99,204,179,197,147,75, +75,201,204,204,179,178,109,219,142,181,2,151,103,26,69,65,231,104,147,49, +134,224,112,230,225,156,255,69,146,164,191,0,166,55,155,130,0,160,208,122, +223,6,246,168,21,71,218,218,62,168,234,24,54,119,111,222,249,242,210,210, +18,135,20,130,164,24,29,16,50,168,40,70,68,82,185,33,3,112,156,41, +121,58,116,70,250,160,54,34,2,178,54,70,68,116,100,9,53,121,55,180, +165,11,110,194,46,10,15,70,75,177,110,1,3,131,111,149,103,5,89,248, +22,73,56,92,96,68,160,132,213,3,18,145,200,40,2,70,61,240,240,99, +51,164,119,136,152,189,116,200,40,13,129,149,82,163,229,211,111,120,243,187, +79,172,150,191,250,171,191,122,242,194,163,95,189,250,194,100,124,240,241,191, +248,243,157,173,141,159,253,217,159,45,104,209,251,250,198,237,155,75,107,163, +211,103,207,52,77,221,134,246,217,47,126,233,137,87,95,110,41,56,9,104, +32,51,84,12,7,24,40,212,65,25,180,218,16,193,180,169,50,202,135,217, +130,59,240,91,119,119,181,31,108,108,110,47,44,46,102,185,158,76,246,23, +23,23,175,223,120,249,222,221,245,233,214,77,155,233,16,218,189,221,237,203, +143,62,178,184,184,232,92,168,198,147,79,125,234,51,167,206,156,60,117,234, +196,214,243,91,121,54,60,177,118,198,251,56,153,86,7,91,59,23,78,172, +157,57,115,238,218,181,151,91,231,21,250,83,167,206,228,166,252,147,79,124, +108,218,212,111,122,227,219,215,86,207,92,123,249,166,201,236,217,179,167,159, +127,225,57,146,188,109,226,153,179,167,174,95,191,222,54,225,181,175,125,237, +250,189,219,215,174,189,248,154,167,158,248,250,115,95,222,216,88,63,177,118, +254,53,207,188,109,180,116,10,13,238,79,246,22,178,21,17,137,49,53,62, +78,14,38,32,166,96,244,3,210,172,169,18,161,91,106,179,180,100,158,231, +49,138,214,134,153,1,36,6,167,148,74,231,116,49,153,192,60,239,78,245, +112,186,99,47,174,75,199,125,43,27,207,58,86,167,75,232,116,223,174,13, +198,104,173,44,72,16,17,239,219,158,143,36,50,176,8,105,149,231,185,49, +228,92,172,166,83,0,114,206,121,159,145,2,68,44,138,82,107,85,215,205, +193,193,129,82,42,69,202,96,70,4,6,0,161,245,40,226,93,179,189,181, +222,76,39,128,18,156,31,21,89,9,121,94,16,72,0,22,4,228,24,81, +2,130,55,202,226,44,83,214,187,140,136,200,18,211,199,9,50,50,163,196, +231,84,178,6,15,144,122,199,13,192,238,221,136,151,84,42,144,12,150,16, +166,227,233,222,246,222,139,47,220,186,122,245,234,226,194,171,73,183,96,201, +3,137,50,193,99,98,220,130,163,9,114,128,212,158,226,136,123,219,71,33, +31,56,250,33,120,1,14,193,17,81,244,172,148,53,58,19,65,5,13,11, +67,42,34,16,64,16,150,136,24,163,71,133,162,80,68,66,240,194,209,39, +94,245,195,169,6,128,64,170,207,82,207,167,80,230,174,27,185,143,87,38, +10,124,145,212,25,46,2,18,131,136,196,80,55,190,109,219,131,189,234,243, +159,251,226,184,126,249,169,167,158,2,69,90,107,32,20,17,69,198,133,216, +49,59,9,49,72,154,121,9,14,151,128,136,34,233,195,20,172,37,68,140, +16,53,8,137,180,227,201,193,237,155,134,195,202,242,201,241,238,132,13,100, +89,102,27,186,115,237,134,18,24,174,46,15,22,205,65,21,64,217,111,105, +54,75,39,242,16,186,92,153,16,244,125,220,30,254,173,251,149,146,34,33, +100,33,22,20,32,215,68,31,90,68,58,255,216,51,127,231,199,126,178,204, +178,106,58,30,21,150,99,184,246,226,11,191,248,47,255,143,127,244,211,63, +63,28,229,79,95,126,117,20,167,90,210,30,51,53,122,231,107,191,203,99, +93,79,38,75,43,163,205,253,123,177,106,75,61,132,6,23,236,90,203,123, +140,208,84,109,145,23,177,145,245,91,155,227,123,213,64,45,124,230,51,31, +191,118,227,214,27,190,237,105,55,221,191,126,227,198,237,59,55,155,166,90, +89,94,92,59,125,33,55,54,132,48,26,157,185,114,229,241,201,184,98,230, +197,43,203,17,252,167,62,251,137,47,124,225,11,139,43,171,143,92,124,98, +124,80,29,28,28,148,195,242,242,163,23,235,131,237,103,159,125,246,226,165, +87,156,57,115,110,220,120,215,250,231,190,244,217,241,116,255,149,79,61,109, +179,242,198,205,123,131,193,104,180,56,188,121,251,133,189,189,157,55,189,246, +61,130,205,250,250,237,205,205,205,39,30,127,213,254,206,254,214,198,250,169, +19,11,91,235,183,190,246,213,231,46,63,246,202,183,188,245,187,178,114,185, +110,131,70,163,82,211,141,153,175,195,115,101,230,253,60,156,15,46,29,122, +90,51,237,155,162,210,74,169,193,160,244,6,181,182,192,173,111,197,104,29, +129,137,72,161,62,86,203,212,91,136,243,214,6,28,198,245,190,165,105,114, +216,63,39,237,235,214,57,68,20,238,138,21,251,219,77,6,97,136,174,110, +34,34,166,114,182,24,58,122,172,114,144,133,232,34,251,182,237,64,206,194, +24,131,44,45,45,109,111,111,79,167,211,36,49,83,24,158,136,20,89,99, +12,64,36,136,152,176,162,18,173,54,153,213,203,75,86,32,247,78,56,162, +247,130,20,144,188,240,33,33,202,124,38,129,40,235,39,110,63,119,153,153, +50,61,255,144,115,66,135,251,65,236,45,71,17,113,161,53,166,208,186,107, +27,130,64,163,133,114,56,202,254,253,175,255,206,245,91,47,62,245,244,165, +98,128,72,90,152,20,73,106,10,220,143,29,206,216,73,137,40,73,4,153, +21,156,29,187,208,253,155,214,154,37,138,36,42,233,224,218,16,35,6,31, +207,159,41,66,128,224,121,134,93,98,1,47,210,69,232,149,50,73,188,50, +91,66,205,204,169,254,119,70,216,39,9,171,204,51,88,73,63,68,135,23, +22,211,243,91,244,131,0,192,226,128,140,86,162,2,7,99,120,121,105,116, +112,48,121,241,197,47,215,126,251,209,71,31,85,214,196,40,33,10,40,173, +117,12,49,146,74,8,3,0,64,65,64,84,152,48,138,93,101,203,12,253, +35,4,71,40,224,187,36,154,81,152,216,216,203,213,133,253,221,221,253,201, +88,103,54,87,198,57,135,77,157,45,13,219,111,145,223,80,140,98,144,8, +210,83,63,41,133,164,232,97,198,246,195,60,223,217,0,122,47,164,148,65, +138,145,17,0,152,134,151,31,123,29,10,151,133,85,40,194,238,85,79,191, +145,105,248,43,191,246,175,199,227,241,247,190,239,187,15,14,246,148,82,239, +127,255,7,111,223,190,187,182,182,86,168,34,167,162,218,171,86,244,73,99, +76,51,118,80,1,24,109,22,114,86,236,188,32,233,216,68,35,197,218,112, +49,76,162,198,112,229,21,23,174,60,114,238,99,31,254,109,84,116,233,210, +197,115,103,31,209,72,83,24,46,175,172,109,108,108,237,108,141,239,238,84, +171,43,39,242,188,220,222,222,38,158,190,226,21,143,93,187,126,117,111,111, +111,35,223,26,141,78,156,59,119,129,52,108,174,223,118,245,129,48,62,249, +202,103,182,247,15,246,38,213,242,194,226,185,243,167,70,19,185,125,247,222, +226,210,217,243,103,206,55,77,115,243,198,245,27,183,111,188,254,245,175,171, +234,58,132,201,193,193,254,104,52,44,50,243,242,157,91,209,59,16,251,217, +191,252,244,147,175,124,205,59,223,249,62,80,101,4,108,163,211,104,57,118, +46,103,10,169,195,156,48,98,72,30,68,202,160,207,62,1,236,9,141,210, +232,50,71,102,80,138,234,186,73,118,21,204,86,141,247,33,10,12,243,60, +70,38,82,169,86,10,0,148,210,204,66,164,146,33,145,102,29,118,72,172, +111,105,142,0,204,9,83,72,82,47,53,225,214,100,156,11,49,198,228,244, +145,2,165,180,54,68,202,86,85,149,64,97,206,185,60,47,179,204,90,75, +9,41,98,140,1,137,74,169,212,166,160,40,138,102,234,19,95,38,118,89, +206,68,90,135,109,240,77,83,197,80,53,190,17,17,4,8,94,218,202,213, +166,13,193,138,64,211,178,119,216,212,94,20,35,178,196,182,159,166,253,90, +197,68,170,51,23,71,152,59,224,8,47,222,220,127,143,11,163,116,188,210, +80,87,169,103,5,2,176,15,238,238,221,219,47,191,252,226,181,235,223,216, +221,219,104,155,41,161,97,102,173,68,145,87,132,34,93,122,68,102,91,23, +196,237,194,14,61,89,75,7,4,123,88,141,7,115,140,220,53,235,16,129, +24,197,187,40,2,129,149,11,177,109,99,12,233,18,81,128,69,60,51,33, +162,112,59,11,41,42,0,207,204,140,221,67,37,31,19,59,248,241,113,16, +217,161,101,202,135,248,193,121,177,72,170,163,171,19,145,253,253,221,141,205, +245,23,94,120,225,133,23,191,48,28,45,86,85,149,197,12,84,16,165,141, +205,13,131,32,216,164,201,59,130,6,233,44,199,46,59,122,104,229,201,204, +196,182,202,10,146,71,166,225,96,233,177,11,226,93,155,13,204,202,98,84, +172,70,154,138,98,16,86,237,255,207,220,155,197,72,154,101,231,97,231,156, +187,252,91,68,70,238,153,85,213,85,213,123,79,47,179,15,103,108,138,148, +56,36,8,89,148,12,139,79,134,95,40,8,54,95,104,8,48,188,0,134, +12,209,122,48,36,129,222,0,251,201,128,13,195,122,48,252,224,69,128,109, +24,54,100,81,163,25,146,210,12,103,56,75,79,247,204,244,86,123,85,86, +110,177,253,219,93,206,241,195,141,136,140,204,170,25,82,54,96,242,162,80, +136,200,140,140,184,255,141,123,207,127,150,239,124,31,170,214,245,173,165,150, +219,141,127,78,14,24,6,1,22,3,160,48,209,5,49,131,48,193,243,227, +219,203,37,191,213,86,1,0,137,145,72,27,50,137,186,74,217,68,55,137, +193,51,81,38,196,62,170,186,111,51,107,91,231,127,229,47,253,250,231,63, +247,198,239,252,221,191,243,187,223,248,253,209,112,32,145,175,127,235,219,255, +248,119,191,118,231,147,59,255,214,111,253,141,27,47,222,216,30,238,183,161, +33,161,140,240,127,254,223,255,151,95,255,43,191,254,248,241,172,238,218,225, +104,208,134,142,192,76,158,206,75,53,248,7,255,211,63,24,110,202,43,175, +189,158,87,229,27,111,191,51,159,207,143,158,62,62,59,57,221,219,217,186, +241,246,219,39,231,143,238,63,122,248,194,237,23,15,95,56,124,242,228,40, +142,227,198,104,180,155,95,59,25,199,143,63,254,232,243,95,252,23,110,220, +184,25,163,153,140,39,141,27,223,216,219,121,247,222,143,181,214,125,23,212, +32,187,118,253,5,8,62,56,125,122,54,249,212,155,239,108,111,239,223,123, +112,215,104,101,12,222,188,241,66,59,247,130,181,182,120,126,126,254,206,155, +111,205,102,99,225,254,198,181,131,127,242,245,223,125,229,149,183,127,254,207, +253,42,234,42,8,250,224,170,170,232,218,86,137,149,165,132,0,162,2,224, +165,192,49,174,176,189,235,135,139,153,147,190,200,106,19,166,232,210,90,221, +182,160,20,102,89,230,218,133,152,153,34,157,160,178,137,214,23,0,22,126, +146,82,235,117,146,245,163,253,207,181,67,86,223,251,106,231,51,243,82,219, +27,212,178,37,99,193,188,186,136,129,69,4,64,105,173,52,1,41,147,89, +6,232,93,24,12,44,174,114,79,185,101,134,249,188,33,210,190,239,147,235, +151,176,41,0,11,113,113,84,20,33,54,93,43,34,130,16,3,4,15,93, +203,109,230,186,30,250,224,230,51,215,117,208,212,30,8,99,236,225,242,165, +174,174,118,145,249,90,59,219,139,125,252,140,130,220,98,117,240,234,59,164, +191,50,20,99,140,9,98,102,44,53,205,244,135,239,253,248,59,127,244,173, +186,126,44,220,251,174,21,241,54,49,108,81,175,52,147,202,150,118,124,241, +161,201,249,10,113,209,246,191,90,186,245,89,61,59,140,49,177,15,68,228, +93,16,198,24,165,235,122,68,213,56,213,54,177,158,7,239,32,120,96,14, +44,1,32,130,152,213,27,38,72,245,226,59,33,228,120,209,75,147,32,25, +204,188,146,140,88,223,46,178,72,196,92,224,189,87,111,168,180,119,46,144, +16,0,159,158,60,121,239,189,239,220,189,243,94,223,157,103,121,57,159,207, +157,11,58,47,80,71,36,45,128,198,152,37,98,99,9,216,3,136,75,240, +209,98,109,215,130,123,68,2,33,239,162,32,116,194,185,210,129,195,36,116, +162,139,202,9,161,117,1,10,157,11,131,70,65,80,248,199,134,166,207,12, +37,0,81,76,144,164,89,23,8,188,198,231,37,58,174,238,129,171,131,85, +114,72,129,25,56,36,20,119,20,1,22,165,76,140,209,75,96,144,186,235, +243,220,246,33,14,246,94,254,183,255,214,223,109,235,105,63,63,127,255,221, +63,186,251,224,193,103,62,251,105,224,248,127,252,238,255,249,213,175,126,53, +132,240,206,59,239,104,212,181,175,255,229,191,250,175,48,193,150,186,134,110, +124,118,239,124,107,107,107,50,153,124,237,31,126,163,44,75,177,240,75,127, +241,175,108,237,236,105,147,233,193,214,32,27,221,122,253,237,174,110,190,247, +221,63,250,240,31,253,195,95,254,234,175,242,181,27,109,219,28,61,124,176, +185,181,89,150,101,140,254,209,195,199,17,219,178,44,175,93,187,214,54,221, +116,58,87,26,14,15,15,125,59,189,119,247,227,23,111,190,62,218,218,195, +194,158,77,103,161,235,99,104,54,134,219,131,106,243,241,227,199,163,205,13, +82,225,187,223,249,225,238,206,193,214,230,126,221,159,124,243,155,127,248,249, +207,126,190,105,231,79,30,223,47,50,253,181,175,125,235,141,215,62,245,217, +47,126,149,76,53,107,107,155,23,54,203,219,186,177,164,242,204,198,37,176, +108,181,128,171,147,184,238,151,172,158,210,178,251,83,150,112,52,68,12,97, +9,67,1,229,156,3,73,168,22,146,101,173,3,150,69,12,88,130,165,86, +113,30,252,127,51,124,43,47,47,77,79,47,139,24,73,79,36,83,10,186, +206,177,4,17,97,142,72,42,33,236,186,206,37,99,140,160,210,31,175,40, +76,250,222,166,254,253,173,45,219,99,49,153,76,146,181,190,52,105,68,32, +244,28,4,36,132,16,122,16,81,81,116,4,9,12,189,11,117,235,186,22, +231,77,20,17,23,28,129,150,181,216,118,53,245,100,163,175,248,44,136,24, +99,191,254,116,245,122,122,198,26,166,65,220,166,107,97,241,0,177,110,166, +231,103,179,217,180,241,126,198,34,93,223,104,201,149,202,192,66,224,136,66, +137,4,212,24,67,23,212,0,0,203,44,198,154,29,185,234,74,92,25,169, +224,139,136,206,57,96,68,12,125,223,27,147,249,64,206,199,174,131,174,21, +239,36,70,97,22,64,136,178,228,68,144,85,29,121,113,105,75,23,143,66, +96,145,152,252,241,37,63,237,197,100,150,15,210,235,23,169,19,144,5,255, +66,15,157,2,29,250,208,54,243,122,218,76,198,243,217,100,74,24,153,185, +153,215,177,144,66,27,77,26,146,86,39,37,34,92,1,32,2,2,66,0, +78,221,118,145,87,142,240,234,90,17,17,9,16,88,138,60,143,160,193,117, +25,26,67,58,136,246,220,218,170,240,194,78,129,115,14,80,52,34,176,252, +12,131,245,252,17,152,235,174,155,181,232,2,0,136,213,56,44,168,202,65, +63,255,123,95,255,106,214,239,13,148,82,163,2,192,194,16,83,232,64,192, +168,65,41,140,236,67,136,229,112,208,52,77,36,102,129,8,27,195,189,97, +181,49,25,149,175,238,236,110,255,206,127,244,183,63,255,153,183,63,253,185, +183,255,217,119,191,245,63,252,143,255,61,123,252,221,127,244,143,127,243,55, +127,19,21,62,57,121,244,159,254,231,255,201,237,27,111,252,226,159,251,243, +95,255,218,55,126,229,171,95,237,251,150,3,31,29,63,249,141,191,254,27, +47,191,249,206,15,222,123,127,127,115,63,219,60,40,80,63,124,242,100,99, +80,125,249,23,126,245,199,223,251,198,209,221,167,247,31,62,253,220,103,191, +184,189,179,215,247,253,248,120,210,180,245,181,221,107,243,22,135,195,97,140, +177,105,186,253,253,23,72,197,89,115,252,238,55,191,153,101,230,203,95,254, +242,180,129,7,143,30,34,101,215,14,246,63,250,201,29,109,242,186,233,246, +246,246,148,134,111,253,225,183,14,14,119,62,245,250,219,15,238,159,190,247, +225,239,191,243,206,231,66,8,119,239,222,37,116,119,63,185,243,233,119,222, +254,210,23,255,197,198,109,0,82,94,65,231,58,241,144,155,82,130,239,154, +153,210,213,149,243,200,139,6,249,11,93,158,245,8,108,5,105,192,181,236, +94,138,111,0,23,173,83,90,103,49,70,165,53,200,66,230,48,165,255,18, +36,46,89,27,89,162,85,214,67,212,255,23,99,229,51,165,199,58,193,220, +202,129,109,219,182,115,46,132,80,150,37,68,69,74,33,194,124,230,153,195, +246,142,233,186,38,203,50,239,123,239,227,160,218,152,215,179,60,207,235,186, +173,6,85,219,182,68,90,144,3,195,249,108,22,0,72,27,239,83,90,106, +81,206,44,85,150,129,81,30,89,16,17,25,125,224,224,121,22,195,16,208, +179,56,137,212,54,62,250,214,115,228,168,34,118,34,194,11,245,28,130,165, +134,161,224,197,145,198,117,63,14,204,218,53,174,114,91,40,254,130,153,122, +125,199,107,44,91,223,105,227,129,16,69,133,168,66,116,132,189,162,60,70, +223,52,77,129,232,156,50,153,6,0,34,10,68,214,90,6,193,84,110,16, +33,173,16,177,142,110,67,103,179,208,23,1,197,7,147,217,230,241,137,39, +216,186,113,173,105,154,60,207,121,9,52,141,49,26,107,251,31,125,144,23, +3,111,116,219,78,204,70,142,34,202,104,142,10,2,178,227,224,251,16,152, +5,189,184,16,93,224,96,168,88,93,238,186,143,198,114,201,101,19,17,9, +2,0,28,215,209,197,107,149,141,197,118,73,55,231,11,36,167,145,140,161, +69,98,102,238,250,62,72,35,228,57,170,172,247,214,7,223,140,237,216,81, +36,86,182,44,6,85,53,156,223,218,41,171,74,91,227,133,25,215,160,243, +90,82,15,26,154,37,88,20,17,172,241,20,181,38,23,102,64,220,35,42, +20,18,47,220,130,50,193,245,70,107,8,94,52,136,128,19,79,132,140,33, +56,109,140,137,208,34,137,128,141,226,153,156,10,168,100,17,215,11,136,66, +66,80,192,145,239,63,166,50,87,59,37,150,89,20,14,109,143,46,232,217, +60,20,166,4,53,47,136,180,130,15,159,100,163,225,124,183,192,200,101,212, +206,96,19,92,1,106,40,250,233,163,199,195,107,123,51,138,24,181,205,165, +119,243,204,24,14,192,76,1,35,26,240,126,176,13,17,208,106,203,211,135, +31,130,205,16,95,48,44,58,118,96,106,155,227,120,138,187,135,159,253,173, +127,231,183,255,179,223,249,91,95,250,220,103,222,120,229,205,31,126,255,123, +189,159,143,107,120,56,123,84,14,170,106,180,241,219,127,243,111,255,224,7, +63,104,186,243,195,23,54,155,56,235,196,69,131,200,246,116,50,223,153,181, +89,94,238,239,239,79,143,158,22,202,236,100,89,53,168,198,125,179,149,111, +125,247,221,175,191,243,149,95,196,237,193,199,179,7,174,107,118,55,110,94, +223,191,174,235,230,135,223,255,206,238,246,205,221,157,151,128,112,62,31,183, +221,108,54,191,211,203,241,173,87,222,122,52,118,179,89,191,183,183,111,13, +63,190,247,222,241,163,167,95,250,242,95,6,53,173,219,211,123,247,238,111, +143,246,15,247,94,124,112,255,116,50,123,180,181,115,19,129,79,30,126,2, +245,121,221,186,119,222,250,249,87,223,249,114,173,43,165,125,31,67,140,76, +160,132,99,64,70,131,162,53,112,147,101,69,148,160,180,86,12,44,137,54, +8,80,210,193,76,52,52,41,149,75,136,0,9,160,186,216,131,4,0,9, +79,25,72,0,80,148,14,2,86,43,0,14,177,39,34,231,33,178,32,162, +210,70,68,148,166,44,47,156,115,28,195,179,12,108,204,12,75,180,252,186, +139,147,252,196,245,112,240,226,200,175,87,249,4,180,49,102,48,168,66,16, +17,113,206,13,135,3,68,80,74,157,159,79,69,100,99,56,234,58,169,107, +159,122,185,242,220,34,250,186,174,7,195,50,25,227,212,125,169,181,14,158, +189,139,171,200,156,153,147,8,98,82,218,69,68,239,253,130,63,48,157,191, +53,20,181,164,182,246,11,173,72,140,236,147,131,147,94,2,16,23,103,123, +117,134,113,245,231,233,13,159,175,171,171,144,68,86,190,247,90,201,9,80, +18,127,122,76,149,220,62,70,159,148,52,98,140,206,57,109,237,162,240,68, +156,110,68,74,93,42,176,164,185,148,214,106,6,35,24,155,142,4,180,205, +148,224,238,238,222,147,208,97,166,148,130,224,130,85,90,33,249,190,139,81, +38,143,78,138,145,231,162,0,100,116,49,74,144,200,209,51,243,34,185,198, +49,58,199,129,25,64,91,173,93,191,46,86,121,97,248,0,105,237,41,203, +82,133,59,117,82,175,155,182,245,52,223,202,240,93,152,66,17,184,204,247, +157,198,105,133,115,140,153,162,98,119,179,220,218,50,218,98,19,218,54,88, +51,176,166,82,90,131,112,2,195,136,136,90,182,241,173,92,221,244,141,91, +109,37,146,8,64,4,224,196,244,41,72,64,128,32,74,161,82,169,175,11, +100,73,58,143,49,6,20,20,96,64,78,245,146,229,230,94,196,74,106,89, +36,97,102,239,253,46,216,110,218,119,227,58,234,133,107,161,4,21,96,147, +83,232,123,41,7,109,219,98,211,108,108,111,133,0,232,120,174,60,129,33, +34,29,32,214,109,152,53,56,114,101,101,149,214,224,29,5,54,8,154,44, +139,242,128,40,76,196,92,143,133,76,149,219,102,114,110,139,13,91,49,18, +10,21,129,251,232,98,150,15,186,206,221,190,113,235,175,253,198,95,255,239, +254,155,255,250,75,239,124,250,229,91,47,85,121,17,48,126,244,222,7,131, +141,225,222,104,71,69,185,126,253,240,235,95,251,39,135,135,215,11,165,192, +17,79,27,12,113,215,84,215,7,27,247,127,252,225,252,228,252,96,103,175, +208,249,39,247,239,205,98,48,155,131,221,253,221,248,189,224,207,106,177,211, +45,155,111,221,184,62,155,197,227,167,39,170,63,106,186,238,179,159,255,69, +239,240,228,252,81,85,85,195,97,53,157,26,132,60,207,6,0,112,251,197, +91,147,233,241,163,227,163,167,79,78,190,240,249,175,8,118,103,39,243,114, +0,132,92,22,163,190,239,129,230,79,31,63,126,253,173,87,167,103,167,71, +71,79,51,147,191,252,198,235,183,94,126,211,152,172,238,91,208,139,254,173, +213,78,91,199,186,71,78,114,210,49,157,172,245,83,124,197,6,173,72,30, +225,242,64,4,88,18,158,175,251,110,41,0,74,209,97,194,5,167,118,175, +245,126,249,245,36,18,174,113,211,93,49,124,207,110,230,103,135,6,128,164, +55,155,164,39,186,174,111,219,118,123,123,51,53,162,141,199,83,99,180,54, +198,218,188,105,26,99,56,207,139,44,147,228,96,15,7,35,68,200,172,178, +22,131,151,190,119,171,188,230,197,185,74,15,128,219,174,134,181,10,247,74, +0,123,53,120,153,59,224,149,66,23,38,195,199,0,148,112,177,151,233,25, +146,69,39,68,100,233,47,14,249,218,245,198,53,28,223,250,175,98,4,36, +159,238,66,73,92,66,33,32,44,38,224,189,119,206,37,153,81,209,34,34, +105,182,184,228,53,185,192,169,116,158,35,230,153,113,220,137,143,205,172,62, +126,124,68,198,100,251,27,133,177,190,233,218,227,83,80,70,4,219,241,36, +211,102,152,151,121,86,181,34,22,144,93,20,89,124,217,137,223,116,177,110, +66,16,33,72,128,144,138,45,8,137,8,111,129,215,65,88,180,39,36,59, +8,178,120,10,34,224,227,133,210,227,234,170,17,81,214,184,127,47,237,194, +203,79,87,223,87,214,4,175,32,20,70,115,235,159,198,129,202,203,205,205, +236,214,174,144,65,84,64,154,132,133,16,0,212,69,39,16,46,145,70,0, +64,0,200,12,6,9,65,34,19,9,69,17,2,2,22,4,66,33,96,148, +213,151,146,114,131,0,198,32,9,41,18,4,33,97,69,169,73,231,130,180, +57,181,172,167,152,200,123,63,222,46,152,51,32,204,179,76,27,227,57,118, +93,215,247,253,174,216,174,238,202,237,172,141,236,123,200,166,126,126,54,133, +198,229,175,28,232,136,253,164,235,143,39,202,201,86,35,195,121,152,76,155, +44,19,223,77,208,213,94,68,21,27,0,90,33,107,13,56,240,211,243,99, +71,182,220,24,118,143,143,104,196,88,206,176,204,42,151,157,60,57,122,253, +181,87,238,124,248,176,204,50,149,183,155,94,255,135,191,245,239,253,189,255, +242,63,22,23,140,214,181,239,40,183,7,215,14,127,241,43,95,41,201,212, +212,127,230,51,159,113,93,183,81,86,227,163,243,145,29,252,133,95,249,243, +239,220,122,227,227,255,251,247,14,242,236,69,93,205,30,141,143,155,222,178, +236,238,238,232,44,127,56,251,200,168,124,83,149,187,170,58,57,59,127,60, +126,0,182,28,110,141,60,27,155,97,27,206,66,219,238,108,221,168,170,161, +11,147,201,236,233,214,230,205,235,47,188,4,168,31,62,186,75,36,33,240, +238,254,117,22,61,155,156,94,191,126,237,123,223,251,103,89,102,247,15,246, +198,227,147,7,247,127,242,233,207,190,118,126,244,244,147,15,62,68,178,175, +188,249,217,253,195,91,38,27,244,62,104,82,156,170,19,72,44,188,50,33, +72,184,60,182,169,53,2,18,44,191,239,251,204,86,112,217,207,184,122,240, +47,239,57,17,64,74,72,47,205,49,166,222,38,0,88,168,6,95,238,97, +71,68,162,213,237,156,214,127,126,101,147,175,30,243,26,142,26,150,230,114, +221,28,167,161,69,164,105,154,132,179,205,243,172,235,250,36,33,150,188,155, +178,44,136,72,107,90,249,59,9,85,99,141,238,90,131,8,77,211,37,229, +13,165,140,247,49,193,95,19,102,101,17,249,47,62,62,118,125,135,192,171, +105,61,151,91,120,53,221,85,63,192,210,34,198,68,61,135,152,96,226,43, +60,202,162,108,186,66,45,202,154,153,131,148,119,127,102,32,34,169,196,170, +155,220,8,5,66,194,36,188,168,70,197,21,11,221,229,85,94,191,153,164, +11,201,243,28,90,23,133,123,231,130,247,153,46,138,209,176,216,24,116,81, +0,98,232,250,208,245,65,139,66,165,146,202,114,110,152,100,220,117,45,247, +209,177,201,43,137,128,66,192,33,68,23,189,99,22,68,69,68,16,19,21, +251,250,58,172,207,225,114,132,155,158,49,162,190,16,36,92,47,171,36,86, +18,17,129,165,78,235,197,21,45,65,145,235,223,130,212,173,126,112,158,131, +49,3,23,171,106,166,125,152,117,197,189,167,217,23,62,227,3,32,122,94, +166,17,82,70,143,150,45,213,139,21,6,64,64,97,70,110,1,24,57,34, +246,10,124,226,229,36,1,132,8,178,76,47,138,44,139,36,200,73,189,53, +32,115,47,128,202,12,80,132,132,22,69,227,203,123,151,136,194,163,83,14, +145,162,4,165,64,107,50,186,180,186,178,134,123,223,247,189,110,59,34,50, +27,85,199,161,173,155,50,34,0,128,11,161,110,253,188,201,208,100,69,30, +152,235,186,118,77,68,233,114,226,192,192,204,46,122,31,122,96,151,155,45, +131,132,64,42,96,244,28,1,37,242,102,81,105,23,75,173,159,220,187,43, +157,31,84,246,244,209,93,110,102,14,240,175,253,235,255,70,55,107,139,162, +176,85,81,109,141,254,224,15,126,239,107,223,248,189,175,124,246,11,78,7, +171,77,223,249,143,239,220,187,251,201,189,215,222,124,235,218,173,151,78,166, +243,221,237,205,218,133,71,15,30,135,64,27,27,155,72,82,159,77,250,241, +169,231,238,165,151,95,219,24,237,158,156,143,207,206,167,166,42,14,246,71, +42,55,223,252,167,223,216,24,237,151,229,110,158,111,247,125,255,240,241,199, +85,105,138,108,243,165,155,111,205,235,206,123,63,168,114,173,233,209,195,135, +219,91,59,157,227,107,215,174,253,248,71,223,55,186,120,249,165,215,207,39, +143,238,221,249,248,246,237,219,71,199,119,63,249,225,39,131,209,246,75,175, +191,115,120,243,53,207,20,188,104,82,18,124,66,98,173,159,20,120,14,122, +44,241,33,131,60,195,178,177,26,63,149,57,28,81,68,18,123,177,196,133, +39,145,220,36,89,86,8,87,46,69,8,129,50,195,34,128,0,132,12,194, +194,0,64,138,56,94,178,107,207,30,240,159,241,20,146,175,151,101,25,145, +238,186,174,235,250,196,250,9,75,116,181,214,58,248,168,148,106,234,110,99, +84,225,18,48,209,182,9,175,184,56,48,222,251,193,160,64,44,102,179,233, +42,174,94,77,11,0,34,251,190,111,173,70,129,40,23,182,239,167,166,174, +87,174,95,250,243,244,87,2,162,212,58,44,99,145,165,146,101,139,194,179, +215,73,114,225,120,174,88,173,16,80,145,138,34,73,78,149,208,42,52,138, +50,107,74,92,48,238,165,10,47,199,37,219,143,48,164,127,144,200,51,82, +244,45,48,235,91,11,200,198,20,219,35,9,17,203,172,200,114,159,235,160, +40,0,192,70,85,21,153,85,90,147,194,16,8,113,20,58,32,19,231,141, +118,109,215,181,198,228,74,25,16,36,34,157,36,25,152,133,133,37,42,20, +212,34,193,47,192,53,12,11,235,32,130,144,250,214,210,207,57,37,235,0, +4,21,132,224,151,155,104,229,114,211,106,173,0,8,144,241,2,215,65,43, +251,9,151,13,95,172,236,120,72,89,153,133,162,216,26,108,228,229,32,43, +43,204,243,16,107,10,1,64,201,162,226,41,233,238,220,63,19,233,164,15, +159,181,13,166,15,137,11,57,189,5,57,212,69,200,114,249,152,1,128,104, +32,97,140,8,65,211,8,8,17,212,34,71,188,56,30,44,44,68,100,173, +149,183,110,106,22,138,162,1,69,196,9,71,133,96,148,117,172,50,172,11, +18,163,236,173,157,150,20,186,220,152,124,150,145,19,80,251,219,229,238,78, +38,212,6,39,133,37,26,18,232,130,130,244,53,68,238,109,229,81,107,2, +205,108,33,235,125,239,219,224,50,41,247,15,14,94,126,101,102,182,93,23, +92,229,179,162,126,33,145,245,0,0,32,0,73,68,65,84,146,16,108,169, +78,220,201,137,156,85,47,110,231,197,214,97,86,86,182,240,125,0,196,160, +248,175,254,171,255,218,55,95,184,241,127,253,111,255,107,86,228,204,50,28, +140,234,174,255,210,151,191,242,107,191,246,151,73,25,231,220,143,223,125,112, +240,198,237,106,247,58,71,173,64,205,198,99,157,155,98,115,116,246,195,31, +69,176,62,203,162,209,215,15,14,109,166,89,218,31,126,239,143,234,182,251, +133,191,240,229,204,110,30,61,61,115,49,108,142,134,125,55,51,84,212,93, +212,10,202,170,200,115,251,253,239,127,191,42,55,246,246,14,24,228,227,15, +63,24,143,199,111,191,245,217,122,58,121,242,232,222,206,238,232,228,244,233, +143,222,127,247,218,232,133,79,127,238,203,195,221,27,93,64,38,13,178,160, +33,89,5,179,171,111,112,97,242,116,10,10,99,223,247,233,216,166,88,240, +130,51,224,114,129,245,202,211,139,204,18,51,203,2,213,31,60,35,0,162, +66,84,204,126,5,134,93,247,233,226,82,60,7,36,117,67,49,34,18,226, +242,236,95,205,235,61,55,208,188,242,24,0,116,8,33,229,245,172,181,93, +215,17,81,215,117,68,131,4,177,9,33,0,130,49,0,0,193,75,215,55, +0,92,20,153,15,81,27,50,6,1,50,34,236,123,231,61,135,224,146,19, +183,148,34,83,0,32,49,134,197,112,70,45,176,196,235,109,119,87,86,231, +202,73,88,58,107,201,173,19,14,205,50,176,93,128,85,146,43,14,98,215, +223,103,21,201,50,48,44,211,121,23,92,126,2,2,6,32,96,210,205,96, +215,182,77,61,159,186,174,73,46,94,92,142,21,139,201,133,253,189,236,0, +50,42,64,242,44,168,117,0,16,145,178,44,230,190,179,96,92,240,74,41, +101,116,16,241,16,65,99,140,145,13,178,15,189,194,168,21,35,106,147,69, +102,142,11,130,47,34,34,21,37,120,225,192,144,88,222,151,190,24,178,200, +69,10,12,152,17,64,36,117,192,37,135,87,68,132,84,88,86,126,136,89, +32,245,118,94,184,192,130,168,0,25,228,146,0,243,250,174,77,35,105,119, +91,70,37,44,132,17,36,10,35,7,178,40,24,0,24,1,211,141,27,68, +16,148,66,89,109,65,22,38,92,32,105,128,25,24,17,25,86,120,146,133, +253,74,150,247,2,77,188,152,64,0,192,24,35,35,249,0,34,18,73,244, +197,222,0,68,4,102,129,165,70,104,12,194,129,83,140,76,136,154,20,68, +1,145,8,152,15,134,141,4,215,7,165,84,67,24,139,108,134,40,46,32, +32,105,197,72,45,64,31,53,27,136,68,209,123,67,210,185,206,150,85,208, +228,16,5,201,59,31,35,136,206,178,173,13,175,165,203,40,102,154,20,97, +23,92,156,118,221,216,55,157,150,172,170,180,25,218,218,251,131,189,131,179, +206,205,3,107,178,182,44,34,198,169,239,95,120,249,229,223,252,55,127,235, +230,173,215,207,207,207,3,71,210,102,180,181,117,218,212,12,253,108,54,131, +65,57,60,56,236,68,157,143,103,3,157,109,108,142,108,65,211,118,250,244, +233,147,235,55,63,83,237,30,116,18,39,181,15,231,231,165,238,198,167,247, +110,221,250,116,219,226,241,233,61,84,230,240,224,150,68,247,131,239,127,123, +103,107,123,48,218,200,45,180,205,236,253,31,190,171,80,31,30,30,246,190, +107,250,122,60,57,121,241,214,27,193,117,103,227,135,34,168,181,250,224,39, +239,103,102,255,211,95,250,243,131,209,118,23,80,72,21,89,217,204,166,17, +196,106,189,160,197,145,164,190,148,50,122,73,91,60,37,248,82,10,72,0, +32,74,232,186,174,168,158,143,175,92,11,182,46,89,61,0,18,97,165,20, +161,22,193,196,70,154,12,66,98,160,130,165,157,93,88,213,176,80,134,91, +29,67,124,166,152,251,92,119,239,202,100,174,90,61,102,118,206,55,77,55, +28,14,83,6,49,189,40,203,178,190,239,181,166,24,165,235,162,214,70,4, +148,82,214,26,99,117,215,57,102,238,122,241,62,2,128,177,228,189,179,214, +116,221,69,94,111,125,54,222,247,44,81,0,83,112,26,99,84,202,200,165, +241,156,185,38,144,132,72,100,22,150,16,99,36,232,189,247,62,244,75,184, +242,202,198,211,149,191,93,172,49,93,90,244,139,7,162,16,153,52,2,80, +112,225,248,233,227,179,243,199,109,55,94,209,82,93,177,113,180,212,226,185, +2,65,34,165,8,48,198,36,4,70,93,12,130,4,68,70,144,64,73,132, +164,250,138,136,74,41,22,234,72,245,190,35,161,84,132,69,69,157,243,209, +35,128,117,46,52,179,233,172,238,2,11,115,136,146,168,120,224,82,48,187, +172,90,172,67,165,152,47,230,25,33,46,112,121,66,0,72,164,21,25,34, +34,109,16,212,18,198,163,96,85,225,149,165,25,189,60,34,70,17,209,74, +9,97,36,118,36,86,19,25,141,160,82,73,61,157,138,196,35,131,66,73, +144,46,101,97,86,12,242,49,138,213,138,65,0,212,10,46,190,236,96,75, +95,195,218,71,10,0,0,161,32,33,114,100,98,138,156,178,58,176,96,65, +189,112,31,86,81,121,52,36,32,12,192,75,59,155,188,115,35,72,194,37, +96,206,68,128,44,24,8,37,196,82,20,35,112,20,23,122,32,180,198,176, +103,10,33,179,218,204,219,167,247,30,30,94,191,21,10,180,42,203,21,217, +168,60,18,150,182,55,166,117,115,200,132,185,233,58,70,239,187,246,52,132, +166,208,153,70,197,77,175,69,85,131,205,249,148,217,96,105,11,67,89,211, +117,109,236,109,134,219,219,219,143,62,254,232,225,201,172,44,55,134,69,230, +189,111,187,0,162,9,121,52,28,150,253,168,63,171,123,52,7,163,93,43, +20,154,105,211,182,211,201,145,205,179,219,47,189,222,184,48,174,199,8,118, +115,88,181,179,227,241,228,225,205,55,222,110,27,61,26,221,206,114,62,159, +60,126,122,244,201,198,104,240,198,171,95,57,239,79,143,31,61,173,50,109, +109,190,57,218,11,129,61,244,243,246,76,43,59,26,14,31,63,185,227,67, +179,49,42,190,253,135,223,188,113,253,197,175,124,233,47,114,86,118,125,143, +74,19,64,116,189,34,210,72,33,44,114,181,171,243,187,186,193,135,24,83, +166,107,85,220,112,46,246,125,159,151,178,60,170,235,65,216,79,213,141,73, +161,113,234,98,144,4,99,89,254,118,221,174,93,148,58,9,121,41,216,7, +8,168,149,0,120,142,235,239,190,110,242,214,189,212,245,207,189,50,116,98, +187,75,246,142,153,67,8,85,85,133,16,172,53,179,153,27,12,54,157,11, +93,219,91,155,181,109,203,226,173,45,66,8,69,145,137,136,214,86,41,175, +181,6,192,241,120,130,36,201,66,167,14,249,197,53,136,36,111,22,46,236, +96,178,229,250,89,171,183,122,180,172,61,167,83,29,125,232,83,111,239,233, +201,39,77,211,76,167,211,182,171,195,82,208,82,36,94,201,223,93,120,212, +242,28,228,10,34,34,43,22,143,10,68,80,162,212,243,201,233,211,187,125, +119,182,238,199,165,255,105,161,157,20,112,89,202,88,165,54,136,72,34,43, +1,18,80,2,202,232,62,196,16,188,177,170,70,86,86,75,98,63,70,64, +4,133,28,33,90,160,192,68,164,9,77,39,18,99,60,27,143,251,94,29, +238,13,31,62,124,248,225,7,119,158,158,156,199,24,81,75,224,62,4,167, +117,190,110,236,86,117,219,37,6,229,130,130,98,105,245,24,129,148,50,214, +218,34,31,86,85,85,150,149,181,185,68,34,18,96,125,81,50,73,87,122, +121,55,172,118,137,101,228,16,67,8,20,163,2,84,130,34,210,7,95,234, +66,88,39,54,78,1,2,102,228,228,235,105,129,196,144,46,8,172,80,33, +160,128,90,89,109,128,4,215,71,37,107,101,165,101,18,86,86,140,5,220, +130,34,193,72,194,113,89,110,190,240,34,153,97,189,91,147,133,188,72,202, +248,210,98,117,44,41,77,170,86,60,109,250,66,25,173,148,136,4,142,64, +10,149,10,130,81,152,9,33,203,162,36,8,6,23,198,70,137,189,107,39, +103,231,215,94,184,105,173,77,205,206,49,70,139,76,153,173,85,60,159,141, +43,10,174,62,63,159,196,82,27,41,141,134,42,70,165,85,46,132,231,227, +176,179,85,229,131,157,1,180,245,233,172,137,253,96,56,28,12,135,189,155, +63,188,251,225,104,48,216,220,191,209,247,253,188,117,190,237,172,193,205,141, +33,114,124,255,253,247,7,26,55,246,114,149,15,35,210,209,249,105,166,98, +62,192,243,227,217,230,206,118,223,197,243,241,180,220,180,155,195,237,126,62, +254,232,131,247,246,119,55,246,119,94,53,102,84,247,103,211,249,105,140,2, +98,110,92,191,254,228,232,145,83,221,193,193,222,195,123,31,123,31,17,213, +198,198,198,221,199,31,28,61,189,255,149,183,126,233,209,227,187,179,217,76, +105,124,247,221,111,190,242,202,107,239,124,234,151,132,85,19,21,80,86,100, +182,155,207,148,6,67,139,29,158,112,14,235,93,171,233,41,44,115,89,204, +140,168,180,214,25,102,89,150,173,50,113,235,225,176,172,229,251,214,255,7, +0,82,38,197,94,23,134,137,1,72,242,60,87,74,245,125,15,0,171,166, +55,230,5,64,139,151,60,46,180,226,121,163,75,156,76,87,172,222,115,63, +250,146,213,3,0,165,176,169,131,181,148,231,214,187,40,145,53,33,71,55, +218,40,167,147,158,153,203,178,68,132,60,47,235,186,238,59,82,74,117,206, +1,192,96,8,130,166,233,188,49,166,28,12,66,8,49,96,240,220,245,30, +48,105,238,6,36,2,228,208,212,86,101,40,153,210,208,247,19,155,81,91, +59,64,189,140,104,147,137,145,229,204,131,32,115,4,165,52,32,132,224,136, +99,51,57,62,126,252,240,193,209,15,30,63,122,4,192,211,233,20,17,21, +46,26,89,100,169,48,0,180,92,125,20,68,20,214,34,145,128,211,71,80, +130,254,49,10,45,164,218,86,58,65,33,4,68,227,125,109,178,212,134,161, +17,21,161,78,76,74,162,0,13,165,88,15,68,0,8,1,67,100,17,105, +33,106,192,72,16,99,200,73,11,1,10,232,40,16,2,136,168,229,253,13, +1,52,41,96,103,51,105,251,182,139,1,213,208,133,226,225,195,243,251,247, +31,157,126,114,252,131,247,126,248,224,193,131,40,33,176,247,49,162,66,0, +64,207,90,219,182,235,210,14,83,202,48,66,140,81,19,39,226,147,165,117, +94,108,50,198,32,162,140,181,100,104,99,115,116,120,237,214,181,107,159,218, +182,47,100,218,115,68,1,209,202,4,31,181,86,129,35,17,145,96,4,6, +241,34,49,137,108,161,32,137,246,16,72,99,64,46,140,14,194,134,16,34, +91,163,65,49,18,171,68,170,46,140,10,65,129,151,133,72,46,3,3,2, +18,48,4,0,64,13,176,172,108,172,236,234,226,255,181,52,236,106,87,34, +128,7,82,1,52,218,16,29,147,141,74,133,190,181,138,163,128,32,24,82, +18,35,39,62,84,16,81,152,122,98,46,238,252,136,2,224,37,102,65,137, +181,2,224,36,48,1,42,148,84,38,98,141,16,189,15,74,216,18,8,115, +210,93,37,34,152,159,23,245,44,148,3,23,6,133,193,42,52,141,130,115, +53,45,89,13,226,164,127,240,227,243,145,237,89,111,62,158,154,91,37,139, +131,124,79,58,19,155,243,241,244,94,145,155,209,112,163,59,57,50,218,171, +189,155,195,243,190,254,224,78,119,115,180,81,202,38,9,223,122,181,29,159, +76,187,102,176,185,181,185,187,231,38,243,227,59,15,242,34,20,250,252,133, +234,21,164,172,97,63,31,31,143,202,97,49,24,250,254,172,57,186,63,122, +241,231,106,239,94,122,229,205,167,39,71,227,233,81,12,19,83,93,123,227, +181,191,20,72,206,78,62,48,100,119,134,187,227,201,81,83,79,125,184,110, +6,27,135,229,206,79,62,122,111,90,31,191,248,226,91,27,213,181,59,119, +191,59,157,221,255,194,27,191,248,228,193,119,186,174,117,93,255,224,209,209, +171,175,254,220,231,190,248,243,245,60,88,83,26,118,0,16,251,206,90,187, +112,251,21,201,242,30,179,140,159,46,0,73,10,76,223,5,101,139,46,72, +158,235,186,239,51,163,56,68,204,53,51,123,23,82,169,147,133,149,182,139, +27,17,44,189,57,228,149,235,135,224,133,148,15,136,186,98,154,121,240,10, +48,246,128,150,186,174,215,90,35,64,106,197,14,222,107,173,163,115,214,90, +192,212,70,150,212,57,192,42,29,113,177,243,101,37,135,5,2,8,244,60, +146,183,103,127,162,83,224,134,202,139,72,210,63,35,173,128,35,51,106,67, +89,134,33,4,34,152,207,107,0,176,86,3,112,2,236,244,125,15,152,186, +145,147,129,95,6,125,169,43,67,46,106,181,145,125,140,17,129,19,164,113, +117,67,120,174,25,150,101,68,153,222,0,64,152,67,87,207,143,79,158,220, +127,240,209,7,159,252,100,50,153,24,173,67,112,198,152,244,149,104,100,150, +11,117,106,68,140,23,30,53,139,196,101,11,65,114,114,180,136,160,22,17, +89,169,181,81,98,25,39,162,229,125,198,24,3,152,154,7,237,210,59,186, +112,155,113,137,113,187,146,80,184,114,69,235,191,93,188,94,178,176,240,193, +163,177,170,119,205,143,222,255,254,135,31,126,244,19,125,122,62,25,183,109, +155,152,80,82,214,146,147,238,52,246,9,57,216,135,136,216,45,64,76,113, +29,159,168,86,155,53,185,77,78,57,196,24,186,62,163,98,107,120,211,110, +171,178,44,65,84,231,120,125,218,204,76,160,158,251,45,252,105,141,245,21, +251,217,201,154,159,61,210,49,88,120,235,43,220,39,112,47,189,214,196,4, +76,41,29,140,86,43,64,241,194,104,200,238,142,4,49,98,168,235,185,239, +234,168,100,67,108,59,125,50,175,143,245,216,31,108,237,105,180,138,65,53, +24,166,236,245,145,4,220,47,183,55,204,222,89,119,220,223,121,48,196,93, +220,220,234,102,179,126,242,52,39,167,245,112,254,228,108,126,52,205,247,142, +50,179,181,151,143,164,209,110,58,115,110,188,49,48,42,74,217,23,117,115, +82,96,33,152,153,40,232,103,16,187,71,247,62,168,236,238,181,27,55,133, +237,201,233,147,186,126,106,51,77,60,218,218,198,166,63,14,109,57,168,54, +203,60,155,78,79,62,186,243,201,235,159,122,115,48,220,108,186,230,222,227, +71,173,59,189,113,237,29,171,135,15,142,190,221,54,237,141,131,207,141,199, +15,102,77,59,30,79,219,62,252,220,207,253,226,225,245,23,235,198,149,213, +168,243,97,125,161,158,187,122,240,76,190,108,233,232,93,244,131,174,188,170, +180,161,87,78,25,51,43,212,107,122,117,196,18,151,175,231,139,6,161,229, +32,34,90,182,97,240,146,22,101,145,80,90,158,113,184,172,151,70,230,194, +151,92,247,233,18,174,243,143,221,30,90,4,189,143,101,153,33,2,48,40, +165,64,192,133,232,251,46,151,188,235,22,193,239,96,80,197,24,187,174,27, +12,42,17,8,34,74,99,150,89,165,192,123,94,18,243,225,202,117,74,115, +89,157,174,16,130,162,228,172,94,224,242,174,44,250,250,5,32,167,52,106, +4,100,22,55,153,30,63,121,244,241,71,31,255,232,241,147,199,169,213,1, +17,181,143,113,193,68,178,106,15,92,63,213,233,177,198,5,227,119,42,165, +19,130,1,64,164,144,18,165,23,86,111,241,29,107,0,136,178,16,54,74, +195,57,167,109,182,54,195,139,149,93,175,29,95,246,168,47,229,19,87,175, +143,108,37,50,8,51,115,228,224,124,251,193,71,223,191,115,247,30,245,103, +139,221,67,34,105,13,145,121,33,0,196,0,160,150,202,240,41,239,27,162, +35,34,188,176,89,203,140,157,48,10,33,82,140,142,206,206,230,179,190,235, +50,137,197,167,63,251,118,85,150,64,161,235,194,213,137,225,243,183,254,159, +133,129,203,228,46,60,83,22,252,217,67,96,149,217,32,0,78,29,1,204, +209,137,67,202,162,176,32,145,210,32,228,4,66,240,56,153,250,227,179,44, +207,213,120,14,224,108,87,163,159,159,31,31,215,198,100,38,135,198,5,223, +22,32,133,30,122,59,31,215,83,153,159,13,182,94,97,167,167,179,71,103, +147,59,213,225,62,4,43,18,234,217,143,243,151,62,157,111,191,214,215,119, +250,199,31,215,143,239,86,217,112,80,189,84,10,78,78,142,38,199,167,101, +85,153,188,8,93,124,250,228,8,218,177,152,27,69,136,209,77,156,15,113, +30,21,231,205,124,246,226,91,111,244,29,215,205,211,224,227,225,225,139,174, +155,220,189,255,94,81,84,138,110,84,195,188,48,229,201,201,163,251,247,62, +124,241,197,23,71,195,253,241,116,210,184,243,201,252,113,53,220,51,38,103, +110,38,227,163,129,189,46,142,143,79,63,153,215,189,143,244,214,59,95,222, +219,191,137,84,20,69,62,173,231,68,164,80,175,226,217,203,43,199,87,54, +195,202,246,37,15,134,46,111,248,180,39,87,176,141,213,161,230,149,222,243, +226,212,96,34,118,4,96,34,73,5,165,229,187,32,144,90,241,215,166,191, +89,149,19,13,225,165,118,254,149,226,24,11,44,4,200,87,149,186,165,59, +249,199,37,245,0,64,19,106,134,48,159,183,89,110,152,57,184,36,187,131, +130,164,148,17,232,180,33,239,125,150,103,226,160,119,173,113,202,57,167,109, +209,182,109,211,52,214,90,99,146,188,155,164,249,93,24,126,73,98,84,23, +121,202,117,187,182,190,154,235,110,223,226,89,4,137,146,90,89,36,186,121, +125,126,62,126,122,124,250,0,0,6,131,141,132,90,72,37,102,157,89,102, +214,168,146,203,25,99,100,14,136,8,200,40,192,12,41,196,78,31,160,85, +174,148,38,212,164,98,215,117,176,132,221,173,164,114,179,172,84,74,37,126, +99,99,140,50,150,136,80,233,181,165,68,88,56,17,148,76,198,250,250,62, +119,199,172,95,50,251,94,128,149,82,218,152,190,174,1,192,228,217,230,246, +182,145,210,123,31,188,67,20,66,140,174,231,24,149,194,176,108,104,19,17, +5,76,68,209,121,173,53,242,162,35,56,161,106,86,217,141,200,1,5,17, +48,207,12,17,144,50,46,120,208,170,105,154,205,209,78,14,218,251,54,134, +184,186,163,74,120,126,53,227,79,125,92,74,253,60,179,127,47,50,131,63, +101,172,86,30,17,69,8,69,144,36,68,71,243,89,134,100,73,69,22,134, +136,8,134,20,139,174,11,229,134,166,218,222,34,163,51,147,117,71,199,156, +133,221,91,123,132,85,47,227,238,60,154,193,13,217,220,63,139,51,220,198, +114,235,213,129,15,117,108,73,188,141,155,109,59,218,216,222,103,81,209,235, +141,234,83,177,210,216,78,245,166,54,249,1,168,124,88,228,193,205,78,187, +206,216,226,218,237,215,6,195,162,247,227,199,143,62,137,10,95,126,243,139, +125,117,224,220,164,157,157,15,15,14,172,146,249,228,113,71,210,102,70,186, +73,158,143,76,101,125,63,127,252,248,19,239,229,198,245,107,131,106,99,50, +153,52,50,175,155,233,214,206,118,89,109,28,29,61,29,140,114,229,99,96, +53,26,190,160,116,251,241,71,223,219,26,220,222,222,222,190,115,255,187,227, +241,153,173,246,222,121,251,211,59,91,47,4,54,141,19,10,94,219,188,237, +102,133,209,235,155,243,98,97,225,249,27,120,225,232,45,91,54,96,145,135, +226,148,162,90,229,245,82,90,31,0,66,96,64,224,84,189,4,17,144,69, +244,9,4,66,9,14,156,32,84,178,36,203,75,49,226,101,155,32,168,85, +146,220,21,194,16,34,8,240,51,55,233,245,173,130,107,229,145,43,87,177, +254,19,221,186,30,145,100,197,223,11,18,1,114,107,152,57,68,169,170,42, +29,173,186,238,180,214,187,187,187,201,113,43,10,147,101,35,239,131,115,174, +235,122,34,50,198,40,165,87,173,11,136,40,204,169,200,189,106,108,120,118, +150,235,51,187,50,16,49,213,1,153,67,219,204,123,215,70,215,35,153,225, +112,104,140,201,203,202,90,11,164,242,60,7,0,66,13,200,49,70,215,181, +33,122,5,11,23,33,165,191,69,36,8,19,105,155,229,214,148,74,25,9, +117,93,215,171,175,48,85,205,149,82,121,94,144,182,101,89,2,170,100,236, +24,176,176,22,8,5,19,119,216,130,191,36,77,25,47,243,35,60,187,208, +235,38,15,18,133,115,112,125,240,44,1,128,14,175,223,254,181,127,233,215, +153,97,58,121,60,159,79,103,211,169,239,218,232,67,219,213,137,189,38,46, +219,240,130,235,17,145,150,202,138,76,11,255,52,248,133,213,78,12,113,29, +244,24,128,123,175,32,196,232,152,44,102,102,180,183,67,68,121,158,11,70, +165,92,210,228,93,236,99,89,22,200,46,127,17,207,189,168,255,255,199,207, +112,235,86,62,224,115,71,132,72,64,169,144,141,18,129,24,129,189,107,206, +166,199,88,102,69,49,2,80,49,64,140,49,144,160,129,156,224,132,162,169, +204,108,214,214,179,121,174,216,108,20,190,14,17,235,108,180,205,125,125,238, +230,57,186,209,224,0,202,221,186,63,143,209,57,163,182,54,118,165,110,230, +214,109,20,190,44,119,135,180,63,243,227,105,61,54,145,71,7,91,157,116, +103,179,200,70,43,239,213,176,4,85,213,81,78,103,199,5,117,80,232,114, +112,24,183,119,30,55,103,70,80,111,236,97,85,213,243,135,143,142,62,220, +222,187,166,212,78,49,172,250,110,226,220,100,62,155,74,180,183,175,191,104, +148,121,114,242,160,50,35,147,203,241,233,116,56,216,109,218,184,189,183,49, +159,157,221,187,115,255,165,87,223,214,6,158,30,221,219,28,238,85,217,224, +253,247,255,105,27,143,202,234,240,214,171,159,217,219,191,57,155,251,204,84, +89,97,230,243,233,176,40,179,188,132,8,112,217,58,172,185,198,151,203,229, +207,241,7,33,185,118,34,28,66,202,113,173,250,35,23,236,24,32,180,212, +29,77,224,36,89,38,96,69,0,88,72,107,11,64,44,192,194,26,100,165, +25,43,203,88,109,137,85,78,244,86,148,48,88,201,48,136,64,242,108,214, +59,193,100,5,206,122,198,228,193,51,118,80,3,96,81,152,212,237,181,170, +251,42,11,228,148,115,62,203,108,12,210,181,206,90,11,194,193,59,102,22, +198,190,15,34,146,58,230,140,49,137,28,166,109,91,89,209,160,63,243,193, +171,113,209,122,117,121,172,59,131,10,129,113,89,170,19,116,125,144,8,136, +42,49,60,23,69,89,148,3,147,89,82,70,235,133,59,70,10,217,59,173, +108,239,106,132,212,28,202,137,130,41,66,84,2,138,116,94,86,38,171,8, +21,69,197,112,81,32,79,216,108,34,82,202,228,121,142,164,113,141,49,66, +68,18,150,114,57,209,85,31,136,92,65,71,255,244,139,94,212,106,148,137, +12,168,68,33,168,94,35,136,30,14,182,103,179,86,171,44,207,134,60,160, +86,101,190,239,208,218,132,22,140,156,148,179,153,115,79,2,193,247,133,86, +33,132,176,44,114,41,189,40,111,37,36,16,203,92,5,20,242,134,66,223, +43,47,168,181,222,219,219,219,174,202,170,170,2,183,43,218,103,0,8,33, +104,80,87,235,184,127,170,227,74,94,239,98,67,63,111,195,252,49,54,49, +181,55,1,9,16,74,4,14,174,155,143,202,65,166,116,236,67,16,6,34, +133,0,226,133,99,49,174,209,187,250,124,162,252,104,219,20,172,124,221,180, +5,13,8,204,180,59,235,154,201,104,247,118,97,118,186,147,39,80,88,27, +139,193,112,99,30,221,172,25,119,103,15,182,119,246,118,182,223,104,187,112, +116,250,137,206,165,204,71,42,219,118,228,142,30,254,196,65,173,182,110,20, +197,117,199,117,237,186,200,189,206,196,218,162,115,125,32,251,96,114,94,22, +69,53,24,26,212,237,252,116,124,124,132,98,95,188,254,106,27,236,121,51, +67,152,142,6,198,80,198,138,35,119,179,182,181,118,51,51,116,231,222,7, +81,120,99,115,183,170,134,143,30,124,116,124,252,224,245,87,223,32,181,113, +247,238,239,231,52,172,202,253,143,62,249,230,180,59,222,59,120,253,141,55, +191,96,178,173,121,237,173,41,153,89,66,40,203,178,235,58,107,53,95,38, +245,90,89,183,85,155,124,26,235,190,158,92,130,80,9,179,172,36,220,214, +243,122,41,217,69,168,37,66,210,66,64,68,88,120,117,203,116,138,8,165, +191,2,100,129,8,40,49,208,26,69,147,44,115,124,43,77,11,188,60,68, +82,44,140,201,170,174,102,167,212,37,27,247,211,238,223,218,245,97,169,64, +46,128,152,212,8,65,138,186,233,100,33,143,13,49,114,150,229,136,216,117, +157,82,170,40,242,243,233,120,17,3,42,149,52,9,9,181,209,89,95,207, +18,137,11,98,130,165,46,125,138,117,47,116,185,70,235,99,29,68,33,34, +2,145,96,213,253,71,204,0,66,132,6,192,41,165,109,158,103,69,158,217, +34,47,43,6,76,78,159,49,70,98,232,219,166,239,50,137,1,9,48,81, +123,42,18,145,40,172,77,158,151,3,99,11,4,35,253,36,132,139,20,198, +138,66,74,107,157,231,185,205,178,162,40,242,162,176,121,97,173,189,116,192, +150,44,193,139,137,225,197,156,127,246,66,35,33,0,120,39,125,31,1,192, +69,206,178,60,203,138,64,40,208,102,89,213,247,81,171,172,42,77,103,172, +247,46,198,136,193,107,38,107,76,8,78,33,112,240,147,243,211,60,27,64, +198,221,10,158,22,4,151,20,88,34,96,130,194,62,70,110,51,178,57,144, +103,24,218,234,96,107,39,183,42,203,50,213,184,149,204,224,226,18,158,71, +61,240,103,100,60,55,32,248,19,155,232,139,83,141,73,238,28,163,119,253, +158,47,116,236,230,237,196,5,208,153,85,90,136,68,192,63,185,255,177,223, +131,205,106,79,187,124,126,50,85,7,150,169,104,189,201,59,175,109,97,37, +51,8,170,119,131,94,149,187,155,216,246,79,207,231,92,248,34,215,172,183, +6,165,62,62,189,195,156,239,14,110,138,115,37,245,147,250,222,212,123,246, +217,193,225,203,89,182,217,157,223,153,67,40,236,118,101,246,51,211,62,121, +250,222,233,217,209,245,195,183,171,193,205,2,155,243,89,51,115,181,165,190, +40,138,173,237,55,122,201,206,207,207,177,132,97,121,224,219,217,228,252,174, +49,198,218,221,34,43,35,133,71,119,127,44,162,94,127,237,237,166,115,247, +238,125,92,207,207,95,184,113,11,0,158,62,249,168,178,89,161,205,135,31, +125,187,245,167,183,95,124,231,165,87,126,193,11,116,173,88,59,96,102,36, +240,174,69,196,162,40,230,243,185,201,205,229,229,90,64,202,126,246,61,124, +229,211,48,115,178,90,171,254,217,244,91,165,84,234,70,117,33,117,70,2, +145,36,152,40,11,8,196,4,18,128,4,109,129,68,210,184,120,231,21,26, +12,150,251,51,198,136,138,180,54,233,252,46,115,56,17,174,0,61,175,90, +146,63,126,51,107,68,236,123,207,224,83,148,154,101,198,117,145,8,203,178, +52,134,20,66,219,122,99,178,166,233,136,40,203,242,249,124,46,130,85,85, +1,128,247,145,150,178,176,90,93,120,64,176,12,64,146,181,246,222,219,139, +188,230,165,96,234,217,101,93,95,95,33,4,102,74,109,120,168,1,72,107, +99,140,177,54,55,58,51,89,94,84,3,102,46,170,129,160,202,173,70,148, +174,205,250,198,114,244,40,156,90,223,136,72,16,4,80,219,188,172,70,214, +22,12,196,173,36,108,111,138,19,83,57,24,0,138,44,87,74,41,109,109, +94,192,82,32,56,202,197,173,102,45,239,65,171,42,213,186,201,91,93,254, +250,207,87,7,216,232,146,163,34,34,223,54,198,100,136,216,185,182,105,231, +219,131,225,228,108,26,163,20,213,192,72,222,116,181,136,100,32,24,141,209, +58,184,222,40,236,154,250,236,108,172,180,213,74,9,92,128,170,136,116,42, +52,51,243,144,185,139,117,227,106,69,140,12,68,170,36,61,204,10,47,14, +0,210,166,20,145,16,162,210,90,41,149,144,227,207,13,10,254,76,141,43, +59,231,79,50,16,49,181,112,166,111,77,34,123,223,63,152,116,251,215,138, +242,112,127,96,11,134,56,239,38,77,63,149,232,232,233,249,112,107,39,107, +130,9,1,38,29,143,16,89,50,187,81,109,140,38,238,110,219,55,219,118, +64,172,207,142,158,204,96,174,231,98,111,222,212,195,161,112,243,248,244,238, +225,193,205,114,112,168,205,208,213,205,236,189,119,225,230,65,216,220,28,109, +24,91,159,229,243,227,182,6,91,110,239,151,74,123,154,60,121,216,66,227, +218,246,246,181,87,118,70,251,119,62,184,99,204,185,218,188,85,110,92,83, +120,122,124,126,103,107,187,172,251,190,24,29,22,153,110,219,135,71,143,222, +31,229,163,91,55,223,232,3,158,143,207,26,223,4,55,190,126,253,205,211, +227,57,229,16,164,203,243,60,4,136,253,188,239,30,86,195,91,247,238,125, +167,15,15,223,252,212,47,95,191,241,149,58,16,171,194,232,232,250,222,88, +18,9,136,81,107,235,156,51,218,174,108,205,106,173,174,172,246,243,127,40, +2,23,16,125,34,74,0,15,90,153,194,85,212,185,82,92,72,218,54,176, +48,5,130,6,100,201,180,140,136,132,20,211,33,18,0,128,149,103,39,75, +250,206,16,194,133,176,153,94,104,107,16,81,244,43,172,238,85,154,244,63, +201,222,208,90,107,99,140,115,10,81,20,97,240,46,47,172,247,81,4,230, +243,190,172,172,206,52,106,108,154,102,88,110,180,93,95,84,85,8,33,113, +47,139,128,247,33,153,134,16,124,140,49,74,8,44,76,42,122,6,6,69, +20,250,58,3,102,86,194,68,70,115,116,32,148,60,20,68,4,33,1,18, +1,22,96,150,8,40,130,12,72,172,89,181,0,0,100,157,103,109,2,41, +79,164,163,235,141,206,6,195,45,91,14,202,106,164,172,25,13,6,86,105, +65,107,173,214,6,7,27,253,241,209,35,131,144,240,195,162,12,160,103,8, +65,164,44,119,71,155,215,133,81,144,59,140,2,23,253,46,171,120,54,73, +50,27,99,172,201,148,53,198,24,68,101,21,17,106,16,226,8,203,138,112, +82,207,64,31,227,170,89,26,150,110,236,202,147,90,186,132,23,213,27,31, +157,198,144,218,72,117,62,82,197,214,142,25,170,46,104,5,163,227,182,124, +253,176,52,185,171,251,204,110,244,185,81,243,158,99,227,92,200,242,1,34, +178,199,210,14,135,195,77,165,104,163,246,104,181,3,136,74,169,44,39,107, +181,214,174,15,209,91,91,108,14,71,59,224,250,224,252,188,110,179,42,87, +54,16,23,202,244,74,53,49,0,74,169,180,139,220,11,46,10,213,171,34, +248,170,105,92,177,198,8,90,144,144,1,3,130,3,52,136,28,196,105,32, +68,29,157,144,86,140,16,137,163,68,149,110,197,146,114,23,36,34,11,47, +216,75,158,231,93,215,45,183,153,75,235,147,19,133,16,80,81,162,179,86, +90,135,16,67,8,153,53,129,188,87,154,101,0,209,100,74,122,152,71,242, +198,107,36,235,156,211,70,3,68,178,166,153,207,243,60,215,190,139,42,243, +64,214,80,104,39,86,73,239,156,45,135,220,25,129,72,22,92,140,20,169, +32,43,221,57,214,147,236,133,183,213,206,208,83,223,53,227,110,214,81,196, +202,154,166,158,181,106,188,59,120,187,109,11,195,238,104,246,112,48,189,189, +191,127,93,38,227,105,60,111,238,63,189,189,255,18,157,79,172,41,167,173, +127,169,186,65,59,69,175,192,159,62,105,206,238,31,216,193,97,118,208,204, +116,135,167,61,205,196,150,106,239,112,43,206,142,127,242,131,211,232,95,56, +120,97,148,109,156,111,2,204,218,217,209,99,19,122,83,21,0,123,85,55, +56,59,185,39,110,102,113,127,152,105,29,78,126,252,238,119,202,205,225,110, +28,6,111,107,140,190,253,241,100,220,218,114,88,236,93,127,48,157,97,12, +27,121,222,207,63,150,173,237,218,197,205,141,205,163,179,187,147,250,228,240, +240,186,14,250,228,209,233,193,102,246,193,71,127,168,178,237,183,62,251,203, +213,230,225,148,145,44,177,212,94,0,52,120,142,0,0,74,135,20,216,18, +40,70,88,104,162,47,171,7,169,8,187,32,34,74,140,150,0,192,137,38, +204,64,21,123,95,142,202,166,109,164,204,149,66,102,142,168,124,27,138,162, +32,2,142,186,168,236,120,236,16,76,8,243,140,42,68,17,140,12,28,57, +10,35,4,201,77,225,252,76,81,193,130,168,178,44,175,154,249,169,66,65, +241,11,207,110,45,34,76,79,21,80,18,244,82,72,10,137,35,199,16,226, +146,201,106,101,79,211,225,141,49,38,77,212,117,219,119,197,255,88,88,61, +88,118,197,2,112,18,106,235,251,190,235,156,86,153,82,106,50,153,20,69, +145,101,153,209,153,214,128,136,125,223,167,252,218,186,131,147,130,44,99,140, +239,45,46,57,75,104,25,222,134,16,72,253,212,219,245,159,228,135,171,167, +9,64,103,173,205,178,194,22,121,102,139,178,24,104,67,153,217,208,134,148, +65,22,231,67,31,186,46,117,135,32,45,172,94,20,26,12,70,195,225,144, +5,1,24,93,41,12,113,41,44,191,186,71,105,163,136,72,43,67,70,27, +99,180,182,74,169,180,59,96,45,211,180,62,171,245,255,215,205,220,115,175, +2,73,197,136,44,81,16,73,43,6,12,46,204,187,126,107,123,152,111,111, +199,172,32,109,45,89,22,33,5,154,114,124,212,113,32,163,109,215,182,149, +100,195,205,107,3,85,116,125,211,20,90,101,121,166,21,230,185,206,50,208, +6,17,157,11,220,120,87,215,93,42,69,69,214,74,89,99,12,146,187,60, +231,181,199,207,15,25,57,5,39,8,145,69,24,89,84,170,12,24,93,121, +23,50,163,201,198,16,60,10,106,193,220,22,209,1,37,28,3,129,72,100, +14,153,33,68,68,19,37,204,102,231,199,73,104,37,193,110,16,177,141,224, +121,33,253,151,18,172,204,156,101,89,19,123,31,221,222,181,235,158,89,219, +50,4,246,222,144,26,70,152,51,114,86,25,239,93,239,90,43,125,102,132, +192,1,161,0,196,24,61,68,107,76,223,78,156,143,96,189,49,3,161,232, +162,23,65,17,142,18,91,215,233,76,239,77,124,156,62,105,221,76,25,109, +28,215,179,57,230,198,24,104,163,10,173,55,89,201,157,171,108,185,59,220, +62,121,124,220,61,125,242,242,43,7,211,105,51,158,220,221,29,237,77,234, +243,151,71,59,234,116,28,113,58,239,103,27,163,34,131,82,49,31,127,244, +113,0,61,184,177,63,220,221,7,58,237,30,60,62,63,189,35,221,244,214, +245,151,138,41,249,56,86,206,219,88,132,179,54,215,252,244,232,62,98,150, +149,33,182,221,225,206,166,80,25,235,217,157,187,239,66,215,237,23,175,53, +79,93,211,206,244,225,200,84,149,177,173,50,59,161,235,7,249,128,100,240, +244,233,79,186,38,238,110,221,30,230,241,228,248,39,125,221,189,124,227,13, +215,55,143,238,191,63,202,225,143,222,189,123,237,198,203,183,95,126,187,26, +29,120,209,152,74,9,17,228,167,148,124,248,50,5,211,106,187,42,122,238, +203,193,69,159,120,123,148,177,74,25,34,8,33,176,139,249,8,91,55,31, +12,203,174,117,173,39,52,1,52,144,138,177,241,38,179,46,178,136,10,206, +21,89,14,192,43,56,81,202,84,92,248,61,107,13,165,87,12,214,133,57, +91,250,13,171,14,141,171,39,235,167,248,122,207,61,137,218,57,151,222,200, +123,15,152,42,176,74,107,6,129,16,92,81,20,136,232,93,156,78,167,33, +148,204,12,64,195,97,30,66,64,36,69,42,1,207,0,146,152,252,162,103, +107,49,69,66,128,84,115,244,180,228,29,248,105,115,186,156,42,93,148,72, +151,191,186,180,16,38,207,140,205,242,162,40,242,42,47,139,170,26,24,163, +141,173,148,82,218,42,132,136,207,255,84,238,0,0,32,0,73,68,65,84, +2,227,179,147,92,167,187,132,18,242,17,61,64,182,49,218,29,110,108,3, +64,148,16,155,19,92,74,193,193,90,205,104,129,24,82,9,36,105,148,82, +168,40,33,227,146,75,190,54,237,244,253,93,93,253,229,252,213,218,107,46, +226,133,8,34,4,200,138,148,82,38,83,198,130,141,182,170,122,208,197,225, +1,108,14,114,99,37,68,142,94,51,219,74,117,181,131,24,141,45,186,217, +76,17,14,105,11,48,72,163,170,60,67,163,35,146,202,12,26,43,137,156, +138,130,166,65,203,96,64,32,43,130,243,46,248,97,57,92,237,252,139,37, +93,75,45,47,199,165,239,133,49,0,73,4,17,84,72,22,81,179,144,8, +246,29,87,69,22,67,167,41,102,138,65,136,5,253,172,189,243,241,221,157, +157,29,133,44,224,223,251,225,247,254,224,247,191,222,247,45,112,32,221,132, +16,142,143,143,157,115,68,196,49,98,146,31,80,24,156,7,1,80,10,141, +22,239,129,193,84,149,111,20,16,252,157,223,249,157,128,229,206,126,169,148, +34,85,244,222,101,166,238,154,30,3,163,112,94,88,141,192,49,120,215,130, +202,22,138,6,209,163,146,179,179,51,157,23,74,64,33,2,163,8,42,133, +90,161,72,232,124,93,14,10,174,99,211,205,123,232,141,69,41,244,246,222, +245,188,80,199,39,143,96,99,68,101,53,174,155,235,27,85,46,91,143,206, +199,7,135,215,205,214,198,249,236,206,140,155,91,47,188,22,77,85,238,108, +207,154,90,169,16,130,123,233,213,55,79,30,190,127,122,247,163,107,135,183, +236,214,53,201,135,89,165,124,125,238,178,214,148,35,29,246,156,33,28,100, +231,245,185,177,131,108,176,3,168,117,191,89,55,231,227,38,30,222,216,203, +178,29,169,59,87,154,250,244,241,200,236,81,182,89,86,123,189,200,188,61, +31,110,109,15,182,134,119,238,127,28,100,186,83,108,13,243,3,239,251,147, +241,71,125,152,221,188,245,105,80,131,39,143,126,36,190,57,220,58,168,207, +199,147,201,67,75,237,211,199,199,47,188,250,249,27,47,220,46,55,246,122, +143,129,37,17,180,18,61,71,137,100,237,182,157,54,231,197,99,88,49,29, +94,48,83,36,193,47,82,134,124,20,31,217,5,233,93,84,202,176,40,17, +137,65,6,131,202,245,161,239,125,102,243,60,47,99,236,89,16,85,223,59, +31,152,134,27,197,120,28,90,241,195,65,118,122,122,58,26,86,146,238,249, +34,160,180,32,9,70,184,188,63,215,231,121,197,201,192,181,113,229,254,125, +197,249,184,98,97,174,12,157,180,217,5,98,136,146,100,125,153,35,0,178, +4,231,59,155,15,67,224,44,83,54,207,148,209,10,200,57,231,66,244,125, +159,108,229,122,68,157,78,59,161,86,202,64,162,251,134,5,227,222,106,150, +171,23,63,119,222,207,25,107,64,63,17,97,16,99,76,10,151,76,102,243, +188,176,89,97,173,181,89,69,68,198,42,165,80,107,211,52,157,213,136,18, +56,162,128,98,180,72,217,96,48,202,179,2,8,125,232,148,205,12,44,16, +70,176,230,196,105,4,33,92,130,135,8,80,33,16,72,162,159,184,132,126, +92,77,254,202,131,159,253,91,39,172,1,80,17,177,70,165,69,105,83,14, +71,187,12,214,66,62,138,86,52,163,131,160,181,85,46,106,107,232,213,219, +33,112,110,51,211,59,17,113,125,35,16,7,28,75,80,2,228,36,138,34, +64,21,133,53,105,17,9,117,19,152,243,220,42,16,215,117,125,231,205,160, +244,207,243,231,146,237,251,105,190,94,34,225,98,73,43,164,133,81,4,133, +145,200,103,153,254,251,255,237,127,245,237,111,126,253,218,254,190,53,153,247, +18,34,220,191,255,35,148,72,4,209,59,163,97,88,149,70,147,214,26,92, +174,137,54,243,33,149,148,216,189,101,1,80,103,173,53,144,74,73,134,44, +207,247,247,15,95,123,237,181,207,188,253,133,255,224,183,255,253,191,249,239, +254,13,128,252,239,253,23,127,255,218,225,109,142,173,209,10,132,140,201,216, +59,34,133,44,62,120,150,80,100,149,243,49,120,79,90,33,48,114,116,174, +27,108,111,107,107,98,239,137,16,5,180,66,96,223,117,179,121,51,221,222, +174,90,173,108,182,195,177,241,2,100,178,94,171,169,159,30,249,241,75,111, +188,134,91,27,89,233,206,251,249,224,133,61,134,98,10,81,184,249,241,163, +79,110,188,242,154,58,188,62,109,217,71,200,183,55,172,85,150,221,211,243, +7,143,103,19,60,188,54,124,237,53,97,61,239,195,76,135,54,218,253,215, +247,163,234,103,112,204,197,160,220,217,85,219,5,104,114,54,204,167,253,96, +80,117,126,178,255,234,237,193,238,245,249,185,179,91,27,14,120,235,181,151, +206,154,99,183,169,54,119,14,136,135,59,187,55,84,25,62,126,250,163,89, +123,254,218,203,63,135,0,243,122,220,118,227,206,247,163,205,151,122,169,155, +233,169,247,126,111,112,205,245,245,188,126,212,248,99,63,15,47,221,250,226, +230,203,159,65,101,230,61,71,134,60,47,128,37,248,94,227,154,69,89,51, +37,171,109,127,197,202,32,162,72,0,73,90,119,201,240,113,210,253,20,3, +145,37,217,63,6,77,168,40,245,150,59,165,36,235,187,88,101,155,222,97, +140,192,130,54,203,34,207,50,91,41,201,186,22,34,147,181,122,58,175,55, +183,54,32,242,255,67,217,155,7,221,118,93,117,98,107,173,61,156,233,142, +223,240,230,247,52,60,13,182,37,91,54,50,216,128,49,110,99,32,13,6, +76,67,168,0,157,74,67,83,129,116,232,78,232,134,162,139,64,133,234,36, +36,41,119,186,210,233,38,204,147,177,219,208,140,118,51,120,144,229,65,178, +37,75,182,37,99,201,214,44,107,120,146,222,240,77,119,60,103,239,189,214, +202,31,231,222,251,238,251,244,228,174,156,122,245,234,220,251,157,115,239,57, +231,238,189,246,26,126,235,247,75,139,12,225,2,147,172,170,220,126,229,213, +64,118,49,198,85,46,111,101,58,86,137,169,67,199,31,58,23,94,193,228, +65,203,185,50,30,143,7,195,94,158,231,121,110,167,211,38,165,212,150,50, +243,60,31,141,167,204,156,231,89,167,211,91,204,219,16,234,121,240,238,114, +252,188,138,174,219,96,182,189,68,37,2,141,194,34,146,90,15,233,229,134, +0,174,68,171,192,215,176,125,203,99,4,192,249,28,173,49,62,115,206,59, +95,186,44,247,89,86,84,29,34,50,214,91,131,222,231,85,231,0,185,1, +37,235,157,72,80,4,178,101,89,245,189,175,148,148,65,218,164,254,202,197, +131,85,191,225,170,37,163,245,241,136,16,141,18,10,0,46,185,146,116,253, +22,116,141,191,127,113,141,8,0,250,50,180,231,98,7,1,148,218,118,249, +5,127,9,161,43,58,98,92,16,34,96,231,157,82,200,114,111,246,102,53, +169,65,180,198,16,98,94,229,40,42,204,68,96,13,65,19,201,88,171,66, +214,8,40,181,57,10,65,201,114,3,66,34,42,28,65,4,9,50,207,198, +32,95,89,114,129,195,15,124,137,116,63,60,74,16,13,179,8,69,239,138, +204,161,113,245,221,159,248,216,3,247,127,188,87,82,10,151,118,207,143,58, +189,13,97,60,125,188,140,49,130,168,36,235,156,203,189,159,79,103,179,209, +40,165,6,17,87,60,17,11,2,109,80,107,12,51,51,64,145,23,91,91, +91,32,246,177,71,158,248,202,195,143,126,246,51,15,188,229,155,190,89,33, +125,226,174,207,252,203,127,250,19,191,240,191,253,155,222,230,177,238,112,16, +155,136,0,42,98,140,213,36,206,21,146,184,169,57,47,179,88,71,16,69, +144,208,204,189,177,69,150,199,164,222,128,162,18,139,132,16,194,120,180,127, +126,30,230,10,221,4,210,52,49,43,179,140,220,124,94,147,66,135,204,12, +105,142,106,195,252,207,255,226,207,238,187,235,142,183,127,219,119,188,245,59, +222,149,149,197,139,231,159,255,221,95,251,189,159,252,233,255,177,42,143,145, +239,148,69,70,32,177,110,234,249,172,87,217,108,80,246,54,54,71,42,243, +249,52,41,100,174,147,149,62,197,56,218,125,169,153,79,183,142,158,202,169, +10,2,243,122,38,211,6,242,50,8,7,3,89,85,94,170,231,134,140,171, +114,66,30,205,118,159,61,247,108,127,123,211,87,93,153,34,107,220,223,187, +56,157,28,156,58,113,45,167,186,9,181,165,138,1,173,147,170,116,179,89, +152,142,94,236,101,3,78,243,189,209,243,59,211,243,54,31,156,62,251,234, +205,173,107,70,181,58,79,96,60,162,196,24,81,91,187,70,171,90,246,186, +251,115,85,115,176,156,203,87,181,18,16,99,84,37,178,14,212,49,43,105, +66,16,36,78,245,94,156,107,170,167,165,3,239,243,209,104,50,157,237,60, +127,238,233,7,30,188,239,93,223,255,67,121,181,229,179,110,153,251,38,204, +58,221,178,149,244,106,41,130,88,113,49,7,1,96,41,190,113,200,164,168, +130,40,170,180,38,143,218,14,85,85,16,81,162,67,71,30,190,157,181,22, +245,171,108,45,72,205,204,102,83,68,4,173,234,121,104,197,195,84,5,17, +139,162,96,230,118,70,183,169,104,239,114,239,13,33,48,235,50,187,135,171, +43,14,33,50,47,41,64,180,101,217,79,8,175,8,229,93,155,120,255,121, +147,215,254,239,189,39,235,140,245,198,122,231,156,179,153,119,185,117,25,145, +93,32,105,200,117,123,27,243,233,46,129,177,228,88,45,0,24,219,169,202, +30,153,66,137,3,215,214,250,86,168,120,213,233,178,30,240,194,194,187,54, +136,168,212,82,31,193,18,111,217,22,178,46,143,164,213,19,199,53,57,168, +151,29,176,216,33,178,8,12,204,68,152,185,130,76,38,34,96,36,70,102, +227,10,147,231,0,33,53,14,200,214,236,54,170,25,176,183,62,37,49,128, +104,21,170,129,74,80,101,204,61,57,107,180,213,99,97,17,113,198,42,75, +136,100,125,142,154,56,38,227,51,22,80,50,235,60,162,87,60,115,88,24, +187,151,143,155,246,165,65,107,0,65,36,115,214,27,153,205,118,63,244,87, +127,244,233,187,62,190,185,209,237,230,246,249,231,158,235,117,123,151,206,63, +19,147,56,50,109,98,241,248,177,227,69,222,153,205,102,221,193,241,78,95, +145,226,33,111,122,81,227,19,105,193,82,117,93,163,177,136,176,225,58,214, +218,217,124,254,229,71,30,226,84,15,59,229,188,225,119,255,242,207,70,137, +255,245,79,253,196,205,55,124,195,96,48,232,151,101,211,196,38,70,132,44, +203,242,217,108,22,35,91,36,239,12,68,221,219,221,113,68,22,137,17,9, +131,48,104,138,49,213,49,140,235,249,172,83,116,242,172,75,182,211,132,233, +116,50,51,38,118,178,74,83,152,239,29,152,38,108,29,31,8,211,195,119, +125,242,236,246,198,39,255,246,175,127,232,7,126,196,24,243,220,254,37,96, +169,50,63,168,242,70,20,128,247,246,246,170,44,27,116,6,168,53,212,141, +153,207,53,97,89,109,56,95,72,108,248,96,127,31,38,105,50,237,150,195, +110,117,100,126,48,157,67,3,150,250,212,133,82,46,188,112,209,34,122,202, +5,220,160,223,139,179,81,128,122,246,252,147,39,124,255,154,163,183,238,237, +237,201,193,14,66,19,230,163,83,217,166,142,102,106,93,102,171,157,233,147, +44,245,201,205,87,155,186,9,59,231,134,89,17,198,151,246,167,23,39,97, +210,29,156,58,114,234,141,69,103,179,166,224,208,171,182,141,142,18,153,61, +33,25,195,204,96,86,1,202,21,109,2,194,87,159,146,180,0,150,226,50, +212,69,0,5,109,187,40,144,35,51,35,145,116,250,93,131,41,134,250,115, +247,127,232,3,31,252,179,135,31,126,72,102,205,15,254,200,143,253,224,15, +254,224,127,245,3,239,4,167,64,27,32,248,99,63,241,83,123,7,231,243, +178,55,28,148,147,201,20,68,172,247,34,2,104,1,152,140,83,32,81,92, +37,191,214,23,230,69,236,101,47,247,144,172,202,29,43,71,245,229,70,237, +80,4,249,74,111,90,68,172,170,138,12,51,171,49,228,125,94,20,78,21, +234,102,102,45,77,235,232,108,54,158,54,173,129,107,73,54,75,45,115,107, +86,104,228,246,82,214,225,175,218,98,244,90,155,190,52,18,235,183,244,114, +147,177,110,218,190,166,175,183,16,39,35,34,34,75,214,147,115,198,123,48, +132,228,200,230,72,68,74,189,238,32,204,199,150,12,162,1,65,37,99,93, +145,229,29,86,210,150,16,220,90,92,134,231,184,146,95,18,161,165,71,215, +194,143,165,117,205,20,86,92,190,235,14,145,190,2,131,246,161,154,198,161, +95,20,21,65,144,0,13,32,51,136,0,1,229,198,165,12,109,148,56,153, +132,201,140,16,248,210,126,53,236,184,178,0,68,99,64,153,145,192,81,62, +155,5,75,6,18,24,103,177,197,79,169,18,160,37,163,10,57,58,49,200, +12,145,68,173,51,22,172,162,77,87,207,105,47,157,188,43,202,26,139,95, +71,129,0,81,20,68,45,40,73,115,254,220,249,47,61,244,192,61,159,248, +200,181,103,78,89,50,150,232,250,51,103,125,145,247,103,179,172,200,53,26, +107,45,144,2,98,20,174,10,75,214,160,53,164,217,242,199,186,156,12,1, +128,140,64,5,137,40,235,118,219,198,146,121,104,152,153,170,6,18,98,172, +52,168,163,42,136,30,76,119,223,251,155,239,86,237,127,253,55,188,249,77, +111,126,203,96,99,251,250,179,55,79,102,117,76,34,144,166,227,144,151,21, +135,6,155,48,31,79,54,183,55,16,64,5,67,28,113,4,100,20,153,147, +48,9,15,6,155,6,242,221,241,132,140,84,253,190,51,121,172,99,61,159, +43,66,217,175,222,255,254,255,240,192,103,239,79,179,61,20,227,45,127,232, +131,31,216,218,222,248,216,135,255,220,23,246,222,207,222,37,70,158,121,246, +220,235,223,248,245,7,251,147,193,245,215,51,201,232,137,175,16,21,166,179, +141,228,155,131,125,150,29,86,227,179,178,24,228,245,120,31,139,180,87,143, +109,202,59,131,161,102,117,54,109,38,207,60,151,158,127,225,232,137,107,123, +102,48,10,138,187,211,250,224,98,226,177,159,64,167,130,249,249,23,95,120, +234,171,39,202,78,39,55,97,46,52,222,239,118,78,204,244,194,65,136,190, +178,131,193,241,217,75,231,14,206,63,211,203,122,121,103,222,236,94,156,237, +238,28,61,121,227,145,83,95,23,243,173,168,40,96,51,130,16,35,107,178, +214,102,185,67,68,77,26,133,237,149,161,204,229,157,175,149,255,106,67,51, +108,7,235,162,145,25,173,2,73,76,44,224,139,44,247,120,238,185,103,31, +122,248,129,191,253,211,223,185,116,233,165,211,199,42,225,238,159,190,247,215, +63,248,103,127,128,52,7,9,63,249,83,63,255,157,223,245,95,56,147,142, +108,118,70,147,217,100,20,137,172,115,121,148,196,162,68,139,212,201,33,135, +230,208,224,4,0,90,122,18,43,171,183,138,198,218,115,215,111,97,221,186, +125,237,212,222,194,148,182,66,17,134,148,153,155,134,66,168,99,170,135,195, +190,74,202,50,63,159,215,214,218,178,244,117,45,179,217,108,85,67,89,93, +247,18,78,12,214,122,162,6,0,160,245,145,16,177,37,45,191,218,45,93, +117,30,174,223,210,186,189,107,55,89,227,44,16,0,68,106,51,137,222,229, +198,56,231,51,84,96,209,172,44,129,8,12,40,47,178,6,11,86,225,246, +68,17,99,28,192,170,82,46,203,9,201,10,237,181,46,177,23,66,43,174, +234,151,95,231,43,249,207,240,178,133,104,245,211,10,115,235,67,50,75,168, +99,164,153,0,228,222,214,163,113,170,108,22,213,178,14,187,61,95,229,151, +14,158,146,157,157,204,29,73,41,89,235,57,74,155,186,146,105,157,245,170, +253,249,4,13,25,107,157,55,34,40,137,81,37,196,144,147,77,34,117,100, +105,2,177,160,128,83,116,138,205,161,156,35,46,254,127,165,205,145,3,85, +142,137,67,148,44,204,103,225,145,175,124,241,163,127,245,23,55,92,115,194, +162,153,77,194,198,145,99,77,138,161,142,89,86,85,85,137,140,0,34,192, +232,177,204,60,57,37,75,130,226,105,129,72,0,208,133,102,222,162,19,78, +68,196,185,76,17,69,18,168,16,51,0,48,150,105,70,133,186,56,142,105, +134,142,160,218,234,111,12,205,52,208,83,79,60,112,255,61,31,71,223,249, +231,63,247,11,195,141,163,157,222,134,177,222,65,233,156,159,140,118,161,153, +128,164,65,167,123,48,155,239,205,38,25,237,107,36,103,114,132,132,164,202, +98,140,155,140,231,29,91,100,222,79,15,198,251,147,189,193,96,176,209,29, +62,246,200,19,127,247,119,247,126,226,254,47,28,237,109,136,248,185,206,183, +79,31,249,232,221,119,108,110,12,27,158,89,141,95,121,240,126,12,211,47, +126,233,239,254,252,253,191,143,148,191,237,29,223,241,221,239,124,215,20,204, +198,70,63,115,48,15,205,40,113,191,219,239,146,205,13,61,246,226,35,126, +111,116,164,119,54,104,238,201,132,122,52,155,78,120,39,142,97,119,243,248, +166,239,86,207,93,220,217,175,121,144,251,237,227,155,207,156,187,208,177,193, +168,43,237,198,176,59,198,184,251,236,87,159,177,69,127,187,58,37,151,38, +13,143,197,237,159,60,246,218,122,26,247,207,61,179,225,59,56,26,159,123, +238,97,76,249,201,205,91,28,159,154,93,108,252,169,177,168,147,52,152,206, +94,42,58,149,37,23,57,133,40,134,44,8,26,99,244,42,61,24,11,107, +2,135,186,95,190,246,182,116,12,28,161,69,218,219,189,116,199,71,254,250, +125,127,240,91,167,54,178,156,44,207,155,115,231,206,231,174,243,125,223,253, +61,127,249,129,63,17,129,199,31,125,236,61,239,121,207,119,190,243,187,238, +251,194,3,63,244,67,255,240,249,23,46,253,200,15,255,55,253,222,38,183, +186,202,4,235,211,167,173,93,226,90,249,98,53,80,121,169,176,168,107,218, +29,170,74,238,48,66,229,208,109,190,124,234,173,31,96,67,98,34,74,137, +140,49,138,40,160,147,217,180,219,237,150,166,106,2,59,114,28,4,24,172, +177,177,86,14,177,91,86,0,176,98,118,146,149,197,109,31,40,89,52,6, +152,9,89,66,8,179,41,9,42,80,74,1,141,79,128,136,86,141,83,10, +202,209,64,43,136,113,185,45,180,133,50,50,43,75,32,241,150,64,36,114, +168,57,25,5,155,180,49,104,13,210,138,44,0,64,5,24,72,69,64,36, +90,151,1,34,57,50,154,111,111,159,154,207,38,0,64,194,34,201,87,29, +246,168,74,22,81,99,100,80,180,102,113,253,132,173,246,26,90,163,98,229, +114,206,238,242,19,124,121,48,187,24,12,75,112,230,234,37,172,149,164,215, +159,123,187,121,235,116,50,157,93,220,55,201,230,220,53,154,5,225,134,185, +191,57,104,246,166,47,60,245,204,177,235,175,169,47,238,249,147,71,221,177, +97,175,232,186,131,180,119,254,188,25,118,235,23,207,247,143,111,237,60,243, +204,214,145,141,221,103,159,232,96,33,126,119,120,246,84,99,178,104,108,28, +79,234,231,206,101,243,137,20,232,149,227,100,76,243,105,213,237,156,223,217, +245,155,155,156,130,130,85,85,230,4,40,128,137,57,2,128,42,38,80,17, +86,85,2,5,78,40,140,8,73,3,55,146,1,233,254,200,171,193,122,250, +240,211,95,185,227,238,191,61,125,253,81,128,141,253,122,175,216,178,147,106, +183,9,19,239,179,141,193,182,39,103,234,158,122,137,118,146,124,240,5,129, +32,70,204,77,79,109,106,19,210,237,202,106,140,113,206,49,51,211,90,93, +155,57,165,228,209,183,4,51,92,21,18,153,58,214,37,228,200,49,88,147, +58,195,224,50,235,58,62,31,31,76,254,159,255,245,127,42,124,190,181,121, +164,91,117,32,69,200,108,131,56,175,67,145,149,223,243,237,223,89,129,27, +100,165,205,182,167,243,153,241,65,161,86,168,251,49,21,231,71,105,20,220, +120,138,221,30,136,108,20,101,37,163,11,23,158,233,99,248,236,71,63,122, +211,153,235,130,145,11,145,7,229,73,7,108,195,249,231,158,248,234,169,235, +206,8,165,141,237,35,247,220,115,207,217,107,207,30,21,105,154,230,161,251, +62,85,232,252,75,15,126,233,29,223,242,237,148,252,55,188,233,91,153,161, +227,197,194,252,233,39,158,104,70,79,111,28,191,238,132,57,242,228,99,207, +77,163,16,166,99,61,23,194,196,64,30,76,190,187,47,20,103,167,85,104, +239,226,139,15,157,179,146,164,119,18,189,53,113,86,143,118,66,30,7,55, +94,91,20,91,179,105,174,131,23,102,251,210,41,79,106,76,179,221,243,145, +103,15,63,251,216,198,160,67,189,235,175,189,254,213,174,220,26,55,56,73, +178,157,178,194,155,134,47,54,187,19,231,139,228,128,172,13,34,72,134,4, +144,169,177,141,1,36,34,66,27,66,48,104,242,60,111,102,141,218,69,219, +0,174,198,51,9,0,168,120,145,4,24,91,92,42,89,143,224,155,38,218, +204,196,16,172,153,58,212,207,220,249,201,143,126,232,3,95,249,202,231,79, +31,223,38,49,101,217,29,143,199,103,175,63,235,156,251,228,167,238,56,182, +125,36,207,243,71,62,247,145,99,69,113,247,7,223,231,75,250,181,255,253, +39,93,217,139,251,79,254,204,63,255,87,46,51,174,44,98,10,9,72,52, +235,20,27,179,189,23,189,13,13,23,198,155,192,201,121,23,99,35,192,136, +104,141,81,134,37,114,16,23,189,167,109,84,198,177,125,95,100,25,150,173, +249,97,34,151,181,195,1,90,115,121,197,204,181,171,54,58,68,100,150,182, +142,1,0,163,209,68,85,59,85,87,117,161,28,212,246,102,197,24,99,140, +121,225,175,106,101,99,140,237,218,78,68,122,89,70,51,57,183,174,78,125, +216,12,47,54,57,28,24,190,220,215,83,93,85,151,174,164,148,97,129,53, +172,17,17,25,99,21,193,32,89,194,22,238,19,99,68,178,44,49,134,176, +50,85,47,251,252,195,119,116,85,47,111,181,173,86,203,67,127,90,127,115, +125,229,153,133,232,16,164,240,42,126,234,48,129,33,151,121,131,47,236,239, +14,182,54,142,158,189,54,27,246,34,115,112,36,101,62,145,84,110,13,209, +48,87,222,122,228,94,105,229,72,234,149,198,40,69,74,26,246,155,186,78, +209,85,93,91,149,221,147,199,242,56,127,126,231,121,66,224,202,147,83,168, +114,19,74,211,41,212,91,88,2,246,214,221,189,175,113,95,89,86,140,167, +211,126,217,23,75,121,183,250,210,195,127,183,185,185,105,1,153,166,221,161, +171,250,190,236,122,227,250,153,45,157,45,81,109,106,180,236,20,144,219,57, +78,193,68,0,50,214,58,75,9,45,162,136,42,115,154,55,243,246,105,164, +148,58,253,162,29,105,89,150,93,134,58,181,49,71,82,73,170,73,152,149, +163,112,96,78,34,115,176,153,201,171,188,234,150,189,201,156,89,25,210,197, +131,139,22,116,182,215,128,33,37,179,115,225,133,95,253,127,191,124,246,212, +117,111,127,235,183,94,243,218,35,249,176,95,100,249,222,222,139,7,59,147, +35,27,155,234,50,168,129,251,84,30,217,156,55,177,17,78,220,52,14,247, +199,51,211,237,180,191,145,115,46,179,142,235,68,108,110,184,246,198,188,42, +47,241,69,139,153,49,14,0,188,207,193,208,238,139,251,247,125,238,126,155, +187,79,127,225,158,23,159,185,88,110,109,221,124,219,109,59,227,139,221,34, +239,108,118,183,78,223,70,232,158,120,241,153,75,179,189,155,110,186,41,197, +233,104,186,55,137,163,121,78,157,193,145,193,198,25,18,166,176,55,222,157, +106,182,121,234,204,141,216,232,100,50,121,113,122,209,12,141,128,153,165,106, +60,154,124,229,145,207,220,245,169,59,118,47,93,122,235,183,188,237,155,191, +233,205,231,247,206,255,222,239,255,142,33,121,215,187,190,247,213,175,191,101, +108,114,171,104,58,213,201,225,102,163,169,142,129,108,150,13,250,104,29,43, +107,18,80,96,77,68,46,112,116,232,1,128,19,163,81,99,44,199,20,66, +88,145,211,173,255,250,8,4,40,117,61,171,170,42,10,41,40,17,197,144, +144,146,243,70,165,201,29,106,154,223,123,223,61,119,126,236,67,151,46,190, +184,53,220,24,244,187,154,60,51,23,69,22,82,19,57,108,31,221,200,138, +124,54,155,12,202,30,138,117,165,183,14,138,42,159,7,249,203,255,248,254, +191,250,224,71,5,211,119,126,247,247,28,57,113,246,157,223,247,131,131,193, +96,159,83,0,211,98,62,234,102,70,198,112,104,0,160,200,178,217,172,198, +204,174,117,127,194,186,187,71,8,235,189,107,109,113,98,5,34,94,253,105, +53,193,17,175,152,134,118,213,52,150,231,185,181,70,85,91,14,75,0,200, +243,124,62,175,91,164,72,59,88,83,74,206,185,182,71,228,229,179,165,61, +87,150,88,19,145,164,170,10,162,202,68,43,118,64,61,124,174,94,150,28, +94,180,137,45,4,191,23,249,217,171,24,190,86,81,112,249,114,25,111,26, +93,242,225,16,26,114,214,144,99,102,99,145,148,22,141,113,153,21,73,204, +145,174,150,239,64,68,150,171,100,226,190,198,254,26,130,15,86,85,29,0, +92,227,224,187,18,239,130,100,138,194,230,149,241,93,183,113,2,196,121,52, +206,104,183,42,179,94,215,176,214,146,236,198,134,173,138,126,213,77,34,181, +183,184,57,140,40,206,219,228,200,110,109,6,18,218,236,129,230,142,155,70, +154,0,96,173,79,6,0,210,60,128,183,67,16,197,212,64,211,48,32,196, +156,115,95,3,91,56,28,17,180,79,120,81,117,186,114,249,1,0,34,139, +206,99,110,93,175,252,226,163,15,157,223,185,116,244,104,95,98,202,6,218, +29,118,124,105,77,102,6,253,97,158,245,144,61,170,121,244,241,71,142,228, +195,78,183,40,179,220,100,153,241,142,148,80,201,184,5,83,49,17,181,172, +215,237,232,76,154,218,28,205,10,190,160,203,228,131,48,40,179,50,8,131, +36,77,137,37,10,52,48,155,217,24,99,10,92,206,242,208,164,102,222,240, +180,49,96,45,160,183,30,0,58,131,206,108,54,27,133,189,95,253,131,95, +253,199,255,114,235,204,201,107,213,27,59,40,51,232,99,167,74,146,65,225, +131,231,113,225,165,116,101,238,115,132,233,115,99,73,110,111,62,187,38,47, +1,229,204,53,39,122,157,42,160,73,89,179,61,56,154,80,50,91,20,190, +26,116,7,190,40,137,128,192,244,135,131,233,116,74,149,173,181,97,207,166, +75,15,63,254,197,87,221,250,154,204,218,131,105,205,208,43,138,236,238,79, +127,234,254,251,239,255,198,111,250,134,191,247,182,183,6,197,105,3,39,110, +126,35,24,216,155,156,39,86,7,216,228,61,215,223,24,21,154,154,84,30, +237,170,76,167,47,164,237,205,51,157,106,115,58,191,112,215,123,63,212,176, +110,30,63,114,215,125,159,250,198,191,247,13,92,232,20,57,243,197,45,111, +254,150,193,177,87,55,49,116,187,221,189,209,184,177,204,12,214,150,77,19, +124,175,87,47,102,183,56,4,80,49,6,85,49,70,181,214,18,153,182,6, +215,86,144,150,93,9,43,210,129,213,180,66,147,187,70,146,50,56,155,1, +8,64,50,200,146,234,207,222,253,201,251,238,187,111,127,119,111,247,210,5, +66,57,126,116,3,193,53,77,3,44,59,59,59,195,205,193,230,246,6,57, +204,74,31,56,20,121,22,99,40,179,60,78,185,153,135,209,193,132,21,142, +29,221,200,139,30,201,252,99,127,249,126,245,61,76,225,71,255,209,143,171, +114,167,215,157,140,15,10,104,170,204,43,196,152,4,4,200,89,11,152,154, +116,200,165,88,13,209,204,47,168,3,90,84,192,202,117,59,212,242,191,14, +102,214,53,96,182,205,188,109,26,138,16,67,8,43,146,131,162,40,170,42, +15,129,153,67,150,101,121,158,183,190,82,27,208,121,239,69,211,85,102,145, +42,162,182,100,118,44,177,245,251,204,90,47,222,250,41,235,254,157,46,56, +68,91,178,205,229,95,84,14,113,20,92,105,227,86,246,5,218,214,154,214, +101,96,22,20,176,222,24,155,147,173,99,156,168,34,16,50,115,8,181,247, +62,165,160,146,210,146,139,88,175,76,40,172,170,157,135,22,195,171,154,188, +87,176,131,8,0,252,50,109,204,118,199,8,38,85,69,244,89,222,56,39, +106,153,37,198,68,101,57,11,81,152,21,192,102,62,136,10,128,0,104,100, +103,44,176,34,26,72,2,64,26,146,65,91,27,244,46,227,105,52,100,50, +151,71,78,236,236,60,8,123,39,41,42,154,152,144,99,228,246,98,146,154, +43,31,224,194,228,225,213,111,1,0,166,179,218,101,30,188,189,120,176,115, +247,231,62,51,60,50,240,222,100,14,77,23,139,110,102,51,99,28,217,210, +102,153,5,38,66,119,203,235,110,42,7,57,230,105,78,51,112,98,189,97, +80,96,104,165,229,219,88,195,137,107,71,164,17,83,152,108,173,26,6,43, +126,221,229,34,103,149,85,5,65,36,69,17,17,104,192,148,24,66,8,117, +36,175,54,154,44,218,34,228,243,131,232,243,236,252,185,243,32,178,185,185, +153,101,153,88,218,60,125,226,55,254,237,255,249,143,255,187,127,246,117,175, +191,253,165,157,189,200,141,237,84,185,31,106,161,147,56,214,204,185,210,171, +166,103,159,251,234,227,79,60,114,205,117,167,124,167,219,68,182,165,233,14, +10,16,233,119,186,211,157,177,69,50,214,156,57,115,166,211,233,248,42,203, +75,103,156,21,134,77,34,97,24,244,170,39,159,124,58,6,253,191,255,205, +175,80,150,103,69,241,250,55,188,238,77,111,124,227,83,207,125,233,198,27, +174,251,192,135,254,164,215,45,63,248,183,127,178,117,98,56,28,30,187,238, +85,175,221,159,214,8,144,137,45,61,141,39,123,179,122,220,41,143,4,246, +221,35,229,238,238,185,231,158,121,250,186,51,175,206,203,238,199,62,254,193, +251,63,255,201,231,158,126,238,232,230,201,24,27,235,224,111,62,252,87,95, +252,187,135,206,190,234,166,39,190,242,228,127,250,240,157,175,187,157,247,246, +119,78,157,58,65,206,158,56,121,141,181,101,29,197,216,124,174,141,70,46, +179,28,21,20,36,198,102,14,13,162,122,42,85,4,17,69,23,204,251,198, +146,50,44,17,87,109,202,12,96,201,59,141,6,66,29,50,95,53,77,148, +20,54,54,171,209,232,165,47,60,240,217,251,62,253,177,199,31,127,124,216, +239,29,221,234,24,171,156,102,214,97,175,219,205,124,103,99,171,223,25,118, +201,1,122,32,11,7,147,100,125,209,212,226,136,34,107,233,187,199,141,67, +37,0,120,238,220,243,60,159,114,12,63,246,143,126,252,182,215,221,240,199, +127,248,91,111,121,203,91,152,163,51,248,119,159,191,247,206,59,239,120,224, +129,7,144,236,219,223,254,237,239,250,129,31,238,246,54,173,47,66,106,94, +33,123,46,203,229,121,213,141,126,133,118,7,46,1,3,203,177,125,133,165, +178,211,105,82,213,60,207,87,181,182,16,66,140,145,153,234,186,206,243,18, +113,65,103,186,146,110,99,102,128,54,145,183,170,136,163,138,180,85,57,0, +104,91,140,152,89,149,201,180,170,90,87,169,31,95,105,1,23,64,158,118, +50,180,110,136,44,41,30,214,142,196,21,178,108,73,233,181,248,88,3,75, +182,28,4,22,80,52,64,6,12,1,2,33,1,67,10,145,57,134,166,102, +142,134,28,44,3,189,117,171,199,124,152,105,103,101,205,214,141,218,250,149, +191,194,206,213,33,205,133,177,73,37,137,2,160,8,40,25,67,64,6,18, +43,40,16,154,204,186,70,18,70,81,80,103,221,66,221,66,72,68,28,98, +205,140,10,173,208,18,32,0,11,9,82,18,96,105,161,127,208,176,50,171, +8,170,42,139,65,50,2,94,175,182,96,194,85,124,189,213,97,89,230,178, +204,197,52,127,224,193,207,133,52,239,118,42,155,19,34,102,85,229,138,188, +234,151,121,233,242,60,183,22,80,197,104,180,89,73,22,18,137,37,68,79, +104,105,233,65,48,128,180,146,106,128,178,0,61,162,196,118,77,182,139,216, +100,149,174,118,228,150,23,131,164,32,2,78,68,88,37,176,75,148,146,15, +117,180,133,141,117,72,73,56,166,94,255,200,124,60,205,243,210,3,61,241, +248,83,38,203,51,159,163,113,71,54,135,239,251,205,95,255,236,217,155,111, +189,245,214,183,189,227,219,146,226,115,151,46,246,122,199,250,189,237,58,212, +211,233,152,226,252,142,15,253,205,23,63,119,207,155,223,252,38,13,98,189, +175,122,30,50,32,213,194,120,227,41,239,230,224,212,87,91,214,155,35,186, +57,216,234,35,82,51,15,206,185,189,157,253,65,86,66,72,221,162,58,117, +234,204,116,58,21,145,251,239,250,84,191,112,159,248,244,231,70,111,122,131, +145,89,175,236,141,46,142,53,65,167,218,60,56,16,114,153,5,233,20,246, +210,133,115,7,147,131,225,209,163,121,89,34,217,243,23,158,154,142,166,167, +142,223,176,217,221,188,235,174,15,127,230,238,191,174,103,147,235,78,223,116, +254,249,103,79,156,58,158,185,206,51,143,63,225,9,15,46,237,14,55,183, +30,252,252,23,62,255,153,207,4,14,100,49,176,252,253,239,253,254,239,253, +254,31,38,181,6,45,101,134,65,153,19,71,118,206,101,89,214,72,77,132, +49,4,0,32,106,249,62,189,72,10,77,34,162,22,176,137,72,186,212,89, +109,223,9,77,99,140,71,68,84,238,117,243,209,238,249,15,124,240,253,119, +126,252,195,155,69,62,236,101,85,69,33,141,81,141,47,108,119,208,179,214, +26,194,141,141,45,227,77,72,181,45,140,245,164,69,215,88,236,66,193,181, +116,187,62,142,33,186,194,160,53,200,32,181,113,167,191,248,165,135,126,239, +119,127,13,126,239,247,140,179,191,253,239,223,253,142,119,188,61,207,253,95, +125,240,47,134,195,254,153,147,71,234,186,190,251,19,119,244,123,195,119,253, +151,63,26,66,64,115,217,228,93,145,97,95,230,211,219,92,240,202,129,109, +95,174,194,222,21,196,162,29,110,75,99,5,182,101,53,32,2,99,40,37, +70,68,107,237,124,190,32,165,177,198,172,56,223,141,49,206,217,86,121,111, +229,115,93,97,126,15,55,199,181,197,59,81,96,85,179,244,170,14,215,140, +214,132,190,116,105,248,84,65,80,97,193,76,122,149,175,35,189,178,46,44, +204,224,0,0,144,44,180,162,89,64,64,45,29,60,32,40,160,178,68,17, +225,216,88,194,184,198,193,191,190,152,188,188,250,243,242,237,208,197,183,231, +173,160,45,176,240,31,205,114,231,242,255,0,16,83,131,136,6,124,142,158, +131,168,17,88,244,61,168,37,10,194,144,56,198,80,89,143,136,22,48,26, +74,164,214,97,72,66,0,13,169,39,74,40,57,102,148,162,39,4,37,76, +130,34,202,81,66,242,64,130,142,73,193,56,37,1,100,96,104,135,246,33, +211,182,216,95,90,189,69,178,97,185,39,204,211,201,232,177,199,191,242,204, +87,31,61,186,61,16,13,166,232,84,157,178,232,84,190,240,101,183,83,116, +50,36,33,18,103,16,53,73,12,66,74,22,10,151,163,129,4,73,84,209, +88,187,140,244,87,63,177,46,187,182,87,139,51,45,73,161,1,192,88,4, +192,21,246,155,0,218,145,67,153,77,73,36,178,203,172,207,93,108,82,8, +33,6,230,218,146,241,205,124,210,237,247,111,242,55,135,70,190,250,252,243, +101,167,219,117,222,149,48,189,120,233,79,222,247,190,167,159,124,252,150,219, +223,244,13,111,253,206,241,20,39,163,105,228,121,85,217,123,239,185,247,193, +251,238,62,182,181,249,197,207,127,206,130,118,58,29,116,92,244,141,53,198, +131,59,122,237,145,124,43,199,76,98,147,92,102,143,246,182,108,102,73,140, +247,142,51,245,206,117,92,199,162,245,214,129,102,222,6,160,0,0,32,0, +73,68,65,84,112,47,207,137,104,151,240,174,79,126,106,115,99,248,185,123, +62,69,44,57,64,225,253,239,252,198,111,255,244,255,240,139,103,111,58,129, +85,39,206,47,93,24,189,48,147,89,247,232,137,162,191,53,159,141,66,184, +152,154,209,145,193,233,42,31,142,247,207,223,249,145,63,179,40,165,205,187, +89,254,82,138,30,209,82,246,210,165,151,94,245,170,215,76,102,53,11,26, +227,82,157,178,188,99,188,187,180,183,127,207,39,62,244,212,99,143,26,83, +189,246,182,55,110,28,61,241,154,215,220,234,108,105,136,18,139,36,64,64, +34,0,74,222,123,102,157,215,115,107,173,245,153,72,84,93,192,248,84,21, +180,149,154,88,226,227,76,198,41,217,76,163,204,239,253,244,167,62,250,145, +255,244,248,163,15,30,63,177,153,25,87,148,89,146,64,40,157,141,110,217, +45,145,104,58,157,157,190,102,43,203,44,57,234,149,27,232,160,14,243,30, +86,170,170,130,84,128,97,103,59,89,152,192,165,151,46,41,26,64,125,240, +203,15,221,118,219,109,204,42,73,66,104,84,210,93,119,254,77,183,42,78, +156,56,161,146,12,137,74,48,164,162,113,52,218,175,250,71,218,44,217,250, +236,107,175,211,44,81,202,173,105,107,157,21,145,150,226,20,214,135,220,250, +203,149,227,213,30,4,34,18,66,104,25,225,243,60,47,138,130,136,156,179, +161,89,212,221,150,74,222,151,21,39,87,233,152,43,220,31,92,200,6,45, +145,100,186,14,250,199,133,123,184,126,17,75,43,166,188,156,21,139,164,222, +218,132,188,108,242,214,191,171,125,184,237,233,176,86,211,16,17,85,180,198, +88,151,53,72,204,177,197,208,168,170,74,74,41,25,4,93,106,87,194,229, +94,156,43,177,29,175,108,233,214,95,170,94,46,224,174,222,20,89,232,138, +174,251,86,237,159,146,4,139,228,172,243,198,6,5,22,78,154,0,130,42, +98,100,181,136,160,214,91,75,38,1,135,208,128,35,17,80,17,36,133,192, +0,130,162,130,44,96,66,51,35,85,116,168,22,72,144,69,8,68,131,8, +48,139,176,136,128,50,81,20,70,178,154,120,253,226,15,249,122,47,191,71, +34,217,219,185,240,204,227,95,174,114,99,49,129,71,166,72,29,147,117,77, +81,57,155,17,24,65,2,50,136,6,13,32,102,237,135,50,131,44,229,41, +157,53,150,211,178,140,130,128,180,192,128,1,224,186,176,47,46,155,204,17, +177,165,68,20,92,194,141,0,16,149,8,141,33,52,192,4,68,232,156,145, +220,51,23,146,120,86,207,61,246,143,30,239,77,247,155,89,152,110,15,135, +62,179,143,63,246,164,27,248,78,191,151,187,124,187,153,63,254,232,163,15, +60,252,200,209,51,55,110,109,95,67,72,253,205,205,249,236,194,99,95,254, +98,85,152,50,179,117,160,141,227,39,5,64,164,238,151,29,151,147,5,123, +162,127,76,140,96,46,165,150,53,55,94,73,68,10,155,99,102,226,190,20, +214,119,186,27,183,127,253,55,238,141,246,122,221,46,132,112,112,112,16,153, +99,10,71,253,137,233,184,62,123,237,105,109,1,226,198,216,140,4,195,104, +231,233,42,203,194,76,141,45,108,78,77,220,119,32,105,18,49,229,166,4, +230,131,79,221,245,183,231,206,61,119,230,196,153,110,167,91,199,241,153,179, +215,24,239,155,89,125,243,77,183,56,155,111,110,86,7,7,123,136,204,206, +147,243,49,177,183,110,180,187,183,255,210,115,33,164,167,31,125,160,73,217, +207,253,252,47,30,61,125,125,111,184,157,154,148,82,204,156,141,161,206,51, +26,141,119,138,162,170,58,121,104,88,68,172,241,34,162,173,134,240,194,111, +90,24,62,0,64,165,34,203,103,227,221,7,238,191,231,227,119,252,245,120, +255,252,171,110,184,78,37,76,103,65,231,115,155,99,119,179,155,85,214,150, +214,122,183,113,106,171,44,115,235,8,137,140,71,85,45,170,60,203,92,140, +145,147,115,22,198,151,14,26,102,194,108,52,158,10,199,39,159,126,246,45, +223,244,230,233,120,146,151,249,116,60,81,9,207,62,251,236,241,19,71,173, +181,172,158,80,102,163,189,102,62,159,76,231,31,249,200,135,26,200,254,193, +15,253,168,189,178,243,108,53,149,86,102,103,85,59,109,131,203,213,58,186, +178,27,235,179,123,181,89,0,156,207,231,189,126,97,173,45,203,18,0,90, +71,47,207,243,233,116,22,154,212,42,84,192,90,101,100,221,106,30,186,166, +85,187,92,155,31,108,173,222,234,172,67,38,230,202,59,161,67,6,226,208, +77,190,252,187,214,77,225,34,68,98,6,192,164,96,81,209,59,239,179,198, +90,137,109,215,30,170,40,51,199,216,168,136,34,173,127,194,43,125,203,218, +119,93,229,77,128,85,128,127,56,95,185,210,115,58,100,76,217,130,176,72, +138,33,132,96,130,90,0,140,2,17,208,196,152,148,108,144,84,147,240,124, +14,185,243,134,76,20,0,181,137,77,102,40,212,153,168,79,156,80,33,167, +134,163,160,18,104,4,94,202,228,178,119,14,181,229,168,64,105,249,72,84, +212,16,36,134,255,159,55,248,210,139,231,44,98,175,204,80,98,89,86,126, +80,249,78,110,157,228,165,243,153,65,2,155,121,139,196,204,34,42,54,32, +0,42,24,64,34,163,104,68,164,105,162,179,135,11,229,171,129,184,222,179, +113,185,173,82,17,90,85,51,213,150,76,123,81,101,74,220,122,136,98,64, +147,48,138,49,2,222,187,34,206,103,193,90,211,117,121,183,119,122,247,220, +110,191,151,223,122,243,245,247,61,250,16,166,209,70,119,184,177,189,197,34, +187,79,62,53,31,143,243,83,30,28,53,205,148,57,126,233,161,7,175,59, +186,197,152,108,230,251,195,97,238,10,191,225,48,75,190,242,14,179,44,43, +131,204,131,105,80,217,176,86,101,135,153,51,45,128,168,4,115,234,244,137, +162,234,250,20,11,82,48,136,10,131,141,225,235,55,222,120,255,151,30,204, +138,142,130,173,170,126,211,52,214,79,18,203,180,57,24,55,123,71,170,237, +233,232,60,132,73,85,14,74,83,197,38,233,120,71,15,46,108,159,190,221, +151,211,39,159,250,252,231,31,184,247,196,201,179,100,205,254,116,239,212,233, +19,34,146,162,148,166,24,108,108,54,77,227,44,62,253,213,199,95,255,250, +219,50,29,58,103,247,247,246,6,195,142,49,46,134,153,167,48,154,28,24, +51,232,148,238,226,249,23,35,82,86,246,92,230,227,124,250,232,195,95,254, +240,71,255,226,133,243,231,223,246,173,111,255,174,239,254,62,107,179,186,9, +222,229,220,58,59,64,235,107,118,187,17,152,48,159,127,240,47,254,244,174, +79,126,164,240,186,53,236,112,51,123,254,185,231,142,157,57,75,94,122,131, +170,51,44,41,135,238,70,79,20,59,131,46,67,99,114,151,123,15,173,228, +30,181,226,51,25,101,21,1,23,71,141,206,169,62,32,227,108,191,223,255, +150,183,190,45,132,209,209,173,97,12,9,82,150,101,89,217,169,154,144,146, +74,70,57,73,234,30,205,159,122,234,49,99,240,157,239,124,231,183,124,251, +223,39,99,56,46,58,92,15,5,97,10,139,202,76,235,184,180,164,39,41, +165,150,218,103,69,157,219,90,164,182,128,182,42,101,0,128,205,202,44,140, +35,39,100,22,242,36,146,8,168,200,171,16,53,176,45,58,43,109,48,104, +59,153,91,152,155,174,155,63,80,80,101,21,6,21,204,172,201,188,53,129, +131,74,48,8,81,148,217,228,158,128,37,37,105,135,183,2,8,32,3,8, +6,213,92,64,133,33,9,10,19,11,112,82,21,131,166,97,82,85,155,196, +9,176,42,131,102,170,181,128,172,120,174,23,115,68,53,17,32,2,17,2, +72,238,45,40,205,103,145,153,189,233,78,155,4,36,6,193,137,204,246,246, +154,121,29,83,147,185,66,21,22,107,92,235,164,182,137,118,76,170,200,204, +73,22,240,23,1,77,73,87,105,81,85,37,92,51,112,4,73,83,27,152, +183,111,174,199,113,45,195,190,247,86,91,220,12,34,38,23,5,209,155,38, +204,93,6,105,174,172,0,68,130,13,160,129,104,166,232,80,145,45,26,150, +68,98,140,106,114,108,10,72,50,39,80,230,72,96,192,179,88,80,111,12, +43,138,51,24,66,180,68,73,180,145,212,138,113,162,40,137,130,114,230,51, +73,181,42,18,42,162,162,176,170,34,128,168,130,136,98,106,169,158,84,65, +36,193,178,24,101,26,121,242,169,199,251,155,142,51,192,194,81,145,231,165, +203,115,40,122,29,227,45,89,99,12,146,2,35,163,83,0,160,22,78,132, +192,0,172,2,218,130,167,64,86,228,199,171,165,174,69,130,33,177,2,32, +130,65,4,21,77,22,172,178,137,182,81,5,99,140,65,50,170,156,20,69, +201,24,20,11,222,6,97,99,201,161,48,71,155,87,81,16,193,27,51,107, +82,67,0,92,203,150,217,126,233,201,221,38,224,55,221,242,117,33,234,189, +159,187,95,48,102,101,118,244,196,198,191,123,247,175,252,252,207,253,207,71, +94,253,6,32,147,26,1,53,2,62,171,138,125,120,145,7,211,9,214,27, +157,126,150,245,8,17,125,20,63,183,0,6,74,0,91,96,110,8,44,89, +213,68,3,226,174,108,12,6,204,19,187,63,169,234,218,163,163,228,231,59, +152,197,34,155,231,165,115,183,223,126,91,211,204,93,229,18,48,0,117,125, +49,59,191,255,219,127,251,71,55,222,122,242,246,111,252,70,95,28,137,41, +189,112,225,81,163,112,195,205,183,239,79,94,188,248,252,69,14,241,220,179, +207,156,58,121,146,76,182,125,108,168,46,72,137,28,184,95,245,188,227,233, +139,211,126,182,149,115,247,136,63,125,145,46,81,206,167,182,6,163,157,81, +145,109,78,246,171,4,122,16,20,231,147,95,254,133,127,194,130,190,219,253, +214,183,189,253,214,215,220,114,241,197,151,222,247,158,63,236,111,150,61,99, +63,252,199,191,253,198,91,94,181,113,226,70,54,5,122,43,211,253,185,67, +143,150,18,56,116,40,154,16,208,217,58,197,174,63,248,227,247,254,238,189, +159,252,232,209,141,222,230,112,48,154,140,235,132,219,39,175,31,108,85,89, +233,139,142,207,187,214,149,206,121,235,243,204,24,245,133,35,82,49,137,200, +58,180,184,64,201,145,1,33,32,235,59,17,210,133,11,47,221,122,251,181, +146,112,58,169,167,36,206,168,204,98,217,45,154,26,184,134,94,134,228,35, +158,47,167,205,254,131,15,63,4,214,191,251,223,255,254,145,35,55,164,168, +92,179,89,91,53,87,121,189,118,39,38,73,41,25,131,214,90,22,1,20, +69,177,182,96,230,196,201,24,179,72,118,169,198,36,72,139,182,183,22,68, +98,103,179,249,178,250,201,168,228,92,102,140,196,24,155,134,137,236,122,232, +183,90,177,87,95,188,110,125,87,115,62,165,20,66,88,85,148,149,112,97, +156,22,109,73,87,135,128,172,47,251,74,132,100,161,205,210,171,2,202,26, +33,248,213,9,192,132,65,104,89,180,214,133,204,163,49,198,56,71,68,204, +81,1,84,22,45,183,109,115,223,161,111,111,79,153,53,193,57,103,172,247, +0,73,36,9,131,146,181,118,97,179,90,191,131,211,138,42,86,194,154,46, +39,172,220,91,104,25,28,72,129,8,11,159,181,133,160,44,203,58,30,84, +140,245,69,213,29,88,159,183,64,29,64,188,180,55,155,207,155,209,108,194, +66,100,51,151,229,9,81,68,50,71,8,152,200,33,45,149,208,16,132,219, +100,71,75,210,77,235,208,159,246,49,18,145,200,229,184,187,117,165,91,225, +149,246,95,123,241,10,38,165,164,40,202,173,211,106,16,22,156,8,179,122, +234,115,231,179,140,8,156,247,104,201,120,235,115,103,12,45,168,183,16,218, +238,152,171,254,28,255,217,205,24,19,99,116,206,196,24,21,209,89,91,135, +58,51,217,98,201,96,97,68,2,67,237,58,38,146,145,15,109,230,23,56, +72,234,12,202,241,116,206,22,93,64,107,29,24,16,17,98,53,69,94,245, +42,72,246,19,31,255,200,219,223,246,29,111,184,237,13,81,195,87,30,249, +210,169,51,215,78,178,164,18,53,205,243,12,118,71,251,194,41,179,46,179, +174,87,245,44,90,155,89,151,121,159,89,227,192,57,107,172,209,69,2,26, +137,90,245,120,92,68,12,17,141,193,16,96,56,28,170,164,249,52,96,141, +217,102,169,115,235,75,87,117,75,85,46,203,156,153,149,185,204,171,131,189, +221,247,252,193,191,235,148,252,185,47,124,226,53,183,126,29,192,254,165,189, +125,71,221,99,91,155,251,123,47,140,14,118,238,254,228,199,238,189,247,147, +131,78,223,73,225,32,47,108,63,213,77,231,72,102,140,41,178,50,119,249, +116,60,235,111,118,223,242,109,223,92,85,101,162,158,201,48,113,44,10,182, +104,199,60,239,15,123,231,46,60,127,205,181,215,170,177,162,102,52,155,125, +234,206,143,127,236,195,31,42,125,166,144,156,115,168,144,231,249,238,197,75, +215,190,234,246,0,190,9,181,181,158,90,64,158,49,2,198,16,50,207,53, +132,170,244,127,240,91,191,121,239,221,159,58,121,228,72,191,42,206,157,123, +193,149,190,55,232,231,157,42,235,144,207,93,94,185,172,244,182,48,46,179, +46,179,100,45,88,105,159,12,81,219,41,181,32,42,117,150,184,129,48,149, +174,31,220,118,211,201,75,151,46,53,49,90,239,52,4,0,1,34,95,130, +175,185,226,204,88,168,235,153,100,62,235,108,131,66,86,244,155,134,235,186, +46,242,82,1,69,174,144,238,93,153,157,16,66,171,59,110,204,162,42,96, +140,113,14,84,86,153,180,171,228,196,86,155,5,0,239,253,124,62,181,214, +114,210,208,212,214,90,34,75,164,0,11,177,199,213,182,150,173,191,202,112, +199,203,240,17,94,21,67,23,94,168,89,129,75,120,21,227,64,107,173,150, +117,90,102,22,77,44,81,212,16,128,48,179,38,78,216,226,7,69,211,226, +17,232,10,13,183,44,230,94,174,108,224,42,190,86,5,34,66,99,128,140, +68,88,177,14,46,38,60,95,17,219,174,238,43,47,58,204,28,91,88,179, +180,46,241,194,79,110,161,136,198,24,211,138,147,181,232,69,240,176,72,78, +105,230,109,103,208,235,247,251,101,89,118,242,172,40,138,54,103,111,173,109, +31,136,181,54,135,49,139,2,88,32,171,8,41,113,224,32,146,134,199,7, +145,117,50,109,46,236,31,236,236,79,103,243,169,43,170,172,40,89,130,2, +90,182,32,204,18,21,21,17,5,20,150,222,238,162,74,165,109,54,115,161, +181,188,122,188,151,67,108,89,164,210,90,179,34,12,74,162,34,136,70,129, +84,149,147,112,106,91,92,84,5,67,108,242,50,7,3,104,168,77,245,250, +220,217,194,26,103,141,49,109,32,35,216,198,71,87,143,154,175,58,60,46, +175,142,137,115,239,234,102,102,173,5,196,38,4,235,76,130,96,212,181,221, +114,184,204,18,3,162,136,68,73,145,83,214,41,231,211,89,110,179,122,30, +140,179,96,84,27,49,118,33,10,138,86,93,97,187,155,85,102,179,239,127, +215,247,255,197,7,254,250,245,183,189,193,91,95,100,249,160,83,133,94,252, +191,254,245,175,252,248,63,253,23,183,190,246,230,201,104,215,0,86,85,213, +62,159,178,44,209,99,150,57,235,141,49,72,206,146,197,21,240,128,168,173, +68,171,49,152,34,71,21,50,214,229,110,30,230,121,158,25,227,32,39,153, +35,27,184,246,134,147,69,183,140,77,163,156,84,4,89,251,85,53,222,191, +80,79,247,142,31,235,140,167,121,156,39,133,75,148,194,177,205,27,235,201, +254,188,121,233,197,103,94,120,240,243,95,56,210,223,202,178,170,223,221,252, +242,151,31,187,246,244,245,96,89,236,212,56,91,84,94,85,183,78,110,26, +143,14,208,150,80,40,217,34,75,193,121,41,96,98,30,223,123,102,176,49, +200,12,85,189,238,104,60,37,99,242,204,111,110,244,73,1,148,59,133,179, +54,51,4,243,249,165,247,190,247,61,212,61,114,221,171,94,75,128,100,72, +98,66,107,130,64,230,253,104,114,208,239,102,192,147,63,250,195,95,255,244, +157,31,58,115,234,180,36,126,246,217,231,251,131,170,183,217,117,29,95,13, +188,43,50,159,81,94,122,87,160,201,140,241,150,28,145,163,22,253,219,98, +134,91,40,7,2,33,98,144,154,52,187,246,248,13,241,192,28,236,140,10, +219,11,186,163,202,133,201,66,138,224,72,81,32,83,143,142,162,11,99,118, +165,75,32,195,173,19,63,243,179,191,116,237,153,155,69,169,110,230,72,209, +154,124,125,8,173,44,15,45,12,45,0,160,72,90,34,16,87,170,214,139, +131,215,1,240,87,88,61,92,106,17,229,121,78,206,170,6,231,50,102,141, +177,14,33,22,185,91,79,54,95,158,69,47,67,108,172,134,181,174,85,235, +68,148,23,85,230,197,49,135,144,40,107,87,223,122,163,172,202,170,168,128, +109,167,26,192,101,183,22,241,10,185,206,214,133,105,211,222,235,222,175,136, +180,74,64,68,86,218,74,46,33,33,33,64,107,185,0,215,89,72,174,120, +154,33,50,51,99,27,100,89,90,200,48,182,92,44,202,42,220,196,70,57, +1,64,158,231,69,213,57,190,177,93,85,85,127,208,173,170,194,24,84,96, +110,29,177,20,173,5,128,40,2,154,26,109,105,6,208,42,38,82,2,72, +42,137,16,201,176,35,22,229,241,222,37,103,108,207,26,168,156,149,108,111, +158,102,161,25,133,58,47,29,33,48,26,85,142,28,80,25,20,1,9,22, +198,218,24,227,22,153,83,77,75,212,213,85,61,104,219,134,30,43,104,209, +98,185,64,196,43,253,181,197,115,54,208,250,200,29,87,122,231,242,178,200, +10,107,28,181,11,44,182,170,189,208,74,92,181,34,165,175,64,194,187,54, +72,214,135,144,138,196,148,44,34,41,112,4,163,54,133,152,21,38,214,139, +66,191,37,35,34,137,23,221,108,100,17,89,199,7,163,146,202,76,10,141, +144,144,5,35,26,64,4,21,68,52,104,146,33,83,116,115,231,184,222,157, +127,247,247,124,151,38,188,247,51,159,190,237,150,91,239,189,255,222,155,111, +186,165,170,170,95,255,183,239,254,153,159,253,103,33,77,219,11,113,214,58, +116,85,85,137,73,173,201,67,75,104,0,17,101,17,136,43,26,195,44,164, +10,68,172,41,165,232,28,176,200,120,114,0,221,110,149,87,148,57,240,8, +37,189,230,246,155,234,58,244,76,213,140,230,147,253,113,183,236,14,7,189, +79,124,252,14,99,213,146,141,243,131,127,245,139,191,240,211,63,243,223,95, +123,253,245,28,247,39,147,151,0,38,143,60,246,40,115,220,216,58,33,2, +198,211,205,183,222,68,133,10,69,159,187,115,231,158,191,249,150,155,179,60, +55,53,18,97,191,219,53,72,170,206,24,19,26,235,216,32,88,17,233,118, +202,215,220,114,115,98,25,108,244,155,38,50,243,238,254,94,191,223,55,132, +157,94,103,158,212,34,20,121,118,176,191,51,24,246,114,239,154,38,114,76, +134,44,42,153,44,219,217,221,221,218,236,53,205,254,31,191,231,215,239,185, +251,99,215,157,57,65,170,59,163,131,225,112,184,125,98,75,124,44,122,46, +235,24,87,90,235,201,230,72,185,33,7,96,21,156,162,17,66,64,32,69, +4,16,0,163,170,74,130,128,73,66,78,69,172,53,167,206,255,242,175,255, +143,127,242,47,254,91,227,141,164,104,17,35,16,24,32,35,69,225,114,201, +100,146,85,214,212,60,250,196,157,159,249,198,111,126,199,217,179,175,101,181, +117,61,203,11,47,42,194,87,184,108,171,177,100,173,71,196,148,66,59,90, +86,107,188,136,174,32,1,135,78,89,31,225,237,210,77,189,126,71,24,102, +179,89,8,137,200,54,77,3,0,101,89,44,105,73,218,15,109,171,189,218, +46,129,43,147,180,178,96,0,90,215,117,11,78,94,218,145,5,76,161,213, +96,109,45,200,33,192,116,251,14,75,90,98,164,91,132,175,145,5,228,69, +85,85,52,173,219,202,229,215,173,149,120,47,187,126,237,42,205,43,52,31, +25,167,137,20,16,112,73,60,173,12,75,171,135,87,86,111,99,76,4,72, +198,168,106,83,215,49,54,6,208,90,27,230,115,68,44,243,108,56,220,222, +216,216,24,244,58,69,81,88,107,173,70,68,4,16,230,121,140,81,129,173, +181,198,16,168,32,68,17,105,3,83,66,84,82,2,158,71,2,160,203,15, +1,147,42,11,72,39,43,146,74,74,169,178,2,29,111,140,185,48,154,207, +71,243,70,13,217,148,181,10,202,137,69,130,49,158,80,5,4,80,0,200, +24,119,25,37,67,10,11,135,238,138,165,5,17,99,74,204,102,241,164,37, +137,36,214,36,204,0,4,196,171,39,112,57,41,105,0,25,189,113,221,178, +235,172,207,125,230,28,181,46,30,45,116,156,101,161,65,135,11,194,170,87, +176,120,135,105,251,218,151,100,200,24,148,196,152,112,62,10,49,9,121,54, +0,26,41,166,192,204,90,22,198,32,179,34,42,17,37,208,148,82,70,46, +215,194,135,42,140,216,145,86,61,183,103,46,180,209,130,181,150,156,83,21, +44,212,58,242,209,36,214,88,227,13,55,220,136,138,85,94,20,101,230,5, +186,185,125,246,233,39,200,106,81,102,77,138,190,106,27,141,216,101,214,121, +131,150,136,0,81,133,18,40,1,161,128,16,1,10,40,42,24,180,142,84, +109,150,121,16,28,110,14,203,178,20,86,97,118,165,151,134,51,2,44,51, +15,38,133,96,189,71,128,65,183,247,240,195,95,186,245,181,183,74,194,193, +112,62,26,55,71,135,199,53,192,197,209,227,101,129,15,62,240,200,189,159, +191,239,204,169,99,17,185,236,150,17,194,241,107,142,170,155,87,93,202,170, +110,86,93,239,10,19,116,94,13,139,201,100,226,178,82,64,10,147,145,177, +214,153,152,52,51,229,240,104,159,41,149,69,86,115,36,178,219,197,246,254, +197,189,78,145,63,248,197,7,111,190,249,198,204,58,91,100,97,62,81,85, +0,238,148,190,174,107,68,227,125,30,99,36,196,233,228,96,107,179,215,204, +14,254,227,127,248,237,207,222,117,199,169,163,67,130,116,241,210,206,137,83, +103,54,182,134,201,112,167,95,186,10,93,105,109,70,228,136,50,50,14,208, +33,25,92,186,86,128,40,128,216,22,203,76,171,107,136,6,173,209,70,173, +183,97,222,252,210,47,255,210,92,199,141,30,40,170,35,227,13,34,36,180, +96,9,169,182,41,128,55,165,150,17,201,253,131,31,248,145,201,148,179,2, +148,144,57,34,193,42,163,181,74,190,183,47,91,98,209,37,1,0,174,245, +65,124,173,192,118,181,45,1,28,6,91,28,35,39,112,214,168,100,198,25, +85,21,230,213,100,128,101,12,139,75,116,213,225,1,142,184,12,87,175,176, +80,173,67,33,139,240,233,10,133,205,149,111,40,34,162,105,193,76,133,34, +178,232,28,80,85,145,214,228,137,2,131,154,101,114,106,17,216,182,30,95, +11,42,68,52,0,130,107,254,35,26,107,189,11,209,42,183,141,157,210,250, +132,42,135,231,97,187,227,173,19,77,156,130,38,102,73,22,208,123,151,89, +247,154,27,175,41,138,162,211,233,100,89,70,11,20,33,115,136,136,161,117, +87,13,1,40,136,32,199,196,17,52,181,207,173,253,112,228,212,118,182,104, +192,28,150,80,33,16,5,84,128,164,192,51,140,150,12,33,36,78,148,52, +3,26,228,214,97,113,113,124,192,81,145,201,100,86,36,162,138,64,68,112, +2,105,97,62,208,168,44,144,219,0,130,104,87,216,160,213,182,180,176,178, +40,35,45,139,73,72,42,45,25,51,18,122,48,139,44,174,104,171,17,205, +80,245,58,70,109,97,10,98,50,104,141,81,37,21,4,84,110,83,133,235, +238,255,43,108,186,126,192,106,44,206,230,77,145,97,51,158,150,166,63,189, +16,234,192,71,142,15,60,147,90,35,81,234,122,110,173,53,89,182,230,188, +167,170,170,82,29,41,81,154,232,163,95,122,242,154,27,79,79,154,73,218, +142,214,90,128,150,95,132,1,4,157,10,177,239,153,243,151,118,210,140,78, +157,58,181,183,123,241,213,175,190,229,190,207,127,238,245,111,120,195,241,237, +173,59,63,242,225,222,102,119,115,123,187,168,242,172,240,89,183,15,94,92, +158,147,35,99,16,72,193,2,17,137,42,45,59,184,129,218,53,149,193,32, +57,11,134,98,108,188,183,198,27,77,2,200,214,35,91,5,143,68,38,140, +99,214,245,14,50,97,16,129,170,234,162,1,228,98,60,57,32,194,208,212, +137,155,24,70,47,29,76,246,247,166,198,152,170,219,37,72,130,176,113,100, +179,214,121,81,16,85,160,78,202,42,23,20,64,81,171,198,161,205,76,235, +51,144,65,87,146,71,26,216,254,215,191,229,13,13,207,198,97,84,250,178, +153,167,122,54,201,74,215,169,42,0,24,244,55,68,36,49,186,170,50,216, +102,171,26,135,146,217,156,57,9,168,164,121,175,114,177,222,251,147,247,254, +246,167,239,248,155,107,175,57,150,121,120,241,197,23,79,157,57,221,27,86, +13,214,121,229,179,158,179,57,162,1,151,59,178,104,61,145,135,54,183,187, +52,55,34,160,180,128,25,113,82,178,64,0,204,41,57,195,23,70,231,182, +186,39,234,113,147,112,174,73,80,80,9,136,212,2,24,48,14,124,138,20, +234,192,140,31,249,216,39,191,229,173,239,232,245,182,201,23,129,131,247,46, +166,185,145,69,224,242,114,175,173,69,25,183,165,91,230,184,162,222,91,172, +217,47,59,254,112,132,219,246,12,49,7,67,25,40,206,231,77,91,196,44, +59,121,136,181,183,171,26,238,225,26,202,250,184,94,237,59,231,154,85,143, +72,75,176,39,34,160,185,95,248,86,68,164,176,64,192,136,200,74,53,189, +37,222,136,49,38,13,194,8,98,144,26,69,224,132,43,189,56,99,76,74, +112,197,87,203,42,199,119,121,134,33,0,81,219,111,203,104,172,181,142,136, +18,183,151,34,75,154,152,43,78,185,188,165,36,41,50,179,51,118,123,48, +56,118,116,123,123,123,187,91,117,84,234,197,51,229,6,17,29,145,160,178, +132,164,162,162,204,129,89,83,226,54,53,166,170,2,154,82,138,129,91,181, +57,0,104,149,55,26,29,131,160,42,168,180,166,157,23,98,241,46,229,206, +20,142,114,107,156,181,149,49,204,33,74,83,56,91,55,41,204,231,150,13, +96,84,136,104,60,17,241,226,202,113,41,8,191,232,122,94,255,97,218,95, +170,109,64,70,116,34,137,165,9,177,9,113,158,120,206,26,84,13,168,83, +12,132,26,163,198,88,39,110,0,197,24,148,68,146,164,176,229,254,197,131, +65,127,131,163,16,24,212,203,137,139,214,251,108,93,188,5,132,231,106,27, +226,229,69,101,125,181,203,202,18,184,174,138,14,77,221,232,194,76,162,27, +201,44,211,146,6,38,115,158,179,194,162,81,213,182,17,37,198,198,219,98, +54,157,102,214,37,9,104,220,233,155,78,135,172,177,125,153,213,243,110,213, +193,101,147,184,181,150,114,228,160,80,164,107,111,56,253,244,151,207,39,17, +64,51,24,108,220,246,250,215,91,159,109,111,22,207,159,127,126,50,165,163, +71,143,55,156,60,198,110,149,187,108,201,14,73,168,70,16,64,64,0,65, +81,129,80,20,16,72,149,67,98,84,4,160,24,35,17,160,69,1,37,139, +66,148,48,49,6,202,80,137,33,136,47,243,88,203,137,83,167,54,55,183, +94,255,134,219,103,113,58,109,102,199,143,157,156,206,198,159,189,255,142,215, +189,238,117,145,205,112,120,246,145,71,239,57,177,181,101,85,84,117,80,13, +15,46,78,78,93,127,188,78,35,11,25,26,73,42,214,25,99,29,162,86, +85,37,73,10,159,37,1,52,202,220,160,161,81,184,56,60,209,219,159,200, +116,58,99,72,101,230,179,225,112,255,252,1,70,83,22,157,44,239,0,192, +108,54,107,91,50,242,162,66,4,71,152,82,66,81,155,251,102,62,150,56, +255,163,223,251,141,251,62,125,231,117,103,142,205,198,35,219,173,78,93,115, +109,213,43,167,60,59,114,116,232,74,215,240,172,91,109,170,170,207,29,25, +52,70,209,32,81,107,240,8,68,21,218,68,243,34,31,128,40,140,106,0, +1,176,230,218,229,254,171,59,143,84,85,103,60,155,70,13,104,77,212,36, +192,153,65,98,139,181,195,198,164,186,30,143,119,183,142,28,255,209,127,248, +227,62,175,146,64,140,13,146,201,178,34,204,34,153,197,36,61,100,115,8, +47,247,243,136,92,1,156,88,55,86,43,64,238,161,97,217,170,163,38,111, +65,85,189,183,253,126,223,57,51,26,77,0,160,5,58,195,90,59,91,123, +176,174,49,173,235,149,62,221,74,211,136,153,201,66,155,137,211,22,199,7, +109,130,9,1,205,42,153,56,159,207,231,115,156,78,167,147,73,51,26,77, +102,243,131,200,43,171,87,163,33,14,56,25,143,167,211,105,93,215,33,4, +197,67,234,197,87,204,112,68,84,65,48,139,9,198,73,12,18,89,50,198, +113,74,176,20,117,20,21,88,139,106,101,41,230,160,170,146,226,214,214,214, +201,227,199,182,55,54,203,34,35,84,77,28,155,185,74,227,156,51,168,145, +99,76,9,148,219,82,117,96,195,44,49,112,74,144,162,164,164,109,223,104, +205,113,217,96,0,173,132,57,0,3,0,185,36,162,160,100,208,47,214,6, +16,34,154,43,132,20,99,45,13,113,158,121,231,11,71,80,120,211,243,62, +197,122,94,215,137,137,12,19,137,85,163,70,164,109,89,93,230,106,151,247, +114,25,64,142,107,130,202,41,165,122,54,55,206,236,237,237,236,236,204,47, +237,76,99,154,9,6,21,2,205,200,54,168,26,107,217,223,185,184,191,191, +59,155,77,98,12,150,108,147,20,4,47,188,112,225,250,179,103,83,76,6, +104,53,182,84,1,116,65,170,175,0,10,124,40,79,186,218,86,78,52,94, +41,149,217,132,80,16,73,226,220,230,24,125,152,112,182,89,82,176,227,241, +184,170,170,204,121,164,86,29,149,219,114,187,68,1,32,145,52,139,211,170, +168,102,205,204,15,113,100,119,155,81,232,148,149,130,198,58,212,49,20,85, +110,157,7,171,22,168,169,155,225,214,80,38,218,239,15,246,70,187,85,183, +247,153,123,239,253,230,215,190,201,90,59,26,77,6,155,113,56,236,187,130, +254,63,210,222,52,200,178,236,56,15,203,204,179,220,123,223,82,107,175,51, +61,251,6,144,3,14,22,2,32,1,8,92,134,11,184,88,12,129,75,48, +40,201,52,77,217,164,104,69,136,114,88,118,4,109,255,112,132,253,195,75, +56,194,97,253,146,29,22,101,209,92,100,6,29,34,104,210,4,40,2,1, +128,228,80,92,0,129,32,48,24,204,130,233,153,94,171,171,234,173,119,57, +231,100,166,127,156,251,94,189,170,238,30,65,212,137,142,234,247,94,189,186, +203,185,121,242,228,242,229,151,17,163,37,194,213,230,43,34,64,132,42,10, +68,43,24,41,18,129,128,8,35,18,33,137,0,160,88,107,17,85,20,129, +148,114,131,98,133,64,201,14,220,208,12,151,117,120,240,161,71,142,167,115, +176,56,26,109,125,254,115,47,24,170,36,197,203,87,198,198,133,135,31,126, +247,238,222,131,137,127,121,167,176,94,112,111,239,194,112,176,251,242,87,174, +62,254,216,83,198,27,15,166,195,69,225,157,162,136,104,8,97,88,14,53, +68,84,80,69,21,86,195,213,208,206,110,206,252,150,135,18,29,148,133,103, +238,212,10,158,59,183,167,157,249,142,231,191,19,212,180,161,43,69,29,113, +94,107,49,4,99,76,100,117,214,182,41,14,42,255,203,191,248,191,253,209, +167,63,241,208,165,189,202,131,27,143,202,193,208,12,7,84,216,115,59,67, +83,162,45,97,80,110,41,194,96,48,86,35,100,144,72,114,79,141,236,166, +40,100,7,194,0,128,98,254,0,1,64,9,37,169,106,170,121,206,133,76, +218,218,86,133,182,74,228,20,72,37,26,36,8,186,56,170,187,153,185,125, +251,206,245,235,215,159,255,238,31,36,227,153,117,217,213,213,192,1,200,114, +209,84,126,36,218,173,5,105,83,121,89,107,85,32,166,144,229,60,135,155, +117,133,147,221,220,98,225,94,112,63,75,212,187,226,130,34,44,10,169,110, +146,47,172,138,16,154,158,108,110,115,39,207,22,132,172,75,50,96,227,208, +36,2,49,181,2,141,117,64,2,32,228,9,128,18,43,17,17,164,136,86, +17,85,146,32,149,179,57,47,167,147,178,24,94,127,227,206,87,94,250,194, +225,157,155,41,73,215,70,85,35,146,44,1,64,98,73,147,201,209,124,58, +235,186,72,232,83,234,16,132,86,41,89,34,74,42,33,49,177,26,3,132, +125,121,10,34,228,221,59,65,131,209,149,126,55,44,59,192,40,176,72,41, +58,244,1,4,116,101,151,199,32,137,183,71,227,115,123,251,143,61,246,128, +181,214,57,3,194,177,157,163,138,117,68,164,156,66,215,132,54,72,232,56, +38,10,73,219,78,187,78,53,54,109,219,118,93,151,82,96,142,49,198,16, +91,17,137,225,36,82,6,171,246,219,214,90,0,42,138,66,145,188,47,137, +136,5,188,47,65,216,8,36,50,75,114,13,137,97,41,226,178,44,120,52, +210,238,182,219,82,38,144,69,215,44,181,115,149,83,87,116,0,101,232,2, +11,91,4,103,36,54,196,13,9,179,184,14,152,64,144,4,82,2,208,148, +132,149,174,221,156,47,142,38,179,217,224,165,175,190,244,181,175,125,105,190, +56,38,202,237,218,114,237,115,116,158,22,203,73,91,55,139,69,45,140,0, +6,165,21,72,80,154,22,216,90,239,172,137,145,9,145,86,4,42,168,164, +32,217,221,69,165,117,216,101,83,205,33,34,11,171,106,83,215,69,81,20, +190,82,209,210,20,77,211,148,14,1,112,71,47,46,231,120,241,226,120,120, +105,112,187,225,107,87,103,251,23,183,41,148,214,139,154,148,32,12,183,70, +179,249,162,28,140,80,91,72,18,20,169,146,185,222,128,237,152,192,152,14, +183,247,71,65,218,210,121,1,28,85,99,85,109,102,245,96,48,32,45,182, +200,237,141,170,255,245,23,255,209,143,253,196,143,187,145,61,60,56,122,254, +253,207,183,178,8,203,166,116,110,76,62,197,182,116,131,178,26,90,107,192, +137,18,11,33,81,22,46,131,168,42,130,0,202,144,151,18,230,100,55,36, +64,96,85,64,85,17,16,36,68,22,65,116,2,48,8,104,60,180,105,94, +237,92,228,171,139,47,126,238,95,191,255,91,223,217,165,132,80,56,11,31, +253,209,191,249,208,163,239,185,240,208,115,198,186,63,251,139,207,52,243,27, +56,122,212,14,135,157,73,133,235,158,125,239,55,96,25,199,35,139,174,113, +206,104,142,73,19,33,106,224,128,5,182,216,17,82,54,59,26,43,197,126, +53,75,83,118,177,36,112,118,16,185,43,108,161,165,107,162,170,53,150,249, +188,43,14,222,224,20,5,77,33,234,108,49,82,44,186,84,59,231,42,19, +126,229,23,255,241,31,253,254,239,60,122,249,130,35,195,96,105,12,176,165, +166,236,252,136,76,9,166,48,182,116,88,26,242,20,93,107,12,230,26,26, +193,21,205,80,159,5,203,198,216,6,76,74,80,88,200,244,245,144,78,109, +18,145,0,214,218,54,197,64,157,247,4,169,130,182,192,102,233,177,253,147, +127,245,135,127,231,103,126,254,157,31,250,254,4,0,208,21,101,15,47,243, +133,101,104,81,78,178,100,155,74,136,140,100,7,206,123,39,210,23,151,136, +72,46,81,71,204,212,123,154,41,194,66,8,153,37,111,173,7,109,211,180, +0,208,182,173,42,90,107,179,183,28,66,202,72,139,123,110,224,247,212,190, +217,16,40,172,131,85,32,111,29,89,20,145,216,117,69,97,145,148,89,153, +99,182,10,39,147,163,219,215,223,188,118,227,197,151,95,254,226,235,87,95, +158,76,238,128,136,138,177,214,167,20,0,4,73,45,81,136,227,81,26,234, +0,0,32,0,73,68,65,84,109,140,81,5,19,215,104,74,80,74,162,89, +229,173,21,10,98,223,130,90,86,77,221,85,51,10,141,4,41,165,208,132, +232,136,153,89,24,92,229,98,215,0,64,12,65,57,237,238,238,62,254,200, +163,231,207,237,89,107,81,58,102,230,184,162,8,84,172,155,80,215,117,106, +109,74,169,235,186,166,107,187,174,107,219,118,94,47,155,186,237,234,105,93, +215,139,197,162,174,23,109,219,182,93,221,117,29,51,179,180,155,219,68,190, +72,99,204,112,184,111,140,27,84,163,221,221,253,193,104,187,170,134,194,3, +68,114,190,36,178,66,66,217,111,16,6,97,142,56,28,248,46,182,154,34, +36,65,144,118,89,51,99,53,216,137,156,132,65,156,136,36,93,131,25,81, +172,241,32,170,218,119,75,44,138,162,109,210,139,47,126,233,245,175,254,197, +104,92,188,121,237,149,227,233,205,208,46,178,116,34,90,107,74,209,128,8, +8,25,132,72,164,36,49,160,71,209,222,168,23,17,71,4,0,204,108,87, +92,15,27,50,112,34,12,186,97,65,175,95,228,22,198,25,35,201,204,12, +168,170,169,11,214,218,102,217,14,6,231,175,190,54,251,196,103,126,127,112, +233,145,122,126,244,93,127,237,3,30,117,224,6,93,215,18,115,219,198,237, +225,110,156,179,84,45,161,141,210,39,202,156,115,138,96,173,109,99,171,138, +65,115,115,241,68,100,171,170,18,17,194,84,141,198,109,35,63,241,227,127, +107,186,152,249,129,251,196,39,62,241,61,223,241,221,214,218,162,40,66,8, +69,81,88,107,188,207,229,89,180,38,125,121,11,129,191,231,18,200,17,85, +236,147,152,132,104,34,135,164,140,208,156,187,184,245,248,83,143,250,178,104, +107,17,145,20,225,193,43,143,62,254,196,83,173,88,85,57,56,56,168,235, +186,218,170,162,118,131,114,164,165,58,75,90,166,88,178,177,9,209,2,229, +139,17,68,234,217,160,80,208,56,219,207,182,2,82,94,161,198,8,128,140, +183,7,30,168,11,209,18,92,184,184,29,23,237,242,112,2,0,41,165,103, +159,125,246,11,47,190,122,124,120,48,220,185,80,21,22,33,253,250,47,253, +179,63,121,225,179,151,46,157,119,222,221,184,126,235,201,103,158,118,149,33, +167,118,108,135,195,170,168,156,41,173,43,8,44,100,4,222,38,11,231,38, +187,120,63,99,122,106,82,0,64,68,145,49,2,91,0,52,0,196,130,128, +196,131,162,108,142,231,21,193,209,209,109,143,213,23,254,242,149,247,125,224, +249,79,124,250,15,158,251,192,15,172,23,11,108,40,184,251,247,243,21,82, +96,208,148,89,79,50,167,133,138,217,144,207,211,185,7,233,143,135,0,0, +182,40,10,17,113,174,202,133,4,204,156,253,228,158,192,32,241,153,243,109, +110,230,112,58,88,147,63,239,186,46,133,72,202,192,138,74,0,202,162,198, +81,81,20,132,94,33,138,4,99,76,167,252,250,215,94,125,237,229,63,39, +210,131,219,111,212,205,52,165,176,34,20,113,125,6,3,82,50,70,68,48, +147,70,56,109,147,90,95,24,231,145,44,144,137,162,5,64,140,209,249,1, +172,218,216,169,230,29,90,85,149,92,153,186,232,172,47,171,65,91,47,141, +243,4,60,153,204,56,53,69,81,60,116,233,242,99,143,63,178,179,53,142, +161,77,169,3,35,4,42,10,41,165,16,83,215,197,46,114,219,182,117,221, +134,165,239,186,102,89,207,234,122,182,88,28,29,29,221,62,58,62,88,44, +102,245,98,210,52,77,221,44,67,8,204,44,178,166,152,238,214,145,251,181, +191,73,68,198,149,206,21,91,227,221,241,214,222,222,238,249,75,23,31,222, +222,219,47,139,202,168,85,86,4,43,76,200,192,8,156,208,25,40,139,166, +244,84,58,59,153,47,22,205,212,15,188,245,149,134,54,112,98,37,195,172, +44,170,186,174,41,99,78,202,73,132,85,49,165,156,142,95,126,238,115,127, +54,59,126,209,90,90,206,143,0,163,2,11,107,166,101,76,177,81,149,152, +58,231,12,176,56,231,0,213,121,82,77,68,100,44,2,72,8,1,147,177, +232,173,183,155,50,176,78,55,157,94,252,39,95,88,123,181,125,151,100,81, +17,97,96,0,64,78,69,53,146,40,183,15,111,125,234,147,159,182,90,254, +220,79,255,220,87,190,252,165,143,255,243,95,250,161,143,254,245,100,224,232, +206,241,238,254,254,98,177,216,51,35,173,219,174,156,169,106,238,206,18,66, +11,0,77,211,20,69,209,71,90,4,168,239,250,196,134,92,219,182,198,194, +162,158,85,213,206,120,111,231,159,254,234,47,255,212,79,253,237,31,249,232, +223,144,20,154,206,60,249,204,211,95,125,241,43,198,89,107,141,115,6,29, +20,133,203,233,233,211,215,223,123,242,247,92,117,120,50,9,178,209,39,79, +140,43,193,128,55,26,227,114,176,63,188,242,216,131,133,43,235,40,214,218, +46,193,249,7,31,171,131,160,3,230,238,119,126,251,55,159,124,242,73,129, +120,60,57,26,95,24,178,77,126,100,165,138,82,170,24,182,61,43,151,34, +146,32,32,228,30,220,32,146,20,21,68,68,48,183,64,232,179,139,192,68, +154,82,235,42,43,142,13,216,229,81,107,77,81,85,248,135,159,249,244,187, +223,253,238,65,85,128,48,114,116,165,249,204,39,63,241,153,143,127,236,129, +7,207,39,94,168,53,143,60,249,120,225,7,6,97,224,125,180,181,245,198, +150,214,21,150,60,162,81,48,144,33,13,235,7,154,159,251,91,239,16,217, +21,84,17,64,32,75,170,194,162,128,26,234,56,116,59,7,175,222,168,160, +82,160,27,7,203,218,134,111,249,240,247,108,162,58,54,143,124,63,60,20, +161,69,64,66,75,104,21,152,114,186,23,105,13,97,203,177,61,201,22,152, +49,185,174,108,93,114,110,85,117,58,157,110,111,143,243,244,197,200,0,96, +140,49,100,83,228,181,100,223,125,226,51,31,246,46,39,170,114,4,16,34, +2,82,34,75,4,200,210,133,16,66,48,132,206,153,92,52,33,18,110,222, +122,243,213,151,191,194,220,53,237,194,88,205,169,81,0,200,120,133,172,236, +176,167,88,176,128,46,132,24,213,179,162,177,94,137,242,22,228,108,111,187, +74,238,235,179,110,121,161,8,10,33,68,34,139,100,140,113,204,28,235,90, +18,123,231,30,186,244,208,35,143,60,116,238,220,185,20,187,182,89,150,222, +89,114,203,229,28,163,107,99,232,186,216,180,161,174,155,166,139,109,27,150, +117,219,44,155,227,201,157,131,91,215,14,15,111,207,102,7,203,249,81,219, +44,82,10,33,117,253,178,199,158,238,38,67,2,215,232,202,51,179,164,230, +184,40,170,166,89,206,22,115,99,220,249,243,151,17,168,44,7,132,8,4, +154,237,91,81,82,11,34,76,42,50,71,29,56,163,169,94,28,222,120,211, +15,75,131,80,12,69,21,193,186,220,232,67,36,129,48,228,12,38,26,50, +70,53,27,170,16,83,108,219,250,224,206,205,201,157,107,44,41,133,218,123, +171,42,28,217,24,151,209,142,72,42,34,214,146,38,246,222,55,77,131,0, +134,52,27,104,0,224,156,65,2,145,148,58,46,75,191,222,225,86,59,242, +169,200,29,108,236,139,0,32,61,225,152,138,200,26,89,73,68,41,5,14, +177,155,179,129,109,17,9,44,232,199,239,251,224,119,125,242,99,255,247,178, +105,70,163,225,87,95,122,237,195,31,186,242,139,191,244,79,126,246,103,255, +19,175,126,218,118,136,72,206,170,242,114,217,84,85,229,189,71,212,30,229, +4,8,208,119,242,76,41,187,51,137,74,136,77,36,239,223,241,141,239,80, +214,173,173,173,219,7,215,14,14,142,31,121,228,145,215,94,123,45,165,96, +208,7,78,165,177,10,146,251,225,189,197,50,190,75,248,243,58,237,77,48, +213,190,252,188,105,59,117,81,33,5,16,239,104,107,119,16,91,60,158,206, +30,186,242,200,171,175,223,156,213,114,126,123,44,162,111,188,254,242,98,118, +124,229,194,229,210,87,22,205,120,48,182,206,248,202,137,11,64,192,154,117, +158,34,98,86,121,25,174,13,0,204,1,193,136,246,220,98,198,24,64,1, +213,194,15,128,133,145,173,39,128,216,213,203,219,55,15,30,222,127,124,145, +166,85,85,17,192,249,253,221,127,244,191,252,79,127,239,31,252,195,103,158, +122,250,147,31,255,173,139,187,67,7,93,181,85,214,93,183,61,186,80,148, +213,43,47,189,244,13,79,63,133,222,144,71,227,8,13,16,101,252,49,80, +15,15,93,11,243,137,197,179,130,130,157,154,26,0,0,52,64,185,135,13, +67,238,82,192,96,12,133,6,45,154,173,98,43,214,241,55,127,231,227,239, +249,208,223,248,251,255,249,127,125,107,114,91,23,245,198,17,54,146,182,120, +214,234,202,131,179,105,131,152,241,189,176,34,85,198,85,147,141,245,216,180, +79,243,64,68,187,174,166,80,85,99,92,46,223,229,36,96,114,70,226,44, +154,247,158,111,215,179,208,118,77,104,155,148,18,160,64,66,99,52,138,136, +106,81,122,99,140,37,103,140,209,128,204,12,40,214,210,246,238,94,215,181, +101,89,246,248,94,22,99,76,215,117,214,90,5,134,126,90,137,108,97,173, +87,65,63,218,54,69,137,198,146,113,104,92,190,49,34,146,85,254,150,51, +95,88,222,126,17,8,73,19,179,2,170,116,77,43,177,59,191,183,255,232, +195,143,93,222,223,5,0,142,201,34,41,152,217,116,153,82,66,212,233,97, +93,215,117,211,116,93,12,93,215,45,234,230,232,232,232,206,157,59,183,238, +188,56,157,78,167,199,135,203,197,44,133,134,57,34,8,17,52,109,218,180, +233,0,114,162,76,115,59,202,245,228,172,21,1,167,78,33,133,80,51,87, +117,195,179,121,55,24,240,206,182,183,142,20,12,179,81,1,17,4,192,36, +6,73,85,35,135,229,124,214,182,203,163,233,225,245,131,87,143,143,39,135, +223,240,142,119,10,57,135,6,178,203,200,162,146,68,24,68,193,228,74,103, +50,6,189,247,29,183,213,160,120,236,241,135,226,37,211,52,77,215,53,34, +34,41,133,16,16,76,140,49,219,164,198,56,132,190,4,101,177,88,56,231, +70,163,10,72,153,57,183,3,205,114,157,82,82,117,103,28,216,85,150,246, +222,66,146,23,70,198,63,209,170,116,7,0,208,80,8,209,217,45,96,226, +148,16,53,38,182,126,44,78,143,235,201,48,150,223,244,158,119,180,220,52, +210,130,129,216,177,247,165,170,38,73,139,197,226,230,205,27,69,225,202,65, +17,66,32,159,161,52,217,189,37,85,154,76,38,231,207,159,239,66,0,180, +190,24,88,165,241,120,120,231,246,237,115,23,119,209,208,203,175,190,82,150, +101,46,16,44,203,178,44,189,47,114,145,137,189,235,250,255,13,182,30,244, +186,47,75,126,175,248,202,162,8,8,129,163,43,21,218,136,214,54,109,120, +241,75,95,170,235,165,25,236,163,219,73,234,85,219,175,189,246,21,208,136, +32,220,138,133,18,2,65,129,152,196,88,176,96,33,151,204,0,8,2,145, +246,216,124,237,19,8,68,106,8,133,114,163,88,64,4,69,10,44,5,121, +231,109,23,131,2,57,239,219,134,7,197,222,23,191,248,135,239,127,255,251, +63,251,233,79,61,247,158,247,93,59,152,160,116,191,252,207,254,247,219,215, +95,121,230,193,243,118,0,179,184,60,119,249,162,245,182,139,205,55,189,251, +217,65,97,195,14,86,85,229,10,171,164,100,65,73,145,20,251,58,179,147, +106,159,53,6,248,126,30,46,8,174,192,222,172,194,202,68,74,200,52,162, +209,236,246,156,103,241,15,94,248,19,42,207,253,181,231,127,200,20,59,204, +135,222,23,103,103,184,63,114,132,123,14,181,136,72,40,68,4,154,172,177, +146,95,227,9,91,240,218,62,37,162,148,54,142,131,104,69,100,48,24,56, +87,52,77,163,154,0,128,208,180,177,203,142,137,108,0,247,245,4,150,172, +136,39,59,252,250,18,85,21,88,136,168,112,14,52,33,16,24,3,44,72, +38,7,212,208,152,28,248,52,198,108,109,141,158,126,230,137,183,61,125,101, +185,92,118,77,179,88,44,234,102,17,219,78,149,219,182,205,122,19,141,17, +64,103,139,225,104,183,42,199,182,40,213,208,112,60,38,235,189,247,206,57, +85,141,49,86,85,5,64,0,196,217,134,85,84,16,160,222,26,79,41,129, +70,16,30,149,197,197,43,143,61,116,249,210,222,206,121,9,29,0,132,16, +166,139,134,89,147,202,98,94,79,38,19,229,65,215,117,93,179,92,44,167, +199,199,135,7,7,183,110,221,188,126,112,112,251,120,254,149,220,48,68,85, +113,133,4,86,85,1,219,215,30,18,89,107,189,47,123,138,26,146,205,249, +89,127,159,117,71,4,64,237,197,7,30,185,252,192,35,59,187,23,135,91, +59,96,188,247,148,24,114,5,135,8,176,42,129,104,146,72,24,219,230,214, +237,235,183,111,189,54,153,92,123,243,141,55,2,199,167,158,121,59,19,147, +113,34,162,41,170,114,78,224,19,246,60,2,170,42,210,215,189,12,135,213, +219,222,246,116,234,46,212,117,221,54,77,93,215,33,116,161,237,0,160,235, +58,160,142,153,173,113,34,98,137,68,120,58,155,77,166,71,59,91,195,209, +86,5,32,219,219,227,148,146,180,17,147,183,246,84,193,111,239,47,156,184, +215,167,18,103,107,247,118,157,34,199,13,124,95,155,226,160,24,171,154,217, +100,238,189,141,33,169,170,136,142,118,199,243,118,209,196,214,16,33,67,49, +240,45,183,77,108,218,186,83,213,114,88,94,188,120,113,189,111,27,99,0, +65,128,85,123,163,67,36,204,102,179,237,237,109,81,140,70,98,152,140,44, +62,241,228,195,175,188,248,202,197,139,231,0,233,67,31,252,240,100,50,121, +226,137,39,202,161,7,16,230,152,18,154,194,108,170,114,253,58,2,124,27, +154,125,237,221,139,2,132,208,137,19,86,245,222,164,38,2,22,165,47,57, +198,170,170,254,203,255,246,191,223,191,242,84,96,44,144,254,224,51,159,122, +240,242,133,170,170,134,195,106,176,93,41,161,115,22,65,0,20,149,140,26, +193,132,136,72,154,45,73,236,179,229,128,4,138,185,46,17,209,128,244,173, +116,148,37,36,48,150,92,144,96,188,113,182,240,190,116,84,62,247,220,115, +177,173,45,153,20,186,110,57,249,159,255,199,255,78,186,246,27,222,246,4, +115,231,11,183,61,30,69,109,141,41,182,182,118,76,9,234,83,81,121,83, +18,154,85,189,3,246,42,77,86,252,114,107,15,247,212,60,220,165,245,72, +132,69,140,85,85,149,164,86,137,196,113,167,203,59,117,156,181,97,17,186, +56,248,123,255,217,127,243,45,223,241,145,197,116,226,242,221,111,42,187,19, +13,117,31,204,198,70,149,1,153,148,169,240,172,181,8,61,199,251,218,249, +80,85,99,76,89,12,96,195,56,179,34,82,20,69,174,169,168,170,138,208, +148,165,75,41,179,75,209,250,134,54,221,150,211,79,253,84,33,90,83,47, +50,133,178,48,147,0,146,198,36,198,246,123,38,34,50,107,134,170,165,36, +195,81,213,53,145,44,217,210,187,232,43,28,1,162,104,242,40,5,22,153, +70,88,0,173,31,84,227,45,87,12,189,47,182,118,182,145,108,81,20,198, +21,100,92,81,148,222,251,162,40,148,40,183,162,236,59,111,96,134,229,97, +87,47,29,218,208,117,5,193,99,143,94,121,248,210,14,176,112,87,51,115, +23,185,105,186,122,217,53,77,108,234,176,88,54,77,19,187,112,216,118,139, +249,236,248,214,205,171,55,175,189,122,120,231,250,124,118,184,92,206,157,7, +206,144,176,40,136,72,206,27,235,8,204,246,238,182,247,222,123,111,200,102, +73,204,26,167,24,152,205,41,90,107,61,0,95,20,21,39,16,197,47,189, +244,213,69,195,151,174,60,92,13,135,133,19,236,56,0,139,8,11,40,72, +146,136,194,33,202,98,186,188,126,253,218,27,215,94,62,60,188,150,100,137, +196,109,219,138,113,214,85,57,113,172,192,32,9,149,33,131,141,88,172,181, +41,196,140,226,102,78,69,105,69,60,185,100,21,40,113,105,140,34,168,178, +90,86,5,76,236,168,204,194,97,44,94,190,242,208,205,131,155,203,229,124, +56,46,83,140,79,62,249,164,243,38,25,73,41,82,130,117,46,44,139,30, +156,108,170,247,32,202,94,75,240,26,52,190,254,91,49,134,145,82,72,128, +98,73,147,70,147,243,167,9,151,211,102,190,85,239,239,239,26,67,63,252, +195,63,170,125,181,47,137,196,229,178,201,85,58,119,238,220,217,221,223,25, +12,6,33,5,17,17,73,206,22,249,68,214,17,51,163,47,34,71,95,64, +187,152,108,239,84,177,109,137,236,11,127,244,231,239,122,238,221,95,248,194, +23,222,253,158,119,90,107,202,145,7,147,24,132,86,178,221,3,18,78,53, +120,185,159,173,39,27,65,39,93,25,127,128,28,208,122,3,150,153,83,27, +41,136,36,65,72,33,176,47,198,228,70,32,145,117,201,169,45,42,234,186, +78,6,147,173,209,206,173,217,173,43,231,46,168,101,50,42,96,209,22,0, +9,80,214,42,79,65,242,38,131,107,2,165,76,83,8,137,85,13,160,47, +65,3,70,69,178,40,144,98,170,135,35,103,77,188,120,225,242,63,253,39, +255,248,59,191,237,91,201,184,97,229,167,211,217,55,61,247,118,76,161,53, +158,134,133,241,12,14,70,91,101,181,229,124,101,88,26,64,163,106,88,5, +20,192,244,92,33,162,156,210,42,119,191,97,229,172,157,152,187,7,1,114, +138,128,132,0,194,64,228,33,152,229,100,17,230,174,180,197,167,255,248,143, +127,240,199,254,238,55,127,240,251,110,29,205,134,6,28,51,172,240,188,235, +195,245,167,144,251,69,246,78,190,147,55,217,254,39,88,0,144,158,226,151, +84,69,65,21,12,243,137,113,138,136,125,102,45,167,65,17,113,185,172,153, +139,220,131,53,165,132,230,173,206,186,30,121,85,247,14,209,138,173,16,12, +17,90,196,104,12,165,24,214,203,160,44,203,16,83,215,205,1,192,149,6, +59,37,32,95,58,91,32,24,6,225,162,180,204,156,152,137,72,16,203,106, +52,26,143,140,29,88,219,23,5,143,183,182,141,243,170,154,19,163,41,37, +42,203,245,26,203,2,162,138,170,226,156,233,234,118,224,236,67,15,60,184, +59,130,178,144,102,58,79,18,167,109,219,181,113,185,236,230,179,182,110,66, +12,24,186,20,35,31,45,239,28,29,222,190,113,253,181,235,111,190,114,124, +231,141,212,77,1,58,149,182,94,140,242,116,121,79,190,28,140,199,227,114, +80,89,107,19,246,83,167,138,8,25,55,228,16,145,87,79,107,93,104,156, +181,67,224,80,12,42,80,195,9,173,224,19,79,63,254,142,231,158,157,207, +231,166,139,194,29,145,34,38,64,85,97,85,101,77,33,217,219,7,71,7, +119,110,29,29,223,58,60,186,78,190,44,75,219,52,141,43,149,37,246,44, +15,216,83,116,18,65,140,49,155,219,217,176,47,138,130,37,72,18,69,80, +4,52,100,189,65,160,142,107,22,177,198,0,88,43,72,228,145,1,80,139, +194,93,121,232,225,47,126,233,47,6,131,1,51,31,220,57,120,230,137,103, +152,121,48,46,197,39,116,39,134,30,108,120,184,112,218,170,93,191,213,53, +112,39,83,233,193,137,18,100,164,196,170,137,17,113,54,107,170,178,112,30, +133,211,71,158,255,129,95,251,181,95,57,183,181,235,209,237,108,143,81,105, +62,93,20,69,53,155,205,246,247,247,147,166,208,37,107,109,110,89,37,154, +156,115,34,18,219,206,88,84,81,68,244,222,55,237,210,145,179,206,116,109, +93,64,185,53,220,50,198,196,152,158,255,158,239,157,79,166,109,219,14,135, +195,200,109,81,20,53,183,133,177,214,209,230,29,233,233,128,250,253,71,238, +39,122,202,60,177,6,147,130,42,34,96,89,86,46,141,39,243,41,72,242, +126,148,146,52,109,2,178,101,81,146,193,24,227,254,246,214,12,38,163,193, +214,100,118,252,96,177,7,133,168,211,8,129,208,26,220,224,179,89,67,193, +1,136,122,24,13,16,162,66,207,37,65,200,60,67,24,26,176,104,48,165, +224,77,113,249,129,189,241,160,232,4,84,120,119,107,251,206,228,120,89,207, +31,123,242,113,4,41,60,65,181,5,134,71,227,129,169,176,28,22,182,68, +113,161,24,120,137,128,230,132,90,2,17,84,69,181,79,245,108,58,185,253, +165,221,199,195,117,6,19,175,99,109,4,128,18,161,158,118,165,86,191,247, +187,191,13,84,61,254,212,55,53,236,92,229,235,227,27,22,52,222,21,190, +91,77,234,189,31,4,153,140,2,238,225,129,235,127,61,113,45,228,206,144, +6,0,115,187,139,236,164,195,134,214,99,68,20,181,93,8,170,105,56,222, +98,230,216,118,24,131,115,46,211,156,156,177,236,0,32,114,114,206,19,218, +148,4,88,141,241,104,24,209,128,204,189,197,38,90,192,44,241,157,53,166, +107,66,57,40,208,74,148,166,223,33,177,242,5,24,27,219,69,28,22,59, +29,116,88,216,148,130,25,150,61,195,74,66,133,22,173,36,48,229,224,220, +104,235,188,26,235,189,47,252,128,172,87,44,156,171,202,98,104,168,0,44, +0,141,1,86,53,204,134,53,23,7,170,166,200,169,13,117,115,233,252,248, +129,243,126,232,107,224,182,158,97,8,88,55,60,155,22,179,69,104,26,14, +65,235,46,165,148,234,118,57,153,28,45,110,252,229,181,235,87,175,221,124, +125,190,56,236,98,20,53,170,85,228,129,43,164,40,170,225,112,88,86,3, +231,156,49,14,208,40,98,97,109,78,118,19,17,98,31,80,39,34,145,228, +92,1,0,204,108,140,33,52,189,134,50,131,173,157,253,217,113,189,183,189, +251,253,31,249,190,103,223,246,76,219,44,236,16,230,50,10,139,152,146,160, +170,134,148,137,168,187,78,234,233,237,201,157,107,119,110,93,13,109,195,137, +216,22,231,47,95,233,160,163,40,49,142,192,86,145,201,11,91,72,81,65, +193,89,177,73,34,171,0,25,164,128,64,26,100,232,7,33,164,194,43,64, +83,184,50,117,237,176,216,201,13,236,58,152,0,0,10,163,53,168,56,28, +148,202,214,155,82,160,66,36,72,128,84,52,24,108,25,200,171,145,33,17, +16,65,79,58,160,103,253,145,124,179,121,31,93,227,216,97,13,145,95,197, +229,85,149,90,54,131,6,220,240,120,113,88,12,70,204,16,26,15,67,243, +246,247,188,51,253,250,175,46,155,122,103,123,36,161,243,198,254,139,223,250, +216,247,126,255,15,84,82,165,101,48,67,76,154,44,186,157,157,253,8,169, +77,205,8,6,0,64,206,182,49,32,24,6,221,218,219,21,17,23,196,83, +17,130,61,63,126,112,241,102,61,168,182,219,101,7,133,124,226,183,254,223, +239,253,200,247,181,18,180,162,134,162,45,61,26,1,102,114,78,129,251,216, +55,129,194,186,43,242,61,42,47,1,214,88,207,245,50,215,252,223,194,39, +219,16,215,145,70,134,74,219,30,206,145,5,200,55,169,65,91,89,227,84, +143,95,248,151,191,113,251,213,151,159,126,230,9,40,203,194,13,200,198,199, +158,186,0,78,146,56,43,142,144,65,22,96,11,93,111,30,27,151,192,171, +246,74,217,26,203,139,88,1,84,118,0,132,161,193,72,30,10,17,227,246, +236,45,184,137,178,253,31,254,157,159,59,62,62,110,187,197,67,15,60,118, +238,220,5,235,81,80,124,49,99,149,37,243,78,49,206,203,72,73,69,132, +28,9,138,230,36,151,42,8,34,90,84,16,10,249,68,136,136,208,115,199, +169,42,122,138,109,52,64,158,202,76,246,158,67,183,141,148,34,92,26,225, +37,23,50,234,14,245,213,151,174,94,62,119,241,250,228,149,84,158,251,187, +63,255,63,60,247,161,31,188,51,95,142,71,116,44,93,180,96,228,172,134, +89,249,19,114,230,243,254,169,48,1,244,29,13,13,57,78,74,104,133,33, +35,4,200,16,32,6,78,210,55,208,64,148,147,205,140,153,173,115,69,140, +49,243,39,35,98,198,64,22,69,145,43,213,238,249,200,243,53,49,179,0, +228,18,47,0,80,200,101,237,210,183,196,37,132,190,89,4,122,239,153,251, +30,189,235,2,50,34,66,180,197,96,72,49,162,53,228,108,74,69,46,169, +99,102,98,35,88,42,49,160,43,135,187,213,104,7,201,26,111,156,173,140, +113,222,123,239,10,235,221,138,99,203,32,18,139,0,38,81,35,34,6,20, +52,166,208,93,218,31,237,141,203,210,27,84,142,145,66,195,243,69,90,46, +194,225,52,212,117,155,121,0,83,104,187,176,56,62,62,184,121,235,218,245, +87,94,188,115,116,107,89,79,4,153,153,67,10,214,13,199,227,113,230,154, +118,190,200,214,28,25,151,53,29,185,172,245,92,175,237,54,20,95,126,78, +217,18,12,33,105,98,231,92,195,36,17,223,243,206,119,125,232,3,31,124, +228,161,135,154,229,50,165,150,0,218,24,2,75,207,171,202,42,194,137,67, +23,234,59,135,55,174,93,255,218,98,49,107,187,86,144,182,70,163,92,107, +161,61,103,87,95,182,172,194,170,140,0,198,18,160,101,77,204,81,24,8, +225,194,133,11,79,62,246,184,45,73,36,73,76,41,133,76,207,135,154,17, +54,125,179,149,178,44,67,27,167,211,121,138,188,191,243,212,159,188,240,49, +196,94,36,156,115,198,36,133,76,234,119,87,49,226,93,46,206,58,246,183, +41,190,103,244,163,177,164,170,41,70,68,35,34,41,70,192,232,28,223,185, +57,249,246,111,255,246,23,62,253,201,202,219,241,240,193,227,227,59,207,63, +255,124,233,139,136,32,36,44,130,6,21,148,153,129,212,174,16,21,43,235, +67,79,134,151,69,90,12,199,195,27,135,111,94,222,127,248,202,227,15,254, +202,63,255,213,31,249,137,31,33,180,12,108,60,216,138,230,139,195,221,209, +142,115,133,161,123,187,105,112,122,191,63,253,139,251,126,63,187,35,208,87, +31,245,71,176,228,148,37,197,118,88,217,143,125,236,95,60,250,216,35,101, +233,151,245,124,48,246,155,127,149,103,41,239,28,119,219,155,247,189,24,128, +51,177,54,21,145,148,84,17,112,166,36,93,154,238,156,175,220,248,178,45, +104,25,22,139,197,108,119,103,203,90,83,12,139,225,112,96,188,5,236,171, +215,113,53,206,158,20,33,103,77,87,27,88,175,244,99,27,65,21,16,152, +25,16,144,76,198,233,170,153,25,68,137,254,171,95,124,229,169,135,118,186, +166,35,18,117,241,11,47,94,255,247,127,234,63,125,215,123,191,117,81,183, +69,225,82,106,64,212,162,85,216,196,174,220,219,214,126,107,27,252,30,215, +188,26,34,98,78,203,173,141,49,182,109,59,24,140,214,94,122,222,168,179, +187,186,2,42,111,30,17,0,128,104,221,13,39,115,56,245,39,147,213,48, +132,136,152,171,130,173,181,33,37,208,60,173,102,13,6,4,48,184,170,23, +49,198,173,85,158,136,144,120,133,78,140,162,41,134,227,243,101,181,207,8, +198,160,247,37,145,53,214,57,231,172,241,100,29,89,147,243,24,8,70,114, +117,188,8,199,6,49,142,6,230,129,115,85,233,141,83,13,173,212,181,46, +102,60,153,118,179,89,59,143,117,234,18,71,145,152,234,229,124,54,187,245, +230,245,151,223,188,250,210,209,193,245,182,173,131,180,136,74,214,108,141,198, +163,209,78,85,142,92,97,51,59,131,49,134,140,179,214,231,54,193,189,214, +163,158,186,134,168,39,98,18,208,162,40,132,33,198,136,0,69,65,57,42, +120,97,107,255,189,239,125,207,123,222,245,77,133,183,203,229,212,26,55,30, +140,15,14,14,219,128,33,166,148,132,25,88,41,9,47,151,199,199,199,7, +111,92,123,233,230,173,215,57,45,235,118,137,198,238,238,157,51,198,73,20, +177,44,146,84,89,50,120,69,57,231,49,242,70,133,43,120,32,167,80,140, +70,87,174,92,137,221,220,90,155,161,53,121,167,66,84,4,64,217,82,148, +16,91,85,109,186,8,234,110,223,58,62,56,104,112,85,243,159,99,164,184, +58,226,74,164,206,234,190,108,247,109,122,64,107,39,119,67,16,245,228,219, +144,8,108,138,0,108,84,17,137,209,180,77,119,48,95,118,207,127,215,247, +126,246,83,159,204,59,241,151,191,252,229,111,251,142,231,95,191,250,230,238, +147,5,89,237,32,90,103,12,153,216,69,235,173,163,158,69,114,173,245,100, +5,92,104,164,118,206,205,186,233,222,238,133,102,185,60,127,233,220,219,191, +241,109,93,104,62,242,239,125,63,99,236,116,89,85,213,182,27,42,68,102, +36,244,171,206,86,39,107,70,207,200,253,215,55,214,250,43,41,75,207,120, +134,136,200,73,8,164,116,120,227,141,151,175,93,125,237,109,143,61,192,18, +119,199,59,166,52,214,18,98,90,239,148,103,14,245,86,154,110,115,136,174, +218,158,73,182,59,147,48,179,206,230,183,246,247,246,162,95,22,222,15,42, +76,16,183,182,138,114,103,43,50,186,202,85,195,210,151,14,80,1,17,16, +200,100,215,240,172,226,3,128,108,172,244,243,156,17,53,217,44,86,180,214, +101,122,71,68,84,72,25,202,18,121,226,211,104,8,251,79,61,248,236,244, +214,226,179,159,253,236,135,62,252,193,223,250,221,255,239,195,223,247,51,223, +246,61,63,230,170,253,249,162,30,56,154,79,102,202,194,34,167,111,125,67, +193,233,153,57,57,187,125,222,253,246,110,7,60,75,39,108,108,192,86,20, +156,47,186,174,203,90,220,185,190,93,119,14,145,156,198,55,111,204,1,81, +238,237,101,76,46,38,96,4,21,97,94,85,44,169,202,42,187,39,153,22, +102,117,88,64,160,108,31,229,174,70,100,208,58,68,178,70,236,90,105,146, +122,81,47,70,125,49,26,140,206,121,191,149,80,17,165,40,202,94,185,144, +35,107,16,17,20,133,32,115,32,101,201,7,141,28,235,97,105,30,186,180, +63,242,81,133,187,142,23,243,48,155,133,217,60,76,103,177,94,114,48,33, +69,6,166,216,117,211,201,209,205,155,175,222,188,250,210,157,219,175,165,168, +81,146,136,88,111,170,225,120,103,103,175,172,70,153,83,218,90,107,93,225, +156,179,214,27,231,87,47,122,77,151,7,97,166,177,67,91,148,93,215,161, +209,225,112,156,82,106,234,197,104,52,186,112,225,194,119,126,232,249,253,189, +45,36,173,235,25,2,118,93,60,62,88,76,142,195,60,165,166,105,187,86, +149,149,57,181,205,228,246,193,27,215,174,127,237,198,141,87,186,48,35,3, +81,116,56,26,109,237,236,231,110,47,217,81,68,82,145,4,36,61,223,42, +106,126,193,42,185,38,47,69,109,155,174,235,194,192,217,193,96,132,10,49, +117,204,172,154,144,84,149,53,117,214,82,89,97,215,5,50,98,221,112,190, +152,220,188,249,234,225,225,97,89,174,185,6,68,87,184,147,236,241,109,234, +133,181,42,91,203,171,174,250,147,174,13,177,187,165,83,152,169,200,140,91, +74,128,174,240,42,221,225,209,116,48,220,169,6,91,69,81,49,179,49,72, +68,153,171,6,209,40,164,200,9,85,145,8,64,81,114,93,227,73,55,119, +216,32,155,65,1,84,228,152,130,6,237,112,128,5,1,166,46,217,202,215, +245,172,28,27,42,133,156,162,179,206,250,76,77,182,113,169,39,107,239,158, +194,191,190,235,123,124,188,26,204,108,122,213,79,0,224,92,97,148,77,106, +190,244,23,127,186,189,85,137,166,225,112,91,89,136,156,115,14,221,9,166, +7,64,153,25,79,214,203,125,77,152,211,231,149,94,113,19,1,1,42,162, +1,4,184,57,191,177,251,192,246,248,252,128,0,165,142,41,37,176,88,84, +142,151,49,243,33,131,1,69,33,4,36,131,8,128,185,122,97,165,38,238, +190,59,129,85,102,210,0,32,4,85,69,134,4,40,198,216,76,171,100,173, +165,228,43,51,62,188,118,232,218,226,234,235,175,189,247,189,239,251,248,167, +94,248,158,191,254,147,31,253,219,255,133,216,157,91,199,203,114,224,83,106, +67,104,10,130,212,9,20,103,115,184,189,18,95,93,193,153,61,105,243,237, +230,20,109,238,187,167,246,224,211,183,98,85,213,24,99,173,95,35,12,96, +3,127,120,191,137,206,191,20,81,34,11,42,162,2,192,93,104,120,213,149, +50,49,131,102,196,60,164,148,202,170,2,0,85,20,214,108,28,245,150,191, +245,68,98,140,203,153,184,245,5,128,26,209,200,72,131,193,222,96,188,71, +102,192,168,0,201,25,223,87,219,146,5,67,64,70,16,8,81,20,84,20, +21,56,116,28,235,161,211,11,187,213,222,208,99,87,199,8,243,121,156,76, +194,116,218,205,151,161,105,83,76,220,197,24,187,192,49,54,243,233,205,91, +175,95,125,253,229,195,131,171,161,157,119,108,21,216,23,213,206,206,206,112, +107,108,156,71,68,227,108,89,12,172,245,222,123,227,124,54,244,140,245,235, +58,51,99,76,118,114,177,199,202,155,142,211,160,26,169,170,164,80,56,127, +249,145,71,159,124,242,201,167,158,122,170,32,73,113,201,204,18,185,110,101, +62,77,179,105,108,26,179,232,38,169,227,16,83,104,187,182,158,30,29,189, +249,198,181,151,110,92,127,125,49,187,45,26,99,167,214,21,123,251,23,203, +114,0,0,102,213,70,103,237,71,203,10,79,64,68,136,154,34,51,11,168, +18,89,85,236,186,14,67,242,182,74,73,218,38,133,20,89,58,34,96,9, +168,130,164,68,218,118,245,157,195,227,155,55,14,94,124,233,181,215,94,255, +34,183,117,81,20,206,57,56,65,45,0,51,155,141,26,69,61,141,90,216, +180,239,78,236,130,83,95,62,177,245,242,119,51,132,31,17,81,185,105,151, +4,241,226,3,207,212,237,18,208,44,155,122,54,155,49,199,182,109,139,162, +208,22,24,53,98,82,76,217,190,6,81,21,198,194,220,45,162,136,72,181, +113,214,185,65,169,173,12,6,3,27,172,69,59,44,134,147,116,52,216,43, +220,80,217,132,249,114,182,183,191,31,36,90,112,180,178,8,214,11,228,235, +51,177,238,185,52,132,153,19,164,98,245,144,84,149,37,160,118,127,240,169, +223,254,245,255,235,255,184,116,174,244,198,106,98,42,44,51,91,91,25,79, +136,200,34,198,90,204,56,152,127,91,91,175,159,101,17,81,68,84,20,53, +0,8,224,161,225,78,44,0,144,27,21,30,125,27,26,180,180,237,11,95, +149,174,176,64,10,96,192,172,243,3,103,43,243,122,45,35,57,150,73,185, +68,12,193,128,40,32,84,190,98,96,21,22,132,148,36,180,81,58,46,108, +57,40,46,46,143,2,183,233,234,171,175,93,121,228,129,223,255,236,231,62, +248,157,63,250,19,63,249,15,83,185,187,232,196,249,129,49,218,118,141,37, +0,6,107,189,192,154,122,29,78,95,128,156,186,140,123,233,190,205,137,58, +107,160,174,248,159,54,149,32,0,216,148,164,235,98,110,255,168,170,109,219, +230,220,95,191,95,209,253,56,78,78,229,173,17,81,21,114,85,86,47,198, +170,8,253,14,182,186,86,18,17,90,101,82,114,140,143,85,50,118,21,85, +73,79,218,89,168,42,160,97,192,114,56,44,7,35,128,146,73,0,163,163, +2,0,8,141,246,32,57,82,204,60,144,146,82,36,192,20,58,226,176,127, +110,231,210,222,22,119,51,13,80,215,113,58,141,71,211,48,155,117,203,182, +147,24,68,147,168,166,16,150,139,233,209,193,27,55,111,188,118,231,246,181, +229,114,70,70,67,138,219,219,219,59,59,59,213,112,100,125,97,140,113,190, +44,203,210,151,195,92,79,234,92,97,172,119,206,57,87,88,107,209,154,62, +155,129,118,229,23,32,34,58,80,85,229,24,203,209,248,137,199,30,121,234, +137,199,199,163,17,51,115,12,49,114,23,226,178,225,233,164,157,78,187,229, +146,219,54,69,136,156,66,219,44,102,211,131,131,219,111,222,186,245,250,193, +173,171,211,201,33,72,8,137,69,113,188,115,126,255,220,69,50,133,170,146, +237,72,141,52,0,0,32,0,73,68,65,84,1,107,188,49,198,144,203,41, +20,1,66,68,4,2,16,34,67,68,204,172,171,109,172,109,130,80,52,69, +108,234,52,157,44,234,166,11,177,69,148,196,129,0,1,32,165,16,98,119, +120,112,243,43,95,249,242,213,171,95,227,216,102,212,122,46,53,1,211,55, +213,74,41,153,194,158,214,102,235,188,39,156,236,88,27,191,58,17,199,51, +158,8,152,92,93,96,13,168,114,219,198,122,25,46,95,220,55,182,32,163, +104,172,181,86,36,229,130,217,27,215,111,111,109,95,96,76,198,155,220,207, +217,88,20,17,235,206,64,193,251,74,74,68,156,31,45,208,144,241,214,27, +179,108,150,46,164,119,125,203,115,243,122,62,220,246,73,66,208,200,28,171, +193,0,173,113,104,74,231,131,212,107,219,234,148,37,123,191,113,255,95,231, +16,77,210,4,118,45,231,192,220,253,197,191,254,87,191,241,27,191,121,229, +226,118,85,41,49,253,249,159,125,225,67,223,254,1,150,148,61,226,245,116, +17,146,194,169,149,181,57,207,247,27,6,141,64,79,106,201,202,160,162,128, +138,248,216,211,79,24,52,65,58,21,97,17,231,77,82,89,53,114,65,32, +5,16,37,52,38,107,132,222,31,63,115,46,237,99,26,171,132,181,158,164, +188,99,136,2,146,48,161,53,22,141,65,82,99,156,184,217,213,196,33,182, +77,59,220,222,249,196,167,255,248,91,190,237,163,63,253,115,191,208,198,173, +102,185,244,110,96,12,114,138,16,153,99,82,81,79,5,107,186,247,205,158, +206,146,175,63,94,227,133,87,143,254,148,82,187,123,172,5,35,127,199,42, +244,221,62,122,215,204,246,141,142,68,196,90,155,25,156,239,214,253,218,155, +21,128,125,251,31,1,128,24,187,188,222,242,154,89,225,158,50,23,121,230, +97,207,199,160,19,78,36,65,236,147,30,162,125,61,99,182,161,89,129,8, +140,47,42,95,84,162,150,80,192,160,1,15,0,185,126,104,221,93,21,160, +239,141,24,98,36,144,237,241,112,111,107,96,48,182,245,172,233,202,233,52, +220,57,238,38,179,212,116,41,132,32,82,163,6,96,207,109,152,29,221,186, +121,243,181,131,195,171,139,118,34,42,168,52,28,86,59,59,187,195,241,54, +160,33,244,101,57,28,12,6,174,44,156,43,50,90,194,186,34,235,59,227, +138,85,44,47,15,179,154,28,2,128,20,154,178,40,46,93,121,240,169,39, +30,187,116,225,188,132,174,107,106,67,216,180,169,235,120,58,171,143,39,77, +221,164,186,233,154,16,89,100,62,157,183,205,244,248,248,218,157,59,87,15, +15,222,60,62,190,213,44,167,18,51,228,196,108,239,238,159,187,240,192,96, +188,147,79,237,140,177,214,25,227,172,245,160,134,72,65,17,193,0,100,10, +251,158,239,32,38,22,145,40,177,105,186,14,19,249,52,157,182,183,14,22, +243,121,211,118,29,146,134,208,96,222,48,186,208,212,139,163,195,91,111,190, +113,243,232,240,118,108,143,51,139,92,78,76,1,51,51,130,0,158,102,163, +88,251,131,189,11,177,97,223,221,45,190,103,108,61,3,86,36,211,199,38, +133,8,0,26,105,107,124,158,133,12,185,174,139,93,200,12,181,169,93,214, +159,255,252,231,31,189,244,67,169,137,190,168,148,18,41,48,115,219,213,227, +98,200,27,219,228,90,243,34,98,53,170,2,119,85,65,203,110,86,184,148, +48,6,76,166,212,46,46,85,181,24,86,93,196,98,80,48,171,181,210,52, +115,83,156,101,202,186,167,178,254,55,142,245,95,173,61,167,172,33,172,211, +95,255,181,255,243,193,203,87,200,44,156,53,139,69,247,254,247,127,192,83, +201,62,16,81,118,78,105,109,185,208,73,205,253,215,105,235,173,150,61,42, +138,138,2,16,40,170,34,57,230,148,108,1,6,77,92,118,228,236,96,80, +148,85,193,192,2,42,42,136,249,108,125,72,47,79,228,189,158,224,234,109, +46,246,92,217,49,89,167,91,227,85,149,147,186,228,160,165,176,76,85,28, +92,187,117,171,24,84,47,252,233,151,63,244,252,143,255,7,63,251,11,181, +150,29,202,112,100,99,8,93,203,133,35,20,228,40,72,16,53,246,211,116, +87,190,194,156,186,187,179,243,12,119,97,6,101,213,18,183,223,66,86,1, +144,77,148,181,170,218,148,100,48,24,228,246,216,217,108,65,196,44,241,69, +81,220,111,83,99,102,68,147,99,231,202,12,40,162,49,103,63,152,227,230, +179,23,1,107,109,31,23,71,36,234,155,147,35,144,49,132,155,244,246,27, +177,149,60,201,12,54,99,128,131,144,49,128,68,18,87,29,60,176,175,0, +215,156,200,84,48,228,2,55,222,154,115,251,187,165,167,182,62,34,141,243, +185,57,158,117,199,179,102,217,8,51,139,38,133,168,218,198,37,215,203,249, +116,114,120,231,240,250,124,126,44,194,64,22,144,46,94,188,228,138,194,90, +239,139,170,172,6,222,151,182,240,101,89,102,119,207,23,149,247,165,49,6, +123,127,150,200,154,147,56,180,210,58,44,240,196,19,79,60,242,208,149,243, +123,251,156,66,189,92,58,4,72,105,94,215,139,37,44,150,221,116,222,46, +150,93,211,134,192,97,217,204,142,231,71,221,68,142,143,110,220,186,253,242, +241,209,213,186,190,147,66,131,0,214,152,166,83,95,22,151,46,94,217,218, +61,143,228,173,247,85,85,25,155,251,96,88,99,92,230,17,0,200,189,90, +144,16,152,83,207,0,220,227,12,140,136,4,77,101,228,101,155,150,53,207, +107,14,65,208,64,215,41,154,150,35,147,82,219,197,249,124,30,226,194,218, +70,96,138,186,147,133,218,24,35,40,204,140,130,118,3,140,114,90,157,245, +47,238,182,17,54,69,112,243,87,194,4,14,0,36,113,75,160,174,40,137, +188,51,163,160,192,10,174,240,33,132,38,116,57,174,215,117,29,69,35,44, +102,203,48,167,8,177,107,218,101,61,247,67,111,140,221,184,0,88,199,19, +141,199,105,156,35,8,120,170,187,5,81,192,202,52,161,241,134,34,75,8, +157,43,75,22,117,222,18,109,248,80,43,124,242,221,183,121,118,220,63,174, +7,43,149,145,35,212,253,91,20,64,30,143,11,208,240,202,43,95,253,198, +183,191,15,193,59,87,186,50,11,15,247,86,158,170,170,16,246,41,3,253, +186,227,122,162,210,123,161,107,206,33,0,64,20,137,100,140,130,42,199,196, +205,208,121,231,189,98,50,104,85,21,80,16,179,27,120,162,20,238,118,27, +79,63,229,245,57,41,123,212,57,157,27,99,148,14,40,17,47,100,126,103, +241,197,63,254,236,187,222,255,254,223,251,244,11,31,254,222,31,251,201,255, +248,23,90,30,183,160,110,128,49,204,85,124,229,43,67,26,68,140,49,214, +96,10,12,27,25,209,123,238,52,119,79,197,25,209,210,85,33,208,70,206, +237,172,148,174,239,200,14,6,3,89,49,157,55,109,155,195,82,0,72,190, +104,19,59,114,249,17,175,101,58,31,199,146,83,9,206,99,138,9,144,156, +41,103,243,35,224,204,208,15,198,24,5,22,80,32,68,192,196,12,6,24, +56,50,3,177,117,14,212,48,39,5,38,58,137,203,228,42,147,124,107,22, +33,138,33,55,46,182,46,117,106,209,162,33,0,69,176,171,46,237,155,247, +175,74,76,137,35,164,112,241,220,104,136,75,110,82,27,240,120,225,111,29, +235,116,218,53,203,185,164,40,28,1,5,5,152,109,146,118,62,63,104,231, +55,117,113,103,64,93,27,151,232,135,231,30,120,184,168,10,227,172,47,93, +81,122,91,120,63,168,138,106,232,156,171,138,210,90,111,11,111,93,65,198, +130,177,132,22,8,73,98,110,190,39,49,161,242,86,85,93,190,124,249,202, +3,15,142,75,15,144,48,46,73,67,138,97,222,201,114,209,206,231,205,81, +11,245,50,212,139,174,93,54,117,189,108,155,249,116,118,103,114,124,48,57, +248,242,241,241,241,116,62,99,142,12,16,132,68,132,72,135,59,151,31,188, +242,208,112,180,133,206,250,178,244,197,192,248,129,113,206,249,115,85,117,222, +82,101,140,26,140,72,54,10,19,25,82,131,144,16,163,72,98,137,49,6, +34,37,2,23,7,40,13,203,113,74,49,116,73,33,114,219,89,37,16,175, +50,143,28,154,46,36,69,6,13,145,140,238,69,238,68,140,2,135,16,200, +168,8,89,235,99,100,176,96,140,17,206,21,161,10,0,42,154,45,93,102, +38,67,128,42,44,214,218,166,105,6,131,65,159,200,90,217,122,107,117,192, +152,146,122,81,39,234,24,92,98,61,119,241,129,168,96,140,97,158,43,4, +36,85,49,49,160,170,26,43,209,212,140,193,2,64,98,75,46,146,109,19, +235,70,7,44,34,234,98,7,0,133,175,152,89,140,184,228,105,105,189,247, +73,147,82,96,102,103,52,146,65,103,29,42,34,35,34,104,20,193,117,74, +4,78,71,42,225,190,202,13,86,14,202,201,170,203,63,41,20,104,164,237, +22,69,2,103,180,245,41,74,68,240,86,228,137,39,31,69,139,49,14,31, +126,234,93,13,201,104,27,104,203,202,214,50,24,54,206,161,230,206,59,10, +6,20,214,126,195,215,109,235,245,221,170,97,237,126,34,0,128,88,112,170, +42,42,65,211,96,123,168,22,250,238,49,152,107,77,49,151,16,231,248,0, +0,16,153,85,17,81,31,197,234,239,145,156,74,178,150,208,64,140,145,196, +88,34,85,140,212,141,100,151,22,164,221,52,85,70,252,32,165,229,252,214, +173,111,124,239,83,255,207,239,254,118,181,247,228,179,223,242,145,22,6,65, +117,80,184,212,116,140,3,68,97,9,28,186,216,5,22,84,84,240,106,217, +108,222,204,106,146,81,49,221,245,113,222,69,54,40,168,214,217,167,85,107, +240,181,72,156,196,43,208,176,102,228,35,33,161,157,78,167,163,209,136,250, +192,235,186,127,163,226,74,164,238,122,222,235,147,144,10,8,106,238,84,159, +129,19,41,198,12,209,96,233,59,198,230,3,100,215,44,199,254,97,165,67, +69,116,221,230,227,110,51,33,215,23,173,186,2,97,79,164,114,47,33,80, +213,92,152,149,243,170,204,137,187,84,183,60,159,53,203,37,228,170,94,233, +121,128,69,89,152,185,238,234,46,4,86,19,197,212,141,34,249,209,104,92, +84,158,50,236,191,168,124,53,40,171,65,85,13,124,89,229,234,90,107,173, +179,133,49,6,8,17,129,72,0,209,218,34,197,132,194,187,59,219,15,63, +248,192,185,253,93,239,173,53,6,32,100,158,190,174,13,203,101,87,47,227, +98,222,206,103,245,209,162,238,186,174,173,155,249,226,248,248,232,224,232,248, +214,241,225,141,201,228,168,107,142,242,69,230,38,188,136,166,26,142,199,227, +241,238,222,131,123,123,123,228,74,99,125,81,148,69,85,122,239,205,106,50, +1,32,169,24,97,85,53,164,128,120,207,140,170,246,1,221,147,200,110,246, +71,55,55,238,251,173,46,68,76,41,138,88,102,70,107,222,58,222,181,94, +168,186,194,48,173,93,140,19,27,234,45,61,71,85,205,158,65,36,73,41, +149,101,217,163,187,1,24,216,172,110,129,20,140,49,34,176,46,29,90,27, +86,57,150,146,225,7,68,39,120,11,234,153,165,245,52,227,244,91,220,205, +91,141,77,149,180,105,22,33,98,92,183,112,101,244,198,9,146,68,49,62, +22,150,29,138,43,201,24,19,98,44,84,121,185,160,139,103,34,247,103,237, +187,127,199,177,18,123,61,131,140,185,167,77,119,119,68,15,214,79,51,5, +17,81,197,140,86,69,48,42,168,10,165,236,154,88,113,72,220,249,173,209, +248,234,213,235,211,107,199,3,51,188,121,20,119,207,63,242,179,127,255,191, +122,246,157,239,233,88,203,170,108,154,101,225,141,42,144,230,38,58,27,173, +117,100,109,155,222,237,198,222,251,243,123,218,125,112,111,53,2,144,75,182, +87,179,145,227,120,150,136,132,163,234,26,238,148,155,102,41,51,223,255,1, +160,192,74,223,33,138,166,148,18,136,174,163,92,39,77,239,1,84,53,132, +128,152,205,16,34,92,95,205,201,99,56,235,159,3,1,245,81,222,92,220, +10,64,194,9,224,36,238,155,117,114,238,244,202,18,85,213,33,170,98,83, +7,141,113,81,243,116,210,205,102,93,219,182,146,34,100,186,27,96,229,148, +82,98,136,172,162,96,24,42,214,194,87,213,214,206,142,47,157,33,239,124, +233,125,89,248,178,40,42,235,75,231,10,239,61,161,53,180,66,38,131,128, +178,1,32,36,71,244,232,67,87,46,95,190,184,53,30,34,170,112,68,137, +128,105,209,213,161,147,174,149,229,34,204,166,237,124,214,206,102,139,197,98, +177,156,79,231,243,227,201,236,214,100,122,107,58,57,88,44,143,219,174,230, +208,9,82,72,33,68,6,64,87,84,227,173,157,115,231,46,236,236,236,184, +106,88,84,195,92,74,86,86,195,193,96,228,203,129,181,206,122,239,203,2, +13,73,74,137,3,160,244,41,161,149,0,233,93,67,54,70,207,208,166,167, +106,168,215,43,4,78,162,19,162,154,251,28,81,140,209,90,191,121,64,220, +84,115,171,243,230,183,235,19,157,22,71,61,163,108,206,104,103,0,136,49, +218,50,119,177,0,107,237,3,15,60,80,20,69,102,227,97,225,32,9,64, +64,24,145,74,231,225,52,115,228,58,148,118,230,74,214,111,17,145,72,215, +141,110,97,163,234,235,126,74,255,126,227,158,97,38,68,36,139,18,69,17, +8,141,8,16,32,128,113,198,238,159,63,191,53,222,6,160,102,25,44,185, +191,252,203,47,189,239,125,223,236,200,174,10,191,54,116,232,95,41,123,124, +191,117,186,190,253,181,214,219,156,156,187,157,68,56,61,21,235,231,210,227, +118,51,195,190,144,170,88,50,206,185,193,98,207,18,125,252,83,255,242,157, +239,124,231,209,215,142,169,225,55,190,118,243,29,223,240,205,159,255,211,207, +255,204,207,253,131,231,222,247,237,140,131,156,100,115,214,160,50,170,65,68, +96,101,73,162,41,183,149,216,236,88,127,215,189,244,109,24,238,250,252,62, +177,148,190,27,24,109,22,144,168,158,69,35,89,145,52,159,79,183,198,99, +200,9,133,117,249,68,222,70,229,30,87,211,139,60,80,210,148,211,59,146, +56,165,12,131,232,179,34,103,30,195,26,225,65,68,160,164,154,222,26,1, +154,213,156,115,5,32,129,2,0,169,178,192,169,149,182,249,96,84,57,132, +160,168,203,229,178,109,23,196,218,118,80,47,99,211,52,49,118,168,186,161, +245,114,178,37,162,53,166,24,14,183,206,91,87,168,137,69,89,170,106,89, +14,170,170,202,246,157,115,206,145,113,100,136,200,89,15,160,146,18,34,20, +165,223,222,30,159,219,219,31,111,13,247,118,118,251,59,77,93,86,33,49, +132,101,8,243,58,46,22,237,124,214,206,166,205,228,120,54,157,29,79,38, +135,179,249,81,152,207,39,211,195,201,236,70,211,78,66,92,198,216,229,200, +79,19,68,201,20,69,57,28,237,236,238,158,219,218,222,45,7,91,206,57, +87,148,104,189,49,182,40,7,213,112,84,14,70,206,121,50,206,57,159,57, +53,133,81,68,80,5,209,172,201,72,214,138,105,243,245,169,177,122,134,103, +190,179,41,25,107,205,197,202,136,200,204,118,195,118,88,139,218,74,54,78, +23,18,173,94,244,57,125,200,82,123,242,124,215,218,118,115,141,33,98,81, +20,204,173,247,30,161,101,230,97,53,108,219,214,123,31,57,36,136,192,61, +129,154,35,91,150,3,84,16,61,1,6,110,158,183,238,218,152,34,24,50, +185,0,121,21,176,59,241,70,79,84,222,169,104,253,215,57,206,220,230,122, +213,245,21,156,130,170,253,186,51,6,31,188,114,241,252,195,251,96,139,20, +161,142,77,49,26,60,241,244,219,201,87,81,193,81,58,101,182,0,171,66, +238,165,253,87,187,158,51,3,137,52,75,88,110,121,153,183,171,251,219,50, +155,27,213,230,221,101,30,54,78,41,59,25,202,164,10,169,75,101,26,124, +238,139,127,126,249,242,101,13,42,117,146,58,60,251,236,59,126,231,247,255, +232,59,62,250,211,31,122,254,135,131,248,54,165,162,28,118,93,151,147,245, +136,46,227,223,57,6,16,6,18,213,179,6,166,222,199,218,213,123,217,116, +103,62,193,141,47,159,185,133,205,64,132,221,217,222,206,0,133,245,246,222, +107,61,37,17,113,228,238,190,38,17,81,99,5,52,107,33,0,96,230,20, +99,126,145,93,140,181,162,92,45,134,12,0,196,245,193,177,111,84,120,191, +199,134,136,104,108,142,42,146,104,166,198,199,187,117,252,122,229,164,148,82, +10,51,76,182,91,22,198,182,29,180,77,136,177,19,17,202,78,176,68,0, +1,85,5,81,145,178,44,117,107,7,17,133,247,231,245,33,82,58,169,76, +98,1,78,70,32,23,53,123,194,237,209,104,52,26,156,223,219,223,217,221, +26,148,133,119,198,34,33,65,74,173,2,128,32,179,166,168,93,23,151,203, +102,185,92,30,77,226,241,241,244,240,240,240,248,248,120,50,61,152,205,15, +38,179,27,243,249,113,92,180,93,168,19,215,68,57,248,10,41,42,162,53, +69,49,30,111,239,238,157,27,142,119,170,106,236,252,192,187,10,173,169,134, +67,231,156,47,171,194,87,213,112,84,22,3,52,68,100,173,119,190,44,148, +200,90,203,33,203,177,228,96,219,153,249,1,188,135,4,192,198,214,151,53, +224,218,178,91,255,109,94,0,34,130,153,13,37,55,101,223,152,240,117,54, +9,224,212,99,57,99,56,156,49,238,68,242,18,58,97,100,56,35,196,109, +215,13,135,195,102,50,39,162,225,112,136,136,31,252,224,7,147,38,53,42, +32,8,66,74,136,152,129,86,186,65,244,182,134,73,33,98,199,141,130,136, +166,158,139,3,251,128,61,228,222,193,39,156,251,43,243,234,223,222,192,90, +223,212,166,189,153,251,204,138,8,42,161,161,164,177,240,242,196,219,30,195, +109,88,46,155,208,134,242,156,167,161,16,65,172,218,237,173,81,66,204,132, +201,0,146,137,85,160,167,240,252,119,178,61,215,195,88,130,220,72,27,179, +36,8,32,32,157,212,246,222,207,104,133,205,135,11,0,0,206,90,66,36, +133,20,163,48,149,174,66,99,44,146,164,238,226,149,75,243,195,227,194,0, +17,125,226,211,47,124,247,15,253,173,191,249,31,253,60,163,7,99,40,183, +123,21,70,107,85,250,42,85,17,97,137,61,119,86,111,211,156,210,98,235, +183,114,186,191,237,58,38,99,240,222,125,114,5,24,17,251,92,16,156,92, +63,234,169,35,219,117,75,61,60,137,107,162,136,96,174,10,60,29,39,58, +153,11,65,0,20,236,99,67,41,5,14,1,132,233,116,41,31,174,162,164, +33,4,80,114,54,17,217,222,185,37,4,64,145,179,79,119,117,46,2,34, +107,109,46,136,130,158,73,6,116,229,56,175,140,5,92,253,83,17,73,33, +212,216,21,169,37,235,219,150,115,161,85,94,216,43,135,171,103,6,244,198, +250,225,104,88,22,251,123,219,214,65,219,205,135,3,59,26,87,195,209,86, +85,85,69,81,84,85,181,181,181,93,85,85,233,139,170,170,172,245,235,203, +35,21,77,28,115,198,89,36,37,73,41,53,117,152,207,151,147,201,236,232, +112,50,157,206,110,221,154,30,79,142,142,142,238,44,150,199,117,115,212,197, +89,219,77,219,110,89,217,42,65,140,146,52,129,34,129,90,95,84,131,193, +214,238,3,23,203,162,170,170,33,153,2,200,26,87,250,193,176,170,134,174, +42,173,117,101,89,58,91,248,162,244,101,133,136,132,150,172,117,214,7,36, +11,164,68,136,0,202,10,247,176,17,238,222,180,54,127,222,83,235,173,127, +150,101,207,64,213,139,148,200,58,78,6,0,167,56,111,79,165,252,78,196, +107,45,12,39,251,19,11,51,27,236,227,44,103,174,54,165,84,85,213,51, +207,60,243,153,223,251,234,98,177,24,85,163,201,100,114,229,145,43,145,131, +47,189,152,204,203,191,2,166,177,18,158,156,61,183,248,128,85,112,80,228, +172,25,136,153,178,233,228,253,95,197,151,60,51,171,103,84,3,129,49,100, +16,147,32,36,140,45,214,64,186,245,224,96,218,29,46,211,157,209,238,214, +209,209,97,57,224,243,231,43,129,150,254,127,226,222,36,198,146,36,61,19, +251,23,51,115,247,183,196,150,17,153,89,149,181,116,85,175,213,11,155,197, +165,71,164,136,225,176,73,177,37,14,37,81,162,6,162,128,161,182,17,160, +139,52,4,79,90,78,130,32,8,58,8,16,116,211,65,135,185,9,144,0, +14,116,160,134,100,75,156,225,12,217,236,133,221,236,133,172,234,98,215,222, +149,89,185,197,242,226,45,238,110,102,255,255,235,96,239,189,120,17,25,145, +85,93,221,228,24,10,89,145,158,30,238,230,230,191,255,246,175,223,55,230, +210,209,95,224,91,126,152,104,222,149,182,30,156,117,125,156,223,252,30,231, +218,95,216,38,17,81,37,101,52,203,2,68,168,142,136,9,93,215,197,187, +71,239,188,121,251,173,189,27,187,245,144,127,231,119,254,241,181,27,207,254, +198,63,248,135,191,244,239,252,71,228,135,49,69,2,37,66,149,92,120,178, +20,136,140,208,10,201,65,2,200,140,36,118,238,61,60,98,232,157,105,183, +243,70,232,57,202,199,141,167,160,149,248,45,31,115,165,136,206,249,52,206, +76,136,54,54,118,68,179,210,63,11,102,43,232,133,245,34,174,114,219,98, +90,180,237,82,131,138,44,125,153,21,0,201,133,184,94,85,213,126,213,187, +154,11,138,210,82,92,232,145,121,175,46,139,232,92,200,197,83,48,4,52, +56,7,116,113,78,17,139,44,157,178,190,143,164,125,197,32,154,17,69,85, +213,4,108,29,224,40,174,174,58,112,228,176,30,15,6,195,48,26,87,77, +21,158,122,242,230,104,52,112,30,189,247,37,124,238,156,3,53,85,117,68, +22,251,18,124,64,36,49,203,57,247,125,74,41,229,158,78,79,79,39,147, +147,217,108,118,124,114,248,240,240,240,254,253,251,71,199,15,103,39,135,139, +118,218,117,179,44,41,231,110,89,193,160,124,26,103,0,168,16,152,66,51, +216,26,14,135,219,59,187,187,123,59,217,28,179,231,224,171,48,240,161,46, +198,93,8,33,12,70,204,92,215,3,34,10,161,170,171,129,153,25,33,179, +71,199,168,200,204,25,17,150,8,210,87,58,106,118,97,108,122,184,171,237, +119,115,73,85,21,145,71,163,17,17,25,145,136,240,198,117,46,92,182,72, +225,90,4,75,119,193,230,208,243,222,199,90,15,194,234,76,56,19,119,4, +128,23,94,120,225,75,255,244,159,148,69,59,58,58,218,191,177,79,1,92, +240,194,89,33,34,174,242,125,106,155,132,148,155,234,149,157,3,89,98,113, +151,237,124,249,238,215,147,199,77,251,78,193,46,103,182,124,159,99,173,29, +28,58,80,80,4,96,76,40,226,83,15,6,78,66,12,123,227,189,94,226, +173,91,183,176,2,100,17,147,133,76,189,27,60,18,174,186,36,185,247,129, +135,232,153,254,178,149,33,172,118,21,9,207,242,204,245,50,194,234,3,47, +88,36,57,231,186,26,56,239,65,112,50,153,190,254,250,155,31,221,125,225, +39,62,247,211,211,227,147,190,155,237,236,95,191,119,154,95,252,87,127,53, +241,158,117,45,49,152,230,186,174,219,182,101,14,41,11,179,47,95,162,72, +66,40,176,191,98,198,136,12,27,192,50,155,247,189,116,145,47,76,245,170, +167,88,175,33,173,221,252,149,41,230,160,96,18,240,70,221,25,32,17,33, +109,242,159,218,230,239,156,127,37,180,100,47,81,117,172,49,229,148,210,58, +135,139,171,74,110,17,65,200,170,170,82,20,144,150,118,65,184,236,5,47, +31,198,150,212,80,107,199,86,75,49,249,101,107,177,118,204,115,142,10,217, +204,3,152,15,164,83,213,179,142,96,91,149,212,154,3,54,147,224,121,48, +168,6,117,53,30,54,195,102,160,25,41,24,152,148,168,45,34,148,55,109, +146,44,75,22,137,49,199,36,109,140,167,211,249,241,233,100,62,107,79,238, +201,116,58,153,206,38,167,179,163,147,201,225,233,244,168,109,167,139,190,37, +121,88,104,222,0,32,103,149,236,208,106,128,32,156,155,225,214,104,176,187, +181,189,191,189,189,203,129,145,129,60,54,188,205,204,117,221,84,245,192,5, +239,125,229,171,166,174,107,14,67,68,172,234,26,145,125,8,190,174,114,214, +210,246,87,94,7,17,17,154,152,129,9,224,37,178,114,65,14,54,181,158, +93,22,46,40,63,171,42,145,111,154,154,136,20,81,68,24,120,243,34,23, +110,180,153,174,133,13,154,58,93,245,240,2,44,59,9,151,101,34,27,241, +226,11,215,185,253,206,219,142,217,123,95,74,229,151,148,6,154,2,115,66, +85,92,194,85,108,84,186,159,107,255,40,55,125,116,21,54,37,185,28,88, +61,194,229,157,230,143,31,118,62,198,180,254,171,102,201,90,10,242,81,48, +99,64,3,237,117,81,229,3,213,70,181,159,79,226,112,183,233,250,217,246, +254,181,62,110,144,69,108,164,86,150,157,77,63,224,124,46,61,46,89,214, +85,19,176,233,63,94,161,245,174,146,159,190,239,189,247,85,85,17,98,219, +182,158,234,157,157,157,167,111,61,197,22,186,62,59,223,124,249,203,95,154, +245,246,191,253,163,127,92,31,124,56,83,83,249,25,0,128,74,59,63,117, +206,231,156,67,104,98,50,135,203,96,151,153,32,161,153,161,26,240,37,250, +203,86,126,254,165,199,55,67,52,155,39,108,250,230,155,143,188,4,124,35, +42,165,45,78,148,68,13,16,100,165,56,150,247,203,130,0,130,6,180,220, +129,197,86,181,14,132,102,11,194,154,96,168,146,5,231,139,238,33,59,203, +113,173,164,136,112,13,186,91,136,52,209,7,6,66,67,101,102,85,52,212, +82,65,254,168,125,130,8,25,168,105,182,84,60,33,101,235,145,80,21,77, +157,224,89,237,117,201,244,26,89,150,140,104,104,25,76,22,61,132,225,248, +104,214,15,235,192,211,7,30,125,76,170,43,111,84,4,136,128,144,213,247, +76,40,170,169,79,137,41,5,119,124,242,208,123,238,115,5,0,96,152,179, +198,56,205,57,199,216,45,22,139,118,150,167,211,233,228,244,248,244,244,116, +58,157,76,38,199,179,217,172,143,109,78,71,49,198,190,239,251,190,95,34, +3,150,216,104,80,201,156,83,32,34,98,73,156,125,197,227,241,222,243,55, +95,116,206,57,239,157,11,64,142,28,135,80,57,231,154,48,34,199,62,212, +222,7,23,234,170,25,132,122,224,124,85,213,99,181,62,212,222,20,185,26, +25,55,89,22,97,24,32,123,86,26,32,100,109,123,93,160,179,128,62,71, +195,96,57,43,98,0,48,145,41,59,69,53,51,6,100,85,64,101,52,6, +201,232,88,29,37,53,202,29,25,98,170,172,247,210,155,229,194,236,227,5, +166,34,193,147,63,61,122,120,243,214,147,65,60,198,136,85,207,86,21,80, +34,5,181,92,162,100,160,160,132,188,14,134,20,39,96,169,239,206,247,117, +150,162,19,68,76,142,56,35,233,140,165,102,23,114,71,192,26,56,47,186, +55,22,179,119,63,242,225,143,155,27,171,170,200,252,227,159,253,72,26,192, +195,201,187,55,248,70,78,170,166,209,101,37,68,69,71,46,91,111,34,68, +203,221,176,228,104,113,117,211,181,117,99,231,28,240,229,103,191,2,41,89, +182,5,92,174,6,174,30,235,10,135,181,159,174,170,70,90,185,32,125,23, +83,55,220,221,105,123,221,245,79,14,100,103,218,31,57,28,228,62,187,208, +212,52,32,47,125,183,48,39,70,168,168,42,217,83,81,13,33,231,68,68, +31,44,147,251,232,224,2,51,15,75,112,67,43,173,86,143,73,221,16,136, +136,103,39,89,8,57,231,188,152,207,135,195,33,178,17,145,180,234,189,71, +53,246,48,237,238,187,113,154,188,29,177,155,124,253,171,127,212,245,125,198, +253,76,129,160,175,34,66,169,30,71,38,87,105,1,67,205,137,192,12,48, +229,185,90,52,212,164,226,137,201,59,201,165,200,254,178,249,3,94,177,18, +151,240,228,34,162,218,25,56,222,185,198,140,170,201,57,57,48,34,147,156, +93,93,135,197,162,187,176,87,188,103,140,225,76,134,80,203,167,94,110,99, +151,217,165,184,202,147,168,170,145,189,31,9,51,64,4,90,250,38,37,31, +246,94,243,89,63,161,136,156,149,105,21,139,195,116,61,225,85,189,90,149, +68,0,13,81,68,98,23,101,114,210,154,137,9,183,109,59,155,157,78,167, +211,201,228,100,190,152,46,22,179,249,124,154,99,219,182,237,124,62,143,169, +84,255,149,182,65,19,141,235,199,4,128,210,252,170,106,185,239,209,234,66, +73,51,28,55,245,176,110,70,91,195,241,53,180,154,189,243,222,147,11,68, +204,222,249,80,151,50,67,239,42,95,215,85,61,8,126,224,235,198,135,202, +185,48,168,27,81,239,28,136,152,247,206,59,178,140,164,226,2,27,106,74, +41,75,90,6,242,117,169,98,188,247,128,148,165,53,51,21,161,101,135,95, +4,68,128,108,229,63,205,102,217,0,13,84,209,16,141,216,136,21,41,27, +36,193,94,85,115,206,41,165,249,124,158,82,162,4,110,35,234,103,171,124, +200,153,54,177,139,78,192,122,115,90,43,157,205,133,234,99,55,114,117,8, +33,117,22,83,7,80,123,7,177,111,239,221,123,176,191,127,208,52,77,238, +115,207,230,174,239,17,144,44,164,61,237,73,220,246,120,103,26,39,160,72, +142,152,208,228,98,219,239,229,178,116,133,199,244,35,25,23,44,95,3,232, +99,52,67,231,130,100,116,88,13,171,113,232,235,175,189,242,234,135,63,246, +145,239,252,229,183,63,250,153,143,78,31,28,95,187,181,165,142,140,12,74, +103,231,70,213,234,74,77,255,117,76,246,189,135,172,8,237,202,43,46,237, +249,5,176,26,5,179,202,180,155,14,234,97,236,147,227,42,245,90,1,47, +122,72,169,22,104,254,231,255,245,31,141,198,79,120,55,50,49,185,242,27, +95,213,15,2,34,224,213,212,143,239,49,46,125,167,107,177,188,234,124,88, +173,176,43,241,169,194,135,240,254,199,50,209,161,6,160,57,39,17,1,53, +34,39,112,166,5,206,185,0,231,202,193,236,194,9,143,14,69,96,239,12, +11,187,16,153,9,161,127,188,36,172,55,222,156,51,131,137,169,17,2,106, +97,90,192,21,138,76,17,41,164,38,75,202,157,230,148,79,161,7,147,62, +206,219,249,98,118,116,127,50,57,62,153,28,207,231,147,182,155,102,233,85, +115,206,17,176,212,48,150,13,68,151,189,198,32,162,30,224,220,7,143,136, +136,228,66,179,187,115,227,218,246,245,170,242,5,243,207,85,163,170,30,58, +30,144,243,5,178,197,57,231,66,229,138,214,11,222,187,224,235,38,248,129, +15,141,243,141,247,85,193,123,207,32,76,198,128,129,156,35,142,8,166,130, +14,141,65,51,24,148,30,3,205,89,3,86,41,71,68,127,182,9,41,22, +250,36,213,12,192,6,217,44,129,37,208,100,40,104,78,205,0,84,64,21, +68,33,11,102,133,172,160,235,190,236,226,96,194,178,224,235,145,56,247,101, +162,182,150,200,181,150,220,48,207,151,231,6,207,166,74,4,138,138,104,200, +138,144,167,167,247,83,148,143,125,244,233,233,201,108,49,155,223,220,62,64, +193,147,7,147,157,107,55,158,220,190,213,29,245,57,227,112,119,164,46,167, +156,178,232,98,177,24,239,141,54,111,250,24,5,119,65,39,94,152,228,7, +24,143,58,185,0,192,158,53,9,161,203,170,57,234,176,25,143,235,241,236, +184,219,217,63,0,166,207,254,212,143,117,48,123,226,198,181,185,76,60,121, +61,179,70,207,69,183,85,245,202,207,247,175,123,172,224,124,108,5,23,86, +42,245,42,173,143,79,142,231,113,177,187,183,221,107,12,236,242,92,243,12, +108,54,235,59,157,119,205,255,244,191,252,239,251,183,62,227,170,107,57,89, +138,157,31,92,228,60,91,94,222,68,37,23,28,226,51,169,248,160,207,250, +248,253,108,243,5,149,160,135,170,50,18,33,57,231,92,211,52,143,129,77, +190,98,246,100,106,102,194,4,109,238,53,39,188,186,67,248,145,169,156,5, +209,175,50,226,16,153,216,35,98,54,43,176,4,5,40,251,178,51,17,17, +13,193,8,75,128,52,231,76,132,107,247,10,86,69,24,235,109,185,120,97, +10,136,134,125,202,41,245,125,59,59,157,158,76,142,79,78,143,254,242,244, +244,164,237,102,102,73,52,137,228,98,162,210,154,51,162,92,132,150,45,47, +228,150,128,233,102,230,189,31,14,135,91,91,91,131,193,32,12,43,199,21, +67,109,32,64,226,157,175,155,157,102,180,71,92,151,253,211,249,138,188,15, +33,20,91,143,66,65,42,173,156,175,29,215,133,44,156,201,59,7,18,213, +80,145,201,208,39,1,51,68,242,162,73,36,17,163,100,19,201,168,98,89, +192,87,165,159,63,101,53,51,231,156,228,92,56,221,1,138,147,171,203,16, +172,101,67,49,37,96,135,150,11,8,118,169,205,83,68,4,183,134,144,40, +49,68,85,53,131,156,179,163,21,46,206,123,217,122,235,212,225,89,220,109, +67,42,76,165,143,145,140,67,168,189,231,28,165,157,30,75,55,123,242,230, +147,255,236,15,255,233,151,191,244,149,233,228,164,250,232,83,135,39,199,71, +71,167,123,91,55,115,34,50,152,29,207,171,81,37,38,70,70,14,155,166, +218,180,37,175,146,183,11,210,2,143,236,252,151,74,224,251,25,103,242,176, +186,72,74,137,200,103,203,177,151,113,51,216,27,238,79,238,79,190,252,47, +190,250,217,191,253,183,4,99,223,201,168,169,34,204,57,144,128,128,209,202, +246,89,134,40,85,149,8,69,4,233,135,202,174,252,48,99,173,242,214,9, +120,85,69,227,187,119,239,31,220,218,35,207,140,152,90,165,84,249,196,64, +242,165,63,249,234,47,253,155,255,225,173,231,62,115,26,67,138,18,2,13, +135,117,188,202,238,214,4,82,8,163,185,100,189,0,1,16,225,131,238,61, +240,94,57,141,181,49,196,37,166,15,134,236,92,215,117,229,11,129,71,18, +163,101,13,174,186,156,153,1,8,128,74,238,212,50,3,224,35,65,228,245, +30,88,234,89,224,124,178,249,49,59,45,146,99,246,134,84,128,91,203,234, +80,41,152,217,60,109,117,205,179,193,148,36,57,224,18,118,41,224,102,102, +2,80,42,114,138,11,142,34,61,160,18,153,136,100,233,99,234,218,118,62, +111,103,49,77,187,126,178,104,167,170,75,56,15,38,143,24,250,66,141,70, +76,76,193,251,186,174,155,166,9,161,18,164,18,229,45,209,247,245,100,40, +16,152,115,20,66,240,28,64,193,249,122,107,56,186,86,48,232,169,32,244, +249,176,52,244,156,3,118,206,249,224,107,242,129,217,51,57,231,2,161,67, +102,73,29,72,36,2,181,101,166,200,121,27,34,197,197,28,129,115,78,169, +239,195,138,136,146,29,103,61,91,91,17,33,112,136,44,194,96,36,25,68, +4,181,184,252,6,38,150,161,104,69,91,86,51,56,20,143,16,16,177,4, +46,54,194,195,231,222,233,242,239,203,144,179,157,5,245,86,105,211,77,101, +180,122,209,103,186,175,9,149,88,54,231,74,190,34,112,45,169,243,150,94, +249,238,203,95,250,231,127,116,244,240,240,249,15,63,109,44,84,185,103,158, +125,54,56,247,79,126,255,15,191,240,119,191,224,169,206,125,202,144,171,134, +5,165,25,84,81,101,125,253,205,157,255,82,203,238,170,191,126,176,113,225, +99,89,202,57,147,230,204,204,227,113,147,45,63,56,186,191,87,29,252,220, +47,252,236,161,157,26,103,172,193,15,104,30,187,80,251,62,137,175,2,20, +150,81,43,177,111,46,91,117,206,249,135,209,2,63,204,16,93,6,73,85, +151,136,173,101,247,154,76,166,102,86,85,149,169,206,231,115,157,80,149,72, +23,220,181,115,243,225,239,253,230,127,124,56,91,184,65,93,53,220,119,51, +66,6,172,47,130,7,0,157,0,0,32,0,73,68,65,84,189,190,229,222, +52,34,24,25,150,210,68,3,59,159,79,127,95,99,189,248,143,188,238,75, +242,188,0,176,68,43,129,194,219,104,133,220,222,95,216,150,223,83,44,74, +142,9,213,12,37,165,126,153,95,189,250,183,174,180,251,174,226,64,114,30, +157,207,107,42,80,181,171,34,0,155,26,175,248,101,18,37,153,245,120,86, +10,88,108,117,85,91,127,144,89,186,114,97,201,49,166,69,223,183,93,183, +232,187,249,201,36,205,230,150,50,23,12,209,186,26,13,6,227,224,7,131, +157,37,47,87,233,93,89,223,61,73,92,151,40,22,145,45,45,40,130,64, +20,60,186,80,121,35,51,224,193,96,103,103,231,58,121,199,204,236,2,249, +224,220,18,10,31,201,161,243,206,185,130,80,143,5,7,87,5,201,52,39, +148,168,214,19,4,6,100,7,192,140,148,26,196,119,223,189,199,161,10,53, +105,78,88,49,176,101,203,32,121,21,26,90,166,224,153,189,136,72,230,156, +181,237,230,243,249,116,54,95,196,60,5,200,42,78,17,12,18,8,116,237, +60,167,78,83,52,49,208,51,196,183,82,248,134,171,165,222,52,120,203,43, +4,40,213,234,23,163,120,235,254,167,11,182,88,249,189,190,141,129,3,248, +138,189,33,114,206,249,203,127,242,207,79,222,125,251,47,95,125,163,113,245, +245,27,251,28,224,104,113,116,109,119,155,7,220,230,22,129,251,20,51,245, +68,193,57,103,5,79,81,151,29,68,143,42,181,247,47,138,31,216,220,219, +212,182,103,158,148,101,34,15,8,98,185,180,227,46,100,18,92,120,237,237, +151,158,126,250,150,186,40,200,20,252,162,139,131,81,3,0,5,51,173,88, +202,5,96,6,128,215,201,153,191,249,177,86,34,235,93,179,172,38,133,240, +161,231,159,3,203,94,2,168,248,106,144,123,110,23,241,255,253,163,63,251, +252,223,253,245,236,42,31,234,69,119,50,168,113,60,172,251,156,175,90,80, +201,61,152,50,32,34,23,210,76,160,31,189,161,119,233,65,92,105,182,172, +224,170,170,34,162,24,35,156,215,160,143,87,124,12,104,6,106,162,146,82, +138,84,96,147,243,149,231,175,139,96,215,206,230,227,157,121,100,15,136,166, +86,240,230,165,64,166,95,253,43,86,58,250,136,136,40,138,196,156,65,128, +177,220,58,175,138,87,81,85,17,120,249,102,65,21,49,103,5,1,19,5, +69,205,16,37,132,102,103,123,176,63,26,135,170,170,66,168,189,27,16,134, +76,83,231,28,50,27,0,216,18,48,217,204,6,245,185,248,5,34,150,222, +59,87,55,160,96,134,222,115,221,84,228,7,77,115,48,28,110,83,240,68, +68,206,179,95,178,14,17,17,48,57,110,28,18,225,138,118,25,213,57,36, +130,52,61,105,48,133,26,135,3,30,86,163,58,212,38,221,124,113,242,151, +223,121,245,47,94,250,171,131,39,158,120,238,35,79,155,72,22,5,5,67, +1,203,8,110,85,6,135,142,131,136,220,187,247,96,62,235,71,179,252,218, +235,47,221,254,254,209,201,201,44,198,19,179,36,130,236,42,194,140,200,221, +60,247,221,81,219,29,105,202,104,217,192,74,74,186,20,106,177,97,206,130, +162,200,23,125,67,179,179,246,143,181,204,92,80,118,248,72,45,70,223,247, +236,25,68,193,60,145,11,68,119,222,121,103,246,224,206,205,131,29,20,236, +219,147,224,252,214,245,97,226,124,255,244,254,254,224,224,23,191,240,75,25, +91,67,21,80,48,75,41,133,80,49,65,132,139,117,94,176,233,83,95,81, +243,181,41,219,239,41,234,143,25,155,207,91,126,102,4,149,148,5,92,21, +208,155,17,28,159,222,239,15,227,83,207,237,169,45,154,193,224,225,225,225, +104,103,28,60,139,8,16,240,70,123,152,170,118,93,199,151,233,241,191,177, +177,230,192,33,34,40,253,84,102,170,234,106,242,158,227,60,247,139,110,72, +91,109,171,237,92,238,63,120,240,217,207,125,225,239,255,103,191,189,176,16, +115,191,53,168,83,59,75,105,224,170,209,85,25,75,201,177,0,223,22,186, +106,3,69,88,149,115,124,208,113,233,187,190,160,248,16,113,89,82,106,164, +6,78,85,79,78,78,134,195,225,197,231,127,236,6,136,184,108,46,41,180, +24,75,174,244,71,94,213,90,26,138,157,117,33,135,139,120,85,90,26,144, +169,248,164,184,236,93,59,55,171,71,101,98,237,234,150,32,84,22,193,165, +33,192,107,219,100,149,77,41,230,222,18,193,148,193,121,170,235,90,155,42, +213,85,123,109,127,223,160,247,149,134,202,144,146,146,40,137,33,115,240,236, +92,233,39,65,68,38,87,140,62,134,77,96,209,179,33,136,117,61,240,28, +0,50,50,178,175,154,193,176,25,142,140,139,49,232,217,59,36,183,196,193, +7,112,22,112,233,235,136,35,244,30,235,186,242,222,223,220,175,157,55,230, +108,133,246,86,250,195,195,59,183,191,255,218,159,127,229,149,111,125,231,229, +207,252,248,139,183,158,186,46,57,247,160,8,228,189,115,100,235,23,83,86, +99,49,93,76,143,223,124,227,141,215,182,118,245,245,55,95,190,127,119,210, +183,81,97,238,188,153,146,100,68,18,70,151,59,51,107,205,38,158,3,66, +1,158,85,231,220,112,232,189,247,228,128,200,214,232,62,103,154,238,178,96, +238,166,192,93,181,21,59,116,206,5,10,117,244,156,147,162,89,142,233,198, +193,245,121,110,165,139,213,96,128,67,75,16,199,219,59,227,221,45,151,130, +51,106,99,222,217,223,19,232,64,165,48,188,229,62,67,245,56,29,113,149, +238,251,17,142,11,207,155,98,172,92,19,188,143,38,243,110,22,66,168,71, +65,187,72,85,234,187,28,231,105,60,30,247,125,170,154,10,176,208,10,158, +85,189,168,106,223,247,33,120,34,2,252,224,90,224,135,25,203,249,152,17, +17,150,14,133,146,115,215,206,146,135,108,67,63,154,31,117,121,78,135,135, +211,24,227,175,252,250,191,159,109,156,77,201,50,228,228,200,251,48,234,164, +114,220,93,113,253,76,134,88,236,59,53,224,199,41,129,199,140,71,229,106, +245,174,47,63,31,113,73,151,12,75,178,30,180,157,237,113,137,127,95,114, +233,21,153,245,217,165,13,1,160,7,47,121,54,168,96,49,153,176,41,179, +143,89,193,67,238,84,204,242,146,73,3,150,161,74,0,198,80,133,1,161, +43,168,162,170,74,76,34,66,192,170,217,121,210,101,134,212,197,172,0,228, +221,40,130,82,136,57,47,114,38,98,74,40,228,72,5,205,140,137,68,196, +177,43,176,186,131,106,208,182,22,33,186,106,208,181,173,31,140,103,135,247, +196,172,218,26,35,204,29,75,4,144,92,52,157,42,118,236,48,101,71,160, +170,89,37,3,170,247,56,222,170,156,191,118,122,250,4,82,70,154,102,61, +77,121,134,146,137,67,21,42,7,142,148,136,130,11,30,144,20,9,75,236, +13,214,38,230,249,129,181,247,222,152,216,85,74,30,93,83,141,247,124,83, +103,26,33,3,50,2,2,168,24,244,172,200,204,148,161,14,180,53,116,163, +81,53,8,20,200,16,12,181,175,213,146,164,62,117,64,154,212,210,34,221, +191,127,255,47,190,241,218,237,183,191,116,122,250,238,188,223,91,244,31,235, +69,43,243,195,154,181,159,83,197,2,140,132,73,5,104,156,117,209,219,252, +155,223,252,243,7,239,254,69,93,87,177,157,46,78,14,85,179,115,46,246, +166,134,4,212,117,109,168,136,25,163,164,186,30,171,185,30,142,8,73,8, +231,146,14,246,183,22,122,220,88,229,227,32,44,198,190,54,8,93,79,29, +224,208,107,160,220,145,23,85,175,176,108,229,94,91,118,155,149,122,162,10, +0,142,24,17,147,228,148,82,104,10,59,239,204,122,248,233,159,248,201,65, +85,159,76,142,78,166,39,145,114,179,237,105,200,190,6,215,184,224,193,154, +40,28,149,185,70,108,241,132,24,9,0,153,162,10,133,115,14,230,57,85, +75,103,95,194,102,208,104,117,206,89,114,121,217,179,121,85,169,242,21,77, +12,166,112,193,133,47,105,31,128,186,23,67,76,0,80,243,192,178,117,150, +97,47,68,205,24,28,153,101,104,93,64,179,14,1,9,80,113,149,64,2, +64,196,173,237,237,171,246,245,199,207,231,7,30,87,248,77,81,163,39,143, +10,108,140,70,34,66,196,142,172,231,133,102,171,117,43,30,54,33,13,223, +124,227,229,7,71,243,159,255,133,95,187,245,225,231,129,152,218,236,234,42, +105,52,6,180,214,17,128,70,64,86,35,98,175,170,166,137,73,99,55,43, +161,255,101,225,23,3,3,66,86,119,181,161,119,213,58,92,181,147,201,198, +115,109,70,207,60,114,54,49,68,69,48,64,215,182,109,85,93,158,102,222, +188,247,5,99,30,169,132,57,215,96,241,176,206,194,111,78,107,253,91,5, +156,57,208,57,162,131,18,138,67,36,53,20,201,138,5,141,143,152,157,135, +1,107,77,64,132,86,124,73,21,53,0,35,129,37,82,92,17,119,50,179, +197,98,65,132,68,20,147,176,115,113,33,49,139,153,44,22,11,3,5,208, +98,231,161,177,42,24,145,138,93,216,97,152,253,104,180,53,28,14,111,62, +49,172,106,220,217,109,182,183,171,24,219,59,239,190,115,231,246,221,217,100, +90,239,109,1,50,51,115,168,216,57,96,87,122,239,28,92,166,242,136,24, +60,123,167,8,196,222,144,140,66,96,71,140,21,180,4,68,128,14,192,85, +212,84,85,51,168,154,80,237,141,135,160,9,52,1,244,165,140,196,128,208, +112,154,59,5,138,201,4,232,244,244,244,245,87,190,247,231,95,255,218,183, +190,241,141,227,211,251,199,167,11,68,108,187,57,187,26,17,99,140,149,119, +64,163,148,78,25,135,142,155,182,63,52,85,233,228,173,183,95,234,230,71, +177,111,165,95,16,216,146,231,140,80,13,209,80,85,98,82,228,226,97,69, +48,151,85,15,118,119,31,220,191,187,51,26,163,250,16,56,80,115,122,52, +223,222,171,21,178,111,74,121,89,121,209,165,250,113,9,130,189,169,119,214, +63,92,176,251,202,96,102,141,48,159,182,215,170,27,188,95,63,120,120,239, +173,183,222,186,126,235,0,153,67,227,170,202,83,5,33,176,11,204,14,109, +73,144,162,132,133,180,224,61,100,181,252,255,178,131,143,73,107,92,153,181, +187,226,62,239,23,8,239,130,167,15,231,191,216,71,227,238,255,114,71,224, +96,98,136,216,231,4,162,206,57,67,200,146,170,0,223,127,229,206,199,175, +31,136,232,233,201,225,155,111,191,149,112,251,224,214,71,203,111,93,120,239, +37,154,81,62,177,101,100,3,17,77,212,174,140,247,253,117,140,243,178,39, +171,192,26,50,59,87,8,89,30,255,203,122,190,190,198,214,149,107,154,69, +4,84,129,8,11,75,217,106,92,120,133,180,1,63,181,242,55,139,45,77, +136,108,100,203,198,118,2,51,36,246,195,186,41,70,169,169,34,209,50,218, +181,68,133,92,46,165,170,162,227,16,66,41,27,102,102,3,244,190,154,35, +24,208,162,93,128,168,243,40,146,68,69,50,129,57,0,48,53,165,242,201, +219,170,57,4,16,185,170,234,186,14,219,59,110,48,168,135,35,95,215,213, +104,112,227,211,159,252,164,10,182,109,255,202,219,111,156,76,38,147,201,52, +74,118,222,251,80,35,147,153,57,174,112,197,223,76,43,76,86,34,34,96, +118,228,200,10,90,21,179,31,13,125,8,116,109,107,80,85,190,174,235,58, +248,194,132,141,42,102,230,243,3,51,51,19,0,64,197,156,53,39,203,89, +79,251,185,65,152,78,226,225,225,201,219,111,190,249,151,223,249,202,247,223, +124,121,54,123,184,104,163,11,213,206,181,189,216,245,192,2,160,201,148,177, +81,204,68,35,179,12,218,55,85,189,232,143,79,79,222,98,139,93,183,232, +187,133,35,99,71,57,11,0,48,5,84,37,36,36,140,73,81,205,57,151, +162,136,89,93,15,158,122,242,233,123,183,239,128,66,142,22,156,99,173,30, +220,190,83,251,29,49,164,177,131,0,86,146,24,136,0,38,27,73,219,75, +229,103,67,144,20,10,196,35,49,40,62,251,196,243,122,76,71,39,183,45, +225,245,155,55,93,205,190,177,80,135,208,16,7,116,21,249,202,113,96,88, +198,155,24,208,16,205,8,9,1,201,214,170,106,173,86,214,82,186,198,86, +91,205,98,157,109,16,216,248,74,207,246,230,43,149,219,99,190,140,75,117, +232,217,198,127,241,74,239,67,69,174,63,174,171,79,254,81,217,122,151,31, +102,164,108,153,152,19,68,69,13,85,165,170,89,109,122,255,232,133,231,126, +76,143,248,244,232,126,206,49,11,255,246,127,243,223,63,251,177,191,181,136, +253,89,164,254,194,110,183,84,124,6,160,132,166,162,154,229,175,187,30,231, +194,86,180,94,204,114,92,13,204,48,84,149,171,235,218,57,39,241,242,76, +196,163,162,188,186,132,17,146,100,73,169,55,51,88,250,204,231,68,106,115, +148,156,201,230,60,202,241,156,51,0,160,67,0,64,224,130,158,130,136,209, +230,38,43,235,81,17,145,177,144,162,217,210,195,85,0,17,73,105,217,153, +32,98,203,228,169,145,119,193,133,250,248,225,3,201,121,107,228,1,141,8, +20,109,137,95,128,140,128,34,25,86,76,198,130,4,166,106,168,198,136,130, +36,206,53,131,186,46,188,136,158,93,24,251,159,249,220,79,151,143,182,75, +113,177,232,166,179,89,219,182,41,165,62,193,90,217,193,70,66,121,103,188, +229,131,99,198,65,83,133,16,42,174,6,131,145,115,14,243,220,204,204,162, +196,86,122,131,85,161,86,47,173,42,136,88,18,136,189,182,157,204,103,125, +215,197,89,142,139,69,255,224,238,131,187,119,222,189,243,253,215,111,223,126, +121,49,187,71,212,181,137,118,15,174,109,109,109,165,20,45,167,42,184,80, +215,10,224,130,151,168,68,226,40,229,62,167,110,186,187,227,191,240,133,95, +120,112,252,192,51,33,216,108,114,50,57,57,18,5,34,138,162,14,172,235, +251,194,145,50,26,109,41,96,1,29,168,57,190,244,29,246,14,25,140,12, +60,135,220,165,129,31,204,187,89,35,140,133,31,128,74,188,99,73,243,180, +22,143,77,129,123,244,72,217,36,98,140,3,172,43,95,205,98,247,234,171, +175,62,245,161,91,55,159,186,57,149,83,170,33,4,231,107,36,15,133,118, +24,29,43,20,127,89,1,80,17,9,151,158,233,5,113,191,84,92,225,188, +110,186,48,171,179,127,186,58,229,123,233,81,132,139,223,249,234,178,182,118, +159,55,14,2,156,199,161,89,79,230,170,219,94,237,217,93,53,207,31,108, +92,121,231,12,166,104,0,72,80,12,189,174,235,204,112,135,247,97,129,223, +249,179,239,60,255,212,83,127,252,165,175,246,180,71,245,245,185,50,158,135, +228,91,106,109,4,5,96,88,71,0,128,209,146,10,200,213,233,206,31,221, +184,52,228,103,168,64,206,4,136,217,251,202,121,239,99,140,143,207,161,108, +90,230,182,4,249,4,36,72,57,169,8,128,2,94,25,41,88,223,88,68, +136,117,141,116,80,184,224,0,0,80,209,136,172,64,51,3,0,56,98,49, +6,4,98,2,0,45,184,131,102,0,198,197,161,22,114,206,49,83,82,89, +35,11,148,58,242,156,162,11,85,168,235,69,219,183,109,239,168,50,99,53, +83,163,194,29,101,64,171,148,14,32,20,204,75,82,192,62,139,246,145,79, +114,78,136,80,153,118,131,58,87,149,214,13,4,31,218,147,227,80,87,85, +85,213,117,53,246,238,250,214,144,136,144,25,48,108,86,174,156,173,146,40, +59,68,203,68,128,6,38,130,105,38,157,194,10,79,152,1,164,16,91,196, +152,115,142,224,251,46,207,231,253,162,141,109,151,187,54,47,186,20,99,60, +58,158,76,78,142,142,143,238,60,188,255,253,147,227,219,169,59,20,232,250, +126,1,110,239,214,83,207,132,16,186,216,86,161,89,162,246,75,22,91,140, +182,200,178,73,159,238,223,125,53,246,253,214,112,239,164,123,215,87,85,29, +66,191,152,197,24,217,133,202,5,49,32,83,144,142,18,133,80,135,122,128, +28,2,179,247,158,189,75,249,20,88,212,34,82,34,12,140,194,14,170,192, +139,5,51,176,90,150,130,120,0,5,233,149,150,162,245,120,165,179,122,77, +101,137,114,142,82,75,181,83,253,244,207,253,84,107,139,147,120,216,184,74, +89,216,35,87,196,30,201,19,58,44,209,159,82,179,169,88,2,197,104,168, +107,189,179,41,162,103,74,237,252,12,206,78,43,166,253,178,29,106,227,148, +199,200,238,21,242,188,241,76,151,187,207,143,206,231,130,25,130,171,126,33, +56,255,137,189,159,251,254,208,227,10,143,94,128,17,115,206,106,22,216,197, +46,117,211,84,135,122,96,187,247,111,31,189,240,194,11,111,190,254,86,61, +186,249,91,191,245,63,60,253,220,39,173,169,186,227,86,85,153,156,158,215, +245,136,172,203,0,84,41,77,49,77,209,30,83,228,241,163,122,170,71,11, +86,74,6,3,140,74,113,4,57,242,193,33,98,74,201,249,43,157,92,124, +36,55,187,18,110,147,156,69,132,138,252,153,18,162,92,241,98,84,21,64, +252,70,205,87,46,249,5,181,66,102,152,37,18,145,129,32,48,104,150,190, +32,220,107,41,55,33,34,102,111,102,158,17,16,115,202,102,230,189,95,203, +138,33,42,32,51,171,25,146,35,23,136,195,225,195,7,1,26,199,30,157, +151,140,102,8,198,128,12,64,222,145,153,45,83,46,180,228,76,73,89,78, +79,53,165,220,118,19,230,201,160,241,59,187,227,225,168,98,198,189,225,88, +251,220,39,41,204,223,196,96,42,146,162,99,89,27,122,176,14,106,32,58, +118,44,172,150,209,8,212,36,103,51,73,125,202,74,217,150,144,124,49,73, +223,199,24,99,78,250,112,42,41,73,236,37,198,220,199,220,117,93,219,206, +219,216,31,222,187,123,122,242,96,49,191,55,159,190,187,152,63,68,20,3, +205,230,246,174,223,184,245,204,179,125,140,93,219,15,6,3,2,48,211,186, +30,56,151,201,104,177,56,121,251,245,87,188,195,155,55,110,60,124,112,108, +236,175,95,191,214,183,243,211,147,99,32,63,30,15,128,168,235,133,205,218, +56,103,102,95,55,117,53,4,32,239,170,80,121,85,109,187,62,137,244,49, +42,130,130,136,36,52,73,169,39,52,180,226,244,128,21,168,32,53,3,15, +150,55,197,99,243,213,151,215,189,114,118,150,235,19,28,107,150,123,211,219, +59,245,158,108,39,82,181,105,108,134,85,47,45,59,4,15,232,144,28,2, +153,98,129,2,54,88,125,169,151,186,163,23,165,206,54,119,241,13,133,136, +231,52,212,163,150,233,163,23,190,244,40,194,121,83,241,241,147,185,250,132, +11,138,123,109,167,252,75,179,245,0,136,40,105,38,36,52,178,94,43,27, +12,108,8,109,157,250,201,189,197,201,203,111,220,253,251,255,201,111,127,228, +211,159,131,122,208,230,190,40,110,239,150,70,204,234,93,111,94,79,1,16, +84,84,210,7,73,214,254,16,227,92,252,180,196,207,136,157,11,76,206,21, +114,235,71,192,61,151,99,181,149,157,197,227,150,203,133,74,6,133,239,113, +205,68,84,250,52,55,119,191,205,25,20,91,12,87,84,161,0,224,189,151, +182,55,205,106,82,114,96,102,201,12,179,119,206,31,129,25,34,23,67,194, +113,0,129,148,210,204,120,180,181,5,0,57,38,0,200,133,208,179,20,139, +168,136,161,115,94,114,100,230,221,253,131,183,223,126,251,110,55,27,14,135, +85,51,100,102,0,114,46,32,17,162,230,188,68,18,84,51,132,98,162,99, +206,42,102,243,227,153,35,108,154,106,209,230,201,105,87,55,110,48,168,143, +252,108,48,168,155,166,241,206,17,129,247,133,17,220,231,212,173,35,122,182, +241,85,199,28,137,168,144,100,138,72,202,160,10,125,31,219,94,82,148,182, +239,250,62,198,100,177,207,125,78,57,171,100,16,177,20,37,166,110,177,152, +157,78,15,167,147,195,69,59,141,253,233,108,114,216,247,199,144,59,166,156, +178,198,12,85,189,253,201,79,125,102,255,224,192,204,136,192,178,136,75,36, +172,102,104,147,197,41,189,253,230,75,91,219,225,218,214,147,199,167,19,197, +124,237,218,211,211,110,218,246,162,66,117,61,112,206,169,130,115,146,69,114, +142,28,170,186,106,66,168,17,156,175,2,128,117,221,98,48,188,214,12,118, +145,28,97,141,92,49,85,10,100,134,102,162,38,166,17,0,201,72,209,84, +1,86,32,198,23,254,132,141,77,110,45,130,197,186,17,77,136,12,141,30, +203,253,142,123,1,25,238,55,109,55,247,181,71,50,114,64,206,192,129,161, +33,130,1,173,241,160,108,229,85,152,153,97,33,166,120,220,184,244,243,126, +84,233,92,25,214,123,76,137,232,165,37,138,37,83,244,200,245,240,28,70, +200,227,82,43,239,161,49,127,84,97,189,171,191,247,162,208,153,89,58,213, +22,70,52,134,142,79,238,157,130,133,239,188,252,218,207,126,254,215,94,252, +217,95,204,4,140,234,168,90,183,18,95,132,31,166,82,41,2,136,72,182, +100,152,112,63,84,61,242,251,26,87,217,122,80,204,61,100,231,2,34,187, +148,18,17,21,182,239,71,199,202,2,199,13,93,118,182,61,170,230,21,156, +228,69,7,231,42,197,7,171,64,64,8,97,60,30,223,124,250,25,3,45, +185,96,114,92,190,255,225,112,216,231,190,104,51,51,75,73,82,154,78,167, +211,249,241,241,155,247,232,249,231,159,111,134,195,229,220,112,125,101,44,224, +240,222,251,156,60,177,191,182,191,47,98,239,220,190,187,189,51,30,111,111, +23,150,137,16,106,231,107,34,2,229,146,130,0,0,21,32,194,12,166,170, +158,141,217,171,217,108,145,166,243,206,51,56,79,222,207,153,172,174,67,211, +52,206,147,103,23,130,243,193,49,115,112,103,141,250,235,167,70,196,182,3, +68,140,169,79,57,167,148,99,50,201,208,198,100,217,114,210,62,75,22,85, +5,49,204,89,179,168,151,216,247,105,62,159,206,166,147,217,252,120,177,56, +90,180,199,125,156,138,28,231,216,83,41,22,205,22,19,140,119,14,62,249, +233,23,183,118,247,250,62,217,18,238,88,156,115,37,10,169,89,222,122,243, +219,219,227,173,103,111,61,125,255,254,61,0,122,238,67,159,254,200,11,31, +23,145,190,107,201,192,17,230,148,212,208,128,115,86,196,67,239,42,132,16, +123,72,34,57,231,163,163,195,123,247,222,125,240,224,1,187,65,22,75,25, +67,38,67,7,230,145,60,90,2,69,85,89,238,117,171,84,0,62,146,174, +93,191,247,245,70,136,155,31,182,106,53,172,79,38,19,102,79,91,78,59, +209,20,67,227,13,16,9,136,180,160,144,172,190,38,5,216,40,100,69,3, +195,11,1,149,71,108,189,203,157,77,124,164,160,122,57,231,171,59,47,47, +61,254,104,240,14,86,49,172,11,191,248,168,229,123,126,62,151,27,155,239, +39,245,241,215,49,236,12,135,148,22,179,133,206,176,169,198,237,81,203,224, +255,252,27,95,255,137,159,253,194,111,254,131,255,98,161,156,33,131,70,15, +227,120,117,216,116,227,121,212,64,225,111,28,81,225,156,173,87,234,245,8, +9,25,0,28,177,159,78,167,77,211,108,156,180,70,217,43,146,183,105,232, +217,18,186,210,80,180,237,250,73,112,154,163,210,50,43,44,158,89,16,31, +69,147,202,57,123,239,179,68,231,28,146,72,202,144,249,250,173,103,118,42, +87,53,245,188,109,75,121,10,6,129,36,14,85,7,42,153,178,9,128,246, +178,120,56,61,109,15,243,183,254,244,149,111,188,242,229,79,252,214,127,181, +232,149,171,1,136,57,51,14,85,142,162,129,144,93,8,181,165,40,20,115, +229,186,78,94,248,177,143,127,233,193,27,247,15,103,168,177,39,199,161,26, +237,238,57,2,69,55,80,134,51,106,244,37,16,52,3,152,5,131,229,119, +108,64,81,33,246,0,189,56,149,25,9,81,207,27,3,17,139,245,186,204, +179,44,219,182,179,22,94,17,45,208,44,86,186,250,205,76,21,34,40,26, +136,24,170,17,185,28,115,55,95,228,156,143,186,227,197,244,168,61,189,175, +113,146,227,188,239,79,251,24,147,102,134,204,68,93,234,187,152,93,61,220, +62,56,120,234,233,231,119,175,221,24,81,173,228,163,115,192,230,217,5,244, +65,187,56,191,251,238,237,111,94,219,127,241,214,83,159,188,115,255,203,73, +166,251,187,159,33,55,218,222,191,53,232,34,237,165,62,69,209,154,1,85, +103,140,104,169,18,247,164,104,135,148,153,113,209,165,187,119,166,36,246,218, +75,111,204,186,35,54,32,152,121,170,198,213,144,51,96,204,181,193,221,170, +11,184,15,90,75,142,61,129,129,121,71,96,45,224,229,213,194,182,170,86, +1,0,5,89,146,187,155,18,242,98,222,121,14,102,166,57,49,155,17,154, +169,161,2,162,21,219,121,201,28,96,0,0,116,62,238,188,82,122,25,141, +12,73,137,141,209,74,182,3,151,94,149,81,105,58,90,54,213,49,167,148, +172,150,190,141,77,213,64,94,218,161,204,44,34,224,236,108,202,107,227,0, +0,148,139,144,148,132,79,145,19,85,189,178,142,175,204,214,54,226,134,70, +0,64,185,18,104,129,122,96,2,243,144,201,84,193,132,184,66,52,36,41, +145,4,51,3,100,68,36,64,17,65,89,249,49,40,98,98,0,36,151,36, +142,62,192,208,2,190,189,84,7,103,192,16,158,234,222,0,32,89,39,91, +178,29,240,90,123,178,0,76,191,247,167,223,252,213,127,235,55,127,245,223, +253,79,21,182,82,92,132,186,54,51,242,17,128,76,148,136,88,77,80,29, +97,206,169,10,150,205,128,168,96,156,128,90,74,189,145,24,101,200,78,4, +188,107,68,123,181,214,57,2,32,83,47,116,85,200,239,253,86,107,47,131, +93,231,48,153,207,142,171,16,147,171,235,224,60,154,137,67,196,193,96,112, +169,194,190,106,152,25,148,30,189,53,236,184,21,99,231,172,114,101,99,19, +91,222,123,211,249,53,51,53,205,57,187,80,133,38,40,161,42,164,148,10, +117,156,49,38,33,230,138,149,114,238,28,87,117,93,79,167,183,95,254,238, +95,156,78,78,22,139,133,86,14,200,9,112,169,31,39,194,44,178,41,135, +142,195,96,48,216,185,182,87,13,6,243,249,131,119,239,191,115,109,107,7, +22,96,40,54,11,91,215,174,37,171,73,150,96,247,80,124,55,0,68,60, +131,128,94,1,29,22,110,114,65,21,51,16,41,19,61,19,56,1,192,37, +172,83,201,106,44,15,219,69,22,190,51,131,7,180,239,251,190,107,83,63, +47,64,126,146,227,172,63,149,212,73,154,107,154,229,216,166,212,162,99,95, +135,110,42,136,42,134,91,219,187,215,110,60,177,187,119,115,123,247,186,175, +155,88,193,184,25,6,38,64,171,194,150,241,120,50,127,237,228,232,43,79, +92,255,185,103,159,249,216,27,223,255,182,115,55,183,247,95,84,37,211,145, +117,11,246,117,221,48,75,72,177,82,17,210,196,8,228,106,65,96,55,200, +210,119,169,3,163,170,202,125,124,240,253,219,175,246,50,251,196,103,126,226, +107,95,249,131,193,98,54,218,217,5,106,63,250,217,231,91,158,111,111,17, +224,169,136,114,64,38,78,98,101,63,187,148,247,193,46,59,120,149,140,173, +109,174,11,33,255,199,203,36,174,172,43,69,37,56,35,195,22,99,213,4, +2,236,16,25,98,106,45,91,85,5,235,171,33,135,110,209,87,149,239,115, +98,102,50,35,34,177,71,203,15,150,110,245,218,137,121,95,30,232,21,35, +82,239,3,153,133,110,209,123,87,33,49,59,84,203,185,207,68,64,160,70, +37,201,194,171,199,50,32,48,48,35,147,101,11,7,50,159,171,166,126,204, +242,190,159,177,212,116,155,60,34,192,189,40,120,11,76,139,227,197,226,97, +62,24,236,103,129,47,127,237,91,159,255,194,191,247,111,252,234,175,87,245, +96,50,63,173,6,77,150,228,168,178,21,32,246,85,134,234,210,189,221,128, +100,71,84,68,46,37,180,34,2,40,166,0,102,196,151,151,137,211,70,133, +239,230,184,228,217,151,168,63,143,144,217,150,227,128,133,180,72,165,71,18, +215,247,253,38,224,138,173,162,120,155,129,170,11,230,186,153,161,74,142,81, +53,131,234,178,48,7,16,86,128,7,235,113,97,65,108,99,136,72,215,117, +211,57,129,171,218,46,45,186,52,159,207,53,101,149,68,128,102,8,176,0, +0,145,254,104,242,240,157,119,222,121,253,181,183,222,185,253,218,60,206,22, +243,41,129,87,96,54,143,76,134,189,15,3,0,43,198,151,232,18,2,32, +84,245,112,56,254,185,159,255,59,191,247,187,255,247,233,195,187,93,123,178, +183,179,117,250,246,241,104,123,63,46,230,163,173,125,102,246,190,242,46,48, +51,145,43,125,224,133,107,189,148,3,174,39,13,0,120,69,135,16,51,151, +186,13,89,134,221,173,80,130,16,172,145,169,196,76,68,115,193,110,58,122, +112,95,52,245,221,172,235,167,41,47,98,63,143,177,85,203,125,63,215,156, +76,35,163,33,130,96,206,49,182,185,3,117,195,225,96,119,123,103,111,255, +218,222,181,27,190,26,133,106,200,222,161,223,51,106,29,55,215,70,207,187, +70,238,29,127,165,239,142,110,94,127,241,217,103,126,242,193,209,119,188,247, +163,173,103,252,224,105,133,249,226,244,237,254,244,224,180,82,33,159,178,204, +167,210,117,93,146,83,79,104,210,21,41,81,213,24,227,225,209,195,119,222, +121,231,213,87,95,189,253,238,247,198,187,55,127,252,197,207,125,253,207,255, +56,51,207,173,235,82,191,119,176,61,111,231,53,103,209,8,96,38,164,46, +212,85,200,73,115,2,114,103,218,225,130,116,94,186,110,184,241,79,231,196, +244,145,93,19,54,130,77,143,14,42,187,11,152,161,42,130,173,136,132,128, +140,61,167,62,75,4,35,11,60,180,172,16,209,183,53,85,4,204,179,249, +169,57,141,73,61,122,207,1,194,217,108,237,12,92,254,12,169,204,86,132, +74,143,62,227,249,97,235,63,54,143,244,218,57,104,64,201,195,16,82,80, +178,46,207,50,204,42,216,93,174,0,25,26,25,46,213,80,166,4,70,72, +168,160,69,47,32,34,42,171,229,205,21,251,96,42,24,214,14,189,173,106, +106,96,105,147,118,152,57,167,118,210,237,184,3,109,170,249,124,254,213,175, +127,235,115,63,251,203,191,254,31,252,231,190,26,207,99,118,149,3,146,101, +3,157,156,17,221,21,47,112,115,62,5,55,180,48,213,173,128,236,72,204, +128,0,201,64,84,52,90,86,80,54,21,75,87,85,206,189,47,91,111,189, +32,116,149,254,229,0,0,109,234,58,118,98,182,130,75,43,15,126,73,200, +99,173,164,241,92,232,10,76,114,44,93,15,184,162,85,150,13,178,212,205, +27,219,249,136,207,18,202,45,107,223,247,147,83,84,104,38,243,118,114,210, +158,156,206,36,166,156,122,208,204,72,165,22,47,75,247,189,239,125,247,181, +215,95,153,77,79,69,166,177,91,196,110,70,84,171,161,195,6,141,21,16, +41,147,67,34,98,64,116,198,161,18,205,32,145,216,141,119,247,126,236,197, +159,248,211,127,241,7,237,236,232,193,195,217,193,181,27,15,239,190,53,28, +109,191,251,224,29,239,171,224,235,166,25,84,85,19,124,237,92,96,246,85, +229,1,128,200,149,40,100,193,115,6,128,124,198,105,176,92,135,229,241,24, +87,199,13,86,72,206,170,98,41,139,164,148,251,24,187,190,111,187,190,237, +251,54,165,228,72,98,236,82,63,79,185,83,141,106,125,150,40,146,28,40, +3,40,64,54,51,1,5,42,56,242,183,158,124,102,56,28,54,131,145,171, +106,4,50,32,242,46,212,117,221,84,205,176,217,26,108,67,156,221,121,251, +75,71,211,191,120,226,201,159,126,238,185,95,59,154,124,251,104,250,240,137, +39,63,19,194,129,185,238,193,253,239,245,147,119,82,252,76,219,45,178,213, +179,69,122,112,191,159,205,230,49,79,208,12,178,39,138,57,139,10,73,202, +111,189,253,218,27,111,126,247,240,248,78,159,142,134,50,54,141,154,133,129, +17,77,76,22,109,139,204,152,188,243,230,42,167,148,187,46,34,18,0,121, +239,179,246,23,94,52,60,222,214,3,129,21,204,34,156,125,132,197,224,254, +1,108,61,54,18,48,67,5,179,194,169,88,176,127,8,132,5,61,215,158, +171,110,174,30,6,32,148,162,166,105,155,168,109,14,170,119,222,190,243,212, +115,79,1,136,115,129,201,39,137,136,133,36,23,96,19,249,104,21,164,95, +195,103,124,48,243,106,80,213,150,192,90,170,96,187,155,137,171,145,92,143, +53,229,72,184,100,143,89,221,78,209,12,68,139,89,132,88,124,229,229,241, +37,59,210,229,27,198,15,58,108,9,9,97,0,96,68,165,146,134,165,38, +239,148,100,78,253,52,125,237,207,190,214,218,224,51,63,254,139,110,120,48, +95,196,186,174,147,116,49,181,193,85,41,202,48,84,139,213,226,92,112,107, +150,125,196,104,166,178,172,89,89,193,38,45,75,190,82,1,56,75,166,106, +70,238,10,148,25,211,247,192,253,92,174,192,250,117,217,185,227,235,191,170, +8,0,72,241,118,81,221,154,247,111,61,233,75,107,121,236,124,240,21,76, +36,245,128,165,0,173,168,69,42,85,38,101,92,248,117,162,115,57,172,98, +235,245,125,239,177,54,76,199,199,241,225,225,226,100,210,230,156,83,92,152, +100,178,190,236,38,237,98,246,214,155,119,14,31,156,244,241,100,209,30,19, +186,216,47,144,22,138,84,49,25,214,66,89,52,145,58,17,41,156,12,206, +57,9,158,173,114,190,146,80,127,226,83,159,170,42,251,131,223,253,157,182, +157,191,115,231,237,173,102,60,57,90,72,93,4,138,152,61,97,96,246,101, +87,113,60,40,168,159,85,168,67,8,33,4,231,28,145,211,243,40,143,103, +235,160,86,52,93,150,88,138,239,98,236,114,206,100,157,89,1,67,73,170, +49,75,20,201,34,146,219,201,234,18,90,58,49,202,159,154,77,1,250,36, +128,190,25,142,198,219,59,123,187,251,187,187,187,232,192,113,32,31,152,28, +187,58,132,122,48,30,13,134,117,112,109,144,27,139,211,163,219,239,254,94, +63,187,251,233,143,253,202,179,207,255,226,209,233,187,239,222,255,222,205,91, +159,118,131,235,132,131,233,228,181,219,111,126,245,217,155,159,94,244,42,17, +1,229,225,113,119,231,221,249,108,218,102,109,65,115,142,236,221,204,148,251, +54,77,167,211,239,191,253,246,201,233,225,162,155,106,110,29,204,143,239,191, +179,55,28,182,147,121,243,196,62,48,80,114,4,190,159,112,134,222,13,117, +180,63,172,92,84,181,148,34,208,18,150,234,253,219,122,87,213,101,172,37, +239,130,190,187,138,87,1,141,8,36,131,24,26,26,162,49,43,161,81,72, +68,24,218,89,7,134,59,205,65,119,154,238,222,121,168,217,28,73,179,85, +219,130,117,193,20,137,107,175,10,93,236,168,42,31,207,74,241,217,89,251, +191,93,54,46,157,204,217,147,61,98,235,89,66,93,200,174,59,128,118,144, +23,93,63,91,52,123,117,148,206,42,4,4,1,101,93,82,0,34,56,0, +112,48,16,19,181,84,60,8,130,51,171,106,115,169,62,176,173,87,38,133, +0,96,100,165,195,19,192,12,153,204,90,194,174,177,190,82,203,147,118,241, +219,255,245,127,247,217,23,255,245,119,167,139,237,209,182,106,214,44,206,51, +128,122,95,229,85,38,243,236,170,171,25,174,232,250,212,64,68,115,113,41, +200,80,80,177,144,56,115,97,197,4,2,45,25,223,75,167,121,213,123,223, +124,146,77,213,191,185,99,110,30,87,49,67,40,27,137,163,149,173,183,233, +138,219,153,226,92,111,197,103,150,218,242,169,84,36,69,134,21,254,157,157, +167,221,59,255,243,133,96,223,90,51,230,156,37,231,212,165,249,172,159,207, +210,98,46,34,57,38,53,21,153,244,164,154,0,0,32,0,73,68,65,84, +212,94,53,139,72,183,232,187,86,193,72,45,139,182,30,71,113,49,55,168, +141,93,242,174,10,142,213,173,238,181,68,199,68,38,98,231,92,240,117,3, +154,18,232,222,193,83,63,255,249,95,249,227,63,250,226,236,248,193,225,233, +195,209,112,216,47,218,2,117,74,88,152,147,124,9,169,48,213,184,130,81, +65,196,51,18,194,213,15,23,118,215,146,101,94,162,19,155,173,140,130,12, +50,91,62,164,101,213,66,33,148,205,172,94,2,206,99,159,164,239,123,53, +44,176,122,49,66,61,28,141,247,182,118,247,14,246,174,29,132,16,114,142, +132,168,152,209,177,95,194,44,87,85,85,121,66,137,125,221,236,117,179,215, +78,142,190,109,58,253,200,39,126,249,214,135,190,208,245,221,221,219,95,186, +249,244,167,182,70,207,114,24,79,142,111,31,222,126,253,198,248,153,173,209, +205,69,15,148,19,117,54,159,117,211,211,110,177,80,5,3,131,156,116,209, +182,76,33,182,113,122,58,159,76,79,251,190,151,212,171,197,147,147,59,15, +238,221,249,196,199,94,248,226,23,127,247,214,141,253,237,189,109,103,85,67, +227,227,182,11,213,32,118,211,220,163,120,35,135,190,10,204,152,243,69,235, +227,226,54,121,65,84,175,172,71,187,196,208,3,0,187,132,245,236,236,180, +37,172,41,18,155,227,236,40,51,205,199,41,165,253,241,141,118,222,29,221, +62,246,228,107,162,175,126,243,171,219,187,59,159,249,241,31,163,158,159,222, +125,150,58,66,68,172,20,253,170,114,19,86,216,181,103,120,4,151,99,123, +252,192,131,120,60,28,229,211,92,103,188,255,230,187,123,79,110,167,78,120, +20,116,89,38,161,8,72,4,4,12,64,166,88,73,37,156,35,98,130,206, +208,128,144,175,88,156,15,104,238,45,203,77,138,202,43,223,53,154,137,55, +231,99,147,102,40,153,255,159,223,255,253,176,115,13,235,189,105,103,227,193, +64,53,247,109,87,135,192,156,83,20,23,72,172,0,46,92,2,92,2,75, +58,87,81,201,69,242,151,110,35,56,230,192,174,6,238,208,214,0,21,87, +6,13,222,115,181,47,108,180,120,197,113,32,228,210,229,143,10,10,174,32, +184,110,90,103,155,17,189,117,116,121,115,151,67,68,181,156,115,102,68,195, +66,85,187,84,109,196,188,46,227,184,48,57,88,157,179,190,148,170,2,38, +192,136,144,13,68,45,170,137,89,6,200,228,56,199,4,104,222,85,0,44, +2,170,58,168,125,238,165,235,22,236,134,65,82,78,125,206,21,241,217,235, +47,232,96,102,70,228,216,73,168,43,214,122,177,88,140,199,7,238,89,254, +249,207,187,175,254,233,31,62,184,251,214,201,252,97,197,97,105,68,16,33, +98,94,63,227,138,109,144,136,87,179,69,88,217,170,155,123,67,249,97,109, +219,219,138,156,201,76,205,140,32,111,46,23,173,106,127,218,69,54,51,43, +23,167,80,123,31,154,154,201,237,63,243,228,246,238,110,51,222,241,33,48, +115,78,189,67,9,142,33,184,42,52,193,15,137,156,247,213,112,56,108,154, +138,8,166,247,94,77,242,125,239,236,249,103,254,237,167,159,251,153,135,167, +119,15,31,254,213,254,193,246,238,205,79,72,31,41,197,135,119,190,97,249, +120,119,255,163,93,215,18,17,66,2,3,211,164,154,193,20,64,12,50,81, +200,202,0,4,76,174,66,68,201,146,82,74,142,67,24,13,182,14,14,110, +94,187,254,197,47,126,177,79,130,136,4,200,236,94,250,206,75,207,127,252, +150,223,82,79,92,240,21,141,41,165,75,42,54,222,67,106,175,204,129,94, +122,240,202,190,159,37,80,54,2,0,176,58,74,158,122,103,9,164,229,173, +209,248,228,240,244,91,223,250,38,152,245,125,91,215,245,193,147,215,170,193, +120,48,28,122,231,168,157,33,192,241,209,195,173,91,3,240,138,142,109,109, +110,32,109,210,251,62,250,8,31,192,214,155,107,75,102,91,205,56,245,211, +39,159,57,208,74,105,4,29,175,89,186,8,192,160,240,54,41,128,88,127, +20,185,65,30,56,113,94,32,149,108,134,109,104,135,31,50,180,135,80,154, +33,97,173,242,84,21,212,66,26,207,239,245,212,133,135,135,119,7,219,215, +255,225,127,251,63,62,243,252,167,209,89,206,139,138,155,81,221,164,190,79, +34,134,22,115,95,55,131,245,199,142,171,82,149,77,35,221,192,212,68,53, +151,246,0,48,44,172,21,204,158,144,17,9,140,208,8,12,145,47,207,90, +188,127,222,206,229,52,30,89,140,165,165,101,121,89,115,172,72,37,69,114, +233,194,173,21,223,165,155,137,137,130,102,216,212,56,8,64,72,182,76,140, +110,18,113,172,63,254,11,10,212,204,84,22,202,44,218,169,245,57,247,41, +247,146,123,68,1,51,145,108,170,34,90,224,45,83,74,49,117,104,195,156, +34,136,152,89,206,57,231,232,124,165,170,152,35,50,151,18,63,0,16,101, +0,31,180,238,105,126,109,111,127,58,153,244,109,220,189,246,196,223,249,133, +127,237,173,55,190,253,87,127,245,237,217,221,249,202,202,207,72,84,138,6, +84,149,125,73,203,32,24,67,177,97,21,1,192,244,156,95,179,249,106,215, +143,86,106,193,138,177,39,182,254,39,6,91,187,39,72,92,1,66,104,234, +173,173,173,209,214,120,48,30,22,210,241,186,186,86,141,70,236,2,48,57, +71,206,27,25,86,142,200,187,16,26,199,53,161,175,170,166,105,42,51,233, +22,45,118,95,171,170,231,198,251,63,191,127,240,201,216,31,79,142,94,138, +121,106,238,217,135,221,241,129,223,158,188,251,29,107,239,86,141,190,121,231, +27,207,60,249,175,144,205,204,58,133,108,210,154,116,89,114,214,182,208,6, +49,58,3,16,73,165,49,217,57,234,1,68,172,55,244,131,173,227,89,47, +128,2,216,197,206,135,122,177,152,127,234,133,143,140,175,53,247,102,111,39, +49,242,75,213,142,72,102,103,48,83,155,171,244,126,44,145,243,123,245,229, +31,243,227,109,1,43,5,237,134,152,209,18,97,135,128,233,255,252,191,254, +143,131,235,215,119,118,118,238,222,189,219,117,221,139,63,245,147,85,213,80, +133,40,36,189,190,241,242,155,31,249,228,135,102,167,243,107,207,236,68,234, +87,33,197,245,213,206,28,246,31,42,118,182,158,103,208,108,242,240,225,253, +235,195,39,26,66,30,215,247,187,119,181,206,40,107,150,174,82,202,106,150, +179,10,116,15,83,179,83,121,231,216,177,90,82,48,53,53,131,117,74,243, +135,156,216,18,97,115,185,157,144,153,150,88,205,226,97,254,254,247,222,121, +250,198,211,175,188,242,242,223,251,205,255,242,99,159,248,156,185,1,104,199, +150,83,92,212,60,172,188,143,34,192,128,222,247,105,241,24,15,180,104,61, +51,65,80,91,219,82,70,136,76,196,68,14,140,214,5,142,87,133,239,214, +40,167,87,141,13,237,15,0,96,43,45,121,118,188,164,88,137,0,17,20, +1,204,128,92,225,199,93,49,39,156,93,171,204,146,1,84,148,136,162,36, +36,231,188,239,115,70,224,220,62,36,132,20,193,251,10,80,13,18,0,122, +166,156,250,98,208,2,64,177,234,150,23,52,1,36,213,18,201,82,85,145, +20,209,4,97,108,234,204,208,114,225,238,50,84,32,114,146,19,35,103,180, +100,17,72,129,204,161,67,245,0,208,117,93,85,47,82,183,24,122,71,106, +0,164,64,222,28,97,16,48,49,52,100,114,129,153,65,45,215,131,28,187, +48,168,199,86,155,14,76,182,159,126,246,199,175,95,255,88,191,56,62,58, +58,58,124,120,127,62,159,47,22,179,118,62,85,83,246,36,27,218,13,169, +36,236,20,64,85,72,44,59,79,203,6,41,69,77,232,156,39,182,146,190, +64,68,4,6,64,128,82,123,150,140,208,251,74,5,179,232,120,123,180,181, +221,136,68,112,250,244,147,47,4,63,158,47,78,6,67,38,114,125,151,119, +119,174,247,73,149,243,214,222,46,83,211,79,39,34,217,87,190,30,239,9, +142,154,42,117,39,247,124,61,220,219,122,66,45,31,61,124,51,199,219,224, +119,246,111,61,179,255,196,83,153,39,175,189,254,255,245,253,228,230,211,63, +235,199,159,186,238,71,179,195,55,94,123,233,79,216,47,184,121,254,214,211, +159,53,87,183,148,43,12,96,36,80,42,10,197,76,208,4,204,169,152,225, +28,200,68,67,206,94,44,35,9,136,27,229,42,119,226,6,123,55,63,244, +209,211,147,123,215,71,31,54,113,169,57,178,107,184,168,251,237,237,45,225, +140,198,204,132,104,104,146,233,10,109,245,200,230,187,20,199,13,41,223,204, +207,242,202,193,200,89,144,61,145,43,149,49,41,245,133,47,15,17,76,204, +131,35,69,20,236,66,239,114,229,251,145,107,107,236,56,128,147,190,251,242, +151,254,4,253,238,243,79,63,191,136,147,239,190,252,245,207,255,210,47,12, +134,219,237,92,78,78,231,170,57,16,93,223,219,101,7,134,228,124,19,99, +20,234,80,2,51,19,19,24,132,218,79,38,147,173,237,145,136,172,227,54, +107,150,133,229,3,94,141,187,183,252,214,206,134,0,192,96,30,136,80,107, +190,171,119,253,40,32,32,5,195,232,69,100,52,26,181,125,43,156,18,88, +35,77,221,142,170,121,243,199,47,255,233,11,63,249,194,252,164,173,66,101, +204,206,67,234,186,65,213,36,91,182,238,18,173,56,176,64,157,115,87,117, +25,156,251,168,87,93,122,136,168,245,98,49,145,189,225,141,105,123,90,13, +120,250,240,248,137,209,179,199,119,23,15,95,250,222,51,207,124,248,159,253, +217,119,127,230,151,127,227,111,255,202,111,168,49,246,57,112,19,145,140,45, +97,2,0,35,54,49,135,218,56,234,120,11,252,131,36,179,38,108,199,136, +236,147,66,47,218,27,14,189,39,233,123,233,23,96,185,144,127,3,32,51, +187,186,158,166,228,67,163,10,30,208,80,149,145,174,108,14,123,68,114,150, +227,172,196,226,252,241,181,211,113,238,50,4,4,2,166,10,0,42,201,17, +81,206,249,170,186,152,117,60,142,200,21,9,32,3,197,37,6,236,251,12, +121,32,162,136,160,178,109,32,172,45,1,153,54,126,241,130,1,117,149,109, +85,74,67,214,69,64,170,74,43,31,19,137,17,105,165,131,144,136,124,24, +0,16,26,168,164,122,216,154,70,34,115,142,42,111,161,170,175,93,219,87, +149,148,250,217,108,214,119,11,17,105,103,243,156,115,76,93,223,247,41,165, +156,83,206,89,21,216,177,1,169,97,142,9,193,170,64,206,11,64,151,18, +20,200,120,68,46,5,64,76,190,174,235,241,214,176,148,43,111,141,247,182, +119,174,197,24,219,254,196,7,168,155,167,146,30,10,197,39,158,124,182,239, +104,54,63,28,239,52,64,122,112,240,100,224,166,9,254,120,118,135,106,221, +222,63,160,158,182,66,19,237,206,100,170,123,79,62,55,26,111,183,237,209, +228,254,171,186,184,87,217,255,207,218,123,6,91,150,93,231,97,107,173,189, +247,9,55,191,252,250,117,206,211,61,57,97,48,51,24,132,33,1,112,32, +0,18,18,131,4,102,80,12,166,204,76,91,44,179,236,42,201,178,85,148, +109,149,75,182,84,37,89,54,93,46,147,54,105,65,204,0,8,82,36,1, +80,0,6,105,48,152,216,51,29,95,119,191,28,110,56,97,135,181,252,227, +220,119,251,246,235,247,6,67,138,251,199,171,123,207,59,247,156,179,247,217, +123,237,21,191,207,155,227,239,61,113,248,97,219,189,177,184,244,133,50,27, +28,57,249,222,201,249,251,85,28,99,111,251,165,11,159,223,144,215,239,63, +249,183,234,230,222,126,102,189,31,24,149,0,188,17,243,231,184,251,162,106, +222,123,107,109,220,138,206,158,59,255,213,207,189,120,96,122,1,146,218,86, +190,209,158,158,4,10,64,36,36,2,204,2,42,32,236,37,221,118,46,189, +247,225,253,118,240,10,73,140,17,24,129,32,48,67,8,14,21,104,16,133, +81,233,3,144,38,196,210,149,26,36,210,90,15,146,118,58,177,213,203,8, +180,45,253,181,27,139,43,171,55,227,78,51,203,178,43,139,55,239,189,255, +252,125,15,62,176,188,186,249,199,127,242,23,243,11,199,211,90,211,229,203, +103,79,158,44,203,18,0,180,214,141,90,29,24,113,108,203,247,222,135,34, +148,101,105,109,36,34,164,246,198,70,218,223,174,220,187,103,43,235,43,157, +102,39,77,83,168,2,253,158,17,209,24,163,76,232,247,123,64,162,140,6, +102,68,85,90,7,206,60,250,232,163,86,91,138,209,59,23,152,67,8,73, +156,100,89,38,74,87,137,89,195,208,165,136,84,117,236,251,248,0,70,182, +200,174,131,182,207,51,141,131,101,79,82,152,88,187,122,99,225,192,161,208, +71,159,241,220,194,193,63,249,179,207,215,231,78,189,229,177,119,32,197,222, +138,81,100,185,132,59,134,97,215,149,119,43,158,200,34,195,68,34,217,9, +144,50,2,97,229,56,82,82,229,147,255,117,131,49,127,189,54,122,72,189, +199,19,223,113,94,37,164,118,58,32,200,226,135,248,247,213,193,157,13,110, +127,216,149,241,178,45,128,219,82,1,198,79,147,161,197,116,91,170,224,184, +16,188,197,97,56,108,97,215,9,68,8,64,32,68,0,172,148,145,26,48, +33,99,28,121,151,212,216,87,212,104,228,8,132,140,80,225,92,105,144,26, +77,157,212,234,34,210,153,224,157,75,241,240,129,113,152,171,21,188,68,58, +214,68,193,23,249,96,163,215,91,21,176,58,154,168,64,107,136,116,189,94, +119,206,121,207,19,19,19,131,193,0,128,81,129,86,9,32,71,105,100,210, +14,96,0,114,53,61,61,53,57,195,12,27,189,27,73,75,79,206,28,138, +116,59,174,215,145,203,213,229,171,157,169,206,212,236,209,162,31,84,220,247, +229,50,161,44,28,56,218,156,60,176,189,121,117,253,198,55,234,170,16,29, +31,60,248,80,124,244,94,177,180,177,114,209,251,242,236,61,239,171,79,220, +43,190,151,186,254,75,175,254,190,142,229,193,51,63,209,168,205,187,65,95, +209,218,210,205,215,142,29,122,111,229,109,132,177,29,5,199,254,238,26,127, +0,240,16,60,74,16,190,235,252,185,63,255,163,194,115,112,193,151,190,8, +170,36,173,69,1,0,11,200,78,121,41,209,62,243,119,28,134,104,116,11, +220,131,107,96,231,252,202,139,42,4,21,217,19,5,212,2,24,144,149,183, +33,120,167,34,208,38,102,86,0,202,121,172,229,173,237,149,44,141,234,215, +174,44,94,187,186,216,27,244,166,231,38,250,121,255,232,177,67,141,230,217, +94,223,254,225,103,190,116,248,232,153,31,248,196,47,127,199,119,62,83,88, +255,95,253,252,199,170,14,102,197,192,40,237,250,62,113,145,103,1,19,148, +82,136,84,237,208,178,195,6,187,167,116,123,131,245,178,159,52,108,183,219, +38,50,183,78,32,225,32,206,57,214,86,71,154,32,242,214,1,41,87,240, +96,43,159,79,219,95,252,210,95,158,58,127,10,130,52,235,245,178,44,211, +70,90,14,6,90,71,42,50,204,28,124,16,68,165,135,197,69,33,132,55, +131,3,56,126,74,199,76,245,150,138,118,60,183,185,185,109,124,75,250,209, +210,229,213,72,210,235,235,155,141,233,3,31,253,222,31,186,239,193,39,250, +5,68,137,41,243,44,142,134,80,231,35,179,122,228,170,26,125,24,31,22, +169,72,190,217,67,224,145,122,20,0,132,129,140,22,84,149,208,83,74,193, +155,6,97,217,111,204,255,74,102,254,200,201,166,69,164,178,112,247,108,35, +12,82,66,197,16,0,128,80,2,187,74,234,33,2,32,195,48,230,49,212, +189,119,89,202,176,51,58,163,91,238,92,249,182,16,202,157,2,78,198,218, +29,167,113,165,241,85,226,9,96,136,169,128,227,202,41,130,82,138,84,68, +21,124,159,56,239,106,194,142,8,42,220,20,29,187,40,46,138,34,115,174, +84,206,89,91,140,184,16,113,8,20,90,201,217,42,55,85,41,225,72,235, +96,179,126,158,89,219,215,154,234,141,78,92,159,206,178,172,214,168,199,113, +92,150,142,180,106,70,17,34,68,137,74,226,54,86,1,226,8,3,59,239, +12,233,70,148,152,201,214,41,199,97,105,249,185,168,6,71,15,223,83,171, +207,69,145,218,218,92,202,131,155,57,126,239,236,212,177,134,138,54,236,133, +213,141,213,230,68,189,211,122,168,17,209,202,181,23,178,181,87,90,148,91, +31,159,186,231,59,211,137,187,106,97,245,133,215,255,196,225,196,169,123,126, +32,24,149,212,139,193,226,235,207,191,240,233,45,237,238,59,255,227,113,122, +216,193,218,181,229,47,44,95,127,249,240,204,219,148,12,217,217,119,13,47, +236,132,233,247,24,103,18,50,106,80,228,237,153,38,40,229,25,28,135,40, +77,130,20,36,134,64,9,1,162,32,16,144,66,161,81,48,231,142,137,182, +71,180,81,246,207,58,30,38,193,160,32,40,0,6,22,20,144,224,197,52, +216,101,113,162,128,61,22,160,156,33,223,240,37,177,141,86,111,46,47,223, +120,185,217,108,2,187,78,187,238,108,118,254,252,93,78,244,231,191,244,141, +201,201,67,31,251,190,159,120,250,221,239,23,140,186,165,104,83,83,74,149, +54,39,211,210,90,3,80,145,149,83,216,78,34,179,94,174,19,145,82,136, +136,138,84,85,181,141,136,97,95,155,230,175,166,235,213,235,117,239,125,225, +138,202,241,173,148,170,198,140,33,16,83,172,141,70,227,108,72,226,102,60, +209,74,85,253,250,141,27,247,61,114,159,101,27,114,209,24,75,41,10,35, +173,117,81,14,57,249,152,89,28,6,118,113,28,143,34,9,111,220,100,204, +24,196,64,83,245,86,177,230,55,46,111,30,60,58,187,121,125,163,183,209, +107,39,230,181,235,43,63,248,163,255,224,45,111,123,55,80,42,16,172,99, +29,107,1,119,59,134,205,173,11,238,168,50,119,222,159,43,55,22,115,64, +16,38,64,64,33,168,146,37,16,164,74,26,171,148,84,222,243,234,227,99, +250,166,69,222,254,66,112,180,251,10,84,186,30,243,190,28,69,1,68,0, +8,72,9,0,35,18,19,130,15,86,216,35,12,55,109,97,169,224,142,247, +163,181,172,94,210,120,146,231,184,133,123,167,92,27,63,184,107,65,34,226, +16,116,8,113,167,232,18,42,189,172,250,0,0,128,76,4,132,4,40,154, +4,53,4,32,96,195,105,138,224,34,77,165,81,57,106,99,156,214,134,180, +246,214,90,91,144,50,206,149,21,247,113,181,0,134,236,136,85,61,144,85, +70,51,112,191,187,177,220,235,174,68,81,212,110,79,215,234,205,205,222,160, +211,233,40,165,156,11,105,170,149,82,132,21,140,141,10,28,165,73,59,173, +153,194,111,149,253,65,156,182,38,59,7,107,181,233,210,109,172,175,190,54, +57,61,113,242,232,227,145,153,239,23,75,221,226,18,198,245,51,199,223,130, +48,107,72,173,174,189,176,217,191,116,248,196,49,194,233,4,224,218,107,95, +30,172,189,218,110,196,160,231,15,157,120,56,238,204,118,203,165,215,159,251, +247,233,252,225,249,19,15,120,29,197,1,111,190,246,197,149,197,175,108,247, +182,207,63,249,227,205,78,220,223,124,253,249,87,254,96,96,187,199,79,188, +171,149,76,21,133,213,183,145,152,139,72,85,109,92,197,92,110,63,190,243, +22,152,89,130,88,235,211,122,35,207,115,85,79,84,131,24,152,177,98,74, +29,122,162,135,10,227,126,153,37,183,77,171,189,179,82,224,142,83,152,1, +119,118,52,34,20,134,204,15,16,184,129,145,205,108,4,177,202,99,219,67, +112,234,143,191,248,89,239,237,68,171,185,185,149,29,88,152,75,27,117,22, +217,222,236,127,229,133,197,247,189,255,163,31,254,240,199,163,180,99,131,18, +4,138,160,116,165,66,204,178,108,107,107,139,17,132,33,209,53,59,8,88, +122,137,37,132,224,125,229,26,1,173,181,236,48,97,143,63,237,183,213,44, +246,235,87,86,12,8,134,37,189,94,60,58,36,34,82,100,76,12,22,157, +229,72,37,16,80,139,182,1,186,253,190,23,79,164,125,86,22,171,3,48, +92,198,182,53,91,207,6,3,143,59,88,103,68,81,20,149,37,32,162,115, +110,63,75,252,214,184,222,222,17,91,100,82,168,171,23,215,54,110,110,76, +79,214,151,151,111,182,91,83,207,63,255,210,83,223,245,225,7,30,121,138, +49,237,103,37,81,228,131,213,136,193,7,26,171,145,192,177,52,12,82,67, +196,182,241,153,35,34,4,194,236,67,112,32,130,84,189,76,36,34,69,26, +128,16,25,8,73,169,157,173,146,111,165,136,125,187,182,243,10,222,188,188, +3,24,227,164,175,218,14,119,15,237,45,245,68,194,144,182,162,2,49,6, +100,8,222,149,213,186,24,169,86,59,207,49,158,46,56,12,18,141,125,189, +165,235,237,185,204,198,143,220,41,251,118,174,187,139,47,141,71,151,173,164, +161,64,144,10,252,10,193,57,231,124,215,123,47,28,216,23,32,78,35,1, +161,232,88,213,85,85,251,33,34,4,48,132,219,226,186,181,85,88,50,140, +61,48,3,64,163,17,13,186,171,131,193,58,74,62,53,221,74,107,205,0, +9,139,105,183,163,52,77,69,4,196,69,81,84,171,213,188,231,126,191,95, +111,78,42,170,213,210,102,94,14,6,253,188,217,236,204,207,31,51,170,213, +219,238,110,246,46,78,77,180,79,28,125,58,137,103,214,123,23,109,88,141, +244,196,193,99,111,131,80,16,44,221,88,121,157,25,78,156,126,139,98,23, +178,141,155,175,255,101,191,183,58,57,59,197,102,118,234,192,253,181,169,169, +173,245,11,171,55,190,134,233,204,204,193,135,235,233,193,193,246,181,141,27, +23,140,48,240,244,129,115,103,90,237,169,197,235,207,93,189,242,31,103,38, +239,62,57,115,186,55,232,9,213,116,172,129,221,174,129,29,189,170,59,223, +5,0,32,65,8,161,94,79,16,85,61,109,20,69,81,243,21,22,110,53, +107,85,181,197,113,181,139,195,190,30,26,193,49,103,243,216,100,216,79,55, +145,48,124,191,10,13,136,0,130,65,205,194,172,74,205,113,232,71,110,131, +146,168,185,181,220,189,185,120,99,208,235,199,181,56,165,216,5,119,207,249, +187,17,213,218,122,247,197,151,46,30,61,118,242,199,254,179,127,248,208,67, +111,209,105,179,151,249,180,30,149,222,5,107,227,184,162,31,67,207,174,130, +26,42,50,219,176,53,87,250,184,21,143,40,128,161,162,57,173,54,105,218, +189,218,199,63,236,213,246,94,123,68,4,32,149,87,203,57,199,192,40,40, +34,236,32,162,36,246,245,40,68,138,33,194,72,71,168,117,196,32,198,196, +211,157,250,235,151,94,107,79,55,242,188,116,5,155,200,176,11,10,176,202, +2,97,231,139,65,70,82,67,198,59,253,110,187,7,246,118,247,147,74,204, +96,107,160,53,222,125,254,12,147,111,119,38,95,191,188,244,248,59,222,251, +190,143,252,32,198,117,64,210,154,156,43,35,173,216,229,56,230,127,223,101, +174,209,88,86,198,240,195,142,131,40,4,199,33,32,10,98,133,6,1,74, +71,164,77,229,135,130,64,74,41,55,92,197,111,214,189,247,159,98,231,142, +191,53,13,183,23,78,236,115,54,136,8,48,130,18,64,182,229,96,124,6, +224,14,46,203,27,40,156,119,74,189,241,18,142,61,213,186,59,37,224,216, +133,185,146,110,99,119,97,68,141,59,176,198,132,40,236,172,181,126,176,194, +204,195,148,18,95,130,132,42,114,14,74,1,128,130,52,82,218,197,145,43, +11,231,116,8,33,77,213,142,90,58,42,71,103,0,80,188,145,15,86,138, +108,171,158,38,173,86,139,226,122,230,1,84,148,154,88,4,7,131,65,92, +139,90,173,150,179,62,47,123,113,90,211,106,162,222,72,138,178,159,229,221, +169,233,131,211,83,179,0,212,235,109,23,246,102,51,157,58,116,224,110,100, +188,177,244,77,48,155,237,246,108,167,121,23,218,114,48,88,28,244,47,79, +182,26,147,19,199,125,161,187,27,87,86,151,158,165,80,158,56,123,111,183, +164,153,249,211,38,77,87,110,188,234,179,165,8,212,225,123,222,81,139,167, +87,175,189,184,178,116,225,216,252,73,36,129,162,59,213,152,125,237,249,79, +13,202,205,35,71,159,140,210,5,235,152,208,148,110,157,104,62,4,11,183, +131,158,223,82,247,240,246,89,43,2,85,44,53,56,77,84,173,49,5,10, +89,32,120,14,145,48,13,171,95,37,168,97,37,94,216,15,26,163,186,224, +94,22,226,62,147,141,3,162,2,70,69,24,2,176,67,143,228,92,192,160, +217,43,219,15,110,160,214,93,255,198,226,85,1,107,161,127,234,216,57,0, +142,162,232,250,242,218,197,43,75,71,142,157,251,196,207,254,215,143,60,242, +182,130,57,73,235,204,152,212,180,181,133,86,42,73,106,101,89,110,110,110, +198,9,53,27,9,162,116,187,221,87,94,185,48,53,253,104,164,227,82,172, +12,147,87,144,133,149,82,35,10,164,209,52,150,113,55,214,62,171,108,191, +174,85,206,95,6,171,80,143,40,165,144,17,57,226,130,106,186,217,93,237, +45,222,184,126,232,208,161,86,163,29,74,255,145,143,125,116,107,99,51,209, +245,151,191,249,234,35,79,60,36,26,36,128,176,56,23,180,214,90,107,107, +109,150,21,235,235,235,74,169,90,173,230,100,95,6,136,93,207,86,29,201, +5,84,146,46,28,158,44,183,139,222,160,255,173,87,94,239,102,244,244,119, +125,84,153,54,128,118,158,83,195,1,28,123,48,90,51,239,17,97,29,127, +179,227,189,30,234,122,40,192,129,217,15,181,31,22,32,36,163,17,84,229, +175,133,74,255,66,16,100,134,55,21,214,248,79,17,121,163,216,67,117,178, +222,121,238,125,127,64,68,129,73,4,132,67,37,201,189,247,68,2,56,36, +76,24,137,188,55,184,61,143,149,232,142,204,219,113,38,141,253,31,247,219, +142,199,45,103,34,222,106,192,34,206,149,138,44,0,171,138,90,87,145,32, +176,66,165,20,59,239,209,123,16,165,148,241,202,41,10,33,8,4,91,222, +138,102,84,23,170,102,255,245,75,95,85,42,28,152,155,78,227,20,73,91, +161,72,163,78,107,173,168,185,178,178,146,38,181,185,185,57,231,220,210,246, +74,28,167,243,243,243,32,19,219,189,235,165,237,78,206,116,58,205,5,225, +56,203,183,64,135,70,218,60,48,123,78,16,55,251,95,7,195,211,19,247, +52,154,11,89,190,233,6,95,45,109,107,178,115,247,100,125,86,21,75,43, +87,255,236,198,205,11,211,211,11,115,231,158,90,188,177,117,226,216,217,188, +183,218,223,250,86,39,214,27,92,59,113,250,131,132,83,175,93,248,61,133, +112,242,204,227,144,164,171,43,47,111,172,94,173,103,171,147,211,199,15,31, +125,194,166,173,45,187,77,228,74,235,99,136,75,89,215,144,126,219,17,190, +109,168,69,130,243,89,150,37,42,245,62,232,68,133,16,52,64,8,8,129, +132,43,108,127,64,20,34,32,161,253,86,221,126,175,111,191,169,66,68,4, +36,21,152,96,238,139,220,33,99,145,149,109,154,22,135,24,8,173,187,114, +241,226,213,165,203,111,121,226,161,133,244,128,41,226,141,173,245,175,189,246, +141,227,167,206,253,232,143,253,244,35,79,124,87,193,141,146,234,202,12,114, +103,81,0,17,149,70,173,116,209,43,141,49,173,86,11,17,243,60,159,59, +48,31,199,41,10,165,81,189,180,253,44,203,162,40,138,99,163,148,26,154, +252,112,219,170,126,211,130,123,239,126,121,239,153,89,41,133,10,216,203,136, +69,147,188,138,88,187,44,92,122,245,242,234,250,218,161,133,195,26,53,146, +211,72,159,253,236,159,126,248,253,31,125,250,169,119,5,51,132,161,98,230, +122,189,30,66,200,243,92,41,213,233,116,68,66,173,86,99,230,125,99,232, +251,36,90,48,234,44,207,125,6,18,194,11,175,188,218,205,220,127,255,107, +255,102,102,254,100,143,141,210,218,187,194,135,34,142,148,247,193,22,78,41, +243,6,186,228,206,80,237,126,128,106,201,87,126,63,17,198,138,37,106,108, +207,144,111,151,139,247,55,216,100,24,234,28,110,206,90,41,229,189,7,144, +59,231,33,34,176,24,102,175,52,129,38,98,131,204,101,105,85,40,69,20, +33,84,12,62,35,53,129,153,133,16,20,1,112,8,126,103,71,19,17,33, +45,145,210,132,198,123,203,161,84,228,144,128,3,237,164,161,248,145,134,37, +194,136,196,204,59,250,242,173,10,54,145,33,250,24,0,41,24,102,118,35, +0,1,35,42,145,32,200,0,154,68,27,4,239,123,38,108,147,152,202,173, +192,194,168,135,213,99,128,158,136,84,100,116,136,188,183,222,107,52,166,170, +27,171,71,113,32,155,7,39,164,40,72,42,132,197,141,235,87,255,2,197, +207,204,28,103,180,73,109,26,101,102,208,189,54,61,21,53,107,167,175,92, +123,57,106,225,145,131,231,243,173,208,93,123,254,192,116,45,170,31,181,170, +230,251,43,206,46,205,207,31,75,154,71,243,60,51,216,111,36,18,200,52, +27,71,189,29,148,229,118,45,153,173,77,157,136,211,150,203,111,22,219,47, +152,228,240,220,252,113,165,234,253,238,107,75,23,62,85,230,203,103,206,61, +173,218,143,118,175,255,97,195,212,175,93,126,190,85,159,62,56,123,247,226, +213,75,157,78,154,149,55,175,94,124,118,238,192,169,137,233,35,128,117,1, +106,214,79,31,187,123,162,213,136,76,114,204,177,11,161,76,193,148,101,80, +136,28,172,129,218,200,121,183,51,148,92,225,24,9,87,174,139,221,205,6, +109,200,196,56,208,2,70,53,6,62,175,69,145,120,35,218,7,167,234,161, +237,197,90,85,72,36,0,128,130,181,162,173,52,23,22,85,3,55,249,117, +21,25,99,39,209,2,73,236,201,178,56,77,74,135,72,163,42,209,121,229, +40,32,10,105,173,21,40,231,28,40,50,70,89,239,28,251,20,35,180,177, +116,149,206,36,182,48,200,108,179,49,47,182,155,101,217,141,27,55,242,193, +224,244,233,211,39,206,44,244,182,187,190,95,254,197,133,215,78,157,190,251, +135,127,250,159,60,248,200,83,58,110,150,33,152,88,9,21,104,65,15,43, +245,65,4,28,59,101,136,33,92,191,186,122,254,222,83,214,151,215,150,174, +205,29,152,205,93,159,65,148,138,27,212,81,74,57,91,82,93,153,72,151, +101,137,136,10,213,200,248,146,93,85,198,251,45,88,28,130,139,236,172,182, +157,243,66,164,165,76,128,61,99,73,1,40,232,96,146,80,107,174,55,81, +55,190,240,165,231,239,186,251,161,62,92,92,219,14,237,14,114,236,19,135, +223,247,221,223,147,91,193,212,88,88,195,184,240,41,120,22,177,76,68,58, +82,129,221,160,116,166,22,229,222,234,200,40,43,65,88,8,72,35,34,74, +0,146,202,177,237,56,232,48,68,147,244,138,88,28,18,104,200,125,234,162, +144,185,175,124,249,139,62,73,68,55,33,110,231,226,21,145,48,199,81,4, +65,49,24,16,36,13,72,85,108,189,146,95,128,99,152,155,94,24,41,2, +9,129,51,162,72,56,209,40,28,50,9,228,108,31,196,146,194,16,130,176, +209,81,77,83,51,128,32,4,66,1,68,210,117,47,145,102,27,139,147,49, +229,105,92,131,25,23,166,227,2,234,118,229,240,205,236,172,149,130,53,252, +162,71,219,206,27,252,114,168,169,49,144,136,15,54,132,176,159,73,60,10, +89,236,202,83,25,249,204,119,20,168,221,109,63,99,118,207,35,227,253,25, +215,52,71,151,150,33,206,243,238,251,140,158,170,202,120,169,126,80,185,135, +153,89,132,1,57,20,186,145,40,34,157,168,164,183,249,202,149,235,95,66, +73,14,31,60,56,40,151,102,218,15,51,232,149,238,87,143,31,123,34,86, +71,46,92,255,119,237,169,3,243,83,143,246,243,155,221,252,213,201,233,67, +237,214,17,167,6,101,177,108,212,234,129,67,119,55,218,179,89,127,73,99, +153,118,38,193,71,49,56,9,118,75,178,214,129,67,147,237,5,93,134,173, +181,215,54,179,237,100,226,116,123,102,126,18,211,165,11,95,188,182,248,249, +116,114,238,204,61,63,162,81,95,184,240,239,5,186,105,163,214,153,90,104, +55,27,75,235,175,109,101,215,74,61,237,123,141,147,39,239,51,73,19,41, +245,1,148,82,181,122,39,54,166,94,211,165,219,251,189,84,230,219,238,35, +183,91,181,187,6,10,0,4,56,132,192,40,90,107,239,45,121,20,9,74, +65,1,131,40,50,136,40,94,140,164,58,68,161,143,2,12,193,88,31,26, +173,86,176,98,108,13,114,207,53,34,8,12,142,67,240,222,3,10,43,6, +5,10,137,133,93,176,30,17,80,80,42,170,118,81,152,92,122,253,134,219, +246,77,108,174,223,216,56,119,246,124,212,208,151,174,190,210,223,90,159,157, +159,155,153,153,107,158,156,88,94,223,122,245,185,151,15,31,61,142,164,127, +254,151,126,229,216,137,187,38,39,23,156,83,129,89,27,229,189,117,193,38, +106,111,30,152,249,185,233,178,24,212,235,13,96,102,6,14,172,181,242,232, +202,144,71,18,161,22,107,11,207,72,4,186,42,91,130,125,39,222,254,109, +175,112,39,248,216,36,121,89,162,65,133,9,151,96,124,204,57,121,144,175, +126,229,43,39,207,63,248,183,191,247,123,190,254,245,175,255,254,39,127,163, +81,11,211,157,84,20,250,80,38,245,100,179,216,12,58,55,137,88,46,73, +105,173,162,16,130,247,66,164,84,64,34,109,203,16,74,164,40,66,8,204, +33,120,1,16,20,2,33,65,229,203,18,16,16,148,128,4,95,5,18,136, +69,69,222,100,190,136,211,26,37,181,143,255,240,143,31,58,243,224,196,228, +12,72,196,35,47,249,155,206,8,169,60,92,187,172,254,138,91,2,134,19, +143,16,17,212,238,104,239,157,214,225,184,67,236,77,222,253,141,158,234,142, +54,154,231,122,191,83,171,51,52,82,0,148,10,254,150,160,66,138,27,79, +83,216,37,155,119,18,199,111,69,76,70,31,152,153,118,204,91,30,251,237, +174,37,55,182,169,202,126,66,112,207,78,86,34,12,135,164,125,193,7,7, +187,241,24,112,244,96,8,149,250,77,68,52,228,210,21,17,145,128,86,25, +142,84,13,109,185,181,245,242,198,234,139,73,154,78,118,102,11,103,15,205, +61,238,161,183,177,126,237,174,227,207,88,233,95,185,249,169,185,201,7,154, +19,83,24,138,65,247,202,236,228,252,68,251,252,86,127,35,200,86,77,83, +52,81,75,210,78,55,223,52,38,76,77,28,40,69,74,223,203,109,70,70, +205,31,60,137,42,13,156,101,221,155,101,214,63,186,112,50,153,56,96,7, +171,47,188,244,255,13,214,110,30,62,250,206,233,227,143,172,247,47,47,95, +253,28,102,203,237,133,123,59,83,167,91,157,35,193,247,47,93,187,170,148, +155,105,207,78,206,220,165,40,14,44,46,80,96,64,2,34,131,186,110,189, +218,115,223,147,49,233,54,250,140,251,156,51,252,203,22,128,5,64,144,67, +8,59,128,52,10,12,71,145,118,80,6,111,3,113,76,181,36,212,97,64, +202,197,171,203,215,14,31,61,219,183,219,232,109,89,90,42,180,31,0,168, +64,17,41,163,101,7,153,174,242,187,66,0,64,80,26,88,152,129,35,138, +160,128,98,187,88,90,90,170,169,90,26,215,91,81,123,246,236,172,70,94, +221,92,109,55,204,161,249,243,189,188,216,234,230,207,189,242,252,252,225,147, +63,250,51,191,122,255,67,111,213,38,201,178,181,201,137,89,231,177,151,151, +198,68,21,115,75,18,197,176,79,34,77,179,30,229,249,64,66,173,145,52, +131,133,70,189,17,216,9,114,25,114,46,93,84,143,73,11,34,16,146,248, +0,112,107,125,224,78,90,240,206,112,237,125,125,24,95,216,114,235,179,214, +60,40,60,162,49,168,40,152,186,180,203,13,27,123,122,237,198,141,27,27, +221,247,63,250,132,110,78,62,242,212,59,127,149,202,158,170,0,0,32,0, +73,68,65,84,255,15,62,185,185,185,61,55,145,6,212,90,43,48,162,188, +196,105,221,250,76,99,130,168,75,180,90,41,246,65,139,98,15,74,34,24, +184,70,218,200,124,31,21,33,17,87,176,154,168,4,1,25,77,20,179,104, +97,197,226,21,105,4,1,38,155,179,218,22,177,126,165,183,150,73,244,208, +19,239,81,113,219,5,131,76,136,130,88,85,25,85,66,138,190,93,86,9, +40,165,66,216,189,72,157,115,85,212,75,132,65,80,107,163,149,217,133,160, +178,99,10,98,5,95,50,54,132,123,8,172,55,41,7,239,60,109,36,157, +70,95,17,81,15,17,180,111,255,217,168,15,68,4,140,1,145,8,52,170, +192,46,112,57,34,35,189,83,54,203,88,106,222,48,65,113,236,154,50,70, +12,184,167,175,100,215,202,28,29,28,239,192,157,221,27,109,26,8,32,16, +136,20,250,32,222,209,48,118,180,199,174,66,202,12,165,28,17,50,225,8, +49,69,40,54,42,244,115,9,107,27,43,207,21,121,121,226,232,3,91,221, +205,153,153,179,158,139,65,47,59,125,242,161,162,244,107,27,215,39,58,147, +11,179,11,27,93,30,12,94,236,180,38,166,39,206,119,203,77,71,221,137, +198,12,248,237,28,38,179,193,114,77,55,155,19,231,148,198,238,210,183,122, +253,245,169,217,179,245,169,19,41,122,228,237,139,87,94,198,168,121,250,252, +195,148,101,238,198,243,175,189,254,41,11,205,227,119,127,112,102,250,204,202, +210,11,87,174,253,133,210,230,248,217,119,55,26,103,32,74,138,192,72,201, +241,83,143,183,155,13,52,117,161,180,244,34,136,74,161,50,40,226,69,52, +32,57,6,141,123,140,207,206,208,225,216,231,91,209,140,241,204,149,241,89, +130,36,44,30,181,66,69,44,162,117,36,18,194,22,75,67,76,75,147,33, +150,18,0,130,227,132,234,193,134,111,126,227,133,35,135,206,81,80,92,64, +76,53,231,40,219,204,181,70,172,51,33,49,4,34,18,207,34,2,129,131, +227,180,17,21,193,90,95,214,147,102,190,149,175,223,216,74,33,61,214,57, +232,74,174,233,134,81,201,246,198,182,13,222,163,206,92,249,165,207,127,237, +228,217,115,81,109,230,135,127,252,251,31,123,242,233,60,40,147,182,250,121, +145,54,102,186,121,64,48,181,70,19,0,2,123,77,128,18,100,31,71,84, +0,81,74,65,128,67,7,14,69,58,122,248,225,71,163,56,46,93,217,170, +55,2,112,164,180,103,207,16,84,5,54,1,192,251,4,109,223,72,232,13, +207,24,125,26,114,197,40,157,104,109,178,65,55,102,202,187,89,226,210,114, +187,255,202,165,245,239,255,177,159,63,255,208,83,108,26,182,232,191,243,61, +31,252,252,167,126,219,16,30,156,63,168,227,200,89,23,99,90,79,234,221, +222,86,28,199,121,191,44,154,107,81,146,248,96,149,36,81,80,161,4,183, +154,251,58,184,78,169,34,5,17,8,8,17,32,10,176,4,68,95,100,74, +167,138,8,89,128,3,176,196,58,69,13,190,199,74,235,47,63,251,133,103, +190,231,167,163,198,194,86,111,144,68,85,254,112,0,80,82,61,62,33,200, +16,78,233,13,154,82,42,236,44,103,230,97,112,140,217,3,34,145,65,96, +33,81,58,170,42,151,70,51,19,71,185,107,97,143,233,122,199,168,254,21, +20,207,253,20,35,24,207,82,134,59,146,89,198,239,84,89,172,10,145,5, +72,129,0,123,239,64,252,46,37,241,206,231,27,183,103,171,3,111,208,135, +59,229,221,157,31,70,103,194,216,192,221,186,38,239,16,122,48,40,68,0, +14,236,136,88,2,237,58,153,153,67,8,59,24,42,10,32,16,17,176,22, +12,34,82,163,186,237,91,144,173,235,215,158,141,117,125,254,240,137,94,63, +155,152,60,165,98,186,177,184,120,246,212,163,206,15,54,250,223,108,183,79, +76,180,142,111,15,190,9,212,105,166,7,218,181,137,110,190,150,115,127,97, +254,46,206,237,202,250,139,16,31,158,110,79,215,147,131,148,212,174,47,127, +109,115,123,241,240,194,253,179,115,15,6,134,173,173,151,151,150,47,204,206, +159,156,156,59,218,223,94,201,150,95,90,126,245,155,201,194,252,201,3,79, +182,91,147,23,94,250,205,149,107,223,152,155,123,176,125,236,109,60,115,80, +251,105,175,74,161,76,24,38,166,15,199,58,205,189,245,4,168,9,57,8, +4,172,248,45,197,163,142,65,110,175,111,189,51,171,96,172,225,104,228,111, +255,79,245,91,2,36,64,102,6,66,29,197,214,246,145,17,60,78,233,121, +229,148,46,149,138,200,129,32,146,117,174,110,40,157,72,187,253,46,106,36, +165,28,177,112,200,243,124,101,101,101,174,62,163,20,112,196,129,157,68,154, +89,32,96,0,105,166,181,94,183,75,70,167,81,43,100,66,54,158,105,28, +168,199,13,216,206,154,105,99,123,211,46,117,87,95,121,253,74,103,102,54, +170,167,168,162,79,252,252,39,158,120,252,109,130,148,21,142,41,82,64,182, +44,35,84,129,197,186,50,210,192,32,222,89,67,72,74,149,101,169,247,201, +95,171,181,102,214,86,23,73,71,132,90,33,214,211,68,27,42,60,66,73, +164,73,172,72,229,241,0,205,200,193,85,153,137,112,167,38,130,184,79,90, +255,48,218,185,163,229,13,89,88,129,81,156,243,10,85,51,74,84,73,165, +115,196,209,183,190,245,141,167,159,249,177,39,223,254,129,126,208,154,26,158, +249,221,239,253,40,217,240,123,191,253,127,189,240,252,115,219,189,222,219,223, +249,212,236,194,65,55,192,132,91,169,36,177,182,133,12,176,80,145,75,12, +196,98,129,123,97,176,81,14,86,87,27,247,4,210,192,142,133,152,17,1, +60,136,128,80,45,73,56,64,96,15,222,42,77,226,152,173,207,54,139,70, +152,92,207,7,144,182,63,246,241,79,20,193,68,73,75,17,146,86,94,242, +91,221,148,209,226,165,253,228,188,136,220,138,81,12,115,146,170,254,130,82, +138,144,68,88,1,234,170,46,126,204,91,135,59,98,79,120,168,235,141,254, +53,126,253,59,101,197,142,126,179,175,28,196,221,222,192,161,225,56,174,250, +104,239,253,136,45,12,110,23,43,0,16,92,16,100,170,176,185,33,132,224, +189,45,4,194,184,212,27,137,149,81,131,59,244,50,129,91,105,220,35,105, +120,167,138,1,227,154,200,238,117,122,219,105,187,116,189,177,35,140,40,130, +18,130,171,74,196,119,117,77,134,224,7,227,60,9,85,124,25,69,32,10, +98,195,141,107,151,190,230,29,207,207,46,48,154,164,214,138,211,206,181,165, +111,45,28,56,159,217,13,235,183,27,233,169,70,163,209,47,46,69,116,72, +69,89,222,173,245,203,46,69,124,120,242,129,60,31,92,94,252,70,187,54, +59,61,121,194,212,155,74,112,241,242,23,7,229,181,147,39,31,107,54,207, +250,178,223,93,123,110,43,55,243,135,159,170,215,116,127,233,229,149,107,223, +216,88,95,157,60,112,168,126,224,241,64,197,205,197,103,243,126,62,119,252, +241,67,39,31,211,233,129,128,53,166,129,227,146,12,0,137,70,112,110,0, +132,46,248,68,69,2,18,130,163,42,77,7,130,128,245,194,10,146,59,21, +219,157,190,223,70,254,32,32,99,246,218,109,34,15,0,216,121,16,66,101, +156,229,56,173,245,215,182,157,229,233,201,201,26,118,26,73,157,64,36,4, +102,101,226,40,104,96,230,229,245,101,209,192,36,90,71,22,209,139,79,234, +157,169,153,233,186,106,8,121,198,178,12,195,197,79,72,4,56,200,251,10, +117,77,53,37,87,146,139,20,146,119,139,128,253,26,70,151,174,92,127,241, +165,203,199,206,220,247,247,126,228,103,31,125,242,41,79,21,255,103,189,31, +88,2,39,105,219,51,123,111,33,112,173,86,115,162,146,40,6,0,14,30, +128,69,72,152,180,214,251,233,39,15,188,245,221,127,254,167,127,176,222,205, +22,102,98,99,40,54,73,112,174,22,215,21,130,112,40,138,34,173,39,20, +161,245,22,0,116,100,248,118,226,106,196,33,185,33,239,151,69,49,110,14, +142,217,134,138,140,101,231,139,50,166,216,109,149,156,155,79,127,254,63,36, +105,227,174,123,222,90,56,109,162,90,127,144,55,234,173,178,24,124,231,51, +223,51,183,112,226,255,248,23,191,176,112,108,234,171,47,190,228,191,249,74, +127,179,175,8,63,242,193,239,106,164,170,225,155,98,185,150,212,181,168,96, +184,214,82,181,227,45,87,112,169,111,106,165,60,122,96,143,85,137,20,163, +209,74,202,16,24,17,65,177,214,162,156,115,4,17,20,225,198,202,242,115, +151,47,61,253,193,239,43,89,115,224,72,27,132,80,148,3,109,104,56,85, +170,194,5,65,196,189,221,38,163,153,83,137,179,81,233,225,206,244,67,66, +77,59,248,35,74,25,84,20,198,13,68,129,33,56,19,140,29,124,19,202, +218,126,255,122,131,86,61,209,184,148,208,35,145,183,167,186,71,68,178,147, +85,42,18,152,189,247,246,206,141,110,151,169,43,123,249,125,171,171,141,7, +25,238,148,116,227,107,239,78,5,228,246,110,220,118,71,34,18,16,5,224, +1,0,89,130,15,195,154,185,221,58,233,208,250,174,80,115,135,215,32,129, +32,0,2,96,187,175,92,191,250,108,158,231,7,230,78,120,17,16,149,214, +91,139,75,23,102,103,78,5,216,20,97,144,182,209,81,94,110,52,234,157, +68,207,45,47,125,133,49,137,107,205,233,169,227,42,196,151,111,124,25,161, +60,113,236,189,66,113,22,214,174,45,61,223,235,95,59,48,123,118,102,226, +174,110,62,88,94,121,78,202,245,99,71,158,64,140,150,46,63,123,227,242, +95,112,40,15,30,123,180,54,121,220,69,210,168,181,155,201,189,113,243,52, +214,148,141,52,219,34,133,166,143,75,37,200,130,192,134,145,153,217,196,9, +32,137,103,69,134,2,18,146,82,202,177,147,138,98,102,175,182,231,190,114, +107,144,111,119,216,15,63,177,10,65,34,138,24,232,212,201,187,174,130,108, +111,109,116,58,173,171,107,203,71,22,14,41,193,217,116,146,68,151,3,155, +96,172,217,92,188,112,69,2,72,16,64,112,46,40,101,98,74,103,39,230, +136,40,80,94,136,27,121,81,16,17,128,116,170,165,0,200,168,88,119,101, +47,40,212,222,130,35,254,252,215,158,59,122,236,204,39,126,230,87,222,250, +212,187,189,232,204,113,18,165,82,150,90,25,173,176,12,69,5,150,97,140, +138,26,241,246,246,86,106,154,10,133,153,145,196,24,197,1,28,7,173,205, +208,43,119,71,123,199,123,63,154,185,242,119,126,235,95,191,242,210,115,40, +240,216,91,30,103,144,35,199,14,71,101,173,214,74,182,202,45,182,14,9, +130,43,85,68,97,56,41,110,77,179,91,99,184,231,213,97,76,45,148,113, +253,136,172,245,173,122,205,15,92,190,238,160,103,182,183,44,196,147,63,242, +115,191,114,230,238,251,66,8,236,178,137,122,82,20,3,36,177,104,206,61, +252,182,191,255,115,255,244,133,87,94,60,123,238,252,61,247,61,168,152,126, +251,55,126,253,211,127,244,27,239,249,142,71,39,154,179,142,75,178,52,24, +12,26,181,122,80,168,35,12,226,140,212,85,32,1,199,104,49,128,23,143, +44,68,177,183,142,192,68,81,18,196,135,129,237,173,89,79,161,216,148,28, +236,93,247,60,242,119,63,254,147,162,107,80,177,109,129,211,53,29,236,8, +101,107,136,1,193,8,136,251,65,204,128,220,42,189,216,221,2,8,8,18, +16,144,2,82,0,84,149,60,140,78,24,122,213,17,119,185,203,246,107,111, +70,228,237,167,42,238,120,101,135,42,215,48,227,177,146,125,227,105,195,149, +13,168,148,18,224,42,45,132,96,20,184,248,118,182,254,109,119,21,145,29, +243,115,204,224,122,99,161,254,87,109,136,85,229,120,85,166,182,83,112,114, +7,67,235,200,155,160,141,1,24,86,239,138,136,200,48,23,255,218,149,79, +7,91,63,48,55,111,18,41,108,148,36,109,166,98,106,186,86,132,205,153, +137,249,178,44,183,243,21,150,112,112,246,174,36,110,191,122,225,121,240,139, +135,78,60,145,54,238,207,242,205,155,215,255,52,54,250,220,137,247,57,41, +54,251,253,162,255,42,132,181,169,185,19,115,243,143,228,221,141,203,139,95, +174,77,53,231,142,124,168,183,250,141,222,213,207,175,47,95,212,81,171,115, +248,222,122,251,96,205,116,176,49,207,228,114,191,89,82,169,114,72,104,218, +212,167,114,31,145,183,58,50,3,111,53,24,162,24,196,179,135,128,1,172, +211,81,196,172,133,149,136,10,204,104,68,107,51,178,112,223,192,175,119,235, +200,254,186,94,28,199,222,7,102,136,162,228,254,7,30,140,208,127,254,115, +159,9,92,206,159,62,125,99,101,117,229,210,205,71,31,125,176,53,89,207, +7,5,37,154,68,121,235,73,148,22,195,158,193,99,179,209,241,133,102,203, +168,133,189,4,199,85,194,26,51,67,8,65,188,11,28,185,40,219,46,33, +55,45,221,188,121,115,249,226,245,203,83,243,83,63,240,83,63,255,216,227, +111,103,142,186,37,2,98,179,49,57,232,247,141,137,53,112,240,62,49,58, +88,23,130,211,81,212,237,245,234,141,6,228,129,42,200,86,14,140,136,132, +36,228,92,208,251,44,144,204,170,247,125,240,99,199,143,78,252,171,127,254, +143,192,218,235,215,174,228,165,187,114,229,74,28,162,135,30,123,8,98,42, +74,103,72,197,73,26,196,94,189,113,237,240,194,220,104,136,254,122,138,198, +78,70,174,46,202,190,9,6,108,196,133,190,124,241,234,7,62,244,241,35, +103,222,218,207,6,132,130,200,174,236,2,161,0,5,52,158,97,225,248,187, +230,78,188,93,71,209,242,70,89,139,162,15,125,236,39,77,132,191,245,155, +255,107,154,17,40,32,5,73,45,121,215,119,190,107,98,98,10,201,146,86, +155,57,112,64,143,196,74,83,229,193,243,65,1,25,169,119,183,179,109,183, +101,140,110,215,27,145,96,217,197,27,87,183,166,15,53,30,123,215,123,5, +107,121,238,12,56,141,90,80,130,56,4,35,114,75,190,127,219,46,203,157, +9,21,120,235,95,2,0,67,144,149,91,58,202,45,11,119,47,163,228,111, +176,237,122,176,209,36,71,68,237,108,102,180,174,30,114,36,181,17,17,43, +28,109,176,138,116,105,125,100,98,20,206,179,46,48,98,136,197,84,33,26, +170,0,68,119,188,65,104,128,16,72,80,87,80,5,163,219,42,72,136,8, +208,105,131,33,36,165,21,5,76,232,153,185,18,254,187,75,53,208,51,7, +69,68,172,130,7,173,18,235,201,3,138,34,165,48,20,61,221,158,16,208, +168,83,163,40,18,27,148,19,38,205,169,102,52,74,178,178,39,194,168,244, +216,158,95,233,59,128,8,198,40,12,30,85,187,55,88,171,167,9,75,236, +189,77,195,234,197,175,253,230,0,67,109,50,198,104,74,216,70,81,72,210, +201,44,239,121,223,157,232,156,71,76,55,87,190,146,18,204,28,121,192,215, +102,95,191,242,205,72,158,235,156,253,123,38,54,214,95,184,122,245,171,121, +223,62,252,192,187,4,160,183,185,221,93,250,214,212,236,65,71,103,91,147, +19,221,226,213,215,46,93,56,48,123,120,118,226,208,202,75,191,153,149,217, +210,214,54,181,231,230,143,156,156,152,62,29,39,71,65,218,131,242,181,108, +80,32,234,102,99,182,86,111,139,136,11,125,210,25,136,10,62,36,0,0, +236,216,131,2,16,208,2,104,226,32,12,6,24,2,67,32,66,16,4,55, +124,193,68,186,98,110,37,82,72,213,84,11,194,113,240,138,148,176,20,84, +129,166,75,14,108,128,110,155,19,149,7,160,244,219,81,164,68,208,59,224, +196,60,244,228,59,15,158,191,255,223,252,111,255,246,35,79,125,252,115,159, +255,179,183,124,224,45,159,249,195,79,246,151,151,222,255,204,123,27,6,9, +120,102,170,115,125,145,74,183,1,138,218,234,96,232,34,75,249,151,95,255, +220,91,30,123,82,199,9,169,162,112,214,41,139,172,116,65,77,154,220,6, +149,223,216,214,64,33,148,95,250,194,151,102,143,221,245,221,63,245,223,60, +120,207,147,146,2,2,170,224,19,231,162,134,201,237,166,74,144,128,189,248, +216,49,91,129,196,72,28,249,194,213,48,65,135,16,17,184,192,177,42,92, +104,121,1,133,93,180,181,52,14,94,148,23,116,33,78,147,158,47,3,130, +81,74,3,25,103,133,147,35,199,222,254,83,191,248,191,151,69,166,168,98, +106,214,47,189,240,31,63,251,153,223,125,250,169,71,231,106,117,21,84,214, +43,125,100,143,78,155,8,172,148,10,41,150,8,182,195,38,68,140,172,98, +74,34,47,121,49,136,211,148,33,56,14,202,144,115,142,180,138,172,8,26, +29,197,1,93,81,246,26,181,36,88,80,18,13,84,89,47,140,220,80,148, +69,95,250,230,215,30,120,251,51,79,62,243,81,47,164,135,156,124,48,36, +144,0,81,96,21,128,167,45,4,229,131,74,146,168,240,25,81,235,187,190, +239,151,30,125,207,39,126,241,19,15,183,26,51,221,141,254,251,63,240,145, +207,252,209,39,207,158,57,246,252,115,223,122,219,147,239,210,157,86,66,137, +119,142,188,245,131,126,93,233,210,138,202,107,101,54,72,161,157,98,108,11, +123,229,226,98,167,147,62,255,245,47,181,26,237,131,231,62,126,247,253,79, +135,188,52,140,0,84,248,2,129,180,54,30,187,65,0,65,171,180,174,73, +123,97,241,142,1,140,140,249,73,199,118,71,226,82,131,33,212,222,149,89, +182,5,129,53,169,16,130,50,26,21,20,214,2,97,171,61,25,105,197,76, +17,70,4,133,8,161,50,33,0,40,4,21,35,40,17,32,146,10,32,142, +136,0,71,9,112,183,1,152,223,174,97,239,155,203,49,126,206,232,171,181, +214,24,83,21,26,42,165,70,181,25,123,248,203,170,131,204,92,121,76,188, +183,129,157,210,162,71,213,176,85,30,95,8,149,4,21,102,36,17,8,21, +137,68,85,130,39,82,217,252,158,217,87,172,79,44,126,7,37,106,55,70, +203,152,45,38,149,167,128,197,11,4,239,45,179,103,246,2,17,17,85,29, +128,138,190,187,186,187,140,226,103,204,92,161,185,240,184,74,186,219,138,215, +170,180,139,237,246,156,117,46,132,44,197,236,133,231,255,144,64,153,122,125, +174,113,30,204,214,106,175,56,186,240,206,237,237,87,187,91,87,14,28,121, +36,73,147,165,43,207,150,133,28,127,248,169,172,59,128,165,23,138,245,87, +14,157,125,95,156,24,219,91,220,188,121,193,148,230,216,217,199,250,165,178, +217,226,230,205,215,166,15,159,168,37,245,193,96,208,223,94,235,118,55,143, +30,56,160,9,95,126,225,43,211,205,118,45,105,206,39,237,90,115,118,102, +238,164,138,235,131,188,191,213,191,10,66,181,90,35,77,26,90,39,33,12, +95,121,133,60,191,231,219,221,175,85,22,235,184,199,0,228,54,85,174,218, +237,68,248,206,228,139,219,95,132,18,17,141,160,13,33,9,144,58,119,215, +253,63,253,51,255,240,220,93,247,159,187,251,1,224,242,131,239,255,208,31, +253,206,111,253,209,239,254,246,187,222,246,86,182,229,226,122,63,105,207,172, +119,7,237,78,147,196,199,113,106,1,178,220,25,19,145,72,200,165,110,154, +174,39,53,157,134,156,86,182,251,24,171,154,68,75,55,55,46,93,188,250, +157,143,125,199,51,127,251,187,163,137,35,176,153,231,121,224,201,38,42,82, +253,82,109,228,96,11,74,34,16,176,253,158,105,183,138,194,6,230,100,166, +131,173,52,48,168,172,204,110,174,212,77,28,79,54,181,48,119,123,28,169, +180,17,27,239,74,68,95,186,96,157,214,58,34,21,52,98,16,246,46,40, +36,132,184,213,90,56,126,52,210,218,24,229,74,11,0,231,238,190,11,68, +255,241,31,252,214,19,143,220,115,248,208,108,44,40,69,152,104,180,242,30, +104,48,8,208,235,110,77,76,79,150,190,71,192,182,159,217,84,71,181,180, +180,22,17,21,41,46,57,49,41,3,168,8,172,19,235,131,15,46,77,27, +89,81,16,163,32,233,16,103,155,62,18,125,125,121,245,190,7,159,254,187, +31,255,41,140,107,131,130,20,237,195,146,3,21,126,33,10,42,165,40,50, +113,173,214,16,86,255,242,223,124,250,202,229,27,39,79,156,157,104,167,87, +150,186,229,96,249,252,61,15,95,188,120,241,250,218,34,59,120,230,189,207, +152,40,73,140,178,222,189,248,252,215,143,29,61,107,52,102,131,254,203,175, +60,215,104,214,230,230,39,187,219,217,252,193,83,43,171,155,39,207,156,38, +109,92,168,76,78,65,165,0,192,6,143,134,112,232,203,27,146,127,189,1, +140,24,0,32,42,65,34,210,68,78,160,210,132,20,33,90,31,72,144,5, +21,105,4,229,133,129,111,49,110,141,102,26,221,94,230,124,251,149,247,78, +27,124,99,245,112,79,11,178,50,105,43,91,182,218,212,245,78,0,119,239, +123,84,2,136,136,16,197,218,204,251,18,32,8,88,133,201,142,80,99,172, +2,165,8,136,194,67,225,18,134,252,243,192,34,85,246,111,84,233,182,149, +91,145,8,64,221,226,179,223,229,206,3,0,102,0,193,170,122,0,64,4, +2,162,32,1,7,168,52,240,16,60,146,224,136,107,14,171,92,61,30,162, +190,179,191,115,212,198,181,113,70,175,148,10,220,119,108,18,93,44,190,250, +199,62,95,165,164,51,209,60,11,209,198,245,197,149,99,39,222,195,48,184, +118,253,229,123,206,63,102,106,201,218,205,87,11,155,159,188,231,201,94,230, +12,23,215,94,123,254,240,201,19,181,206,137,108,251,202,246,202,149,78,90, +111,167,147,154,226,66,178,165,229,107,103,142,157,240,201,92,175,183,98,243, +245,98,176,209,76,235,221,213,229,32,106,118,110,74,196,212,162,70,39,105, +215,27,29,235,220,245,235,215,131,184,86,187,102,226,70,100,18,165,98,14, +8,2,170,66,19,18,255,87,53,0,16,17,4,68,130,12,11,245,24,134, +189,30,81,119,84,67,61,204,89,129,177,16,238,248,248,235,40,101,134,192, +206,251,2,88,217,146,181,110,62,240,192,93,69,214,143,162,136,76,171,159, +111,191,231,3,223,107,25,62,249,91,191,158,38,234,111,253,173,31,82,16, +254,228,51,191,247,192,185,19,95,249,226,231,62,252,161,15,133,18,242,94, +46,1,12,106,195,209,214,205,222,137,19,39,138,174,117,61,129,194,128,205, +243,46,246,123,242,244,187,63,250,228,253,111,21,170,247,7,153,116,7,209, +193,142,81,202,245,242,176,61,40,92,232,114,89,7,169,13,188,150,128,153, +149,162,228,170,18,78,41,214,232,153,53,67,217,27,40,130,168,158,150,253, +172,239,202,154,153,77,227,90,0,14,2,236,188,181,150,53,1,42,37,168, +128,152,148,13,76,68,42,142,133,200,19,4,163,69,4,177,246,119,190,251, +135,15,204,30,248,191,255,237,255,252,250,133,200,68,114,236,196,169,226,250, +96,225,192,97,197,132,2,132,196,3,27,188,36,81,44,91,219,214,148,192, +28,155,196,123,143,130,90,107,107,157,82,138,73,41,82,214,51,42,227,124, +80,74,163,24,102,136,243,36,47,164,87,184,23,47,93,253,199,63,249,79, +154,157,227,165,184,137,168,38,251,48,34,198,90,1,64,181,163,123,1,34, +114,165,5,9,113,243,248,169,123,207,146,210,107,101,247,253,31,251,161,95, +253,229,31,123,232,220,161,60,219,208,222,22,5,255,135,63,254,236,125,247, +221,55,183,48,189,181,209,63,127,215,253,75,55,215,85,228,6,189,162,187, +185,90,143,230,138,44,183,65,174,175,245,255,193,207,254,234,209,123,239,53, +198,120,239,9,53,243,144,108,59,132,64,168,68,16,132,148,50,32,40,21, +123,228,94,164,180,213,82,10,194,65,24,148,38,54,72,34,129,5,149,160, +82,70,33,81,100,216,196,169,73,82,164,40,144,66,165,160,202,236,219,241, +178,237,164,82,236,54,117,255,122,34,239,13,218,24,60,40,64,133,175,71, +68,178,15,51,27,236,132,105,136,196,7,235,131,5,112,204,1,144,199,163, +54,183,48,191,42,213,179,202,244,169,214,22,2,16,34,13,241,25,4,111, +69,123,225,78,207,250,72,37,25,34,23,49,0,107,77,0,195,10,10,144, +152,195,40,251,4,136,198,34,200,132,10,1,20,162,56,96,79,183,139,185, +93,14,8,98,136,107,179,253,124,67,147,189,113,233,203,235,75,175,212,210, +153,250,228,193,217,201,99,207,93,250,189,115,103,222,159,96,253,194,149,63, +58,122,242,129,180,126,124,101,229,47,55,87,110,28,127,224,3,100,116,113, +237,149,237,237,181,250,225,147,205,217,123,250,171,47,172,174,172,204,207,28, +97,7,141,70,163,155,93,187,177,188,120,248,216,121,149,30,17,233,247,186, +155,107,55,94,34,206,169,51,215,108,45,100,129,68,215,210,250,124,163,222, +202,243,252,234,205,75,2,182,221,158,72,147,57,224,152,18,240,158,109,233, +137,204,14,153,9,35,40,222,7,248,112,63,212,18,4,26,253,107,212,95, +173,53,132,93,244,55,21,238,192,45,44,141,221,174,189,138,61,139,128,32, +104,173,35,147,150,86,171,210,0,145,160,42,108,136,210,105,31,138,247,127, +248,7,31,125,252,137,95,249,47,127,225,238,183,188,227,200,161,249,66,240, +75,127,254,135,14,224,181,203,151,166,102,15,199,173,9,17,241,142,39,27, +157,117,211,236,173,116,83,213,100,15,47,124,235,197,115,119,31,186,126,125, +237,193,167,63,248,240,59,223,59,55,123,176,96,175,149,50,165,8,137,245, +62,43,242,122,61,174,77,118,58,9,38,73,130,91,89,164,49,12,138,196, +215,177,83,15,169,113,193,131,144,143,168,117,98,65,217,144,17,91,128,208, +136,41,40,108,36,185,120,15,16,213,18,173,181,78,227,82,2,16,130,23, +0,32,1,239,3,147,16,41,118,28,16,148,138,148,193,126,86,182,146,250, +163,111,123,247,228,84,235,95,255,203,95,195,0,249,165,141,67,11,167,127, +231,119,126,239,145,123,31,248,250,87,190,252,129,15,126,192,152,122,108,234, +131,110,54,153,30,222,246,75,58,50,121,86,152,72,149,222,122,87,212,154, +181,210,21,108,29,162,6,65,19,25,231,173,38,208,138,74,23,242,229,188, +44,233,107,207,191,244,158,15,127,239,193,83,231,6,150,73,145,214,222,249, +189,223,99,49,200,180,166,97,56,81,129,243,92,90,102,246,168,136,52,101, +190,172,53,211,90,217,122,199,211,239,120,253,155,127,62,61,157,22,197,214, +201,227,103,6,89,232,13,242,41,15,19,19,83,253,237,254,133,151,95,154, +62,216,96,47,135,15,205,49,123,99,212,133,197,197,172,143,82,155,72,234, +53,239,189,50,49,0,32,67,197,104,166,117,132,140,149,150,71,168,68,4, +3,144,144,218,73,196,217,83,232,16,81,173,94,71,136,149,82,200,66,164, +69,144,217,2,0,35,105,29,41,29,185,80,229,84,96,116,187,68,171,84, +48,185,125,186,238,119,163,55,41,242,70,234,222,248,141,70,53,99,85,0, +99,40,245,246,91,93,34,82,229,32,49,87,166,46,104,29,97,16,14,136, +56,202,119,17,34,181,227,40,172,228,143,6,34,22,207,140,0,168,20,9, +87,197,176,72,66,2,192,64,204,213,60,220,157,159,2,59,18,106,180,0, +149,82,0,72,20,17,198,74,25,102,32,34,26,134,203,171,250,92,132,0, +162,4,80,20,72,8,190,74,56,16,145,157,186,72,216,77,204,110,41,7, +23,155,137,149,107,127,122,243,202,179,179,211,39,0,211,233,137,19,87,151, +190,126,124,225,253,205,230,204,133,11,159,158,234,28,159,155,60,179,209,123, +253,234,149,229,19,167,30,50,160,55,151,47,250,193,186,105,118,154,243,167, +182,179,110,255,230,43,147,243,119,167,245,233,213,229,165,129,187,214,203,87, +15,159,56,221,110,31,204,7,208,93,187,80,244,151,211,200,76,52,103,128, +26,30,234,245,201,118,109,162,97,115,125,99,237,170,243,131,90,163,54,217, +58,162,40,9,222,163,118,235,235,253,200,36,73,146,42,165,2,75,8,161, +42,149,131,253,242,194,222,16,90,104,167,167,92,141,94,156,24,8,44,64, +176,131,187,42,66,0,59,156,126,183,199,52,170,207,46,120,102,142,140,86, +4,33,4,212,198,164,13,138,106,24,54,61,91,64,45,160,84,212,100,79, +179,243,103,255,187,127,250,175,38,22,142,75,28,61,253,161,239,126,252,157, +143,255,202,207,125,98,203,219,173,213,27,231,158,120,244,139,207,126,249,220, +249,83,166,199,134,49,5,45,206,11,3,251,226,91,47,189,170,66,251,240, +153,187,167,143,158,202,10,95,64,208,145,74,8,193,7,212,74,119,26,2, +132,105,106,139,65,33,214,181,40,69,68,81,24,148,138,84,224,16,74,87, +83,113,106,204,118,100,211,200,228,226,13,169,58,78,38,33,64,146,128,15, +32,65,25,114,128,165,184,130,61,1,69,128,4,18,121,208,59,218,180,19, +113,222,135,192,236,48,142,117,86,12,234,105,122,242,158,135,63,254,19,191, +136,138,238,187,255,113,107,245,191,252,103,171,24,25,81,100,217,182,76,189, +151,13,152,249,47,255,242,243,143,60,249,136,203,93,45,54,69,158,3,58, +80,184,185,189,161,83,51,161,27,165,13,113,148,20,69,150,166,81,214,235, +11,210,96,187,48,91,105,142,238,240,169,211,223,243,253,63,150,135,34,73, +107,222,251,65,190,166,77,115,207,55,104,210,42,183,57,4,177,42,136,48, +11,7,163,117,240,5,139,37,84,217,32,159,153,62,248,190,103,62,242,203, +191,247,201,248,80,103,225,200,209,194,193,210,122,119,235,245,171,175,93,189, +124,207,185,83,141,90,250,214,183,62,244,252,107,95,63,117,226,140,45,92, +8,97,59,203,143,156,58,243,161,239,253,137,227,103,239,46,114,11,0,90, +147,115,142,72,139,72,8,33,138,34,231,42,31,49,48,120,34,98,9,21, +172,38,12,117,210,221,27,106,112,214,85,11,26,134,149,242,10,120,152,82, +1,4,72,52,52,150,61,34,146,2,12,67,62,69,24,51,60,97,44,190, +49,62,135,119,105,42,111,190,237,247,171,161,223,112,132,185,178,255,239,135, +9,110,0,72,24,25,157,26,210,74,87,140,130,183,188,224,149,2,25,100, +136,42,79,196,0,12,76,128,30,0,8,9,85,172,85,82,69,63,152,49, +104,241,202,209,94,80,130,59,189,173,12,178,32,34,90,71,132,9,18,104, +106,130,128,119,161,66,253,132,157,164,60,68,244,222,107,208,33,56,0,241, +161,180,182,224,224,144,25,238,176,32,134,22,28,82,153,229,185,95,191,248, +226,179,135,231,103,40,158,104,79,158,88,91,221,144,56,158,237,28,122,241, +165,79,97,162,15,28,124,100,101,233,249,237,254,149,217,185,243,209,228,61, +91,55,190,192,189,173,137,195,167,87,122,220,244,131,229,203,95,59,48,119, +162,54,115,116,99,241,18,184,149,173,254,234,220,177,115,38,57,48,232,109, +247,55,174,220,92,252,198,100,123,38,170,29,69,108,206,204,31,245,132,57, +216,149,181,149,178,232,183,27,147,211,211,71,65,76,240,84,250,44,203,183, +189,203,25,27,73,92,171,234,100,66,5,119,136,226,131,221,255,237,236,147, +164,194,28,170,178,193,224,152,153,197,35,69,113,28,179,5,239,71,118,10, +141,178,153,229,246,36,229,209,117,148,170,120,133,88,4,131,13,214,90,22, +9,196,26,130,47,93,163,62,225,156,237,247,202,122,18,199,186,57,55,117, +124,178,192,107,139,75,38,141,83,61,245,150,187,30,245,249,122,214,235,165, +212,120,226,93,207,60,251,236,23,218,13,51,63,211,46,243,156,16,138,178, +68,205,101,192,159,251,169,255,252,236,195,143,118,179,50,246,80,3,28,44, +111,214,106,237,129,1,113,222,56,6,97,54,33,2,10,150,21,136,119,101, +171,213,84,86,56,183,12,2,204,97,144,97,225,211,35,29,44,189,1,49, +10,180,23,151,151,165,183,145,144,110,38,18,216,91,71,145,209,74,41,64, +229,3,216,224,109,46,8,158,57,74,82,29,71,74,27,32,10,194,214,229, +181,90,173,200,139,56,110,221,253,240,219,25,48,3,229,181,154,60,124,224, +218,171,47,164,157,232,15,62,243,187,83,211,243,150,49,88,255,232,195,15, +183,205,148,23,215,43,187,73,68,138,212,86,177,161,180,137,33,230,190,104, +48,10,76,232,11,2,181,163,9,151,11,12,92,191,223,127,105,241,242,223, +255,133,127,44,186,33,194,69,153,71,100,200,0,139,221,231,61,34,143,106, +248,100,184,92,149,198,24,107,1,33,203,157,34,99,51,53,63,119,239,255, +240,207,255,159,95,250,185,159,80,91,171,101,142,191,246,63,254,171,90,189, +249,63,253,179,127,148,123,166,34,103,91,158,60,123,151,183,216,47,60,82, +194,58,122,199,59,223,119,234,220,253,140,53,9,213,74,4,102,136,34,170, +44,39,0,22,66,33,1,64,12,0,40,36,34,40,8,60,94,100,59,30, +144,141,13,17,136,84,100,121,44,194,24,16,0,2,7,47,64,90,39,162, +5,5,140,66,33,212,90,144,135,81,222,145,174,7,99,218,217,104,121,254, +13,218,182,195,25,191,163,216,85,162,89,87,223,71,249,44,187,110,35,224, +73,17,11,18,82,28,167,226,90,200,37,177,195,104,40,176,134,87,169,176, +103,81,7,155,3,185,32,4,72,164,1,88,87,161,217,52,138,141,137,72, +25,84,132,160,217,139,215,172,84,188,175,133,11,97,36,79,147,36,77,226, +166,54,13,246,162,34,128,138,210,37,132,16,2,177,19,17,231,28,129,18, +9,0,62,16,187,34,43,139,156,216,35,240,157,134,187,12,3,102,146,64, +246,236,179,159,156,110,79,58,159,78,204,52,87,215,183,250,249,230,249,147, +143,94,186,252,185,210,246,206,157,254,142,229,245,203,131,108,217,208,212,220, +252,220,242,202,171,182,183,117,252,240,169,235,219,89,146,154,107,175,62,55, +53,57,157,182,78,108,172,222,116,197,122,182,189,216,174,183,148,227,213,171, +175,247,183,22,203,193,34,152,84,168,110,234,179,237,206,252,102,175,187,221, +219,14,16,58,147,237,217,185,41,103,41,148,26,32,100,249,122,150,247,16, +84,167,51,141,42,174,192,111,188,247,128,10,144,133,217,123,75,100,246,121, +143,251,48,14,48,178,136,15,222,123,231,156,243,222,199,81,100,140,241,102, +7,65,226,22,129,175,140,170,166,118,137,60,0,16,18,165,208,187,64,177, +138,162,132,136,64,133,32,101,132,137,82,46,203,123,145,54,237,102,20,202, +114,109,121,211,101,69,239,181,203,173,35,39,123,5,67,36,13,221,92,237, +222,104,119,90,139,23,47,255,228,47,252,227,3,135,78,127,250,119,255,223, +181,213,98,126,182,227,131,181,174,239,196,181,219,243,223,252,198,55,79,220, +247,182,102,115,50,219,222,72,82,221,140,227,237,181,13,156,106,150,101,233, +186,131,208,205,204,194,92,109,186,93,20,133,223,234,71,137,150,48,232,110, +15,108,150,163,209,88,139,107,38,141,146,216,173,108,251,188,228,88,231,204, +174,91,144,209,62,40,102,1,91,162,64,8,161,49,213,209,160,202,44,31, +108,246,148,13,170,17,235,200,248,96,93,193,49,6,208,6,133,24,65,147, +113,121,65,66,190,20,23,116,90,79,138,193,118,189,17,63,245,206,247,252, +147,63,249,236,92,163,126,248,192,124,25,200,152,58,72,88,91,93,237,212, +59,165,47,175,94,191,124,240,216,66,102,203,205,181,173,179,247,156,201,122, +253,26,183,215,55,187,205,86,170,109,88,191,186,217,72,107,174,128,124,45, +172,172,173,170,120,162,209,57,28,56,82,72,6,201,250,66,167,13,116,123, +239,94,30,65,96,136,128,128,140,68,20,156,15,37,6,31,80,163,86,24, +197,113,214,15,16,55,38,14,223,253,223,254,47,255,231,198,131,12,251,144, +0,0,32,0,73,68,65,84,214,213,201,201,131,147,51,71,1,229,237,239, +249,200,159,127,246,223,13,122,221,131,179,147,203,91,131,87,95,189,122,244, +196,221,165,83,31,248,59,31,122,236,169,119,57,159,144,170,33,20,21,21, +36,201,208,234,87,68,236,188,82,84,217,109,88,101,233,146,128,48,32,128, +236,174,39,27,206,19,95,50,34,16,0,50,129,34,141,67,72,70,22,16, +84,138,12,41,2,17,16,8,62,136,213,96,96,84,209,0,88,97,246,195, +206,53,119,20,172,91,40,33,227,55,253,107,180,113,1,93,53,25,69,51, +170,10,173,91,139,97,188,111,194,74,25,96,212,42,194,24,216,150,190,8, +194,28,118,248,182,171,90,91,2,2,4,32,173,117,132,88,86,234,170,82, +132,200,85,160,21,81,1,42,34,141,68,64,76,24,33,88,16,26,165,63, +222,33,254,24,36,84,253,143,163,52,77,154,81,12,236,221,196,76,26,199, +105,8,193,218,34,246,86,153,196,57,23,252,160,214,52,149,154,141,196,214, +21,206,57,13,1,135,228,51,183,181,234,70,25,151,139,47,125,42,133,129, +214,29,15,245,224,162,165,165,23,78,157,123,240,230,245,203,55,183,111,158, +60,252,240,96,107,105,101,245,165,133,133,135,242,1,100,189,197,193,245,175, +204,156,254,224,50,71,174,88,9,219,75,38,138,155,147,247,216,220,83,190, +13,33,179,206,173,45,175,110,111,108,165,41,82,89,68,24,117,230,206,54, +154,147,1,163,215,23,47,2,186,78,179,213,172,205,65,136,160,88,96,183, +222,11,203,131,98,85,235,104,98,98,94,97,3,33,18,178,206,57,14,142, +72,177,56,155,123,145,160,13,89,251,102,34,244,99,199,133,24,130,223,105, +149,59,124,7,202,48,84,252,159,178,83,247,2,32,0,183,109,179,35,241, +231,188,85,70,87,46,158,29,183,5,51,57,118,138,16,80,177,210,33,248, +82,161,180,235,137,87,216,53,190,185,48,197,186,198,218,62,253,125,31,251, +213,255,226,39,103,35,63,119,238,120,105,147,135,31,122,167,203,236,111,252, +250,191,8,214,77,207,117,234,205,86,233,130,223,236,222,127,255,253,194,190, +40,51,43,165,214,138,141,46,51,162,155,235,209,194,84,171,213,218,126,237, +154,223,236,97,26,177,198,255,159,180,55,253,181,46,75,239,131,158,105,173, +189,207,116,135,247,222,119,168,170,238,234,161,186,221,110,87,199,118,60,180, +99,39,118,75,32,67,64,17,163,133,137,64,72,16,9,196,28,57,31,18, +137,72,200,144,72,240,197,145,64,32,97,196,95,0,68,226,11,72,1,129, +64,1,225,150,66,72,236,110,219,213,85,93,85,93,195,59,222,241,12,123, +239,181,214,243,60,124,88,251,156,123,222,91,239,237,116,135,245,225,234,222, +115,206,61,123,90,235,89,207,240,251,253,158,102,54,213,161,31,206,47,4, +120,241,218,67,107,67,41,69,36,246,224,39,155,112,118,182,10,77,211,44, +230,110,162,140,48,11,145,101,1,178,89,173,87,195,58,36,115,133,220,231, +169,243,225,116,118,25,211,236,96,22,74,204,14,20,155,2,238,21,42,49, +88,144,0,0,2,177,193,102,184,222,28,79,227,176,57,123,243,245,159,255, +79,254,250,239,254,213,191,248,175,93,61,61,7,68,8,88,242,166,137,126, +239,254,233,183,191,253,237,111,126,243,23,26,105,86,87,215,63,245,133,111, +244,47,186,227,249,253,126,237,127,248,247,222,255,250,79,125,67,154,201,250, +252,252,108,243,244,244,248,81,240,195,228,159,252,165,223,250,237,47,124,229, +167,205,36,224,148,96,64,244,146,131,220,209,8,150,69,180,36,0,113,3, +43,142,34,181,206,128,177,55,203,128,121,72,218,204,14,250,156,32,226,225, +23,62,119,252,198,231,84,35,200,194,52,253,202,183,254,201,38,216,255,250, +63,254,183,191,247,237,255,231,209,151,190,254,111,254,59,127,249,151,126,249, +31,203,222,20,66,243,214,141,189,4,9,85,57,9,67,136,85,93,74,66, +40,165,100,83,118,7,32,180,241,198,0,218,15,129,231,134,170,179,200,80, +203,161,14,80,74,2,32,212,1,88,200,12,220,0,72,144,20,213,171,102, +229,158,219,56,90,183,207,224,70,254,1,147,252,110,35,120,87,13,247,150, +11,41,166,69,152,115,209,173,165,187,81,7,112,119,164,182,100,67,36,115, +181,122,107,140,6,243,136,60,12,67,108,4,153,115,206,232,90,243,46,192, +12,228,34,232,160,69,51,17,69,225,100,218,247,61,139,112,16,112,87,205, +142,133,197,29,178,1,91,37,132,129,130,41,152,129,57,162,33,32,96,227, +174,204,214,76,224,244,81,59,105,227,91,95,125,237,248,228,104,177,88,28, +30,46,166,179,118,50,105,167,211,54,70,5,204,210,140,253,125,204,44,115, +110,79,38,213,169,137,119,136,252,246,171,39,244,230,55,155,175,54,142,48, +157,78,151,203,229,207,255,236,175,171,211,234,188,28,4,69,90,125,248,241, +59,111,60,252,217,126,243,52,72,60,156,127,241,141,111,253,188,56,174,175, +46,237,115,63,73,254,147,177,157,98,136,200,180,188,126,20,227,155,240,229, +95,232,251,190,118,22,70,68,85,93,204,38,235,245,146,153,79,190,244,165, +216,204,114,130,174,215,235,229,230,252,252,247,218,105,99,132,139,163,47,52, +18,166,241,224,112,122,24,64,82,76,86,106,107,26,3,0,80,171,93,65, +106,130,242,85,143,249,213,215,197,206,149,253,226,8,170,14,78,147,201,60, +13,102,33,94,95,92,21,83,55,100,64,85,131,218,16,222,24,232,198,216, +213,225,238,234,166,185,144,3,71,238,93,27,2,40,48,45,130,17,134,101, +63,97,6,231,66,152,4,29,96,50,59,154,219,7,207,175,206,112,186,210, +164,237,209,231,255,210,111,253,141,255,242,119,126,231,55,255,141,127,137,25, +129,194,159,248,233,95,252,95,78,63,71,154,168,27,186,139,245,215,95,255, +198,183,126,243,95,255,242,219,63,35,18,18,130,220,63,94,173,86,139,203, +77,243,233,185,199,41,51,119,104,139,147,195,229,199,79,245,204,167,175,223, +191,202,215,237,226,168,19,152,79,103,32,33,245,61,4,46,168,218,167,235, +103,23,235,229,213,209,209,116,152,113,57,60,176,46,5,145,37,232,124,192, +171,245,74,68,220,117,179,186,134,192,205,231,14,55,224,161,76,52,185,45, +83,80,87,26,60,144,31,76,114,164,9,143,109,192,18,244,0,61,54,48, +40,0,29,101,215,197,107,111,253,135,255,197,127,111,37,163,59,35,153,230, +239,124,231,59,127,231,111,253,215,111,191,253,54,152,76,83,187,25,38,158, +67,234,150,23,151,79,207,175,151,95,248,226,163,166,165,171,139,171,167,31, +125,242,181,183,190,40,56,188,251,238,223,255,51,127,254,63,122,253,235,223, +36,34,208,181,75,74,197,9,3,104,65,84,85,69,38,68,204,165,32,34, +48,153,153,168,146,86,249,12,200,94,146,213,128,212,130,137,41,135,208,230, +156,205,123,113,15,22,82,79,198,30,196,93,47,221,12,169,249,185,95,251, +141,63,249,173,223,80,240,137,137,153,117,238,78,224,132,150,51,145,34,38, +84,32,162,130,174,104,169,24,72,40,234,8,28,192,152,184,170,207,137,132, +82,10,243,196,221,25,199,30,50,91,223,104,52,23,70,99,16,172,234,68, +40,194,238,106,166,78,92,3,96,19,178,10,2,241,192,30,20,2,89,158, +74,41,234,198,88,128,194,100,146,86,155,189,186,232,75,84,215,207,154,176, +58,67,239,202,119,19,224,75,13,170,42,242,24,28,9,75,81,172,37,85, +116,217,113,48,94,185,186,70,182,23,49,1,2,48,134,96,222,170,21,208, +145,87,187,243,16,221,13,17,115,201,246,114,91,169,90,55,145,216,140,217, +55,17,17,1,243,4,93,41,37,198,87,103,229,183,129,152,1,80,211,52, +109,27,15,14,230,71,135,135,167,247,23,199,199,71,39,39,39,179,249,36, +4,14,129,89,16,0,74,6,162,17,254,99,214,248,221,210,193,117,200,131, +69,81,109,219,182,62,224,171,171,229,245,106,115,126,126,241,238,59,239,189, +243,238,223,251,149,95,251,234,241,225,231,68,168,239,224,114,253,226,91,127, +250,55,138,12,77,136,105,115,226,90,172,20,18,41,128,142,240,232,254,188, +102,100,115,206,163,88,46,162,153,213,162,151,187,39,45,67,175,215,203,254, +226,124,249,123,255,247,255,181,217,172,126,245,91,191,58,61,156,73,128,97, +24,212,186,7,15,223,108,66,11,56,148,82,170,49,162,109,35,81,68,223, +89,183,91,143,127,31,232,244,210,246,8,164,99,79,75,82,131,82,106,245, +59,92,157,245,125,151,211,48,114,36,220,189,90,213,59,247,240,24,145,169, +166,17,90,230,166,105,106,27,236,100,133,162,32,177,89,41,166,28,26,52, +79,41,249,124,54,187,127,58,184,79,143,98,36,125,248,139,223,252,15,126, +251,175,157,190,253,37,203,108,69,227,98,254,39,126,241,151,190,247,135,223, +126,239,201,249,124,118,248,115,191,248,203,95,91,60,178,231,215,87,238,116, +124,16,15,102,179,56,15,203,229,243,243,229,226,151,190,168,33,0,154,31, +204,112,49,209,77,238,158,95,64,192,67,19,253,224,188,108,30,227,225,220, +91,209,62,65,42,49,70,126,227,52,184,37,128,178,25,60,112,83,48,32, +53,8,107,176,204,20,133,91,138,58,172,87,79,207,151,254,194,221,105,58, +199,98,185,235,25,73,98,224,249,164,109,90,66,222,220,137,122,101,102,57, +60,62,22,17,85,85,203,179,217,108,241,240,65,156,230,255,237,111,255,207, +229,201,71,207,252,131,249,116,246,201,15,46,94,92,117,135,237,241,98,54, +115,128,52,116,76,250,229,47,127,209,57,254,157,223,255,14,201,252,43,95, +249,138,72,44,170,0,232,170,200,130,8,170,110,110,176,13,155,182,49,24, +128,67,41,5,153,156,144,16,133,130,153,185,26,111,221,238,157,50,121,29, +204,76,104,94,180,146,178,181,20,34,98,34,205,57,211,86,168,189,238,107, +163,194,174,43,0,24,232,190,38,72,45,115,153,213,109,123,119,160,237,26, +199,106,104,118,190,209,110,30,214,15,239,115,249,153,185,106,3,87,166,237, +78,127,30,183,228,179,157,231,229,126,83,99,221,251,114,196,189,152,247,142, +231,114,135,187,231,176,251,199,157,247,182,59,213,155,42,74,189,54,226,27, +19,123,147,92,187,41,172,88,189,210,16,130,67,204,57,32,40,0,48,163, +153,109,65,207,133,153,75,202,204,172,68,53,163,102,102,134,55,58,163,181, +97,118,13,190,170,141,184,125,206,219,248,139,121,219,191,130,144,76,88,80, +36,18,135,38,242,164,141,179,105,156,182,13,49,16,141,234,11,45,33,192, +86,97,149,198,235,2,128,114,199,108,38,15,77,195,128,94,140,1,121,126, +16,135,108,102,246,221,239,254,193,7,31,124,244,139,127,234,171,179,201,195, +203,203,179,245,114,189,238,46,220,36,96,153,182,147,86,130,107,201,57,35, +185,154,41,56,250,136,218,145,48,182,2,168,87,193,40,34,146,115,70,146, +245,170,47,25,77,245,15,191,243,7,211,249,44,198,88,242,176,233,134,190, +223,128,23,100,115,74,15,14,155,148,56,39,171,183,124,11,120,132,187,172, +222,173,146,251,238,93,171,75,136,16,129,205,112,232,117,211,165,213,178,63, +127,145,174,175,250,190,203,149,24,230,35,110,74,183,26,179,47,13,216,146, +201,235,3,202,57,167,148,84,85,2,180,192,170,9,53,11,131,59,66,74, +164,24,140,249,75,159,43,77,219,107,81,164,110,200,76,242,197,175,253,228, +69,234,128,9,208,103,243,195,63,251,207,254,11,167,95,120,237,111,255,31, +255,251,159,252,230,175,252,250,63,242,79,228,85,73,230,72,100,211,182,67, +178,128,248,224,112,22,190,58,180,156,74,170,96,136,249,107,15,181,27,140, +160,93,76,207,217,154,159,249,146,116,165,92,175,189,17,62,154,113,177,54, +249,42,146,216,81,136,17,162,48,115,112,115,117,117,203,72,147,195,69,140, +77,137,145,229,248,240,248,0,204,83,74,102,38,196,45,145,196,128,76,138, +160,66,195,246,62,124,118,68,142,90,212,157,29,9,3,105,134,85,206,16, +227,159,250,214,111,126,235,207,253,115,191,251,55,254,106,247,241,123,207,47, +95,124,239,249,234,63,254,79,255,155,97,29,254,214,255,240,159,191,247,206, +239,191,253,213,207,187,245,77,59,185,234,108,101,237,95,254,43,191,253,249, +175,126,141,69,138,41,17,151,108,44,53,172,115,117,168,89,30,51,227,173, +254,35,33,34,19,9,23,85,48,99,64,83,117,119,9,33,107,245,253,129, +132,69,164,148,82,172,182,199,2,83,229,16,16,209,138,50,82,64,70,180, +228,134,120,131,50,70,196,82,41,16,13,123,81,118,20,216,54,116,5,119, +2,118,170,166,147,136,16,64,182,121,183,234,211,192,104,110,110,251,89,183, +36,132,235,233,35,113,77,173,84,84,28,34,34,56,226,174,5,51,130,215, +102,132,124,151,105,187,235,245,31,101,220,50,121,190,197,6,2,192,200,205, +168,158,218,173,24,103,251,91,141,215,199,170,128,19,2,9,80,44,195,178, +162,243,204,172,218,251,82,242,88,135,254,204,129,111,9,44,239,114,150,183, +12,246,158,169,133,84,114,245,202,17,8,36,16,130,25,164,84,214,171,36, +188,65,144,182,29,136,199,187,134,232,228,251,40,68,187,185,102,190,67,19, +17,133,216,53,39,34,41,217,175,175,175,191,255,254,31,191,247,253,63,250, +244,211,239,199,32,199,7,167,57,167,171,171,171,98,171,227,211,147,203,229, +117,155,60,242,36,13,154,82,238,250,53,162,43,40,17,162,109,101,74,183, +27,212,152,25,0,5,0,85,101,150,103,207,207,62,250,232,147,31,124,248, +241,243,167,79,94,107,30,93,95,61,95,119,43,98,148,38,230,174,89,175, +187,16,154,161,245,110,147,214,93,86,5,112,114,80,119,3,48,55,185,117, +115,234,159,59,243,122,235,209,34,215,222,131,102,10,90,40,101,95,175,210, +102,211,63,63,215,205,166,223,108,82,181,122,128,6,168,254,114,23,240,253, +9,160,165,128,141,9,65,34,10,196,34,18,99,52,49,75,144,221,137,201, +144,84,53,16,177,4,143,139,77,41,42,164,6,109,59,233,55,253,80,44, +206,166,74,161,164,178,90,119,36,237,55,127,237,207,254,212,47,252,234,241, +226,104,179,41,54,23,4,110,36,84,129,90,83,91,185,242,233,124,238,97, +205,37,171,246,93,135,68,112,188,24,52,139,132,193,123,52,128,134,203,241, +84,144,72,61,187,173,38,156,2,71,152,50,113,70,83,85,246,154,61,142, +10,4,49,116,238,107,27,56,210,100,54,33,7,24,6,71,203,132,74,128, +68,58,62,43,51,179,185,189,122,158,108,54,157,136,132,16,76,141,136,166, +18,107,112,208,122,83,174,245,159,249,115,255,242,95,249,183,255,2,49,255, +245,255,236,191,250,220,87,127,118,88,211,159,255,87,255,221,223,250,183,254, +149,190,75,179,54,108,146,125,247,189,79,255,197,191,240,239,191,245,211,191, +130,220,22,213,202,2,87,80,114,53,67,34,2,7,100,218,165,240,97,203, +22,40,67,114,15,5,157,152,130,19,18,27,184,153,137,176,111,59,46,140, +157,160,17,69,184,148,98,132,138,35,177,212,16,138,27,10,171,101,4,5, +4,70,116,55,66,202,86,66,8,57,103,47,218,212,106,137,3,17,41,56, +18,161,141,235,116,220,203,69,198,249,188,157,222,85,114,208,111,82,195,35, +0,165,102,144,119,250,43,196,213,245,168,213,96,71,0,52,7,122,41,4, +4,196,49,215,143,116,11,15,184,3,210,253,144,20,222,43,135,191,10,236, +82,159,241,206,115,148,122,85,68,4,47,139,235,238,159,220,46,146,7,0, +0,174,219,16,140,17,113,5,48,215,184,114,76,61,84,8,177,143,113,22, +214,10,84,125,43,231,92,91,121,134,16,18,226,46,194,221,247,46,247,255, +4,98,2,7,32,100,212,130,125,151,206,207,113,179,129,203,203,20,99,172, +248,149,241,232,35,241,96,215,209,209,183,214,231,213,195,220,29,138,218,48, +109,103,155,117,254,248,7,31,125,255,131,239,62,121,250,126,159,46,68,132, +5,159,189,120,31,96,146,117,9,48,87,75,155,21,5,182,235,213,112,121, +121,125,121,117,165,150,205,50,49,48,196,122,170,68,47,229,67,153,250,234, +219,174,86,171,15,62,248,224,251,239,191,123,118,246,92,173,91,175,159,95, +94,62,1,128,217,108,49,161,72,208,172,151,214,52,240,156,187,229,117,127, +121,217,117,155,82,204,205,76,33,187,171,96,187,123,114,240,178,133,186,101, +173,198,211,48,64,68,3,47,69,77,169,40,165,193,82,42,171,206,82,74, +195,48,168,102,135,12,238,149,244,130,47,127,219,238,59,3,139,155,229,126, +128,169,6,36,70,178,92,186,213,154,15,17,163,168,107,65,203,164,200,76, +198,235,161,23,240,128,68,40,201,74,43,109,22,85,48,200,190,233,174,79, +15,14,189,244,5,124,147,117,50,189,151,6,131,100,62,35,115,135,162,160, +32,196,129,100,200,133,12,250,97,19,130,68,36,2,202,2,40,4,217,181, +79,109,203,154,178,18,35,83,114,23,55,119,215,82,84,149,140,84,11,68, +50,240,130,96,96,25,113,94,172,58,227,85,104,175,239,19,169,11,81,32, +46,102,96,174,104,4,192,72,140,36,68,197,94,93,19,15,77,131,136,108, +238,169,48,80,27,165,100,64,51,157,14,38,116,252,250,215,126,231,119,255, +102,49,93,188,241,198,122,200,160,118,244,240,139,95,249,218,207,118,155,51, +77,250,135,31,60,249,51,191,254,207,127,235,31,253,167,140,38,144,179,187, +3,187,153,49,32,0,228,60,132,16,8,221,173,128,59,35,108,235,6,14, +0,83,36,69,40,96,170,154,139,11,160,136,12,154,113,236,97,117,19,81, +186,187,170,2,86,129,53,75,86,128,193,192,7,213,200,66,65,76,77,28, +133,40,151,92,53,148,136,168,49,51,128,234,77,168,169,35,35,2,108,177, +74,213,201,81,181,24,165,20,53,179,109,186,109,231,172,248,46,56,173,1, +220,102,179,113,247,233,116,186,197,136,216,22,92,181,235,148,108,232,84,207, +19,252,38,187,34,18,43,148,234,150,195,244,15,231,232,221,50,121,184,87, +199,184,49,10,238,82,207,123,95,78,121,127,48,144,131,33,250,184,141,32, +32,137,132,54,15,203,82,10,82,21,80,29,131,217,42,150,255,74,15,174, +148,18,98,172,143,106,183,123,236,59,44,240,210,234,245,10,228,113,119,7, +4,83,45,222,107,78,69,251,78,69,146,200,102,187,29,141,70,83,165,250, +92,219,246,184,56,18,238,194,29,32,95,14,33,235,42,165,46,114,115,125, +209,125,239,157,63,186,90,126,90,236,154,32,119,155,75,43,221,197,213,179, +215,31,188,221,149,240,193,135,31,127,227,235,231,98,83,131,230,236,108,245, +201,211,23,47,206,46,74,206,57,119,180,221,238,96,143,160,2,227,134,211, +3,64,148,240,226,236,233,227,199,31,157,159,61,190,190,62,47,218,145,181, +150,250,105,51,145,130,218,27,8,244,155,178,89,111,204,241,252,108,243,228, +217,213,213,213,144,6,203,166,10,201,253,102,49,222,242,196,9,95,202,72, +220,92,87,1,102,68,196,226,230,142,224,172,86,97,89,21,235,147,205,75, +245,34,107,202,118,255,75,94,178,158,234,144,149,130,179,3,27,120,46,150, +50,114,57,184,244,156,6,131,28,231,109,22,25,134,65,50,224,96,24,212, +54,169,57,62,6,128,188,186,152,28,204,59,42,253,229,149,24,14,103,207, +134,229,178,89,44,142,79,78,175,87,27,31,134,153,123,55,36,5,132,216, +64,140,234,232,166,33,23,88,151,23,216,159,108,130,32,217,162,77,170,124, +185,9,93,118,9,190,81,115,3,14,200,228,173,12,19,225,141,54,151,61, +54,140,217,13,60,30,206,10,58,171,65,82,79,54,116,133,154,64,77,48, +132,98,224,228,34,164,136,56,40,128,7,25,19,58,232,224,185,152,3,200, +29,253,160,193,84,141,144,155,32,152,117,115,121,221,45,175,135,174,191,223, +97,71,174,36,129,219,233,189,123,220,71,153,18,6,45,202,191,254,235,255, +244,255,249,63,253,119,203,117,247,239,253,197,191,246,19,63,255,171,220,206, +115,206,136,2,8,106,134,72,194,206,140,206,200,232,80,188,246,101,38,17, +119,243,93,78,106,217,183,247,22,9,171,17,130,138,36,183,202,212,7,0, +119,68,44,57,135,16,0,192,84,67,46,102,202,211,86,144,20,156,144,220, +70,183,163,134,107,168,150,187,190,225,185,34,145,121,24,76,221,99,228,65, +53,171,198,32,21,107,236,128,224,128,14,140,228,110,66,108,160,181,152,233, +190,11,104,110,162,69,128,113,21,215,28,200,100,50,25,93,69,31,225,2, +176,31,9,161,213,244,19,194,77,221,118,75,235,122,41,96,130,151,115,115, +175,126,50,63,218,192,151,71,157,225,178,253,246,151,157,172,155,127,34,119, +7,84,164,209,219,35,98,145,216,204,231,35,8,182,54,184,163,234,47,142, +230,140,153,117,155,112,173,153,175,156,243,156,185,105,154,157,51,8,175,234, +195,187,59,122,86,165,189,172,103,109,53,109,6,197,45,123,193,162,59,123, +55,254,11,239,119,234,208,221,91,145,94,93,45,41,186,113,232,17,83,103, +101,181,210,203,171,77,46,5,200,106,192,190,90,159,89,225,32,179,123,7, +95,238,215,63,72,131,103,95,243,16,175,54,171,179,171,213,249,245,166,148, +162,57,17,248,62,202,116,119,103,221,157,145,202,144,88,134,179,243,229,245, +178,203,170,70,90,60,97,225,178,214,97,200,42,75,245,141,64,67,102,93, +63,244,77,88,173,250,171,179,205,217,249,102,72,80,188,184,103,39,165,59, +56,24,110,175,110,11,132,198,136,78,12,54,182,77,66,0,50,71,180,228, +238,53,145,237,181,148,225,227,14,180,95,243,218,25,62,50,71,53,40,106, +41,247,171,245,48,160,224,89,104,125,145,210,106,181,114,209,240,218,41,54, +50,44,175,83,246,168,60,105,173,60,187,114,213,48,155,172,158,94,4,121, +180,242,206,151,235,131,48,133,212,29,34,60,255,244,113,19,90,25,114,127, +246,108,200,169,245,104,230,25,49,156,28,203,201,193,144,211,112,113,233,151, +235,227,47,156,132,171,117,183,92,251,131,195,13,58,118,105,166,4,28,142, +11,245,23,215,206,132,111,220,107,166,147,252,124,157,159,93,70,10,50,103, +239,134,108,5,73,53,103,234,53,18,17,65,98,0,84,96,48,32,34,102, +97,1,241,162,125,67,174,42,4,86,20,0,68,196,132,152,25,238,208,227, +163,202,74,192,82,212,86,171,107,77,195,226,120,126,252,240,36,207,103,88, +202,20,136,151,137,57,40,121,234,115,131,172,64,191,246,173,127,252,103,190, +248,214,226,240,244,69,207,6,11,237,51,219,64,28,204,12,138,18,75,46, +10,230,129,24,145,176,148,126,221,177,8,207,36,155,25,56,7,113,128,39, +223,123,255,181,111,252,132,76,165,32,206,38,173,246,169,207,185,176,207,131, +228,156,75,206,102,182,217,108,22,139,69,211,52,234,64,87,93,233,187,246, +161,72,27,54,105,224,16,4,24,82,209,128,226,46,200,58,12,221,213,213, +193,116,18,16,134,161,207,31,191,240,70,248,62,38,212,236,165,193,134,220, +93,13,69,118,115,192,182,118,19,17,205,118,221,129,253,38,193,135,6,123, +189,97,119,158,20,142,100,112,7,87,114,113,2,65,168,226,220,213,212,84, +171,231,238,213,66,34,48,98,217,55,76,240,242,94,254,163,143,155,212,214, +222,159,176,103,67,235,47,82,77,82,181,63,190,205,184,237,254,77,72,204, +108,84,160,170,242,141,64,72,18,99,28,109,246,54,243,93,157,190,154,48, +222,29,198,221,9,73,68,64,95,34,114,196,24,75,63,252,144,26,110,117, +128,113,235,67,85,105,63,51,3,70,199,151,248,4,68,66,68,88,12,124, +172,103,35,192,206,21,79,119,88,7,247,200,68,14,212,165,236,70,110,140, +192,41,103,87,8,97,242,236,249,199,204,15,187,110,152,205,239,191,254,26, +49,207,76,47,213,83,42,93,95,250,190,100,244,138,221,220,178,111,106,148, +177,151,110,83,147,84,32,2,59,134,33,151,77,63,24,40,146,149,1,114, +103,206,169,17,239,6,141,241,26,60,19,26,170,89,82,29,178,13,238,217, +16,107,245,136,108,111,53,238,239,123,116,199,30,104,200,6,90,74,222,209, +218,29,208,221,197,220,93,1,173,234,13,212,130,93,173,175,221,50,121,117, +176,131,13,57,83,10,44,199,135,71,147,131,211,123,167,143,56,28,233,197, +83,226,86,197,117,209,250,162,141,243,192,138,52,216,230,221,63,154,101,26, +46,175,154,105,59,101,110,3,78,165,157,81,144,206,47,159,63,221,44,47, +15,78,78,99,209,167,143,63,245,229,213,195,131,249,42,2,41,45,47,46, +41,192,236,225,162,139,72,97,126,244,185,251,249,253,79,210,229,74,215,221, +241,233,189,217,201,124,56,212,152,81,175,55,103,235,213,226,39,94,79,139, +230,82,123,158,184,204,22,48,151,6,67,250,206,187,144,21,2,135,197,44, +173,54,229,114,131,10,74,112,156,241,186,12,182,152,180,175,159,240,193,162, +4,42,80,237,62,195,86,31,159,28,192,92,139,222,89,203,0,112,205,0, +160,14,36,64,173,80,43,225,96,218,151,210,230,120,47,196,178,188,220,60, +123,220,59,158,124,229,171,6,212,119,42,139,80,50,108,58,63,58,62,108, +39,211,182,189,215,109,158,165,205,138,226,180,102,190,98,140,67,215,185,251, +100,54,35,119,73,170,125,194,166,62,25,51,112,6,48,4,31,242,132,67, +87,202,106,179,146,118,86,250,33,17,132,163,121,183,94,3,64,16,225,24, +53,231,192,108,165,172,150,203,227,235,62,175,174,121,177,96,150,235,229,70, +218,118,140,58,15,167,128,68,128,195,144,134,77,135,14,66,180,78,41,172, +7,97,142,44,137,48,163,59,66,206,89,187,33,44,230,59,167,36,231,172, +170,187,156,227,118,122,108,3,2,180,177,47,151,106,140,55,109,49,42,126, +235,214,90,30,77,69,117,60,17,193,21,81,170,101,68,96,68,164,151,69, +165,246,86,247,93,121,249,31,86,195,189,117,116,216,230,1,70,245,102,85, +17,172,13,208,38,174,125,218,92,158,159,127,154,134,85,35,193,16,42,188, +112,247,159,251,63,151,136,186,19,152,114,79,91,75,55,9,182,78,131,151, +206,198,251,101,6,144,6,159,205,219,245,117,114,127,64,28,66,224,229,230, +138,176,176,35,234,132,185,197,2,1,136,9,146,155,17,1,16,233,77,104, +106,90,139,70,8,64,59,168,5,66,173,222,34,152,249,182,91,193,94,139, +150,10,47,2,186,163,195,83,96,72,10,128,76,140,138,189,121,231,160,228, +65,144,161,248,102,89,30,62,132,192,186,233,62,89,175,59,40,128,126,232, +69,3,148,152,136,59,166,80,6,235,20,136,141,65,1,1,165,46,28,29, +159,153,242,154,197,115,25,60,21,207,214,32,171,114,99,200,147,188,76,47, +2,112,60,186,63,153,53,14,230,32,128,54,184,42,120,118,29,44,25,48, +184,155,219,45,145,218,125,135,223,238,242,240,189,27,111,206,141,181,116,0, +112,173,18,56,140,91,56,169,3,168,154,225,64,40,170,9,168,3,232,176, +176,216,148,117,77,68,179,131,69,12,211,205,170,59,62,176,116,126,121,185, +122,63,240,193,195,71,167,68,208,167,53,247,3,172,55,180,188,134,2,7, +243,69,249,252,23,250,190,223,44,151,249,252,66,130,228,139,107,234,251,235, +156,15,102,243,195,7,15,252,254,253,190,239,159,63,254,164,33,152,190,246, +90,153,76,66,175,205,108,218,181,177,215,220,46,251,56,228,245,197,21,76, +103,65,218,230,141,5,105,254,228,234,252,245,89,123,191,105,63,120,255,221, +136,28,127,250,39,150,253,16,178,61,146,185,157,247,171,243,51,207,197,154, +118,241,218,3,85,77,41,117,203,181,171,193,225,140,154,102,30,99,25,20, +134,190,47,41,175,186,9,199,102,33,65,184,108,99,12,80,3,68,67,128, +154,128,119,80,240,81,131,196,161,234,236,214,245,166,144,17,154,198,3,118, +249,96,99,151,79,159,148,233,209,100,178,160,249,146,55,169,91,132,102,118, +178,249,240,201,240,218,70,223,249,24,223,122,200,104,196,72,60,93,95,92, +53,97,141,122,237,155,229,172,105,244,241,167,165,152,187,135,249,108,230,154, +154,48,57,58,90,121,46,223,254,187,179,163,3,108,35,61,189,102,7,63, +158,133,71,167,128,126,120,111,230,23,231,225,163,167,7,129,102,205,228,106, +70,18,185,157,71,35,90,62,125,49,83,114,68,211,52,11,211,179,23,47, +166,10,195,130,3,183,56,12,235,167,207,91,179,82,74,156,205,102,132,93, +67,83,142,23,31,127,156,87,171,153,250,252,98,249,248,233,19,34,23,14, +22,189,68,139,37,247,63,248,244,168,61,216,92,92,245,58,232,201,28,214, +253,129,210,176,92,207,15,22,195,217,85,251,185,215,83,43,80,140,70,211, +4,99,42,9,16,1,141,12,60,32,4,34,65,74,67,186,110,154,153,22, +50,174,245,81,71,68,114,4,132,130,206,76,19,12,238,197,216,220,149,0, +162,176,130,104,32,78,186,179,89,163,191,135,0,8,132,99,7,231,253,12, +146,217,75,211,255,229,132,96,141,14,119,81,139,141,86,151,76,8,220,139, +3,134,200,99,223,140,90,124,40,37,131,185,140,81,45,186,123,46,121,223, +75,220,95,129,251,155,192,206,191,51,29,25,160,47,173,68,247,97,24,218, +118,54,157,78,7,181,146,148,136,170,187,105,216,59,161,97,46,154,114,206, +165,36,39,68,244,187,76,252,143,237,247,222,177,37,36,117,181,132,92,111, +137,163,24,100,67,116,131,21,139,63,121,246,253,243,203,199,39,247,206,184, +70,228,176,4,106,129,192,32,171,37,181,30,188,234,26,108,169,124,159,61, +168,115,69,94,85,168,84,81,205,165,100,45,87,151,215,185,40,138,172,243, +48,153,182,210,54,10,58,164,126,118,56,33,86,67,117,72,128,226,104,166, +201,180,192,171,68,126,0,126,244,180,198,246,140,248,46,46,7,0,0,162, +56,48,96,48,168,168,83,91,230,212,169,210,132,67,140,165,97,110,167,147, +195,147,233,244,244,197,234,146,132,74,148,24,196,25,74,27,211,186,31,250, +85,191,41,109,219,182,167,199,77,211,164,148,122,128,20,25,27,121,209,111, +42,243,103,50,153,204,143,30,32,226,122,189,62,191,190,8,32,8,73,38, +113,210,204,122,114,8,232,139,246,98,232,137,104,115,189,198,38,200,241,97, +106,194,144,7,58,92,220,59,62,57,47,37,198,72,234,221,208,107,30,32, +10,16,118,154,207,175,215,33,132,182,109,219,163,3,102,206,57,111,186,238, +124,189,140,44,241,112,122,220,222,163,216,100,242,14,212,74,113,228,87,247, +184,2,32,31,133,124,156,8,193,157,176,74,236,150,200,168,232,136,12,20, +79,230,139,197,231,65,249,249,85,103,23,235,201,124,6,134,135,111,62,136, +179,9,45,102,244,229,215,211,188,81,3,8,77,115,124,212,204,15,135,162, +67,73,60,155,93,94,94,207,30,28,149,97,200,73,161,141,133,64,163,172, +209,122,179,249,91,159,215,86,140,56,103,207,57,123,68,119,197,32,195,209, +108,57,13,249,254,129,70,94,26,244,45,73,219,36,225,214,105,190,88,240, +80,136,72,122,191,218,172,42,180,61,76,231,69,181,143,92,102,45,35,65, +41,185,137,73,75,152,76,29,121,114,114,175,157,77,161,232,208,134,50,139, +200,204,97,146,38,188,49,45,41,119,8,67,224,114,52,65,156,224,172,49, +196,172,80,208,202,124,162,147,48,160,117,105,152,82,128,49,250,170,118,96, +155,191,38,172,188,6,102,86,35,34,36,162,177,169,238,205,210,48,0,170, +119,152,118,28,9,116,220,70,199,59,223,240,174,44,222,45,203,243,99,76, +251,237,160,61,124,140,153,73,53,162,197,29,209,83,238,85,11,19,153,23, +50,177,151,35,169,253,227,237,192,40,240,114,122,174,148,180,243,138,119,184, +30,119,31,134,220,76,113,50,157,91,223,149,68,72,2,80,212,29,124,25, +144,0,108,196,206,146,3,22,71,211,187,32,60,63,238,114,191,99,16,178, +163,85,194,149,65,173,57,169,130,154,50,16,29,30,156,158,156,62,106,194, +137,180,168,170,196,147,84,6,39,2,204,138,201,48,187,219,216,35,248,14, +173,26,131,0,128,53,146,36,33,20,70,35,146,56,63,184,119,120,242,0, +133,145,3,76,26,156,68,39,23,225,100,105,40,67,209,141,249,80,108,112, +119,247,2,88,16,238,224,225,222,169,197,114,199,199,253,213,153,132,186,206, +179,186,22,116,100,71,112,50,224,18,102,247,194,124,17,15,142,226,116,86, +218,134,38,141,29,44,124,190,56,60,57,32,130,85,191,84,118,116,109,103, +211,137,26,163,4,205,53,198,49,34,207,153,153,91,0,17,105,83,126,41, +145,12,208,78,167,205,233,105,32,236,75,162,24,128,105,24,134,64,241,224, +228,80,135,140,44,49,103,8,140,65,138,187,34,196,147,227,60,109,45,39, +138,194,76,74,69,218,166,57,88,144,67,206,121,22,31,212,249,150,17,149, +8,219,118,178,88,180,238,230,137,136,10,178,129,23,115,71,32,137,194,12, +195,171,107,181,21,204,192,176,93,30,132,234,230,238,108,148,179,145,160,9, +39,116,163,72,16,98,156,196,24,169,141,101,211,95,55,204,243,150,16,232, +112,110,173,128,123,103,208,156,156,90,211,0,0,149,220,58,54,237,60,205, +93,82,105,198,248,14,144,17,88,38,18,248,205,215,13,93,132,177,88,44, +6,0,25,204,172,52,15,239,107,144,48,157,54,109,244,33,183,104,77,136, +217,173,139,28,239,29,149,110,104,155,166,209,50,228,52,57,58,100,7,156, +72,51,137,33,54,120,48,139,44,57,103,20,134,82,114,96,51,15,71,139, +6,14,193,205,130,180,145,66,19,163,97,33,179,40,4,212,28,30,224,225, +1,251,28,27,9,196,105,186,70,112,238,7,158,204,130,68,158,78,36,87, +90,240,14,192,235,176,213,106,228,42,42,7,32,196,5,28,107,234,0,28, +209,107,240,131,96,219,157,219,208,106,43,13,219,129,145,193,9,128,68,162, +222,205,186,253,108,166,15,247,42,188,183,62,188,51,74,248,114,21,216,13, +205,198,183,84,77,182,5,92,7,211,148,122,7,37,6,205,14,8,104,78, +252,82,118,112,239,219,199,222,70,187,114,194,238,168,219,140,230,141,81,39, +192,162,224,134,204,28,66,28,130,64,95,189,69,96,1,228,0,36,238,232, +142,232,94,76,205,123,190,99,181,239,55,32,255,209,198,29,181,185,45,0, +221,43,14,190,146,28,145,57,76,74,73,49,78,143,143,79,115,158,76,38, +4,196,224,92,215,141,33,84,194,13,150,156,61,107,129,248,25,160,245,118, +121,43,35,58,26,177,141,106,22,238,234,54,12,121,221,13,237,225,92,154, +144,152,58,43,67,201,64,196,94,129,46,194,140,165,242,91,176,16,222,248, +116,159,121,4,123,17,236,143,178,251,221,241,17,22,7,199,2,8,181,177, +105,54,3,45,158,180,184,25,32,49,134,152,29,16,113,32,16,116,12,129, +8,74,66,119,116,112,33,4,224,12,192,113,82,139,196,104,134,34,142,104, +102,125,74,97,79,172,187,158,39,86,204,38,20,104,66,65,40,86,140,209, +76,75,234,133,72,205,184,109,12,60,231,82,179,96,210,242,106,72,129,43, +34,12,136,25,24,50,58,18,2,135,193,156,42,52,215,61,111,183,91,68, +140,109,213,116,83,68,228,32,68,162,110,57,231,112,135,243,159,82,170,39, +216,99,29,247,0,0,32,0,73,68,65,84,73,0,170,10,99,18,31,231, +74,125,81,45,6,172,18,209,0,179,234,100,178,216,52,40,185,52,109,115, +157,210,132,16,38,177,172,251,33,32,22,132,98,45,75,46,37,78,103,217, +109,57,12,211,89,187,209,85,0,20,98,51,3,36,114,240,77,105,88,12, +67,177,2,5,92,173,5,10,8,106,133,29,92,98,49,115,102,70,162,24, +185,20,49,242,62,175,26,227,16,19,131,122,225,192,166,136,77,48,181,92, +84,153,7,68,21,54,196,194,68,194,32,204,128,57,167,16,155,140,8,128, +157,21,109,3,6,65,5,71,36,199,32,145,23,7,208,182,197,75,9,36, +40,208,78,141,220,98,212,166,33,96,166,16,17,9,203,246,9,238,122,76, +87,200,158,2,176,153,213,98,166,89,45,151,33,57,140,105,187,42,83,133, +176,133,181,41,225,168,119,182,155,186,181,163,46,220,225,235,221,74,246,237, +191,114,151,111,248,217,81,29,249,154,215,67,68,49,47,185,36,17,41,154, +74,30,220,21,157,199,2,160,251,142,77,2,47,175,174,157,83,186,59,143, +122,6,92,5,67,96,148,233,69,116,66,50,4,138,34,18,136,184,109,166, +125,191,86,53,7,36,34,55,210,130,93,55,92,95,95,95,95,157,149,146, +0,43,32,234,213,103,239,119,53,181,191,107,220,145,215,19,105,85,7,71, +115,231,245,106,227,69,193,144,145,13,150,36,118,189,126,246,248,169,133,240, +96,53,40,34,174,187,231,8,71,57,217,122,221,173,86,171,205,122,9,152, +221,51,128,12,58,236,190,115,255,25,152,1,17,160,231,52,108,138,173,205, +83,101,212,134,38,26,184,185,23,117,3,181,9,228,2,218,15,49,196,110, +181,94,94,93,94,95,94,14,67,46,102,14,25,192,221,228,150,81,27,39, +138,220,222,0,95,249,231,110,208,103,122,197,141,159,183,94,157,180,224,114, +185,44,105,85,116,32,47,0,134,10,168,238,185,128,59,154,19,16,57,128, +161,27,56,34,59,75,237,23,232,160,166,0,100,41,19,81,19,70,244,98, +101,182,87,245,142,209,137,31,241,228,184,133,115,58,137,160,154,32,135,216, +186,90,206,25,145,8,41,176,12,57,9,32,139,212,117,130,136,12,152,77, +119,181,163,84,70,122,50,34,143,216,136,170,93,203,92,99,151,148,186,26, +58,17,48,56,64,86,114,199,61,181,139,219,243,33,108,129,251,4,169,31, +106,177,142,136,210,243,139,246,240,100,96,78,170,174,134,69,211,80,72,38, +145,39,94,114,187,76,118,216,76,27,206,171,97,227,38,234,25,96,22,27, +41,96,217,38,83,76,14,16,101,149,122,96,68,132,186,149,128,16,17,161, +170,20,28,54,235,48,111,84,164,58,40,5,221,141,133,185,0,145,65,33, +200,105,8,33,104,202,22,169,9,209,76,73,93,144,44,23,114,108,73,168, +88,41,133,9,25,153,28,180,22,67,182,86,155,141,0,106,255,32,5,66, +51,67,166,82,10,84,84,54,41,2,69,137,213,177,45,165,148,113,217,50, +178,21,83,1,36,45,209,125,228,252,248,24,131,33,222,212,67,235,235,91, +131,176,205,116,153,33,50,84,86,6,57,184,35,145,131,250,216,142,162,134, +191,181,66,66,194,33,127,150,11,123,7,124,111,191,186,240,217,207,223,70, +160,236,34,92,186,97,19,48,179,84,74,25,128,165,212,213,150,189,35,234, +109,11,71,124,245,42,218,70,181,187,221,21,71,8,203,141,190,113,85,190, +27,103,149,196,201,108,202,161,65,112,230,96,238,68,178,222,12,221,170,139, +161,251,254,187,223,125,231,157,119,159,61,123,146,242,0,166,128,198,18,95, +121,220,207,178,97,254,65,227,213,86,79,179,25,100,10,194,28,60,195,208, +119,12,29,74,114,139,142,90,50,94,92,14,243,105,110,28,219,182,233,7, +184,186,120,214,46,135,239,127,239,157,119,223,249,248,249,179,43,245,13,66, +65,8,196,134,175,114,206,69,136,153,8,221,60,13,221,170,148,222,52,163, +195,102,216,12,67,23,134,88,146,77,166,145,77,94,60,191,56,123,126,121, +56,207,239,191,255,225,251,223,255,224,250,122,165,35,153,175,168,22,223,90, +237,91,149,214,92,202,43,95,191,115,220,241,46,214,226,58,115,74,73,203, +224,214,53,98,228,20,2,135,200,181,208,137,14,1,17,213,35,97,8,129, +192,51,32,153,249,88,187,39,148,128,90,220,29,213,42,9,20,205,70,153, +92,119,164,49,3,173,41,67,21,209,97,1,48,55,119,53,64,112,40,140, +84,57,145,169,79,12,136,106,224,78,64,174,230,0,65,36,105,217,213,199, +17,49,198,56,102,147,213,77,75,253,90,217,18,3,74,78,33,10,141,113, +141,214,117,44,40,72,152,253,213,17,110,189,227,0,96,69,135,213,38,204, +16,1,193,97,115,125,69,71,71,125,36,2,193,110,83,86,107,98,225,86, +100,149,58,208,235,191,255,158,254,220,23,3,199,245,187,159,240,91,143,102, +3,108,68,57,117,146,224,242,236,178,172,214,147,227,185,51,116,170,138,134, +200,132,168,232,61,26,184,205,2,81,129,238,197,243,118,241,26,5,118,51, +115,232,192,28,189,12,5,57,48,96,104,98,74,197,16,186,161,87,240,70, +2,16,14,174,37,32,48,155,105,140,33,153,149,128,147,78,165,137,169,40, +152,82,32,34,6,115,55,69,160,72,200,128,64,196,140,33,180,0,160,170, +181,135,84,149,213,67,66,48,15,204,2,32,72,198,132,132,132,238,106,76, +78,0,76,56,128,193,77,243,29,219,229,203,43,84,154,28,36,4,33,160, +218,18,141,48,187,226,136,8,29,11,158,132,238,128,78,132,232,6,165,242, +238,106,249,145,57,236,87,234,118,243,249,86,108,251,67,60,187,31,238,36, +2,140,19,68,85,43,181,78,170,241,51,211,60,12,136,136,228,102,99,49, +1,29,118,10,8,254,50,207,33,151,97,75,201,216,146,105,182,14,237,104, +89,193,96,219,98,174,66,100,219,102,90,175,147,131,52,205,100,72,235,143, +62,250,232,253,119,190,63,155,198,15,62,124,239,241,147,15,87,171,171,122, +121,130,60,148,87,35,78,126,236,52,254,29,17,141,136,0,42,36,4,96, +80,70,87,128,14,44,169,54,0,246,250,163,183,22,135,247,154,230,126,136, +158,75,121,231,143,62,250,240,131,119,14,14,253,163,79,222,125,246,116,185, +217,244,128,29,146,10,198,157,21,190,229,117,15,227,6,165,8,150,115,162, +170,9,152,179,123,110,155,48,11,1,33,78,195,116,117,182,252,222,31,126, +244,193,135,159,126,229,205,242,233,39,79,158,63,127,158,138,214,141,212,93, +179,41,191,172,4,117,243,11,197,87,190,126,167,237,187,131,123,64,32,6, +134,130,170,25,113,148,163,118,165,94,7,5,79,94,162,23,71,115,52,115, +69,196,84,82,12,76,130,228,100,142,200,160,6,166,169,97,50,53,64,68, +134,16,199,233,53,138,136,108,245,43,66,21,97,52,203,154,198,149,192,196, +213,236,185,86,108,1,5,2,134,40,146,82,109,77,197,89,181,248,141,240, +204,216,190,189,134,32,102,49,198,154,215,115,215,154,184,65,4,102,4,168, +45,86,182,72,93,160,98,166,165,240,29,85,29,32,4,32,1,100,132,140, +124,16,90,205,37,167,52,201,142,90,134,108,83,17,90,110,154,171,174,57, +88,148,174,107,55,142,83,193,148,211,52,0,82,44,69,55,27,236,86,243, +123,83,232,18,23,178,213,82,201,226,44,174,187,213,140,136,146,79,80,204, +140,167,173,11,154,89,116,47,203,110,177,233,3,218,249,106,73,203,196,18, +194,188,9,210,210,229,10,154,236,169,52,128,177,43,24,130,153,51,33,186, +114,175,206,224,129,218,182,237,174,150,214,15,6,46,49,164,174,111,154,32, +4,64,84,229,78,188,22,81,205,41,80,177,130,76,234,142,6,166,10,0, +234,16,130,128,121,113,101,102,179,18,65,176,230,77,208,221,20,92,205,212, +24,11,170,19,142,125,55,169,234,111,111,239,33,218,78,77,128,198,198,20, +80,63,64,14,149,148,182,179,12,117,37,178,32,64,149,73,197,109,89,132, +171,159,248,89,211,230,91,153,119,223,210,159,110,77,248,91,75,239,174,129, +136,57,231,93,168,81,55,72,46,165,176,64,41,169,174,55,216,10,184,35, +226,93,253,52,240,51,3,234,126,126,243,214,120,186,149,51,88,5,144,85, +213,0,99,104,38,147,201,250,122,249,225,7,31,125,247,59,191,127,124,111, +126,126,246,81,183,121,14,48,0,152,21,72,64,119,93,201,143,91,195,189, +11,239,83,74,65,116,39,4,23,114,142,34,140,61,81,47,97,62,164,53, +135,98,208,21,93,123,41,151,87,87,239,253,209,187,47,158,61,62,125,40, +87,23,79,186,77,1,71,243,181,151,161,56,59,220,248,122,251,190,55,66, +4,48,80,67,114,112,170,45,26,3,75,156,196,54,10,20,213,60,56,167, +231,143,47,223,125,239,163,103,103,87,82,158,95,95,95,15,125,95,121,154, +102,86,99,49,39,218,21,112,124,7,149,2,0,151,91,86,111,255,231,171, +158,215,29,153,1,157,59,100,80,119,27,36,4,170,130,97,206,202,8,45, +99,195,220,8,70,54,132,98,89,93,157,8,153,28,33,149,228,154,153,2, +16,184,67,210,84,229,36,138,21,80,168,226,58,184,13,195,13,204,220,124, +167,189,193,168,14,194,98,102,117,239,173,129,19,55,17,17,251,97,8,44, +21,113,0,68,224,230,8,200,164,110,149,49,90,65,135,136,24,68,186,210, +87,158,112,165,227,212,204,8,86,126,52,1,0,170,27,24,1,40,16,34, +11,220,193,65,178,74,83,115,112,243,161,235,123,222,172,175,174,151,151,87, +135,103,87,211,215,31,205,38,19,218,244,203,247,62,106,215,195,236,13,184, +92,117,150,137,15,103,109,219,172,221,0,32,206,218,238,201,249,213,178,47, +207,117,49,153,155,66,100,90,76,39,221,245,229,197,211,39,135,113,194,177, +233,186,97,179,238,166,15,239,197,7,71,128,108,215,171,23,223,251,240,116, +117,237,103,71,253,176,108,150,54,89,28,51,11,195,208,127,248,44,30,79, +151,23,151,101,62,133,46,197,251,71,177,79,177,105,77,139,254,241,39,30, +25,90,153,159,158,150,199,207,45,149,216,196,102,62,253,212,251,201,124,6, +81,16,93,193,193,157,1,145,73,193,72,196,138,145,224,136,215,1,109,66, +92,247,67,160,128,194,78,142,194,152,140,9,160,168,198,80,161,96,136,78, +0,200,228,236,234,224,101,71,197,69,28,59,228,40,56,152,121,5,151,212, +112,181,182,39,172,1,202,78,33,198,247,172,30,85,49,130,61,132,10,2, +238,227,251,62,235,244,237,191,184,13,99,127,188,50,46,0,148,82,98,140, +85,171,124,244,250,136,136,210,48,108,58,48,4,18,211,76,72,106,165,106, +88,192,30,228,24,182,176,97,7,38,32,24,177,25,72,213,198,105,21,153, +241,42,169,2,88,57,27,226,142,210,30,175,250,12,161,187,119,116,162,67, +31,184,101,240,79,30,191,251,226,252,251,207,206,138,149,222,76,71,61,6, +67,128,81,93,174,238,87,227,47,88,61,137,31,38,62,83,63,89,153,127, +227,109,146,62,13,78,222,78,154,176,30,174,145,13,57,56,10,149,180,189, +143,170,170,37,4,85,5,23,201,221,52,192,139,199,79,41,62,158,207,103, +109,179,176,62,92,60,254,238,245,106,115,117,85,84,135,92,122,66,39,20, +51,36,4,160,76,216,148,12,72,138,84,0,10,128,128,7,196,181,111,1, +61,176,183,29,81,161,32,19,192,0,8,30,148,194,234,249,211,255,23,220, +255,248,189,179,155,11,185,241,31,221,225,142,124,156,15,175,124,253,199,29, +238,23,219,217,76,105,200,238,14,144,64,96,90,176,133,48,11,19,118,130, +162,130,36,196,129,201,153,220,85,132,147,34,17,33,185,251,88,179,99,198, +218,218,201,93,153,171,108,12,176,213,118,48,35,191,208,16,170,14,14,109, +163,132,90,246,26,103,179,26,33,26,99,1,107,29,9,112,48,21,17,236, +146,178,9,115,113,51,112,17,174,232,88,52,23,103,80,0,29,83,123,188, +77,104,236,229,102,182,191,217,15,91,42,238,206,68,8,96,90,218,197,108, +53,244,216,134,195,71,247,245,75,167,23,144,194,138,136,44,127,225,132,219, +246,233,218,22,179,211,180,190,118,225,203,183,78,166,27,21,193,116,255,96, +90,230,221,116,53,89,76,47,150,171,131,163,123,129,227,117,206,52,105,78, +191,246,118,42,131,229,76,136,49,165,46,231,184,30,102,179,89,106,132,62, +127,90,218,55,7,183,86,40,31,232,245,52,78,67,44,224,249,75,167,129, +99,123,56,7,128,148,210,160,42,179,73,233,115,140,81,191,248,160,13,33, +165,116,49,116,101,222,78,219,182,164,188,44,121,241,218,233,0,38,102,85, +222,163,222,1,66,52,66,43,133,17,161,24,34,130,131,112,44,234,211,38, +186,22,116,39,71,176,194,72,217,1,152,189,36,0,168,2,73,230,197,138, +7,102,77,41,70,169,140,198,29,91,163,154,53,98,51,85,36,175,126,153, +106,142,177,77,131,59,69,3,40,37,21,107,68,100,76,233,57,162,155,169, +11,214,126,163,25,16,220,1,105,90,113,66,52,122,90,90,221,49,51,43, +154,235,181,32,222,100,21,225,182,127,183,87,111,216,203,223,65,213,124,82, +37,162,24,88,75,109,227,73,102,69,234,123,174,169,114,149,70,113,197,173, +37,246,189,3,224,54,167,104,102,240,178,245,217,121,161,149,138,59,146,100, +111,48,141,208,117,93,140,113,58,157,58,130,1,84,187,11,64,165,20,243, +162,234,80,173,30,50,128,87,26,145,1,16,49,215,192,141,128,183,11,99, +7,99,220,205,87,216,82,156,107,225,220,43,207,202,28,0,24,48,132,104, +197,139,14,77,64,5,39,130,33,107,20,217,130,111,70,42,177,187,3,104, +79,77,140,178,120,240,249,123,247,239,77,38,147,24,39,23,207,151,87,233, +239,246,101,205,168,238,165,214,100,75,218,16,69,199,162,86,152,24,136,145, +193,92,221,13,193,85,19,110,137,198,91,154,161,213,67,112,12,169,216,209, +209,180,105,38,110,136,204,192,116,125,121,25,154,224,238,21,186,233,192,48, +182,197,172,157,230,94,49,240,85,45,71,254,97,70,13,6,235,158,102,55, +46,252,124,126,80,161,249,33,132,38,182,53,32,200,57,83,12,187,158,38, +224,232,128,14,184,45,39,188,98,56,66,21,118,217,190,80,241,230,134,119, +48,237,84,21,133,136,89,16,205,44,107,86,183,73,12,166,110,64,85,34, +70,107,33,209,0,8,238,210,212,177,59,221,129,87,127,190,238,128,132,228, +129,26,18,111,140,16,5,41,211,128,16,152,27,102,156,122,158,77,230,49, +250,193,226,36,31,182,72,180,78,189,5,81,102,162,166,229,32,179,22,3, +227,180,109,39,179,98,52,197,169,186,21,112,228,192,66,204,44,211,182,70, +232,198,196,220,28,198,147,128,100,8,162,26,205,80,216,155,128,238,66,128, +200,226,129,136,88,219,26,148,153,25,137,248,148,138,8,148,134,29,72,53, +182,19,86,109,212,170,142,222,254,186,168,115,207,95,101,235,183,43,251,206, +154,192,254,146,175,223,115,75,36,105,247,177,189,142,135,149,234,243,82,38, +206,221,29,20,64,160,234,125,242,237,147,193,45,81,44,132,160,170,117,205, +186,143,81,163,109,197,232,246,29,192,31,209,221,195,61,80,221,206,105,219, +253,57,170,138,14,155,108,102,232,186,155,189,21,147,120,235,96,187,75,66, +188,177,169,187,43,188,229,18,214,171,174,171,253,244,254,189,24,99,41,133, +40,187,59,18,223,187,255,224,151,255,244,175,252,204,55,190,50,12,125,63, +172,82,223,165,60,164,33,91,41,37,91,46,61,0,144,132,234,148,2,97, +117,75,249,14,212,174,109,107,187,149,184,106,102,160,230,238,41,119,147,201, +212,115,126,242,248,195,92,86,237,180,17,158,47,14,30,92,92,62,173,100, +233,16,154,138,252,62,56,56,18,145,233,236,224,236,226,98,54,155,181,237, +76,184,137,97,250,250,27,147,159,251,133,183,239,29,31,228,60,12,221,178, +235,54,41,247,47,94,188,8,28,137,200,156,8,35,97,32,134,162,107,0, +159,76,230,90,112,95,53,12,107,49,145,136,136,166,135,39,237,124,170,128, +10,40,33,126,237,167,222,126,227,11,159,71,244,161,95,231,156,135,97,72, +67,151,82,202,57,107,26,84,85,127,236,60,230,143,55,108,212,186,160,90, +99,13,210,140,236,34,226,163,147,83,145,73,45,252,213,171,104,154,38,3, +130,19,2,19,134,186,97,16,128,87,65,176,87,13,28,51,223,8,21,206, +63,114,106,176,54,149,249,236,160,208,16,154,22,115,39,34,33,196,172,69, +170,195,182,135,15,69,132,10,142,189,163,237,4,208,29,252,235,187,86,139, +43,24,66,170,37,72,64,96,54,68,35,82,99,112,42,197,25,220,40,100, +68,151,96,28,50,5,96,82,52,39,82,68,3,114,33,115,1,84,108,67, +143,96,104,237,100,90,114,26,134,158,25,139,59,130,18,19,48,171,170,89, +38,34,105,195,144,11,18,161,4,51,53,240,162,217,16,156,161,50,30,153, +193,137,220,81,1,84,33,131,22,65,99,80,0,70,2,133,94,192,9,33, +176,232,77,172,179,127,141,248,25,67,118,243,214,237,21,141,183,62,179,51, +103,204,108,37,213,44,221,254,91,59,167,97,247,10,140,252,212,189,4,156, +109,29,79,34,124,213,205,223,121,6,176,111,76,247,198,103,207,121,103,115, +62,59,246,223,218,166,26,221,221,119,109,137,234,144,138,168,24,134,14,221, +188,74,113,120,53,121,124,235,91,118,86,214,221,153,105,204,43,111,47,181, +30,166,74,37,87,178,26,192,104,242,152,89,144,186,174,3,148,201,100,214, +182,211,205,42,197,102,242,181,175,255,212,250,226,100,179,89,117,155,117,215, +47,55,155,205,208,245,41,85,13,184,228,238,49,182,28,164,100,35,34,172, +52,18,132,221,57,236,223,35,29,115,7,86,205,98,21,1,174,178,19,160, +166,165,235,186,179,97,200,167,167,167,203,101,254,252,107,143,238,63,60,120, +252,233,147,182,109,115,206,165,96,223,247,179,217,4,0,230,50,244,220,119, +231,143,27,40,42,179,141,189,8,82,164,156,17,29,197,24,17,231,77,51, +33,2,166,184,88,204,39,109,155,204,220,2,56,155,231,174,191,42,58,28, +29,158,104,25,233,126,85,63,21,17,69,164,202,17,207,239,61,154,204,23, +34,49,134,169,187,99,148,6,230,181,218,227,192,106,104,138,128,66,92,138, +52,86,20,232,6,233,189,255,116,127,220,252,230,93,99,71,237,169,25,222, +234,217,137,200,100,190,0,12,20,162,112,164,32,117,210,168,42,133,41,51, +184,53,204,5,76,137,168,126,195,157,162,204,184,37,185,58,114,141,101,107, +146,253,14,148,53,58,168,102,114,112,181,108,42,211,136,44,88,241,20,58, +246,86,174,203,26,17,200,253,174,3,191,162,77,20,0,192,174,207,242,237, +81,149,162,71,15,145,192,17,170,67,73,24,220,72,157,28,204,89,20,201, +136,141,56,171,145,3,240,22,210,227,80,76,21,12,76,137,0,85,29,198, +197,76,68,136,4,80,170,191,191,23,33,142,141,77,9,0,184,22,52,71, +25,56,168,50,231,91,114,247,120,103,16,17,177,53,0,51,118,192,122,129, +125,174,41,78,35,168,137,166,26,239,184,187,185,218,216,249,172,174,148,91, +249,178,91,253,145,235,17,104,231,187,212,165,143,232,0,134,232,238,202,44, +136,187,165,87,21,241,94,178,149,123,52,173,241,89,251,203,173,71,235,3, +70,130,26,45,0,140,245,125,22,218,34,75,198,21,77,68,248,178,217,218, +191,9,63,124,242,239,95,38,110,195,172,234,133,236,72,180,210,132,88,74, +41,105,168,137,24,116,216,73,175,162,34,200,104,233,246,173,236,206,161,221, +63,198,238,197,27,151,24,199,215,43,177,113,182,128,233,116,90,109,34,135, +166,148,44,161,145,56,165,92,40,230,6,230,230,72,28,98,182,82,74,209, +30,156,36,6,145,232,6,78,76,68,213,130,220,186,170,241,25,194,184,171, +140,45,13,75,174,185,197,38,182,57,13,154,248,248,222,189,179,23,171,147, +147,99,45,87,207,158,126,242,240,205,215,15,14,23,111,190,249,38,34,118, +155,254,7,63,248,193,225,225,98,24,50,81,89,28,204,0,11,17,181,237, +36,198,216,54,182,217,28,63,124,243,75,81,66,74,125,206,185,104,54,21, +0,107,218,150,84,1,68,184,113,87,22,93,46,141,80,12,97,72,25,17, +89,66,211,78,66,8,77,211,180,109,27,66,40,18,128,137,36,74,19,9, +133,136,208,20,13,39,139,35,25,18,201,64,161,43,165,88,46,149,229,178, +19,17,120,121,130,194,126,123,129,255,63,99,139,250,30,133,160,153,67,8, +129,153,145,68,29,98,104,37,54,85,64,13,144,180,20,65,68,36,168,10, +25,117,1,3,32,222,41,135,123,243,160,0,0,1,221,172,174,237,59,62, +174,185,8,193,84,162,12,233,250,236,172,57,61,228,54,114,182,138,118,50, +70,3,24,193,156,35,28,246,46,221,128,87,143,187,124,64,203,169,186,213, +149,78,3,136,91,37,235,74,205,84,119,32,65,117,115,80,245,66,128,232, +16,20,96,43,250,143,130,196,194,78,102,128,128,128,140,197,164,56,129,148, +156,199,4,76,205,93,18,5,22,119,55,53,174,231,175,70,136,228,99,174, +128,156,192,125,151,68,26,151,94,149,89,118,112,119,70,2,28,141,66,53, +163,73,51,124,38,235,15,0,0,183,125,177,250,157,188,183,156,235,163,168, +238,150,185,19,98,45,211,18,0,186,143,189,147,247,140,245,238,89,143,230, +8,173,106,151,17,85,97,174,76,200,245,220,16,176,38,35,104,47,166,190, +229,196,213,79,86,161,83,244,155,74,110,173,53,195,109,211,60,142,91,62, +224,173,183,118,209,39,140,24,18,107,154,102,23,119,2,128,140,61,4,243, +0,96,56,238,0,232,238,12,228,175,42,39,239,174,252,150,29,172,47,166, +148,106,107,174,221,109,169,159,57,56,152,207,167,211,73,211,154,89,201,134, +44,28,227,226,240,200,114,159,181,184,107,102,54,4,230,160,193,74,49,243, +56,58,191,18,68,90,34,114,32,51,112,207,59,195,138,123,249,50,148,96, +102,12,72,4,14,154,135,190,148,2,0,6,216,206,230,152,23,147,150,215, +235,243,97,24,30,62,60,77,131,95,93,93,172,215,203,235,235,235,123,247, +238,29,30,29,60,28,30,62,122,244,136,153,99,115,176,220,92,118,185,123, +227,243,111,53,225,24,145,133,187,233,230,202,221,155,73,203,28,136,6,209, +124,112,116,188,94,94,206,102,179,100,158,147,229,228,185,228,162,158,74,145, +216,76,103,19,146,80,99,198,26,219,86,61,94,17,241,48,105,226,132,40, +50,133,16,226,184,91,146,15,125,118,100,32,36,97,85,117,53,181,236,238, +101,171,25,179,63,213,0,224,174,188,216,63,196,216,78,66,174,39,44,18, +153,121,50,159,16,54,147,233,156,152,9,9,145,67,140,181,249,142,143,0, +253,45,15,7,193,189,220,205,129,169,27,184,143,179,202,44,231,65,173,224, +29,122,175,1,17,212,60,23,91,245,188,222,204,142,15,48,21,235,211,192, +131,33,0,211,78,82,172,78,98,188,195,250,223,85,187,135,187,106,217,120, +99,14,205,29,13,9,192,17,200,11,32,32,16,160,17,185,122,66,102,226, +17,66,190,187,10,4,68,173,156,3,48,51,6,97,70,47,238,197,133,73, +213,205,117,100,236,185,91,209,145,0,238,176,67,102,212,2,253,184,138,172, +134,206,219,158,4,149,193,74,104,230,42,94,1,217,102,198,4,197,157,25, +16,65,240,70,33,106,103,86,136,200,75,134,45,78,100,175,188,3,251,70, +227,150,5,217,153,164,125,219,196,72,84,191,161,42,34,143,62,49,86,229, +21,216,166,113,112,11,72,186,121,16,163,137,168,153,220,27,111,14,95,14, +34,119,192,23,51,219,98,90,198,94,226,240,170,136,243,135,143,91,254,32, +34,14,195,176,139,163,221,93,144,28,208,74,73,84,251,148,212,2,179,195, +190,236,90,29,59,19,134,91,216,11,190,156,71,216,89,211,237,39,247,254, +5,96,24,6,119,103,142,40,133,129,141,121,50,91,164,110,85,74,33,2, +181,86,98,40,41,187,99,41,86,180,35,100,51,99,105,167,211,57,115,208, +98,192,52,12,253,206,234,193,110,225,185,87,214,60,1,16,131,89,201,67, +87,177,41,113,62,215,65,173,235,142,239,45,86,215,103,239,190,251,7,199, +199,249,244,244,193,219,95,121,251,147,79,62,121,242,228,9,162,55,205,196, +92,95,156,61,63,61,61,117,99,17,25,214,27,192,34,1,75,86,85,111, +154,201,106,125,49,157,133,33,151,174,219,20,205,230,249,252,250,69,59,69, +195,41,99,187,88,180,109,27,145,203,179,103,159,222,191,255,90,148,153,238, +237,141,176,117,120,153,89,218,54,72,195,220,16,138,72,0,128,24,35,0, +176,36,85,213,220,230,50,168,170,23,173,246,101,151,103,221,223,190,224,238, +72,237,199,29,251,103,8,128,188,27,194,65,38,33,54,33,136,52,66,68, +255,95,115,111,214,36,73,146,164,135,233,97,102,126,196,145,89,71,102,85, +117,87,119,85,79,247,244,116,207,181,88,46,65,80,240,3,248,78,62,16, +16,136,240,129,228,19,255,29,249,0,17,138,64,32,66,96,87,86,246,192, +206,204,206,236,238,236,236,28,125,212,221,117,101,102,28,126,152,169,42,31, +204,221,51,50,50,179,103,26,179,0,214,36,165,202,195,195,195,221,220,14, +53,53,213,79,63,117,231,150,220,220,163,182,235,105,185,110,44,234,168,161, +12,31,85,69,68,82,194,107,34,11,61,81,234,187,55,39,107,126,179,145, +109,187,117,112,178,94,89,211,149,239,223,83,4,23,60,122,103,163,9,93, +147,92,39,245,190,105,220,162,141,27,23,178,11,195,94,33,34,132,164,102, +100,236,49,198,72,174,247,232,212,7,86,160,156,233,7,242,118,216,18,26, +219,192,230,66,132,232,24,132,144,145,189,7,157,162,220,70,169,131,136,72, +10,128,142,97,88,62,118,218,13,149,28,155,89,174,152,138,33,83,14,139, +1,0,98,150,24,141,16,4,48,59,58,114,210,89,203,187,206,193,233,57, +97,33,96,144,124,231,154,218,180,87,133,243,190,51,51,24,192,66,231,58, +205,224,57,34,206,186,117,246,209,13,128,54,34,204,174,45,132,41,151,67, +150,86,160,146,229,184,0,64,198,72,103,40,91,222,53,35,230,74,218,80, +73,208,73,234,229,87,200,141,64,68,162,122,221,208,186,186,31,47,98,155, +105,39,34,136,198,28,29,102,230,178,237,201,118,48,22,100,251,1,16,123, +178,51,27,173,96,220,54,79,95,101,77,18,38,110,2,26,178,106,100,245, +149,93,66,50,96,114,206,145,35,0,85,233,235,122,222,247,29,48,128,164, +156,253,4,141,82,74,162,129,201,69,81,38,191,92,222,36,231,83,82,231, +92,140,23,34,192,166,69,73,13,85,21,201,136,80,37,118,93,147,82,79, +68,194,232,171,208,186,141,135,248,207,255,197,191,12,5,172,86,175,85,211, +233,233,219,227,227,227,162,40,222,123,239,189,182,109,31,63,126,122,114,114, +114,120,120,216,53,175,235,5,116,167,79,158,253,70,14,22,239,50,149,222, +37,104,78,95,189,57,91,30,84,68,190,94,148,158,235,91,183,231,10,155, +247,30,220,171,170,119,77,89,18,0,154,65,183,222,174,202,170,174,171,3, +32,158,150,135,129,167,76,84,37,45,15,106,199,161,40,42,66,63,117,79, +146,152,147,39,72,16,159,156,138,136,200,78,188,192,56,36,119,245,252,107, +216,4,190,105,209,161,171,71,237,0,115,44,48,19,3,83,193,204,28,130, +247,44,35,143,46,50,16,17,16,208,72,250,165,96,96,132,215,250,154,179, +46,155,205,56,131,134,168,154,174,161,46,6,73,157,71,51,77,94,197,5, +63,35,234,85,203,170,106,193,24,145,16,136,81,45,207,150,204,28,120,181, +124,251,70,83,5,0,36,74,214,142,178,60,200,56,90,50,64,50,67,37, +83,83,37,5,211,30,53,16,136,16,9,168,137,154,12,150,56,33,80,128, +104,194,206,155,154,154,48,65,132,188,113,81,112,20,69,76,109,212,56,108, +96,98,178,28,107,139,153,47,109,82,130,20,12,192,212,52,75,97,81,9, +142,1,209,167,33,180,64,147,121,68,82,244,138,98,168,99,59,76,74,110, +54,181,79,59,217,189,150,193,139,58,205,52,193,39,37,113,175,25,167,153, +190,187,150,19,145,230,60,98,48,252,106,50,101,138,8,232,160,10,35,217, +24,192,134,147,41,112,175,131,6,187,202,0,247,179,188,58,226,165,81,181, +99,225,185,102,111,49,114,125,238,234,188,56,210,226,229,59,171,170,43,3, +158,157,126,53,38,184,228,236,175,3,2,3,5,7,153,95,111,90,21,0, +0,1,65,205,57,202,221,54,101,56,201,130,60,42,138,24,130,136,246,140, +76,4,189,130,167,112,115,113,104,72,49,70,143,157,103,236,186,84,248,208, +106,170,102,7,77,31,21,0,44,161,99,75,162,170,41,70,228,146,153,187, +24,205,140,2,87,85,109,224,192,168,230,115,210,211,221,183,74,169,71,100, +52,151,27,171,239,54,219,230,180,40,124,40,230,38,18,139,121,215,244,101, +224,239,124,47,252,252,239,255,195,233,250,209,246,5,235,124,241,234,228,244, +248,221,123,119,31,62,184,121,239,254,151,191,249,242,211,143,63,141,116,167, +10,130,179,163,174,105,191,247,221,63,140,226,204,145,145,185,159,252,197,241, +237,251,135,55,142,186,196,76,101,187,62,105,91,148,238,108,121,251,253,109, +243,122,182,44,192,152,76,215,171,179,190,217,28,45,143,26,221,198,24,183, +93,203,204,0,104,224,150,7,135,85,85,23,229,141,188,230,16,81,182,49, +169,42,153,99,145,177,75,170,33,82,213,204,204,228,146,85,126,232,248,157, +248,226,139,186,201,53,250,215,53,186,225,222,124,152,204,55,20,124,166,107, +117,206,17,123,2,66,50,194,134,225,6,26,10,120,81,238,186,30,65,136, +129,192,84,46,144,5,77,255,138,26,100,141,79,19,103,146,114,233,29,92, +90,87,199,146,208,3,2,31,29,233,17,244,0,61,0,222,94,116,0,147, +74,37,10,0,163,51,240,58,254,172,111,94,198,184,230,97,248,231,233,42, +25,176,15,66,108,42,98,226,29,148,38,96,32,156,116,120,91,55,188,184, +51,0,200,145,45,96,204,106,96,102,206,57,147,132,166,38,54,110,128,97, +7,53,130,128,57,231,109,54,116,226,72,226,14,158,9,76,93,206,145,77, +4,60,228,211,81,86,0,16,21,242,160,152,208,129,64,4,4,26,53,113, +216,235,247,115,231,207,224,129,29,204,18,59,41,28,246,74,6,240,78,190, +23,85,117,206,165,216,237,201,83,203,124,162,236,146,245,134,146,140,145,11, +199,69,223,53,203,186,146,228,92,225,186,216,139,136,105,222,226,102,133,78, +112,204,57,1,59,19,153,248,80,244,173,195,174,170,24,146,83,161,4,64, +206,76,8,71,162,144,161,167,6,116,196,53,3,8,45,71,233,16,17,51, +169,74,74,217,182,160,170,41,251,112,152,209,153,89,74,87,135,43,237,214, +108,175,65,47,175,165,121,182,56,231,148,81,133,80,179,58,61,92,214,52, +205,225,205,91,69,81,136,26,17,59,231,208,180,40,10,99,158,205,102,166, +125,140,45,17,144,207,186,192,144,252,161,80,1,128,162,172,171,106,206,174, +52,69,209,120,222,115,59,139,134,89,97,134,166,40,34,132,72,164,64,90, +20,158,169,4,212,236,79,112,0,139,197,7,200,155,31,253,164,217,172,215, +255,253,15,255,229,123,235,248,159,126,252,211,179,55,171,162,46,95,190,122, +54,159,215,239,125,112,8,40,15,30,222,255,187,191,249,153,11,209,49,249, +162,234,36,29,222,94,108,155,211,227,187,71,98,98,218,87,181,191,113,243, +240,233,211,175,122,249,74,161,107,218,38,246,106,32,69,137,207,158,61,190, +125,115,145,224,96,182,56,184,113,43,56,239,139,162,68,100,83,4,38,199, +229,88,231,161,101,156,11,0,48,17,238,235,78,217,107,252,139,210,13,247, +206,140,231,47,244,200,116,204,215,232,62,187,42,228,180,206,35,34,100,134, +106,28,164,158,141,9,48,97,180,99,100,15,181,105,68,50,80,65,184,58, +110,154,156,207,179,78,37,58,38,130,100,138,132,252,205,185,115,254,219,23, +27,157,140,191,127,185,56,125,118,160,112,23,23,161,203,179,108,244,117,94, +184,0,113,224,40,222,213,197,70,245,237,178,127,3,174,186,241,254,212,222, +93,2,47,85,248,194,125,166,36,24,147,123,19,113,16,157,211,125,204,108, +151,41,18,241,130,163,6,70,89,150,36,17,130,67,207,204,83,214,195,221, +10,76,195,245,58,85,126,74,210,6,59,6,183,204,182,146,31,154,189,228, +174,235,98,219,246,87,223,99,103,94,237,181,218,148,133,120,239,250,76,41, +58,34,87,128,153,137,125,81,84,147,105,255,220,154,9,72,68,174,40,22, +139,133,105,223,52,152,125,41,25,169,168,10,102,146,189,201,204,158,201,23, +161,202,254,242,221,184,188,169,86,99,214,93,214,152,68,35,144,32,89,85, +149,101,121,216,181,235,142,214,62,112,220,246,174,156,127,231,211,63,10,69, +253,199,255,238,255,254,147,63,251,179,31,126,255,15,190,255,157,239,44,15, +14,111,30,31,29,204,23,63,255,229,223,38,108,28,179,103,122,125,242,197, +143,127,186,190,117,116,172,88,138,112,236,95,126,246,249,231,198,27,164,90, +197,51,128,89,243,246,228,171,217,252,241,221,187,15,219,94,138,57,123,239, +151,243,247,52,201,226,192,31,220,254,52,183,178,136,160,99,55,165,35,0, +62,175,182,209,249,48,29,27,148,118,108,163,54,166,218,131,75,2,46,233, +213,224,149,36,23,214,192,243,161,124,77,255,238,141,230,105,33,25,118,43, +57,70,146,216,20,17,8,140,156,207,108,254,204,204,206,57,48,48,16,3, +116,236,167,250,92,144,164,192,35,217,126,86,52,240,31,79,116,252,215,40, +211,100,219,109,168,43,91,254,63,239,230,187,17,159,72,231,77,131,112,46, +131,118,31,77,59,121,118,242,101,163,184,132,43,175,119,116,97,235,10,48, +36,167,191,82,138,1,0,26,100,191,7,194,104,61,189,136,14,218,187,91, +62,158,164,222,116,236,252,24,132,11,160,150,192,72,45,33,50,94,26,111, +249,32,15,39,233,179,3,116,136,56,156,12,124,95,47,124,119,75,182,188, +217,232,218,230,145,131,71,71,251,96,174,191,243,236,190,38,88,103,79,36, +239,30,95,43,254,233,188,150,170,138,68,166,152,82,122,253,250,181,161,155, +47,14,178,76,116,25,99,2,80,22,117,172,59,85,201,82,207,146,32,178, +41,136,136,231,193,218,233,156,43,203,146,7,146,181,97,5,216,205,184,22, +53,1,128,115,100,193,181,173,138,120,38,168,170,170,44,107,192,222,133,138, +192,90,226,190,79,222,205,31,124,240,195,91,255,235,237,127,247,255,254,63, +127,242,167,255,241,147,143,190,253,226,233,179,63,90,30,254,179,63,248,3, +161,230,198,242,225,7,15,63,58,61,217,188,255,238,15,127,244,215,127,113, +124,235,35,230,25,227,92,241,57,98,9,22,190,245,224,163,190,69,68,14, +222,22,243,195,151,175,94,60,124,239,227,166,65,14,172,150,28,184,135,15, +228,233,179,95,28,191,235,7,56,136,207,218,116,111,104,77,211,20,97,57, +108,27,137,76,39,107,41,249,29,215,228,84,96,103,130,93,150,122,87,158, +215,107,152,181,174,211,173,166,189,198,94,255,50,17,103,140,44,57,32,212, +33,13,32,197,155,69,32,42,0,0,32,0,73,68,65,84,216,57,98,64, +243,222,51,35,19,100,238,225,152,166,108,50,23,235,108,46,199,104,130,22, +132,34,17,5,183,255,72,66,227,191,82,177,75,249,69,7,144,221,55,188, +201,116,124,165,242,53,186,29,6,153,54,114,92,195,40,169,46,252,118,247, +227,120,38,247,227,185,67,50,127,156,100,7,158,75,203,172,0,94,136,228, +223,153,212,154,77,126,59,58,154,34,77,91,183,11,49,18,136,8,19,208, +196,210,228,43,176,9,21,108,40,18,83,74,76,30,6,247,197,21,247,1, +128,140,153,34,243,132,32,81,76,33,219,2,71,83,200,52,74,167,143,87, +139,191,169,14,147,100,200,154,199,164,183,230,226,54,155,85,215,55,197,117, +66,244,122,12,244,244,230,211,3,84,85,53,153,153,129,12,70,0,27,228, +253,124,62,71,118,69,81,20,69,209,247,137,136,24,129,0,84,128,75,95, +201,44,198,78,37,161,129,58,38,67,23,130,72,204,241,82,73,53,3,104, +67,40,122,73,187,171,13,142,224,149,25,113,211,52,38,98,38,76,86,4, +54,163,16,2,152,50,97,166,124,170,23,243,42,66,223,247,193,249,249,242, +206,191,250,55,255,231,95,255,229,31,127,245,252,139,7,31,220,253,241,143, +255,248,171,87,31,34,149,63,253,241,79,60,150,31,124,248,113,140,253,189, +187,247,87,103,219,143,191,253,161,166,64,254,70,225,239,252,234,151,255,176, +40,239,186,217,76,133,144,161,174,238,190,122,249,111,79,79,223,46,22,119, +40,80,236,49,245,114,116,116,231,201,243,127,120,241,242,203,229,226,176,109, +59,17,139,34,73,250,162,112,49,117,247,238,222,96,102,231,56,115,207,153, +229,232,123,84,176,113,180,13,3,41,55,188,94,180,199,77,147,103,111,199, +122,174,146,95,43,245,174,238,222,156,90,240,114,207,194,144,37,153,0,50, +17,98,94,195,82,225,156,99,50,35,75,81,53,251,100,205,84,50,79,212, +21,11,97,102,73,32,196,156,14,213,186,81,179,189,186,62,255,212,74,30, +96,123,83,236,247,215,245,206,167,207,112,98,72,67,49,125,30,247,187,120, +169,73,247,86,175,193,84,194,59,200,59,60,55,254,218,133,135,236,116,16, +141,57,17,39,81,56,126,53,76,103,128,1,85,3,99,48,204,112,221,249, +236,131,81,162,90,6,92,123,239,205,100,160,122,25,54,100,6,192,102,198, +14,17,8,113,176,98,218,5,57,158,43,68,19,183,104,126,10,49,13,115, +99,44,176,51,235,191,94,233,219,85,235,112,32,251,51,162,105,203,15,174, +143,173,247,124,174,60,92,115,139,169,228,123,77,195,118,79,234,137,166,76, +178,50,112,85,33,58,23,156,243,171,213,234,240,230,45,51,235,251,94,36, +243,210,168,243,206,8,137,161,40,138,162,168,250,174,1,48,54,7,0,140, +140,56,146,203,17,34,153,65,100,87,84,161,218,5,199,76,21,32,147,205, +234,172,105,215,8,58,224,206,5,218,245,138,92,177,109,78,11,15,102,102, +234,188,175,52,69,0,163,130,155,22,190,245,201,255,120,120,243,232,209,163, +159,173,155,215,41,222,255,228,227,31,212,165,252,226,151,127,242,252,205,63, +132,162,50,146,127,248,213,47,99,60,187,117,120,187,199,10,173,63,91,63, +251,171,31,253,127,31,60,252,120,179,141,213,172,90,109,87,142,251,191,251, +249,95,188,115,255,91,64,62,251,106,171,194,153,233,175,127,253,179,239,124, +252,105,89,44,192,251,27,213,193,192,72,139,22,19,32,168,74,84,137,19, +250,4,17,113,200,170,14,231,99,2,1,0,28,93,189,195,181,29,235,245, +110,215,236,117,227,78,43,93,199,77,125,225,38,59,125,61,132,39,3,0, +34,193,0,247,79,49,246,96,110,138,220,69,36,0,1,195,41,138,96,111, +142,101,22,81,80,68,80,4,83,77,102,138,223,144,254,254,159,66,217,125, +175,223,71,234,237,233,56,163,151,242,124,34,15,231,247,206,142,207,221,91, +211,112,231,202,189,167,12,115,126,7,247,75,56,108,93,179,68,188,178,122, +100,48,110,83,145,12,76,13,17,25,80,232,194,120,219,17,207,154,13,24, +187,234,155,65,222,144,193,132,49,67,68,83,249,154,148,103,249,139,148,146, +99,114,236,153,156,146,202,72,210,247,187,151,61,71,243,244,188,41,158,119, +80,69,187,110,75,215,143,194,189,78,58,223,133,237,32,144,119,191,242,222, +163,74,138,132,104,42,231,9,194,93,246,76,99,14,80,85,34,146,152,84, +1,193,131,1,251,162,44,75,149,168,170,140,164,10,76,200,206,201,192,247, +69,136,96,38,68,128,76,136,48,98,147,243,62,151,156,227,160,198,32,40, +125,38,94,39,96,205,138,36,65,96,117,204,206,21,177,135,212,119,72,81, +77,32,249,164,54,187,113,147,75,183,184,125,131,253,143,126,245,235,191,215, +190,123,255,91,31,234,61,31,37,125,252,241,39,109,35,179,226,232,217,227, +39,181,175,163,79,132,221,205,219,197,87,47,30,63,127,9,101,181,228,84, +69,217,220,57,122,240,248,249,227,245,250,245,209,221,7,115,154,135,130,3, +187,123,247,222,249,249,207,255,19,169,44,231,115,80,15,224,0,161,221,180, +128,134,212,32,226,132,49,54,179,203,248,222,221,225,37,134,112,213,52,187, +60,239,134,107,144,247,207,228,114,77,76,2,92,146,83,195,111,201,16,88, +85,17,115,188,16,14,150,86,34,102,4,96,35,129,97,144,129,169,78,89, +180,13,118,71,191,161,38,205,80,53,51,132,164,154,12,4,80,225,26,148, +242,63,193,98,54,48,255,218,104,146,252,253,117,189,92,178,194,52,30,15, +103,0,50,212,99,58,121,65,45,186,44,221,198,217,39,187,122,64,190,216, +12,12,100,146,139,217,82,55,234,59,87,172,154,136,8,166,227,54,25,70, +27,160,17,13,228,179,87,191,66,190,237,69,52,9,34,230,105,158,23,200, +81,49,74,112,13,190,18,119,156,39,67,18,73,68,83,163,49,42,110,188, +48,107,127,215,218,134,221,78,62,223,201,198,23,99,116,110,199,127,141,232, +186,118,107,32,95,143,245,191,188,208,77,119,223,253,214,204,50,107,128,153, +224,152,82,210,57,231,125,1,136,103,103,103,64,126,177,60,204,147,135,192, +27,72,82,97,3,118,28,66,104,91,6,0,66,39,18,213,52,59,227,205, +4,8,69,52,166,94,36,50,133,113,43,61,120,190,50,10,164,63,91,105, +138,132,198,142,65,18,33,16,2,58,54,235,171,224,251,216,198,100,8,129, +81,124,0,181,62,73,69,94,215,221,89,81,214,21,188,255,207,255,232,246, +195,119,254,230,175,127,242,239,63,123,244,229,195,15,223,223,198,230,39,127, +221,188,127,255,59,15,30,60,64,139,155,245,171,135,159,254,79,12,141,193, +246,104,249,234,233,211,23,159,124,252,131,245,118,115,235,184,12,209,66,185, +120,244,228,233,65,125,91,145,12,146,68,3,154,191,119,255,254,179,103,175, +15,151,82,149,139,102,27,139,170,100,51,68,139,169,67,68,34,33,114,185, +127,167,213,105,167,189,207,135,35,15,249,234,246,123,100,247,212,40,239,0, +0,100,151,43,120,215,231,123,141,151,126,178,242,238,141,233,132,57,169,136, +49,121,114,204,52,81,222,68,85,220,27,223,72,110,143,27,102,26,27,57, +20,9,51,18,14,114,136,104,158,159,255,104,177,37,255,69,203,149,83,253, +31,75,234,93,188,255,232,172,164,61,225,117,65,206,238,237,221,166,107,166, +26,237,109,0,117,96,106,186,98,97,219,125,151,235,46,176,29,164,196,52, +74,167,202,216,144,35,45,255,68,7,18,245,225,226,115,143,220,168,157,124, +93,143,103,148,140,115,142,9,53,170,74,202,20,107,187,178,101,183,134,215, +245,192,238,108,202,213,206,251,244,9,251,146,135,46,255,155,255,237,255,114, +154,76,13,225,170,191,115,123,170,153,101,22,105,64,4,38,4,83,48,101, +68,4,51,21,149,4,170,98,186,89,111,192,208,12,93,40,20,145,139,130, +24,171,186,62,56,56,184,113,120,80,22,14,0,36,245,76,78,5,153,141, +144,53,198,224,75,2,220,108,87,0,29,98,52,64,226,28,128,145,107,1, +4,64,8,200,69,215,71,230,16,205,84,12,85,171,224,80,180,233,94,159, +173,79,13,64,21,16,73,84,129,208,192,64,33,167,42,200,33,129,136,96, +138,160,129,80,60,113,64,135,162,142,1,157,47,23,119,223,251,240,95,84, +12,155,245,234,240,160,14,212,127,249,249,223,198,118,85,85,245,47,127,249, +197,118,245,36,165,83,132,70,185,61,57,123,253,244,249,23,7,7,139,216, +247,169,71,98,91,173,159,191,121,243,197,98,81,128,216,118,211,137,180,81, +95,191,124,245,124,219,156,38,221,180,221,233,122,243,106,181,122,189,221,158, +173,183,77,89,149,101,89,168,38,133,156,201,87,144,108,119,213,217,29,184, +120,1,106,127,222,47,130,185,141,51,160,22,32,39,155,71,187,78,135,50, +20,64,5,84,64,203,201,21,192,192,76,9,21,65,9,13,115,60,98,62, +70,35,72,132,104,72,236,139,122,126,144,68,9,136,128,188,155,17,135,104, +142,24,165,91,163,53,64,24,209,24,16,71,69,8,196,114,154,109,71,12, +18,29,113,138,18,216,51,58,233,58,139,209,1,160,40,120,138,108,102,234, +13,156,170,128,74,198,135,166,20,12,152,48,130,40,35,50,166,216,47,48, +116,177,167,224,147,164,146,61,26,244,41,65,112,10,82,180,73,93,70,152, +26,168,212,64,141,55,111,186,165,212,165,200,165,159,71,232,52,58,246,107, +136,225,90,110,152,171,255,76,51,203,114,78,238,5,136,168,0,158,29,249, +250,194,207,207,39,167,71,66,209,136,200,132,37,1,155,244,6,17,167,73, +136,70,132,68,56,228,90,128,1,197,151,59,154,80,41,147,15,168,32,24, +19,230,238,206,171,56,19,2,156,207,193,97,72,228,99,208,97,165,207,255, +158,207,95,156,212,40,24,149,29,56,215,34,109,215,215,129,8,52,174,166, +83,228,21,17,133,16,64,45,67,178,51,4,193,84,65,141,137,72,45,120, +151,211,227,56,98,51,147,94,153,188,247,21,128,154,37,68,41,10,118,204, +160,232,57,136,70,204,145,26,59,245,39,66,14,182,109,154,245,186,137,93, +100,71,200,138,104,236,130,89,50,24,91,140,41,27,251,12,140,56,239,212, +53,211,25,16,1,156,135,145,160,153,32,154,15,46,195,247,138,50,244,253, +121,100,167,170,242,255,242,175,255,119,147,8,120,193,199,177,183,98,92,49, +74,70,91,222,158,248,143,18,65,115,236,161,136,154,26,20,213,204,249,176, +217,118,204,76,196,142,3,32,200,64,147,7,72,0,99,206,36,149,148,164, +7,203,252,148,231,244,244,211,179,0,128,92,5,96,196,228,216,21,69,65, +0,153,139,180,109,79,183,219,173,153,17,216,132,105,34,184,86,19,222,221, +136,237,10,154,119,223,185,31,202,186,105,227,203,215,111,86,235,173,11,254, +206,157,227,239,124,242,237,151,95,157,182,219,158,168,40,252,60,20,229,233, +201,233,147,167,95,86,21,191,125,245,66,33,58,199,79,159,62,126,253,234, +69,40,56,198,174,235,154,34,44,29,215,47,158,191,13,126,126,231,248,62, +83,177,152,223,154,213,55,22,243,153,15,5,0,170,40,2,210,144,180,41, +15,245,253,170,238,157,185,176,8,227,254,245,227,130,124,205,207,207,123,115, +60,64,67,160,243,224,204,189,167,163,1,146,2,178,11,161,40,69,36,75, +1,246,51,114,94,1,8,77,250,6,193,128,200,144,52,201,180,204,18,14, +200,210,148,82,64,19,85,73,178,221,110,54,235,179,20,27,179,72,140,173, +199,156,46,41,16,7,231,65,53,109,91,219,116,220,73,75,214,86,44,142, +130,98,213,155,87,64,199,101,39,169,239,45,70,105,90,103,192,68,224,168, +177,216,183,157,87,32,209,236,43,103,177,96,168,34,142,200,35,121,1,90, +181,80,250,214,196,28,207,208,127,115,55,10,78,138,53,34,230,118,113,206, +115,152,93,217,89,104,8,104,10,138,200,206,5,4,50,141,8,50,202,154, +209,196,54,205,182,60,128,207,63,141,122,202,37,163,222,248,136,43,124,193, +187,231,175,28,21,123,31,119,207,157,175,175,231,245,57,47,121,43,144,29, +163,211,100,196,29,119,7,154,65,134,93,1,50,115,223,247,109,211,50,179, +15,222,44,19,101,131,247,222,185,144,113,1,72,182,43,133,241,124,99,11, +169,235,83,234,179,255,78,85,197,76,146,49,49,24,154,130,41,232,248,151, +185,17,178,14,6,249,216,112,84,201,70,175,50,160,25,168,104,166,226,206, +57,130,152,29,17,19,177,75,41,21,76,242,59,216,151,167,183,133,157,69, +99,111,119,230,189,79,93,219,183,49,165,20,202,170,42,103,33,148,170,224, +189,207,225,247,204,140,142,83,146,221,72,94,102,206,62,160,170,170,182,155, +72,228,114,32,78,206,132,144,23,6,21,141,109,183,56,64,5,86,85,145, +88,85,149,128,178,97,240,97,96,51,133,41,114,10,233,26,123,237,84,38, +115,195,212,151,204,188,237,225,206,187,31,223,190,247,224,232,229,131,71,95, +252,234,233,179,207,95,191,250,179,155,183,14,191,245,240,123,143,31,61,219, +174,155,131,249,173,15,222,187,127,231,214,189,47,31,253,90,186,246,187,159, +254,179,205,186,47,170,249,209,141,111,63,121,250,25,89,121,124,247,126,14, +84,184,123,252,160,174,22,207,158,61,105,218,213,173,155,119,54,155,214,177, +115,193,247,125,31,45,51,69,163,37,27,194,51,119,134,236,101,179,241,101, +99,194,180,13,154,222,101,56,184,184,35,56,239,154,1,61,55,104,99,56, +240,121,156,247,250,165,93,54,0,140,74,6,34,24,153,9,2,94,153,163, +14,129,139,210,159,35,171,213,68,164,235,186,190,239,139,71,47,213,96,86, +214,133,41,162,17,203,102,245,186,217,174,230,15,239,107,233,35,153,110,218, +238,180,145,77,75,193,133,229,172,35,112,235,14,79,26,63,171,252,114,166, +152,226,87,111,241,100,251,212,218,162,40,66,8,174,79,162,103,18,92,184, +185,236,45,134,89,205,189,165,183,43,71,212,164,142,154,184,141,169,221,108, +143,222,57,102,131,212,167,244,213,9,125,84,160,119,173,166,170,67,8,223, +20,115,242,219,203,133,129,4,102,38,59,48,148,65,36,209,32,206,6,139, +219,121,159,227,174,155,85,39,187,225,117,82,239,2,107,195,148,93,23,70, +187,224,206,149,83,221,224,146,40,188,238,252,100,184,220,189,102,87,222,237, +254,59,78,179,44,8,134,85,152,153,179,33,15,70,137,150,19,55,35,14, +78,148,203,72,169,241,125,149,136,170,162,22,34,80,65,178,156,119,8,76, +38,252,239,190,192,190,40,145,114,217,245,102,136,8,162,49,19,34,58,103, +187,175,236,108,8,123,250,157,236,44,211,99,118,55,207,187,205,151,98,15, +0,57,246,214,6,169,12,222,7,31,234,162,168,138,162,8,193,199,156,42, +144,113,236,102,35,98,85,201,160,188,102,187,130,209,107,190,135,178,1,128, +205,234,108,182,152,19,7,85,101,34,65,140,49,2,64,140,17,84,112,242, +181,79,170,220,53,218,234,196,27,124,222,238,185,19,43,191,77,73,19,30, +222,184,127,243,230,59,15,62,248,232,243,207,126,254,248,209,103,95,125,245, +239,31,188,255,161,40,252,252,23,63,158,61,90,222,189,251,78,25,230,159, +125,246,235,245,250,79,63,250,240,211,205,186,13,101,125,120,227,224,209,227, +95,59,111,183,143,143,82,87,110,182,111,239,222,187,209,197,215,207,94,252, +186,168,160,172,230,219,205,155,117,67,125,223,23,161,44,103,181,25,154,25, +163,67,162,108,127,25,27,121,87,240,93,160,243,218,17,127,118,241,35,236, +30,216,101,240,250,0,101,160,241,171,43,204,37,23,102,130,209,4,83,29, +173,120,3,68,28,233,92,90,154,229,172,32,216,247,253,244,115,71,3,205, +76,85,85,240,242,13,38,43,15,234,77,211,244,177,5,139,234,177,60,168, +133,145,16,89,173,7,72,51,15,149,19,66,9,28,92,193,203,121,84,145, +62,193,166,233,182,141,20,84,126,251,238,220,153,103,199,73,105,219,235,166, +141,42,174,10,169,139,11,96,108,155,248,234,180,188,177,44,171,170,10,117, +148,20,216,201,179,183,116,99,206,204,162,198,235,110,118,180,92,73,186,142, +212,239,247,41,151,108,124,3,216,130,208,8,13,243,190,216,104,4,149,76, +83,215,198,158,154,102,208,40,113,80,97,8,4,222,239,68,196,11,253,142, +231,186,225,21,168,227,241,204,228,151,216,147,113,184,123,217,249,91,76,255, +239,189,87,54,143,76,106,111,94,117,81,17,50,208,58,111,216,169,44,203, +141,115,83,150,196,44,236,118,199,213,132,167,219,127,180,129,41,18,17,135, +96,162,98,106,136,128,20,92,152,48,27,83,156,47,100,206,237,113,254,78, +155,206,233,171,193,214,223,247,54,34,7,157,163,41,116,2,51,151,114,223, +247,193,95,45,245,174,211,62,166,227,93,93,105,90,244,204,140,200,25,160, +102,94,41,4,0,136,189,168,128,136,54,109,147,82,42,203,210,44,163,103, +51,53,46,18,161,119,133,227,144,164,71,144,17,173,3,170,146,53,109,34, +234,218,77,61,43,139,80,166,4,57,83,42,228,184,253,216,15,213,48,197, +209,180,78,96,251,80,171,139,111,49,85,123,234,137,54,110,136,188,15,165, +38,83,73,135,135,247,255,187,63,58,254,131,31,254,15,95,60,250,187,211, +211,147,213,230,245,124,54,219,54,47,159,60,221,126,251,163,239,254,224,7, +63,248,205,103,191,248,203,191,252,179,227,227,59,139,249,45,0,244,110,246, +211,159,254,244,198,173,234,157,227,239,199,212,198,216,56,143,235,213,234,47, +255,252,207,31,62,248,48,132,18,177,74,57,23,132,26,33,76,93,119,253, +226,108,23,207,79,131,18,47,94,54,92,176,167,3,78,231,117,48,228,40, +194,121,126,197,43,91,102,252,54,251,46,33,71,104,32,102,24,33,101,60, +230,52,148,115,56,48,179,135,49,198,96,82,13,114,245,54,71,117,219,69, +127,60,71,90,20,160,177,95,235,54,24,68,121,185,241,69,72,170,41,198, +202,135,121,93,27,97,52,77,39,91,8,206,84,0,128,189,247,206,33,1, +121,39,22,83,74,177,237,185,139,113,187,109,250,142,15,102,206,57,104,122, +89,55,105,219,170,42,16,39,3,117,142,23,117,255,235,167,238,246,220,47, +106,190,217,167,151,167,174,46,188,231,190,114,116,61,66,235,63,175,236,77, +7,4,192,65,187,201,152,15,203,161,183,99,196,48,230,174,24,5,31,90, +202,78,158,105,210,102,72,183,129,25,101,123,221,238,179,198,192,140,105,174, +237,84,224,178,92,51,200,124,39,187,63,63,255,78,198,159,231,143,163,42, +67,121,198,141,155,89,50,162,129,143,100,160,100,82,67,196,9,91,53,188, +242,40,118,189,119,68,187,220,60,54,206,113,69,116,0,74,57,119,16,216, +238,163,13,204,179,107,209,136,40,184,66,85,83,74,134,148,93,255,249,134, +187,218,143,153,77,234,144,141,16,60,56,159,206,72,148,105,211,6,191,43, +0,152,197,73,116,226,80,21,255,91,40,42,241,146,38,9,215,36,106,11, +33,244,77,155,82,114,142,0,217,113,64,36,0,154,213,139,16,194,46,238, +49,19,51,228,149,106,234,66,34,42,138,50,109,146,89,156,92,144,166,154, +65,179,132,104,166,154,82,110,199,76,50,90,20,133,38,201,161,196,52,78, +62,196,156,194,102,127,220,236,190,209,238,193,164,192,58,82,0,73,210,18, +250,28,58,222,39,66,172,223,187,255,135,31,124,96,47,95,63,126,242,244, +179,215,39,47,187,246,169,98,188,123,124,239,251,223,251,195,39,79,191,236, +250,184,92,46,171,242,240,206,241,123,31,125,244,209,175,126,253,183,102,248, +206,189,247,178,164,126,239,221,111,63,126,252,184,109,219,227,227,155,217,70, +6,196,8,134,72,100,168,160,41,201,46,203,197,229,166,134,75,98,145,46, +126,156,46,216,147,242,83,195,230,53,205,32,15,196,115,156,126,186,202,12, +144,59,5,140,0,41,243,238,1,208,200,1,51,101,172,200,43,121,14,44, +164,184,179,246,238,222,231,94,42,95,189,221,198,245,87,0,80,21,190,95, +191,149,245,27,139,157,159,205,67,40,145,49,158,174,251,211,147,70,201,10, +39,133,211,38,66,159,98,140,238,198,130,222,61,226,34,180,95,189,145,47, +94,66,197,3,25,12,16,71,195,100,172,120,80,207,182,253,150,152,220,141, +5,149,1,29,69,77,196,12,179,130,202,32,158,213,129,206,11,123,179,246, +125,98,162,53,165,249,53,222,140,111,90,246,250,104,18,64,4,58,5,33, +100,110,26,69,100,28,242,25,1,0,34,1,78,130,15,133,116,167,205,206, +247,197,19,64,119,239,41,60,33,78,166,1,156,185,63,206,149,253,61,65, +185,95,198,11,46,172,154,123,98,116,250,136,59,12,5,123,33,192,227,193, +48,152,204,44,198,174,40,42,85,137,209,166,141,237,128,113,51,67,82,176, +243,52,143,123,109,184,89,159,109,214,103,154,58,40,60,17,101,138,9,24, +127,187,219,236,217,144,178,55,109,167,87,200,101,138,224,130,209,59,156,115, +150,225,232,74,118,148,253,73,87,14,255,139,141,117,229,110,104,183,90,102, +22,83,116,206,133,16,16,57,38,245,222,207,151,135,243,197,193,108,126,80, +150,69,222,162,103,94,83,179,209,5,51,224,194,80,213,16,161,174,235,174, +107,97,96,91,26,172,3,83,151,168,166,118,187,46,235,122,94,151,73,7, +166,248,237,102,147,82,66,211,41,135,14,154,142,195,226,234,181,157,200,237, +118,192,212,205,36,156,151,14,38,67,212,40,2,132,206,135,216,67,76,233, +230,205,111,29,31,63,252,240,131,151,79,159,61,122,254,252,241,231,127,254, +231,69,241,167,159,124,242,201,182,89,255,236,239,158,44,23,55,15,14,110, +220,190,125,251,238,189,227,207,126,243,247,167,103,135,15,222,255,200,185,146, +153,143,143,239,62,122,252,155,47,31,253,234,254,123,31,148,101,9,96,93, +223,16,6,239,139,140,201,190,16,143,57,238,82,1,96,122,163,189,1,55, +93,191,163,253,229,235,247,34,141,118,191,165,241,53,13,224,66,42,169,189, +110,221,237,244,169,168,34,16,168,138,93,66,210,12,40,156,29,67,1,140, +251,142,245,221,165,46,2,178,151,152,200,243,250,229,150,22,183,60,195,22, +149,170,202,35,45,170,66,143,146,198,4,162,108,176,92,250,174,118,80,16, +50,161,82,136,2,119,111,201,251,92,172,250,136,38,4,230,92,201,206,250, +174,169,66,139,82,204,10,66,242,139,50,122,82,85,21,33,181,198,193,226, +225,221,52,43,91,211,186,42,241,206,13,31,130,58,231,244,186,36,203,191, +87,153,154,8,0,8,41,115,16,35,231,204,85,134,100,121,129,27,175,214, +73,176,32,194,206,106,183,187,157,50,160,33,20,108,234,23,28,119,178,123, +51,113,82,115,246,170,52,30,94,70,143,159,91,120,225,124,56,93,8,17, +155,136,3,242,25,85,117,147,146,118,73,196,228,4,93,106,73,19,149,101, +158,164,187,198,95,155,126,162,58,16,142,238,202,172,124,220,90,239,28,34, +123,102,84,21,118,14,144,187,216,79,56,108,202,14,111,51,3,83,84,102, +182,29,109,9,96,144,144,231,180,5,104,195,110,26,12,115,18,94,83,27, +155,203,121,239,215,155,85,229,203,223,161,127,247,203,249,155,95,20,127,34, +130,8,222,23,135,135,55,15,111,223,174,234,101,215,71,102,215,182,107,17, +89,28,30,64,206,212,129,131,86,161,35,177,61,17,23,69,193,204,0,172, +35,17,224,174,154,83,149,161,143,169,239,187,130,92,140,146,82,10,206,37, +21,147,33,81,116,214,242,108,26,25,215,108,227,70,25,58,101,137,30,58, +219,65,21,165,71,0,131,36,154,208,19,33,118,177,67,114,85,53,239,186, +216,181,169,42,239,126,252,237,227,143,63,250,193,171,215,207,159,61,249,155, +167,79,94,205,234,195,123,199,55,79,87,103,95,126,249,229,118,45,183,111, +189,123,255,193,252,139,207,31,191,248,171,199,239,220,253,192,251,130,157,204, +22,240,232,241,227,23,127,245,234,206,157,59,117,61,23,177,80,212,203,197, +97,81,84,142,249,50,155,192,229,113,124,113,172,95,109,121,216,197,109,237, +125,107,166,147,224,155,174,199,177,97,47,253,234,194,172,24,11,157,91,163, +71,164,113,110,243,156,227,42,47,36,217,135,155,151,229,206,140,202,210,249, +224,197,42,239,155,245,169,83,143,144,152,177,67,91,91,207,14,74,23,48, +185,72,166,193,173,250,84,145,11,134,98,214,144,166,2,216,216,33,73,17, +148,193,28,245,102,68,14,76,205,144,21,99,137,108,32,158,146,9,33,58, +231,74,163,6,82,119,88,122,34,18,13,200,253,173,121,219,70,69,46,191, +113,248,236,111,47,187,237,131,136,8,57,149,27,146,193,196,180,113,222,15, +163,6,52,201,56,26,217,159,96,218,99,78,35,247,226,157,167,166,182,175, +181,78,92,249,195,235,190,189,124,114,119,221,154,58,81,85,51,119,206,174, +91,35,23,85,33,202,51,116,16,58,67,122,47,0,51,153,70,215,52,192, +46,171,105,249,113,177,235,144,204,33,169,37,53,97,100,64,83,85,25,5, +253,222,84,221,29,222,187,55,204,89,128,114,5,38,215,51,162,33,120,21, +16,17,33,67,68,254,159,255,213,255,65,138,196,112,37,96,201,242,158,25, +1,51,190,98,68,217,100,94,113,0,83,211,252,49,99,48,76,250,182,237, +4,17,200,47,111,31,223,189,247,110,89,213,98,186,152,149,93,183,45,11, +207,4,177,107,29,1,129,161,169,136,32,24,17,100,207,151,129,137,153,15, +69,187,93,137,8,123,74,146,36,69,68,146,100,166,228,216,119,113,91,148, +222,16,3,87,165,47,85,250,179,211,151,210,174,153,16,33,99,154,96,106, +26,4,70,160,171,254,192,84,9,7,240,81,198,3,169,136,162,98,70,61, +1,34,48,26,129,33,35,147,129,166,72,160,142,209,57,135,192,0,190,42, +15,239,222,253,232,206,157,135,193,87,111,222,188,214,216,164,238,236,205,171, +207,0,222,222,188,243,233,195,135,159,204,23,55,54,219,182,40,103,183,142, +239,207,230,247,222,125,247,187,62,192,106,219,133,186,190,121,231,222,108,121, +232,125,161,106,140,62,246,157,47,189,11,190,147,168,104,25,135,1,134,228, +16,193,2,17,71,113,73,60,162,243,174,215,196,206,171,89,47,66,206,41, +24,17,138,42,33,218,144,169,81,115,150,98,100,52,48,1,165,209,109,56, +254,217,144,5,38,111,199,8,70,84,249,208,116,140,144,44,25,80,152,29, +250,176,140,61,136,69,192,6,4,157,175,136,28,26,245,125,203,14,141,208, +60,89,215,195,176,115,190,32,142,201,121,19,3,193,164,202,179,208,198,141, +246,141,147,152,12,76,213,1,18,115,66,27,80,106,73,136,152,20,80,84, +69,92,17,250,24,25,201,84,251,202,131,89,32,103,102,91,77,82,48,32, +122,36,23,161,112,129,5,12,49,2,32,113,82,171,192,145,88,50,83,132, +200,192,72,162,130,8,10,10,72,201,84,76,5,193,8,213,81,147,122,99, +42,20,59,212,228,169,145,168,8,222,249,24,35,120,206,13,74,232,0,40, +147,98,128,89,89,120,172,103,10,98,172,232,128,88,61,171,71,33,237,8, +5,137,36,65,49,171,21,205,72,145,193,136,32,38,239,189,17,101,156,7, +177,243,133,143,146,12,140,56,135,126,25,123,143,76,73,13,217,57,53,118, +46,17,128,39,113,24,83,244,14,153,48,145,69,84,1,85,202,126,94,67, +85,54,163,130,72,197,155,149,68,32,9,200,160,228,173,116,108,174,55,179, +170,232,69,130,15,41,137,5,223,49,6,145,220,228,25,220,7,102,96,10, +150,145,34,64,72,8,40,41,153,154,99,151,25,199,68,39,150,123,179,12, +30,65,100,32,64,51,138,106,22,194,12,193,109,55,107,132,20,170,25,33, +48,40,3,248,129,108,201,33,103,34,126,38,34,38,159,36,50,106,17,168, +109,86,219,179,147,60,244,136,156,227,128,134,160,22,152,189,115,132,3,246, +147,145,64,205,84,17,32,103,28,154,242,14,101,208,42,1,58,38,19,117, +204,222,185,12,135,245,236,24,9,65,251,174,97,2,239,168,8,206,137,8, +92,244,88,95,183,8,236,158,204,162,23,46,102,156,204,203,66,206,136,230, +184,152,205,102,69,81,56,231,208,32,198,152,105,150,67,8,56,226,128,204, +204,123,63,253,118,87,252,123,95,76,62,151,108,4,204,250,105,215,117,136, +216,117,221,204,87,72,166,42,69,8,151,197,255,111,45,211,250,131,23,49, +156,116,93,230,73,211,161,26,102,83,206,95,102,86,227,122,81,206,151,7, +71,119,239,245,237,250,237,219,87,79,159,60,250,234,245,233,231,95,254,219, +197,108,126,231,206,221,218,151,171,23,47,87,207,126,115,116,116,116,120,120, +243,193,209,237,218,240,228,205,233,219,179,230,232,246,113,189,60,76,73,165, +235,202,217,50,38,105,187,142,217,121,207,18,19,153,57,134,148,114,171,74, +58,89,111,94,190,9,117,53,187,115,139,43,103,77,95,134,16,152,208,48, +230,84,3,2,33,184,56,146,181,41,216,180,56,59,98,212,253,126,28,117, +189,201,32,116,158,61,221,204,16,144,145,100,218,184,77,84,107,131,197,29, +204,12,84,108,76,121,124,157,238,97,57,181,13,32,3,89,23,211,217,6, +222,158,245,167,39,116,22,29,18,2,36,17,32,128,186,168,111,30,148,7, +139,23,165,5,164,146,184,219,54,132,49,16,97,54,130,108,219,156,45,109, +88,133,12,57,74,183,218,200,225,124,155,122,23,21,74,87,1,211,54,74, +233,58,176,50,27,129,9,96,136,238,100,49,99,199,24,205,19,151,200,194, +152,86,91,156,151,65,57,118,82,10,89,64,18,42,149,217,123,223,27,110, +34,179,143,57,21,14,66,198,137,100,147,28,160,170,106,32,194,40,113,125, +150,78,54,186,222,114,219,59,133,21,71,95,213,174,154,215,247,223,13,179, +153,5,142,162,93,74,88,56,85,113,96,72,104,72,146,162,74,63,47,10, +167,67,10,105,231,188,26,164,148,202,204,82,237,188,154,5,53,141,82,122, +79,62,104,18,102,156,181,42,76,145,192,114,212,203,182,235,94,159,110,222, +158,22,73,77,196,68,193,49,150,190,188,121,48,191,115,43,144,115,2,234, +157,138,137,161,235,162,23,147,62,209,190,249,23,166,25,68,116,69,164,218, +116,129,13,153,227,206,167,5,179,211,17,12,157,175,97,102,49,20,77,153, +211,30,199,223,102,75,154,40,128,153,154,101,159,47,33,100,144,83,89,150, +54,242,54,78,215,19,81,78,59,145,31,54,56,34,156,35,162,235,40,65, +167,159,231,154,100,87,70,74,137,153,199,28,220,160,170,206,33,184,50,200, +117,33,75,191,173,236,41,204,68,84,20,5,169,21,161,94,46,151,101,89, +170,33,0,166,190,11,33,108,54,155,140,203,203,233,165,189,247,58,130,14, +51,177,87,78,109,7,0,69,81,164,212,103,14,209,236,135,214,33,21,19, +120,239,187,190,41,101,193,73,84,193,151,36,18,247,44,5,95,191,5,216, +171,255,229,221,226,117,175,185,183,19,84,213,222,23,146,122,85,13,126,198, +92,29,47,143,238,62,248,228,244,244,52,110,191,252,226,139,47,158,189,124, +17,156,59,92,30,116,77,251,234,101,251,250,213,227,249,221,251,165,15,161, +192,147,215,47,78,94,63,55,98,87,21,71,119,238,45,217,249,178,114,90, +56,114,78,9,68,60,2,73,220,250,0,236,9,168,4,92,191,57,241,69, +208,194,165,130,189,34,48,197,20,145,72,137,145,41,146,37,214,74,179,135, +94,153,178,157,28,49,103,189,186,196,227,152,75,118,99,101,171,95,166,24, +200,43,40,154,10,34,224,16,102,52,232,134,6,136,67,162,191,76,1,132, +106,198,95,39,245,178,203,207,12,152,217,25,114,47,190,183,230,237,38,124, +244,62,123,7,76,133,119,46,132,190,239,87,171,213,219,211,55,184,188,41, +109,236,163,110,87,39,24,131,63,152,43,170,34,176,67,32,108,98,175,142, +140,16,204,88,85,154,38,28,45,82,146,74,96,75,154,54,91,125,242,154, +222,189,165,165,35,117,150,37,63,145,169,150,101,189,222,110,68,213,49,118, +36,218,54,27,103,253,219,55,179,242,118,153,76,37,246,17,250,16,156,36, +175,6,142,187,237,182,93,159,186,57,33,5,184,188,84,32,206,128,41,170, +172,26,215,74,121,176,164,123,183,212,145,121,190,167,186,110,187,211,109,219, +250,36,46,97,192,46,165,206,196,131,16,97,151,18,136,206,234,170,221,110, +95,159,158,222,127,231,221,87,167,111,17,177,174,235,156,249,151,152,216,97, +74,169,9,142,16,157,48,246,230,24,145,121,211,181,142,193,215,161,105,26, +52,116,236,55,235,245,230,205,73,93,148,223,250,254,167,91,237,28,51,68, +233,218,118,219,52,86,120,37,84,52,161,100,72,109,76,158,24,0,138,34, +244,168,10,136,113,223,184,54,149,105,120,95,181,83,62,207,98,49,240,194, +101,67,155,169,25,158,3,54,205,8,144,8,105,28,23,38,106,78,81,141, +70,70,24,51,243,68,72,216,117,155,174,111,253,69,189,7,0,178,193,36, +132,48,65,240,198,237,234,215,41,55,19,50,38,198,104,102,217,131,154,235, +159,189,97,153,34,196,133,16,98,140,95,111,255,186,108,63,186,172,3,102, +241,236,189,71,114,152,164,44,203,170,170,136,40,69,1,226,236,141,158,182, +232,211,91,77,58,218,110,163,3,128,247,133,115,93,106,19,12,156,92,138, +100,38,192,204,4,154,82,234,250,6,33,48,123,85,211,212,79,222,225,235, +170,189,87,108,244,97,239,94,198,124,41,57,251,88,104,204,101,149,145,104, +0,144,115,203,213,194,25,47,62,227,208,52,77,179,89,87,85,85,247,222, +31,124,56,255,232,94,25,252,233,201,201,234,205,155,213,233,35,35,19,137, +79,222,252,237,7,239,190,247,209,251,15,223,59,60,92,157,109,94,173,78, +54,177,241,46,185,144,130,151,46,41,36,140,34,221,166,81,84,144,168,183, +156,3,140,93,75,6,60,43,139,197,76,146,192,89,239,140,226,182,81,83, +31,66,146,228,138,224,29,101,62,141,216,245,41,165,16,66,40,11,35,84, +85,83,3,186,130,126,214,70,244,201,104,151,201,125,49,104,139,196,134,96, +142,145,208,152,153,209,192,52,51,113,187,49,15,39,0,48,242,117,164,126, +0,67,46,249,164,226,29,11,35,122,87,47,230,82,149,93,192,162,10,66, +160,96,4,49,65,50,207,243,170,228,173,166,179,45,118,98,103,141,19,152, +85,214,246,157,170,186,121,5,154,82,236,125,168,4,161,223,108,125,15,212, +246,214,244,210,247,46,49,150,5,17,217,166,43,163,37,77,125,236,185,240, +190,12,132,212,54,107,194,160,219,46,84,37,111,59,157,121,80,163,121,181, +56,88,150,117,77,111,223,186,166,113,117,141,0,208,244,214,137,17,74,211, +185,94,74,246,221,16,141,191,59,172,0,209,84,21,72,251,64,88,22,116, +184,32,231,54,237,186,79,77,212,132,133,171,234,101,61,159,137,152,172,54, +214,108,11,178,89,40,218,182,157,133,64,0,188,237,93,2,138,74,175,79, +230,149,39,162,58,132,117,179,85,213,122,62,111,183,219,77,179,181,91,55, +60,176,110,182,133,0,245,146,44,89,234,66,240,171,102,237,157,67,196,216, +183,193,81,125,247,200,19,111,165,93,5,96,16,96,193,218,135,121,225,139, +16,17,78,86,103,135,201,176,240,38,137,139,162,61,219,104,8,66,224,103, +149,94,26,13,56,228,187,72,26,179,234,33,0,0,5,61,73,68,65,84, +152,23,75,132,137,49,126,156,152,231,128,36,192,33,225,74,150,122,128,231, +98,193,57,151,34,0,128,35,50,197,108,95,177,156,211,114,0,51,163,101, +111,13,33,128,73,74,18,19,158,55,242,5,112,200,174,100,152,4,244,100, +58,188,92,166,244,211,57,3,109,22,59,125,223,103,222,128,172,86,3,228, +196,24,118,238,45,250,221,203,101,153,130,136,236,28,146,75,150,195,80,220, +96,10,37,174,170,74,68,234,186,206,194,34,39,93,54,51,98,48,211,76, +223,102,166,58,33,72,216,123,95,116,93,99,0,0,58,236,85,80,201,40, +165,132,106,177,235,29,247,117,85,245,113,35,210,243,142,32,190,120,112,181, +56,207,59,113,28,115,160,76,59,214,164,215,102,159,185,114,145,121,249,179, +159,45,231,7,204,140,243,57,119,81,78,79,99,40,77,68,231,51,236,165, +77,61,117,250,221,59,31,63,168,238,190,126,249,226,171,231,207,169,134,47, +127,244,243,231,63,250,5,37,61,58,186,117,227,206,81,191,222,190,249,213, +231,175,142,94,207,234,131,89,125,243,112,126,156,162,108,78,207,58,195,89, +93,214,235,190,114,161,223,118,222,123,152,205,74,231,86,47,222,240,186,137, +236,186,174,43,67,8,85,181,62,121,155,202,176,188,117,163,152,213,77,80, +48,201,188,38,56,162,40,0,140,175,76,89,139,168,176,11,190,203,3,23, +50,78,5,193,72,179,162,13,142,177,7,192,76,244,172,2,160,99,162,21, +35,34,219,117,64,94,44,52,218,129,34,168,33,54,1,11,242,253,65,137, +175,86,161,86,52,232,83,84,48,53,193,224,120,89,184,103,167,105,189,1, +226,26,24,147,209,186,195,183,103,46,74,60,104,83,74,106,86,221,241,73, +245,237,139,55,174,85,222,244,253,98,213,110,182,219,196,177,190,25,234,130, +171,146,218,40,39,171,13,104,117,243,160,114,78,53,173,94,191,181,117,219, +246,93,96,183,254,242,185,45,43,138,34,178,172,78,187,40,22,191,120,166, +170,116,195,44,182,221,233,70,218,164,203,202,54,173,239,213,221,238,226,188, +24,181,223,243,1,192,72,82,51,38,226,179,152,222,174,219,87,43,42,216, +149,190,158,87,221,203,87,102,100,20,52,108,161,21,78,18,154,38,16,191, +194,134,137,132,157,244,113,94,149,129,152,222,172,227,186,219,178,86,85,197, +135,114,246,228,73,219,182,253,114,217,197,254,240,240,176,62,32,234,211,155, +207,191,50,181,86,116,211,53,90,80,186,217,156,157,156,133,121,125,112,247, +232,96,185,88,173,86,175,30,61,165,94,110,205,151,188,244,14,48,53,157, +118,209,68,153,156,3,156,109,183,43,233,195,188,54,38,40,171,213,243,23, +140,228,235,114,241,238,189,102,62,233,176,163,174,71,134,100,26,117,82,142, +46,34,138,51,199,103,134,22,2,216,96,191,205,59,81,32,102,242,57,213, +84,81,20,41,54,41,37,207,108,153,76,13,21,80,153,57,51,147,18,49, +106,246,7,160,196,62,198,136,136,126,148,21,54,18,154,230,106,100,139,214, +100,96,57,183,180,92,83,66,8,19,108,101,52,29,184,186,174,17,49,39, +200,246,222,19,145,67,83,231,220,229,172,52,123,115,126,239,204,36,41,38, +245,109,244,60,13,215,59,231,240,98,90,144,24,99,22,210,121,123,155,239, +57,196,36,12,76,216,104,163,113,13,209,66,8,206,185,76,137,158,73,92, +6,195,194,192,133,169,18,35,17,244,237,58,166,142,241,26,86,203,235,223, +104,87,93,157,86,149,235,174,183,145,27,108,215,174,23,66,56,184,127,52, +159,207,219,182,61,139,157,56,225,27,117,168,107,85,173,23,243,205,25,134, +16,98,223,174,210,22,107,190,255,233,71,55,238,223,41,110,47,207,222,188, +150,174,255,252,87,191,124,117,122,210,157,173,48,184,217,114,121,218,172,158, +159,158,20,197,43,185,187,125,231,248,253,69,125,111,115,186,149,78,94,191, +124,117,80,207,209,76,11,135,55,231,61,177,157,185,34,22,110,57,135,205, +198,179,43,138,178,236,43,40,188,43,11,42,188,65,114,193,59,240,204,172, +227,144,101,230,100,87,119,34,218,144,29,202,46,32,90,148,76,25,73,8, +156,203,73,114,133,8,6,2,36,27,8,124,178,235,142,136,210,245,58,181, +152,57,68,71,172,6,64,100,158,91,82,57,168,10,12,107,145,182,109,13, +173,172,235,194,123,32,4,71,91,15,50,11,26,188,121,238,65,123,103,82, +113,89,122,55,171,181,237,152,201,87,149,169,248,197,140,75,152,31,240,154, +201,124,0,38,32,76,4,180,40,5,129,16,151,7,135,84,22,72,132,0, +179,249,188,244,129,10,239,203,2,238,221,198,210,235,233,22,5,152,89,137, +252,237,131,250,112,153,214,13,20,236,22,117,81,129,86,30,188,167,168,209, +33,49,152,101,173,199,112,52,130,34,153,72,12,33,132,227,155,184,168,177, +105,229,108,43,47,79,237,213,138,111,21,101,53,171,170,5,2,109,86,91, +16,117,203,178,174,235,91,46,53,77,83,132,144,186,126,211,53,88,85,229, +204,175,215,235,195,131,69,211,52,235,212,251,89,117,112,116,107,113,176,60, +61,61,93,30,30,10,168,129,116,218,47,102,75,199,72,169,224,170,8,243, +218,45,23,190,46,149,112,213,110,195,172,250,214,247,62,233,215,219,211,215, +111,240,201,155,228,24,8,171,249,172,62,88,112,240,219,174,109,222,164,57, +84,230,57,129,113,93,204,111,221,240,196,24,92,152,215,45,94,193,125,253, +53,131,127,80,229,70,142,251,60,89,45,39,235,24,39,212,52,216,0,128, +64,137,188,41,66,222,5,139,34,25,10,16,35,130,34,177,153,129,137,136, +196,216,159,163,122,70,209,6,0,89,120,141,185,129,134,73,58,137,197,235, +24,92,114,164,86,86,185,178,164,219,93,174,166,189,218,255,15,215,83,217, +167,3,60,157,217,0,0,0,0,73,69,78,68,174,66,96,130 +}; diff --git a/ediv/ideQT/gif/alarm.gif b/ediv/ideQT/gif/alarm.gif new file mode 100644 index 0000000..48e2bed Binary files /dev/null and b/ediv/ideQT/gif/alarm.gif differ diff --git a/ediv/ideQT/gif/alarm.h b/ediv/ideQT/gif/alarm.h new file mode 100644 index 0000000..719cc17 --- /dev/null +++ b/ediv/ideQT/gif/alarm.h @@ -0,0 +1,10 @@ +static unsigned char alarm_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,6,0,128,0,0,127,127,127,191, +191,191,255,0,0,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,87,104,186,213, +251,42,56,83,84,11,175,4,33,180,231,146,197,129,210,54,134,5,216,172, +141,16,160,236,32,203,108,101,21,131,64,20,132,48,76,17,92,103,183,243, +105,24,50,130,146,167,164,33,153,196,29,206,70,73,70,155,191,133,36,7, +77,253,48,12,33,209,72,85,0,86,191,95,3,144,41,176,107,134,115,25, +66,95,36,0,0,59 +}; diff --git a/ediv/ideQT/gif/animatn.gif b/ediv/ideQT/gif/animatn.gif new file mode 100644 index 0000000..75e6212 Binary files /dev/null and b/ediv/ideQT/gif/animatn.gif differ diff --git a/ediv/ideQT/gif/animatn.h b/ediv/ideQT/gif/animatn.h new file mode 100644 index 0000000..9fa2bd7 --- /dev/null +++ b/ediv/ideQT/gif/animatn.h @@ -0,0 +1,8 @@ +static unsigned char animatn_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,127,127,127,255,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,60,148,143,105,35,236,13,159,154,107,216,219,46,190,33,216, +108,117,78,232,141,36,227,137,159,86,54,157,154,189,93,156,58,105,123,174, +121,3,4,189,222,251,185,66,186,82,79,80,26,224,146,3,0,229,25,137, +62,70,208,68,1,0,59 +}; diff --git a/ediv/ideQT/gif/arrow1d.gif b/ediv/ideQT/gif/arrow1d.gif new file mode 100644 index 0000000..542e4ce Binary files /dev/null and b/ediv/ideQT/gif/arrow1d.gif differ diff --git a/ediv/ideQT/gif/arrow1d.h b/ediv/ideQT/gif/arrow1d.h new file mode 100644 index 0000000..79e2b6c --- /dev/null +++ b/ediv/ideQT/gif/arrow1d.h @@ -0,0 +1,7 @@ +static unsigned char arrow1d_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,255,0,0,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,36,148,31,121,203,18,16,154,124,81,50,106,47,204,11,231, +148,64,224,4,148,230,70,158,85,106,174,172,251,114,134,39,211,181,220,89, +5,0,59 +}; diff --git a/ediv/ideQT/gif/arrow1dl.gif b/ediv/ideQT/gif/arrow1dl.gif new file mode 100644 index 0000000..e08a01e Binary files /dev/null and b/ediv/ideQT/gif/arrow1dl.gif differ diff --git a/ediv/ideQT/gif/arrow1dl.h b/ediv/ideQT/gif/arrow1dl.h new file mode 100644 index 0000000..65e8a57 --- /dev/null +++ b/ediv/ideQT/gif/arrow1dl.h @@ -0,0 +1,7 @@ +static unsigned char arrow1dl_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,127,127,127,255,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,44,156,143,169,10,2,155,90,16,235,25,233,150,160,216,42, +49,129,153,22,148,147,247,153,19,52,128,234,74,170,27,106,184,229,198,186, +120,30,178,199,238,11,10,125,5,0,59 +}; diff --git a/ediv/ideQT/gif/arrow1dr.gif b/ediv/ideQT/gif/arrow1dr.gif new file mode 100644 index 0000000..b67481f Binary files /dev/null and b/ediv/ideQT/gif/arrow1dr.gif differ diff --git a/ediv/ideQT/gif/arrow1dr.h b/ediv/ideQT/gif/arrow1dr.h new file mode 100644 index 0000000..f3a6483 --- /dev/null +++ b/ediv/ideQT/gif/arrow1dr.h @@ -0,0 +1,7 @@ +static unsigned char arrow1dr_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,127,127,127,255,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,44,156,143,105,32,160,47,66,123,137,73,183,168,157,66,208, +177,69,222,103,5,230,72,69,166,244,169,43,171,48,238,249,13,221,139,166, +106,222,138,53,210,249,9,127,5,0,59 +}; diff --git a/ediv/ideQT/gif/arrow1l.gif b/ediv/ideQT/gif/arrow1l.gif new file mode 100644 index 0000000..d76cec1 Binary files /dev/null and b/ediv/ideQT/gif/arrow1l.gif differ diff --git a/ediv/ideQT/gif/arrow1l.h b/ediv/ideQT/gif/arrow1l.h new file mode 100644 index 0000000..026874e --- /dev/null +++ b/ediv/ideQT/gif/arrow1l.h @@ -0,0 +1,7 @@ +static unsigned char arrow1l_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,255,0,0,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,35,148,143,169,203,237,18,194,131,1,200,22,129,190,42,235, +29,133,225,71,150,150,225,125,98,136,164,28,86,189,78,52,213,246,141,23, +0,59 +}; diff --git a/ediv/ideQT/gif/arrow1r.gif b/ediv/ideQT/gif/arrow1r.gif new file mode 100644 index 0000000..48004cd Binary files /dev/null and b/ediv/ideQT/gif/arrow1r.gif differ diff --git a/ediv/ideQT/gif/arrow1r.h b/ediv/ideQT/gif/arrow1r.h new file mode 100644 index 0000000..bb49641 --- /dev/null +++ b/ediv/ideQT/gif/arrow1r.h @@ -0,0 +1,7 @@ +static unsigned char arrow1r_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,255,0,0,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,35,148,143,169,203,221,17,28,10,0,74,65,65,141,7,122, +168,133,22,22,150,230,246,121,230,168,100,155,67,177,15,119,213,246,141,23, +0,59 +}; diff --git a/ediv/ideQT/gif/arrow1u.gif b/ediv/ideQT/gif/arrow1u.gif new file mode 100644 index 0000000..3e28b10 Binary files /dev/null and b/ediv/ideQT/gif/arrow1u.gif differ diff --git a/ediv/ideQT/gif/arrow1u.h b/ediv/ideQT/gif/arrow1u.h new file mode 100644 index 0000000..f561e8e --- /dev/null +++ b/ediv/ideQT/gif/arrow1u.h @@ -0,0 +1,7 @@ +static unsigned char arrow1u_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,255,0,0,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,40,148,47,129,203,202,31,128,123,40,78,154,128,190,80,75, +156,121,31,21,137,220,81,138,227,18,180,150,11,90,32,186,198,53,38,207, +217,9,181,79,1,0,59 +}; diff --git a/ediv/ideQT/gif/arrow1ul.gif b/ediv/ideQT/gif/arrow1ul.gif new file mode 100644 index 0000000..49448ec Binary files /dev/null and b/ediv/ideQT/gif/arrow1ul.gif differ diff --git a/ediv/ideQT/gif/arrow1ul.h b/ediv/ideQT/gif/arrow1ul.h new file mode 100644 index 0000000..7bd778c --- /dev/null +++ b/ediv/ideQT/gif/arrow1ul.h @@ -0,0 +1,7 @@ +static unsigned char arrow1ul_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,127,127,127,255,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,43,156,143,105,34,234,35,2,123,41,202,70,97,216,55,91, +206,0,206,7,82,36,246,156,162,121,73,235,216,0,145,240,38,175,236,102, +6,142,102,114,173,11,58,10,0,59 +}; diff --git a/ediv/ideQT/gif/arrow1ur.gif b/ediv/ideQT/gif/arrow1ur.gif new file mode 100644 index 0000000..e113668 Binary files /dev/null and b/ediv/ideQT/gif/arrow1ur.gif differ diff --git a/ediv/ideQT/gif/arrow1ur.h b/ediv/ideQT/gif/arrow1ur.h new file mode 100644 index 0000000..8380bfb --- /dev/null +++ b/ediv/ideQT/gif/arrow1ur.h @@ -0,0 +1,7 @@ +static unsigned char arrow1ur_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,127,127,127,255,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,43,156,143,169,43,178,217,130,123,35,74,106,195,77,32,235, +169,8,218,184,49,36,168,116,231,163,70,40,210,2,213,107,196,135,28,74, +56,53,116,59,15,12,62,10,0,59 +}; diff --git a/ediv/ideQT/gif/arrow3d.gif b/ediv/ideQT/gif/arrow3d.gif new file mode 100644 index 0000000..a7ef9ba Binary files /dev/null and b/ediv/ideQT/gif/arrow3d.gif differ diff --git a/ediv/ideQT/gif/arrow3d.h b/ediv/ideQT/gif/arrow3d.h new file mode 100644 index 0000000..9be294a --- /dev/null +++ b/ediv/ideQT/gif/arrow3d.h @@ -0,0 +1,8 @@ +static unsigned char arrow3d_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,0,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,54,72,74,211, +238,43,62,39,70,92,243,93,53,128,255,214,198,100,225,54,8,1,90,137, +140,154,166,165,20,12,47,26,99,149,187,138,205,236,223,146,220,9,136,249, +17,113,13,150,236,120,25,42,155,202,4,0,59 +}; diff --git a/ediv/ideQT/gif/arrow3l.gif b/ediv/ideQT/gif/arrow3l.gif new file mode 100644 index 0000000..d28b4e9 Binary files /dev/null and b/ediv/ideQT/gif/arrow3l.gif differ diff --git a/ediv/ideQT/gif/arrow3l.h b/ediv/ideQT/gif/arrow3l.h new file mode 100644 index 0000000..4b3c7be --- /dev/null +++ b/ediv/ideQT/gif/arrow3l.h @@ -0,0 +1,8 @@ +static unsigned char arrow3l_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,0,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,49,72,186,220, +254,48,202,65,165,26,34,8,202,7,233,157,54,0,93,102,106,232,200,125, +32,186,145,213,229,166,176,183,112,174,26,95,231,166,219,183,14,11,3,156, +236,44,200,100,36,1,0,59 +}; diff --git a/ediv/ideQT/gif/arrow3r.gif b/ediv/ideQT/gif/arrow3r.gif new file mode 100644 index 0000000..1c405fd Binary files /dev/null and b/ediv/ideQT/gif/arrow3r.gif differ diff --git a/ediv/ideQT/gif/arrow3r.h b/ediv/ideQT/gif/arrow3r.h new file mode 100644 index 0000000..05d3fec --- /dev/null +++ b/ediv/ideQT/gif/arrow3r.h @@ -0,0 +1,8 @@ +static unsigned char arrow3r_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,0,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,47,72,186,220, +254,48,198,65,31,189,67,4,49,220,5,89,128,97,196,55,108,168,166,98, +160,42,142,37,5,166,104,167,152,238,197,152,225,186,115,21,216,174,34,41, +26,143,200,4,0,59 +}; diff --git a/ediv/ideQT/gif/arrow3u.gif b/ediv/ideQT/gif/arrow3u.gif new file mode 100644 index 0000000..a7d201d Binary files /dev/null and b/ediv/ideQT/gif/arrow3u.gif differ diff --git a/ediv/ideQT/gif/arrow3u.h b/ediv/ideQT/gif/arrow3u.h new file mode 100644 index 0000000..42dd496 --- /dev/null +++ b/ediv/ideQT/gif/arrow3u.h @@ -0,0 +1,8 @@ +static unsigned char arrow3u_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,0,255,255,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,53,72,186,59, +252,111,8,7,225,8,180,54,153,235,184,160,70,112,211,36,130,24,214,49, +82,32,184,156,231,206,161,245,222,176,214,222,235,246,253,61,197,0,64,44, +6,129,72,207,4,121,100,126,24,9,0,59 +}; diff --git a/ediv/ideQT/gif/arrowleft.h b/ediv/ideQT/gif/arrowleft.h new file mode 100644 index 0000000..1bf1a1c --- /dev/null +++ b/ediv/ideQT/gif/arrowleft.h @@ -0,0 +1,55 @@ +static unsigned char arrowleft_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,255,255,255,255,255,204,255, +255,153,255,255,102,255,255,51,255,255,0,255,204,255,255,204,204,255,204,153, +255,204,102,255,204,51,255,204,0,255,153,255,255,153,204,255,153,153,255,153, +102,255,153,51,255,153,0,255,102,255,255,102,204,255,102,153,255,102,102,255, +102,51,255,102,0,255,51,255,255,51,204,255,51,153,255,51,102,255,51,51, +255,51,0,255,0,255,255,0,204,255,0,153,255,0,102,255,0,51,255,0, +0,204,255,255,204,255,204,204,255,153,204,255,102,204,255,51,204,255,0,204, +204,255,204,204,204,204,204,153,204,204,102,204,204,51,204,204,0,204,153,255, +204,153,204,204,153,153,204,153,102,204,153,51,204,153,0,204,102,255,204,102, +204,204,102,153,204,102,102,204,102,51,204,102,0,204,51,255,204,51,204,204, +51,153,204,51,102,204,51,51,204,51,0,204,0,255,204,0,204,204,0,153, +204,0,102,204,0,51,204,0,0,153,255,255,153,255,204,153,255,153,153,255, +102,153,255,51,153,255,0,153,204,255,153,204,204,153,204,153,153,204,102,153, +204,51,153,204,0,153,153,255,153,153,204,153,153,153,153,153,102,153,153,51, +153,153,0,153,102,255,153,102,204,153,102,153,153,102,102,153,102,51,153,102, +0,153,51,255,153,51,204,153,51,153,153,51,102,153,51,51,153,51,0,153, +0,255,153,0,204,153,0,153,153,0,102,153,0,51,153,0,0,102,255,255, +102,255,204,102,255,153,102,255,102,102,255,51,102,255,0,102,204,255,102,204, +204,102,204,153,102,204,102,102,204,51,102,204,0,102,153,255,102,153,204,102, +153,153,102,153,102,102,153,51,102,153,0,102,102,255,102,102,204,102,102,153, +102,102,102,102,102,51,102,102,0,102,51,255,102,51,204,102,51,153,102,51, +102,102,51,51,102,51,0,102,0,255,102,0,204,102,0,153,102,0,102,102, +0,51,102,0,0,51,255,255,51,255,204,51,255,153,51,255,102,51,255,51, +51,255,0,51,204,255,51,204,204,51,204,153,51,204,102,51,204,51,51,204, +0,51,153,255,51,153,204,51,153,153,51,153,102,51,153,51,51,153,0,51, +102,255,51,102,204,51,102,153,51,102,102,51,102,51,51,102,0,51,51,255, +51,51,204,51,51,153,51,51,102,51,51,51,51,51,0,51,0,255,51,0, +204,51,0,153,51,0,102,51,0,51,51,0,0,0,255,255,0,255,204,0, +255,153,0,255,102,0,255,51,0,255,0,0,204,255,0,204,204,0,204,153, +0,204,102,0,204,51,0,204,0,0,153,255,0,153,204,0,153,153,0,153, +102,0,153,51,0,153,0,0,102,255,0,102,204,0,102,153,0,102,102,0, +102,51,0,102,0,0,51,255,0,51,204,0,51,153,0,51,102,0,51,51, +0,51,0,0,0,255,0,0,204,0,0,153,0,0,102,0,0,51,238,0, +0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0,0,68, +0,0,34,0,0,17,0,0,0,238,0,0,221,0,0,187,0,0,170,0, +0,136,0,0,119,0,0,85,0,0,68,0,0,34,0,0,17,0,0,0, +238,0,0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0, +0,68,0,0,34,0,0,17,238,238,238,221,221,221,187,187,187,170,170,170, +136,136,136,119,119,119,85,85,85,68,68,68,34,34,34,17,17,17,0,0, +0,33,249,4,1,0,0,0,0,44,0,0,0,0,32,0,32,0,7,8, +247,0,1,8,28,72,176,160,193,131,8,19,42,92,200,176,161,67,129,255, +254,61,116,24,81,226,196,133,21,35,94,76,88,113,196,26,139,27,11,86, +188,54,2,27,200,144,16,35,94,227,48,98,132,70,148,0,70,142,64,208, +210,219,201,139,35,59,4,104,57,98,27,200,140,64,95,18,148,25,160,2, +207,107,21,191,205,250,214,141,219,54,110,216,162,114,187,25,243,31,201,0, +52,121,106,221,202,85,104,85,146,8,2,116,224,74,86,235,17,151,63,255, +181,12,107,161,172,91,143,35,108,166,156,213,242,65,209,183,101,185,121,212, +152,113,77,203,4,120,201,110,187,134,52,237,191,111,36,223,94,203,150,237, +200,26,109,143,185,157,245,90,245,159,222,192,132,143,28,201,166,237,236,55, +170,25,177,113,125,36,57,177,96,202,41,255,117,219,106,51,35,211,109,217, +68,143,40,204,49,98,54,158,217,130,6,109,173,48,41,79,170,149,51,50, +172,232,247,17,112,145,13,147,106,59,142,82,56,204,131,206,159,27,68,45, +189,186,245,235,216,19,6,4,0,59 +}; diff --git a/ediv/ideQT/gif/arrowleft2.h b/ediv/ideQT/gif/arrowleft2.h new file mode 100644 index 0000000..1ed1536 --- /dev/null +++ b/ediv/ideQT/gif/arrowleft2.h @@ -0,0 +1,59 @@ +static unsigned char arrowleft2_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,255,255,255,255,255,204,255, +255,153,255,255,102,255,255,51,255,255,0,255,204,255,255,204,204,255,204,153, +255,204,102,255,204,51,255,204,0,255,153,255,255,153,204,255,153,153,255,153, +102,255,153,51,255,153,0,255,102,255,255,102,204,255,102,153,255,102,102,255, +102,51,255,102,0,255,51,255,255,51,204,255,51,153,255,51,102,255,51,51, +255,51,0,255,0,255,255,0,204,255,0,153,255,0,102,255,0,51,255,0, +0,204,255,255,204,255,204,204,255,153,204,255,102,204,255,51,204,255,0,204, +204,255,204,204,204,204,204,153,204,204,102,204,204,51,204,204,0,204,153,255, +204,153,204,204,153,153,204,153,102,204,153,51,204,153,0,204,102,255,204,102, +204,204,102,153,204,102,102,204,102,51,204,102,0,204,51,255,204,51,204,204, +51,153,204,51,102,204,51,51,204,51,0,204,0,255,204,0,204,204,0,153, +204,0,102,204,0,51,204,0,0,153,255,255,153,255,204,153,255,153,153,255, +102,153,255,51,153,255,0,153,204,255,153,204,204,153,204,153,153,204,102,153, +204,51,153,204,0,153,153,255,153,153,204,153,153,153,153,153,102,153,153,51, +153,153,0,153,102,255,153,102,204,153,102,153,153,102,102,153,102,51,153,102, +0,153,51,255,153,51,204,153,51,153,153,51,102,153,51,51,153,51,0,153, +0,255,153,0,204,153,0,153,153,0,102,153,0,51,153,0,0,102,255,255, +102,255,204,102,255,153,102,255,102,102,255,51,102,255,0,102,204,255,102,204, +204,102,204,153,102,204,102,102,204,51,102,204,0,102,153,255,102,153,204,102, +153,153,102,153,102,102,153,51,102,153,0,102,102,255,102,102,204,102,102,153, +102,102,102,102,102,51,102,102,0,102,51,255,102,51,204,102,51,153,102,51, +102,102,51,51,102,51,0,102,0,255,102,0,204,102,0,153,102,0,102,102, +0,51,102,0,0,51,255,255,51,255,204,51,255,153,51,255,102,51,255,51, +51,255,0,51,204,255,51,204,204,51,204,153,51,204,102,51,204,51,51,204, +0,51,153,255,51,153,204,51,153,153,51,153,102,51,153,51,51,153,0,51, +102,255,51,102,204,51,102,153,51,102,102,51,102,51,51,102,0,51,51,255, +51,51,204,51,51,153,51,51,102,51,51,51,51,51,0,51,0,255,51,0, +204,51,0,153,51,0,102,51,0,51,51,0,0,0,255,255,0,255,204,0, +255,153,0,255,102,0,255,51,0,255,0,0,204,255,0,204,204,0,204,153, +0,204,102,0,204,51,0,204,0,0,153,255,0,153,204,0,153,153,0,153, +102,0,153,51,0,153,0,0,102,255,0,102,204,0,102,153,0,102,102,0, +102,51,0,102,0,0,51,255,0,51,204,0,51,153,0,51,102,0,51,51, +0,51,0,0,0,255,0,0,204,0,0,153,0,0,102,0,0,51,238,0, +0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0,0,68, +0,0,34,0,0,17,0,0,0,238,0,0,221,0,0,187,0,0,170,0, +0,136,0,0,119,0,0,85,0,0,68,0,0,34,0,0,17,0,0,0, +238,0,0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0, +0,68,0,0,34,0,0,17,238,238,238,221,221,221,187,187,187,170,170,170, +136,136,136,119,119,119,85,85,85,68,68,68,34,34,34,17,17,17,0,0, +0,33,249,4,1,0,0,1,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,3,8,28,72,176,32,193,127,8,19,38,52,200,176,161,192,127,233, +54,145,11,181,236,92,186,116,10,29,106,12,240,111,211,146,37,74,224,136, +172,84,9,225,70,135,255,162,193,1,80,34,202,146,58,155,74,254,59,137, +114,19,128,77,191,54,233,220,4,110,38,77,134,255,138,41,217,169,179,82, +52,159,63,11,254,67,7,135,168,206,163,73,129,58,141,217,51,170,193,127, +149,156,202,76,138,116,224,191,80,83,77,158,92,168,20,236,206,74,161,196, +106,204,168,244,92,214,157,71,187,94,69,24,170,156,92,142,102,99,86,170, +138,50,101,204,180,87,157,158,82,59,55,84,165,37,58,229,34,124,75,82, +29,97,175,16,55,193,41,81,148,240,191,101,68,7,223,229,24,180,146,18, +202,59,213,46,142,153,248,46,66,117,146,235,153,24,119,22,227,67,112,111, +75,207,53,231,185,222,18,214,68,207,245,252,154,149,100,90,197,126,39,3, +176,131,155,40,69,189,127,119,207,141,166,83,9,0,196,78,139,85,186,243, +246,148,99,199,13,255,245,68,23,83,137,38,162,197,192,170,67,195,72,118, +99,66,238,177,55,149,91,182,119,179,121,237,255,78,157,61,199,254,49,215, +132,134,55,157,59,23,7,187,85,200,248,197,81,142,126,238,221,119,90,76, +131,253,55,87,66,209,0,166,224,130,108,61,168,84,132,18,30,84,94,133, +19,210,20,16,0,59 +}; diff --git a/ediv/ideQT/gif/arrowright.h b/ediv/ideQT/gif/arrowright.h new file mode 100644 index 0000000..fe89342 --- /dev/null +++ b/ediv/ideQT/gif/arrowright.h @@ -0,0 +1,56 @@ +static unsigned char arrowright_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,255,255,255,255,255,204,255, +255,153,255,255,102,255,255,51,255,255,0,255,204,255,255,204,204,255,204,153, +255,204,102,255,204,51,255,204,0,255,153,255,255,153,204,255,153,153,255,153, +102,255,153,51,255,153,0,255,102,255,255,102,204,255,102,153,255,102,102,255, +102,51,255,102,0,255,51,255,255,51,204,255,51,153,255,51,102,255,51,51, +255,51,0,255,0,255,255,0,204,255,0,153,255,0,102,255,0,51,255,0, +0,204,255,255,204,255,204,204,255,153,204,255,102,204,255,51,204,255,0,204, +204,255,204,204,204,204,204,153,204,204,102,204,204,51,204,204,0,204,153,255, +204,153,204,204,153,153,204,153,102,204,153,51,204,153,0,204,102,255,204,102, +204,204,102,153,204,102,102,204,102,51,204,102,0,204,51,255,204,51,204,204, +51,153,204,51,102,204,51,51,204,51,0,204,0,255,204,0,204,204,0,153, +204,0,102,204,0,51,204,0,0,153,255,255,153,255,204,153,255,153,153,255, +102,153,255,51,153,255,0,153,204,255,153,204,204,153,204,153,153,204,102,153, +204,51,153,204,0,153,153,255,153,153,204,153,153,153,153,153,102,153,153,51, +153,153,0,153,102,255,153,102,204,153,102,153,153,102,102,153,102,51,153,102, +0,153,51,255,153,51,204,153,51,153,153,51,102,153,51,51,153,51,0,153, +0,255,153,0,204,153,0,153,153,0,102,153,0,51,153,0,0,102,255,255, +102,255,204,102,255,153,102,255,102,102,255,51,102,255,0,102,204,255,102,204, +204,102,204,153,102,204,102,102,204,51,102,204,0,102,153,255,102,153,204,102, +153,153,102,153,102,102,153,51,102,153,0,102,102,255,102,102,204,102,102,153, +102,102,102,102,102,51,102,102,0,102,51,255,102,51,204,102,51,153,102,51, +102,102,51,51,102,51,0,102,0,255,102,0,204,102,0,153,102,0,102,102, +0,51,102,0,0,51,255,255,51,255,204,51,255,153,51,255,102,51,255,51, +51,255,0,51,204,255,51,204,204,51,204,153,51,204,102,51,204,51,51,204, +0,51,153,255,51,153,204,51,153,153,51,153,102,51,153,51,51,153,0,51, +102,255,51,102,204,51,102,153,51,102,102,51,102,51,51,102,0,51,51,255, +51,51,204,51,51,153,51,51,102,51,51,51,51,51,0,51,0,255,51,0, +204,51,0,153,51,0,102,51,0,51,51,0,0,0,255,255,0,255,204,0, +255,153,0,255,102,0,255,51,0,255,0,0,204,255,0,204,204,0,204,153, +0,204,102,0,204,51,0,204,0,0,153,255,0,153,204,0,153,153,0,153, +102,0,153,51,0,153,0,0,102,255,0,102,204,0,102,153,0,102,102,0, +102,51,0,102,0,0,51,255,0,51,204,0,51,153,0,51,102,0,51,51, +0,51,0,0,0,255,0,0,204,0,0,153,0,0,102,0,0,51,238,0, +0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0,0,68, +0,0,34,0,0,17,0,0,0,238,0,0,221,0,0,187,0,0,170,0, +0,136,0,0,119,0,0,85,0,0,68,0,0,34,0,0,17,0,0,0, +238,0,0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0, +0,68,0,0,34,0,0,17,238,238,238,221,221,221,187,187,187,170,170,170, +136,136,136,119,119,119,85,85,85,68,68,68,34,34,34,17,17,17,0,0, +0,33,249,4,1,0,0,0,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,1,8,28,72,176,160,193,131,8,19,42,92,152,240,223,63,134,16, +11,58,124,24,177,226,63,111,14,43,66,252,151,237,90,70,141,10,255,129, +27,49,2,35,69,144,7,255,145,28,161,237,35,74,137,107,86,142,248,230, +50,229,196,147,18,71,202,220,86,51,231,26,111,223,192,221,156,8,64,165, +204,17,30,113,18,116,120,116,196,17,108,218,184,113,11,202,173,233,8,110, +61,139,254,211,54,2,1,130,7,95,43,84,176,192,129,67,135,166,216,142, +56,205,250,175,219,136,10,2,16,136,181,240,160,108,89,171,218,184,150,172, +201,180,67,0,171,128,73,174,137,57,98,141,75,135,216,70,252,13,12,120, +219,182,196,51,51,58,124,212,149,113,227,109,215,72,62,250,200,244,129,229, +166,217,30,147,236,118,248,95,230,207,71,185,101,211,204,247,31,97,171,215, +142,28,121,93,88,111,75,165,69,191,69,221,54,107,22,205,161,28,73,94, +219,70,242,54,110,224,200,29,122,19,92,156,168,65,224,8,153,66,198,230, +252,165,214,213,72,171,91,47,74,57,41,238,151,76,181,111,14,215,42,126, +60,121,243,207,191,163,95,207,126,125,64,0,59 +}; diff --git a/ediv/ideQT/gif/arrowright2.h b/ediv/ideQT/gif/arrowright2.h new file mode 100644 index 0000000..408dacf --- /dev/null +++ b/ediv/ideQT/gif/arrowright2.h @@ -0,0 +1,57 @@ +static unsigned char arrowright2_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,255,255,255,255,255,204,255, +255,153,255,255,102,255,255,51,255,255,0,255,204,255,255,204,204,255,204,153, +255,204,102,255,204,51,255,204,0,255,153,255,255,153,204,255,153,153,255,153, +102,255,153,51,255,153,0,255,102,255,255,102,204,255,102,153,255,102,102,255, +102,51,255,102,0,255,51,255,255,51,204,255,51,153,255,51,102,255,51,51, +255,51,0,255,0,255,255,0,204,255,0,153,255,0,102,255,0,51,255,0, +0,204,255,255,204,255,204,204,255,153,204,255,102,204,255,51,204,255,0,204, +204,255,204,204,204,204,204,153,204,204,102,204,204,51,204,204,0,204,153,255, +204,153,204,204,153,153,204,153,102,204,153,51,204,153,0,204,102,255,204,102, +204,204,102,153,204,102,102,204,102,51,204,102,0,204,51,255,204,51,204,204, +51,153,204,51,102,204,51,51,204,51,0,204,0,255,204,0,204,204,0,153, +204,0,102,204,0,51,204,0,0,153,255,255,153,255,204,153,255,153,153,255, +102,153,255,51,153,255,0,153,204,255,153,204,204,153,204,153,153,204,102,153, +204,51,153,204,0,153,153,255,153,153,204,153,153,153,153,153,102,153,153,51, +153,153,0,153,102,255,153,102,204,153,102,153,153,102,102,153,102,51,153,102, +0,153,51,255,153,51,204,153,51,153,153,51,102,153,51,51,153,51,0,153, +0,255,153,0,204,153,0,153,153,0,102,153,0,51,153,0,0,102,255,255, +102,255,204,102,255,153,102,255,102,102,255,51,102,255,0,102,204,255,102,204, +204,102,204,153,102,204,102,102,204,51,102,204,0,102,153,255,102,153,204,102, +153,153,102,153,102,102,153,51,102,153,0,102,102,255,102,102,204,102,102,153, +102,102,102,102,102,51,102,102,0,102,51,255,102,51,204,102,51,153,102,51, +102,102,51,51,102,51,0,102,0,255,102,0,204,102,0,153,102,0,102,102, +0,51,102,0,0,51,255,255,51,255,204,51,255,153,51,255,102,51,255,51, +51,255,0,51,204,255,51,204,204,51,204,153,51,204,102,51,204,51,51,204, +0,51,153,255,51,153,204,51,153,153,51,153,102,51,153,51,51,153,0,51, +102,255,51,102,204,51,102,153,51,102,102,51,102,51,51,102,0,51,51,255, +51,51,204,51,51,153,51,51,102,51,51,51,51,51,0,51,0,255,51,0, +204,51,0,153,51,0,102,51,0,51,51,0,0,0,255,255,0,255,204,0, +255,153,0,255,102,0,255,51,0,255,0,0,204,255,0,204,204,0,204,153, +0,204,102,0,204,51,0,204,0,0,153,255,0,153,204,0,153,153,0,153, +102,0,153,51,0,153,0,0,102,255,0,102,204,0,102,153,0,102,102,0, +102,51,0,102,0,0,51,255,0,51,204,0,51,153,0,51,102,0,51,51, +0,51,0,0,0,255,0,0,204,0,0,153,0,0,102,0,0,51,238,0, +0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0,0,68, +0,0,34,0,0,17,0,0,0,238,0,0,221,0,0,187,0,0,170,0, +0,136,0,0,119,0,0,85,0,0,68,0,0,34,0,0,17,0,0,0, +238,0,0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0, +0,68,0,0,34,0,0,17,238,238,238,221,221,221,187,187,187,170,170,170, +136,136,136,119,119,119,85,85,85,68,68,68,34,34,34,17,17,17,0,0, +0,33,249,4,1,0,0,1,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,3,8,28,72,176,160,193,131,8,19,6,248,247,79,161,195,132,12, +27,62,156,56,240,223,169,101,12,41,78,252,103,174,82,168,140,26,21,254, +91,86,2,206,166,104,32,67,26,252,7,110,9,0,37,149,204,165,84,89, +49,221,18,18,0,236,153,140,72,179,166,203,95,112,160,84,170,116,106,166, +202,127,112,74,108,90,186,212,35,79,138,17,211,33,45,49,142,41,211,74, +82,141,22,252,167,238,92,168,77,67,43,217,81,98,213,170,83,173,11,255, +133,10,91,105,83,168,80,191,200,150,109,138,245,105,197,101,109,193,158,2, +23,49,84,148,185,96,63,218,21,168,182,233,38,190,18,213,230,189,186,41, +171,68,130,22,219,182,85,151,242,95,185,178,68,89,106,253,135,110,177,96, +200,167,242,78,30,12,121,113,37,163,28,155,98,36,125,183,44,234,208,135, +17,139,4,203,244,51,228,116,130,31,35,252,151,206,116,81,221,105,89,175, +92,118,199,234,57,212,104,15,42,174,189,122,107,200,127,101,205,109,74,14, +213,243,101,234,27,69,135,58,119,26,248,209,182,229,206,137,32,175,4,78, +93,207,138,139,155,126,60,79,152,33,184,104,209,46,254,102,31,177,126,125, +246,91,237,123,199,207,63,64,64,0,59 +}; diff --git a/ediv/ideQT/gif/audio_cd.h b/ediv/ideQT/gif/audio_cd.h new file mode 100644 index 0000000..4a22538 --- /dev/null +++ b/ediv/ideQT/gif/audio_cd.h @@ -0,0 +1,61 @@ +static unsigned char audio_cd_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,4,0,0,0,0,218,218,218,230, +230,230,170,170,170,255,255,255,206,206,206,254,254,0,158,158,158,98,98,98, +255,255,177,220,220,0,146,146,146,255,227,212,255,199,177,255,171,142,255,143, +107,182,182,182,0,122,185,194,194,194,242,242,242,0,146,220,0,170,255,107, +198,255,37,170,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,24,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,49,8,28,40,16,128,193,131,8,19,2,32,200,176,33,128,0,16, +35,74,156,40,96,97,67,135,3,38,106,140,40,128,64,1,139,23,7,62, +132,120,112,35,68,1,6,8,128,12,9,32,35,201,131,7,52,162,36,224, +113,165,67,137,15,15,24,140,41,177,35,77,149,33,49,180,196,25,32,38, +128,3,60,3,248,36,48,0,129,77,130,35,35,230,140,152,212,167,0,4, +9,18,24,196,40,213,96,81,153,63,7,100,53,160,64,129,205,168,8,145, +130,37,112,53,1,89,169,34,93,190,68,154,244,100,88,5,111,33,126,20, +185,81,45,69,154,87,23,40,8,80,160,48,73,161,114,77,114,12,187,96, +129,82,1,144,15,71,85,188,152,45,130,198,12,50,51,128,92,113,40,229, +202,76,27,55,112,224,160,129,233,204,6,11,124,174,28,152,240,104,7,15, +72,63,48,8,193,48,229,165,3,34,212,150,16,224,53,233,9,11,1,64, +168,173,218,164,85,4,20,136,23,144,96,154,52,72,225,195,109,247,12,27, +161,130,5,9,203,151,155,6,14,117,120,244,226,118,45,83,101,176,190,91, +2,115,238,12,161,123,55,188,20,65,245,11,215,177,75,152,128,222,225,2, +239,209,151,170,164,207,159,254,211,244,0,220,135,95,0,63,169,148,80,80, +14,5,56,224,79,16,108,133,96,80,6,9,8,1,129,52,253,247,32,128, +2,82,104,225,133,24,78,184,33,135,9,126,200,208,0,36,150,104,34,136, +23,153,168,226,138,37,162,56,16,139,44,186,24,210,138,40,6,4,0,59 + +}; diff --git a/ediv/ideQT/gif/ayuda.gif b/ediv/ideQT/gif/ayuda.gif new file mode 100644 index 0000000..48c1ddc Binary files /dev/null and b/ediv/ideQT/gif/ayuda.gif differ diff --git a/ediv/ideQT/gif/ayuda.h b/ediv/ideQT/gif/ayuda.h new file mode 100644 index 0000000..a6d0748 --- /dev/null +++ b/ediv/ideQT/gif/ayuda.h @@ -0,0 +1,14 @@ +static unsigned char ayuda_gif[]={ +71,73,70,56,57,97,23,0,30,0,162,7,0,192,192,192,128,128,128,128, +128,0,0,255,255,255,255,0,0,0,0,255,255,255,255,255,255,33,249,4, +1,0,0,7,0,44,0,0,0,0,23,0,30,0,0,3,179,120,186,43, +238,44,202,227,136,181,112,70,65,76,255,158,160,53,157,97,4,69,224,89, +197,200,153,102,33,131,68,59,9,112,44,123,171,189,149,48,89,129,38,240, +145,114,167,20,15,99,84,224,128,177,101,168,73,185,44,135,75,66,81,194, +161,73,63,91,201,208,138,82,93,194,226,174,71,8,66,167,47,229,51,117, +17,24,20,212,237,130,125,82,55,220,47,128,69,6,123,12,125,49,21,24, +130,38,132,7,134,38,40,119,14,66,57,123,122,72,42,126,50,0,0,5, +72,149,3,57,1,40,6,155,147,48,140,150,48,42,66,156,148,77,169,39, +42,165,157,139,115,176,66,59,181,35,183,185,131,115,12,176,174,35,192,160, +194,195,196,167,191,187,160,140,199,17,122,202,206,209,7,9,0,59 +}; diff --git a/ediv/ideQT/gif/b_disk.gif b/ediv/ideQT/gif/b_disk.gif new file mode 100644 index 0000000..595397f Binary files /dev/null and b/ediv/ideQT/gif/b_disk.gif differ diff --git a/ediv/ideQT/gif/b_disk.h b/ediv/ideQT/gif/b_disk.h new file mode 100644 index 0000000..4a97923 --- /dev/null +++ b/ediv/ideQT/gif/b_disk.h @@ -0,0 +1,14 @@ +static unsigned char b_disk_gif[]={ +71,73,70,56,57,97,16,0,16,0,196,31,0,142,186,247,128,172,233,69, +113,174,93,137,198,81,125,186,160,204,255,45,89,150,28,72,133,35,79,140, +15,59,120,190,234,255,78,122,183,90,134,195,159,203,255,240,255,255,102,146, +207,115,159,220,108,152,213,174,218,255,54,98,159,199,243,255,0,39,100,164, +208,255,37,81,142,109,153,214,171,215,255,147,191,252,247,255,255,0,23,84, +255,255,255,0,0,0,255,255,255,33,249,4,1,0,0,31,0,44,0,0, +0,0,16,0,16,0,0,5,105,224,39,142,100,105,158,38,167,174,172,58, +114,14,215,205,116,87,28,133,39,114,148,188,253,192,204,33,161,251,112,20, +62,224,47,131,128,20,57,146,164,146,249,120,54,100,153,172,54,99,96,60, +1,151,176,88,108,32,124,53,232,116,26,32,120,162,49,240,120,220,188,11, +4,56,149,188,158,51,104,239,48,119,53,29,22,124,19,69,70,17,50,22, +139,139,28,11,126,35,30,146,147,148,135,40,39,33,0,59 +}; diff --git a/ediv/ideQT/gif/b_file.gif b/ediv/ideQT/gif/b_file.gif new file mode 100644 index 0000000..6425d8b Binary files /dev/null and b/ediv/ideQT/gif/b_file.gif differ diff --git a/ediv/ideQT/gif/b_file.h b/ediv/ideQT/gif/b_file.h new file mode 100644 index 0000000..3d5af8d --- /dev/null +++ b/ediv/ideQT/gif/b_file.h @@ -0,0 +1,21 @@ +static unsigned char b_file_gif[]={ +71,73,70,56,57,97,16,0,16,0,213,41,0,157,224,255,153,220,255,137, +204,255,194,255,255,131,198,255,160,227,255,163,230,255,166,233,255,191,255,255, +169,236,255,128,195,255,198,255,255,174,241,255,135,202,255,127,194,255,121,188, +255,186,253,255,125,192,255,92,159,248,88,155,232,182,249,255,130,197,255,85, +152,220,90,157,240,74,141,176,132,199,255,76,143,184,83,150,212,78,145,192, +80,147,200,195,255,255,144,211,255,147,214,255,150,217,255,140,207,255,138,205, +255,134,201,255,79,79,79,199,255,255,93,93,93,0,0,0,255,255,255,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,41,0,44,0,0,0,0,16,0, +16,0,0,6,133,192,212,105,72,36,150,74,169,100,242,52,24,32,154,8, +8,165,52,66,42,79,139,5,73,32,32,17,20,37,70,245,106,18,161,206, +103,66,201,35,70,45,77,31,209,39,222,61,30,221,66,19,8,125,38,121, +21,24,120,39,38,33,32,33,133,116,94,26,130,38,1,124,124,36,28,140, +0,1,0,148,136,34,2,29,140,5,143,104,34,27,140,6,5,6,163,151, +32,31,22,140,7,158,103,32,19,140,38,7,9,9,7,166,1,33,23,140, +35,13,35,188,25,21,14,17,15,18,130,173,158,74,201,202,202,65,0,59 + +}; diff --git a/ediv/ideQT/gif/b_open.gif b/ediv/ideQT/gif/b_open.gif new file mode 100644 index 0000000..0936092 Binary files /dev/null and b/ediv/ideQT/gif/b_open.gif differ diff --git a/ediv/ideQT/gif/b_open.h b/ediv/ideQT/gif/b_open.h new file mode 100644 index 0000000..3e332a7 --- /dev/null +++ b/ediv/ideQT/gif/b_open.h @@ -0,0 +1,13 @@ +static unsigned char b_open_gif[]={ +71,73,70,56,57,97,16,0,16,0,196,19,0,255,195,0,255,235,0,255, +170,0,255,248,79,233,138,0,248,160,0,255,248,38,255,174,0,189,77,0, +255,223,0,182,67,0,255,248,248,240,148,0,255,185,0,220,120,0,255,248, +111,255,209,0,255,248,0,0,0,0,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,33,249,4,1,0,0,19,0,44,0,0, +0,0,16,0,16,0,0,5,83,224,36,142,100,105,158,104,90,74,172,42, +74,79,44,169,18,16,221,11,171,207,99,29,220,145,152,240,193,155,248,128, +200,136,129,248,2,252,34,144,168,52,200,243,65,26,187,172,78,80,32,72, +146,200,1,139,129,144,4,164,210,4,36,50,147,40,36,215,134,124,126,96, +191,36,142,188,94,111,239,105,119,46,41,33,0,59 +}; diff --git a/ediv/ideQT/gif/b_person.gif b/ediv/ideQT/gif/b_person.gif new file mode 100644 index 0000000..8ff1252 Binary files /dev/null and b/ediv/ideQT/gif/b_person.gif differ diff --git a/ediv/ideQT/gif/b_person.h b/ediv/ideQT/gif/b_person.h new file mode 100644 index 0000000..9ec7222 --- /dev/null +++ b/ediv/ideQT/gif/b_person.h @@ -0,0 +1,13 @@ +static unsigned char b_person_gif[]={ +71,73,70,56,57,97,16,0,16,0,196,16,0,255,181,141,255,227,212,126, +255,82,26,84,0,44,138,0,55,55,55,121,255,73,31,99,0,62,236,0, +51,206,0,12,12,12,255,240,212,62,192,0,164,255,132,15,15,15,0,0, +0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,33,249,4,1,0,0,16,0,44,0,0, +0,0,16,0,16,0,0,5,70,32,36,142,100,105,66,78,122,150,78,16, +0,206,58,182,111,44,163,64,110,223,233,46,43,141,6,67,113,123,4,5, +12,198,99,101,60,38,149,167,199,98,208,64,14,22,203,232,3,145,32,60, +178,76,195,193,91,92,96,205,96,211,67,161,40,176,211,183,184,60,4,0, +59 +}; diff --git a/ediv/ideQT/gif/b_twist.gif b/ediv/ideQT/gif/b_twist.gif new file mode 100644 index 0000000..15b8c32 Binary files /dev/null and b/ediv/ideQT/gif/b_twist.gif differ diff --git a/ediv/ideQT/gif/b_twist.h b/ediv/ideQT/gif/b_twist.h new file mode 100644 index 0000000..4e191cb --- /dev/null +++ b/ediv/ideQT/gif/b_twist.h @@ -0,0 +1,9 @@ +static unsigned char b_twist_gif[]={ +71,73,70,56,57,97,16,0,16,0,179,13,0,0,91,0,130,158,255,0, +56,248,0,47,210,0,169,0,0,108,0,0,33,151,37,87,255,0,156,0, +0,65,0,110,143,255,0,77,0,0,0,0,255,255,255,0,0,0,0,0, +0,33,249,4,1,0,0,13,0,44,0,0,0,0,16,0,16,0,0,4, +54,176,201,73,171,189,45,224,123,52,101,96,24,10,130,50,129,216,48,156, +204,102,124,173,24,90,40,221,86,53,126,195,114,147,55,132,77,142,80,192, +228,16,5,128,76,84,1,44,54,150,4,116,138,137,0,0,59 +}; diff --git a/ediv/ideQT/gif/bin2h.com b/ediv/ideQT/gif/bin2h.com new file mode 100644 index 0000000..afd074b Binary files /dev/null and b/ediv/ideQT/gif/bin2h.com differ diff --git a/ediv/ideQT/gif/bookopen.gif b/ediv/ideQT/gif/bookopen.gif new file mode 100644 index 0000000..b243076 Binary files /dev/null and b/ediv/ideQT/gif/bookopen.gif differ diff --git a/ediv/ideQT/gif/bookopen.h b/ediv/ideQT/gif/bookopen.h new file mode 100644 index 0000000..1bd4c9e --- /dev/null +++ b/ediv/ideQT/gif/bookopen.h @@ -0,0 +1,8 @@ +static unsigned char bookopen_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,0,0,255,0,0,0,255, +255,255,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,54,156,143,169,193,186,2,131,59,1,90,38,83,181,98,247, +60,120,17,23,133,164,56,98,23,217,117,0,96,162,109,0,15,175,92,209, +9,192,172,186,2,203,185,38,54,222,144,104,224,213,144,204,230,161,0,0, +59 +}; diff --git a/ediv/ideQT/gif/bookshut.gif b/ediv/ideQT/gif/bookshut.gif new file mode 100644 index 0000000..24c514d Binary files /dev/null and b/ediv/ideQT/gif/bookshut.gif differ diff --git a/ediv/ideQT/gif/bookshut.h b/ediv/ideQT/gif/bookshut.h new file mode 100644 index 0000000..597218d --- /dev/null +++ b/ediv/ideQT/gif/bookshut.h @@ -0,0 +1,8 @@ +static unsigned char bookshut_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,0,0,128,255,255,255,0, +0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,55,72,186,220, +78,3,140,215,226,184,147,90,124,159,21,2,38,56,219,16,154,65,184,108, +39,26,164,83,41,190,176,34,113,110,189,114,2,173,86,151,222,235,71,18, +234,52,61,34,5,162,92,66,156,80,70,2,0,59 +}; diff --git a/ediv/ideQT/gif/bulboff.gif b/ediv/ideQT/gif/bulboff.gif new file mode 100644 index 0000000..b2b3dc0 Binary files /dev/null and b/ediv/ideQT/gif/bulboff.gif differ diff --git a/ediv/ideQT/gif/bulboff.h b/ediv/ideQT/gif/bulboff.h new file mode 100644 index 0000000..383e895 --- /dev/null +++ b/ediv/ideQT/gif/bulboff.h @@ -0,0 +1,7 @@ +static unsigned char bulboff_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,191,191,191,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,37,72,186,220, +254,80,141,25,215,16,120,212,139,115,228,128,7,129,226,40,132,90,69,92, +169,202,170,18,5,15,65,187,201,51,172,239,68,2,0,59 +}; diff --git a/ediv/ideQT/gif/bulbon.gif b/ediv/ideQT/gif/bulbon.gif new file mode 100644 index 0000000..d5466fe Binary files /dev/null and b/ediv/ideQT/gif/bulbon.gif differ diff --git a/ediv/ideQT/gif/bulbon.h b/ediv/ideQT/gif/bulbon.h new file mode 100644 index 0000000..7c986cf --- /dev/null +++ b/ediv/ideQT/gif/bulbon.h @@ -0,0 +1,9 @@ +static unsigned char bulbon_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,127,127,127,191,191,191,255, +255,255,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,61,88,186,69, +252,208,193,37,137,181,74,178,203,113,180,67,120,125,196,32,16,194,48,110, +229,233,170,26,167,10,192,9,123,77,75,0,40,252,92,166,218,141,100,26, +18,75,171,77,38,164,202,76,20,131,192,224,249,96,82,171,207,4,0,59 + +}; diff --git a/ediv/ideQT/gif/bycategory.gif b/ediv/ideQT/gif/bycategory.gif new file mode 100644 index 0000000..ee8013b Binary files /dev/null and b/ediv/ideQT/gif/bycategory.gif differ diff --git a/ediv/ideQT/gif/bycategory.h b/ediv/ideQT/gif/bycategory.h new file mode 100644 index 0000000..4576ef2 --- /dev/null +++ b/ediv/ideQT/gif/bycategory.h @@ -0,0 +1,53 @@ +static unsigned char bycategory_gif[]={ +71,73,70,56,55,97,16,0,16,0,247,255,0,0,0,0,8,6,0,30, +21,0,11,7,0,29,20,0,91,63,0,238,167,0,101,73,0,80,58,0, +83,60,0,82,57,0,79,55,0,71,50,0,159,111,0,242,170,0,21,15, +0,160,114,0,172,109,0,157,83,0,158,84,0,157,81,0,176,110,0,178, +112,0,177,116,0,198,139,0,102,72,0,129,92,0,134,59,0,182,230,245, +184,227,235,187,228,238,195,238,242,186,235,239,166,176,141,169,110,0,15,11, +0,132,95,0,136,60,0,194,247,255,115,92,102,69,71,74,29,18,0,176, +161,180,230,219,183,167,109,0,7,0,0,38,36,47,24,21,29,137,60,0, +166,225,246,63,66,68,237,235,236,193,195,199,22,37,48,204,199,156,132,80, +0,69,60,69,255,255,231,136,153,100,131,92,0,157,92,0,169,191,213,49, +51,51,186,186,189,184,186,192,4,0,6,141,113,102,90,77,72,225,243,201, +215,255,127,87,135,0,126,89,0,166,106,0,193,229,158,24,17,26,150,164, +169,31,37,38,73,66,85,223,241,197,222,255,156,215,255,135,90,135,0,126, +88,0,166,103,0,181,241,108,211,207,210,251,254,244,235,253,202,218,255,147, +218,255,157,215,255,136,122,86,0,166,108,0,172,188,69,93,64,17,28,18, +0,192,186,202,221,255,143,216,255,149,217,255,154,48,32,0,161,112,0,169, +117,0,205,142,0,55,30,0,190,185,204,227,255,164,221,255,161,76,53,0, +198,136,0,44,30,0,19,13,0,22,15,0,223,213,238,170,248,0,195,251, +82,226,255,171,219,255,158,30,52,0,188,243,77,225,255,167,218,255,142,41, +68,0,192,245,87,196,249,90,93,136,0,35,55,0,178,255,0,106,151,0, +24,34,0,12,17,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,1,0,44,0,0,0,0,16,0,16,0,7,8, +198,0,3,4,16,32,176,160,192,1,4,12,6,40,96,224,0,130,4,9, +20,44,96,208,192,1,0,131,15,32,68,144,48,129,66,5,11,23,48,100, +80,24,64,195,6,14,29,60,124,0,17,66,196,8,146,36,74,152,56,129, +34,133,138,21,44,90,184,120,97,144,4,140,24,50,102,208,168,97,227,6, +142,28,58,12,238,224,209,195,199,15,32,65,132,12,33,82,196,136,193,35, +72,146,40,89,194,4,64,19,39,79,160,68,49,40,101,10,21,0,0,170, +88,185,130,37,139,150,177,2,1,108,225,210,197,203,23,48,97,196,140,113, +11,55,0,153,50,102,68,156,65,147,70,205,154,189,111,11,178,105,227,230, +13,28,0,113,228,204,161,83,39,113,193,139,151,1,216,185,131,39,79,95, +146,5,245,236,225,211,7,52,73,63,127,0,153,38,25,72,144,192,128,0, +59 +}; diff --git a/ediv/ideQT/gif/byextension.gif b/ediv/ideQT/gif/byextension.gif new file mode 100644 index 0000000..5805c36 Binary files /dev/null and b/ediv/ideQT/gif/byextension.gif differ diff --git a/ediv/ideQT/gif/byextension.h b/ediv/ideQT/gif/byextension.h new file mode 100644 index 0000000..7ece3ad --- /dev/null +++ b/ediv/ideQT/gif/byextension.h @@ -0,0 +1,53 @@ +static unsigned char byextension_gif[]={ +71,73,70,56,55,97,16,0,16,0,247,255,0,0,0,0,67,68,59,184, +185,163,238,238,211,175,176,155,222,223,197,165,165,146,224,225,198,150,151,133, +142,142,126,232,233,205,71,72,63,70,71,62,58,59,52,42,42,37,176,177, +157,83,85,77,166,169,150,6,8,9,135,137,123,93,96,86,70,73,67,53, +54,48,235,236,208,62,64,57,78,63,41,86,71,47,64,52,31,86,72,48, +75,60,38,84,69,46,74,60,40,89,75,52,21,18,12,72,73,64,44,46, +40,228,229,202,41,44,41,81,68,44,255,255,180,114,96,66,255,255,177,198, +167,116,218,183,128,149,126,86,255,255,181,226,190,133,212,179,124,255,253,175, +78,67,46,39,40,35,164,165,145,139,140,124,160,161,144,66,53,32,255,238, +165,182,154,107,89,75,51,101,86,59,255,248,171,93,79,54,176,148,103,255, +239,165,71,60,41,84,68,47,255,252,176,212,176,124,108,88,61,126,104,73, +60,49,34,241,200,139,191,159,111,166,139,97,84,100,58,75,89,52,58,73, +41,48,70,37,46,63,35,69,87,49,67,85,48,37,56,29,71,88,50,59, +79,43,3,22,8,193,161,112,203,241,141,180,212,125,253,255,175,116,136,79, +246,255,170,109,130,76,128,151,88,135,160,93,172,207,120,41,27,21,92,78, +54,162,193,113,145,173,101,185,220,128,53,62,36,157,186,109,78,92,54,49, +58,34,174,207,121,174,206,121,79,93,54,164,196,115,88,105,61,156,185,109, +170,202,118,190,226,133,126,149,86,190,225,132,184,219,128,193,228,134,173,205, +120,69,82,48,81,96,56,51,60,35,255,255,255,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,119,0,44,0,0,0,0,16,0,16,0,7,8, +200,0,239,8,28,72,176,224,29,0,8,19,42,68,72,48,128,128,1,4, +10,24,48,112,0,65,2,5,11,8,50,104,224,0,192,3,8,16,34,72, +152,64,161,130,70,11,23,48,0,200,160,97,3,135,14,30,62,128,152,25, +66,196,8,18,37,76,156,64,145,66,197,10,22,45,92,188,128,17,67,198, +12,26,53,108,220,192,145,67,199,14,0,60,0,244,240,241,131,32,144,32, +66,134,16,105,81,196,200,17,36,84,15,38,81,178,132,73,19,39,79,160, +68,145,50,133,74,138,24,7,171,88,185,130,37,139,22,45,89,182,112,233, +226,229,75,136,131,96,194,136,25,67,166,76,25,50,102,204,156,33,8,0, +13,128,52,0,212,172,89,195,102,114,27,198,85,220,180,120,3,167,115,28, +56,114,230,48,30,75,167,142,146,211,167,203,216,49,200,186,181,235,130,1, +1,0,59 +}; diff --git a/ediv/ideQT/gif/calculat.gif b/ediv/ideQT/gif/calculat.gif new file mode 100644 index 0000000..063407c Binary files /dev/null and b/ediv/ideQT/gif/calculat.gif differ diff --git a/ediv/ideQT/gif/calculat.h b/ediv/ideQT/gif/calculat.h new file mode 100644 index 0000000..0c8f49f --- /dev/null +++ b/ediv/ideQT/gif/calculat.h @@ -0,0 +1,8 @@ +static unsigned char calculat_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,127,127,127,0,255,255,255, +0,0,0,0,0,191,191,191,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,60,88,5,211, +238,64,201,65,170,181,67,42,122,111,214,212,227,16,223,68,54,193,144,146, +90,17,138,97,203,117,85,185,145,120,200,130,52,38,231,64,155,171,87,251, +233,142,63,162,240,72,16,56,119,38,101,139,1,107,68,20,9,0,59 +}; diff --git a/ediv/ideQT/gif/cdaudio.gif b/ediv/ideQT/gif/cdaudio.gif new file mode 100644 index 0000000..44f8c8b Binary files /dev/null and b/ediv/ideQT/gif/cdaudio.gif differ diff --git a/ediv/ideQT/gif/cdaudio.h b/ediv/ideQT/gif/cdaudio.h new file mode 100644 index 0000000..aff1c6b --- /dev/null +++ b/ediv/ideQT/gif/cdaudio.h @@ -0,0 +1,10 @@ +static unsigned char cdaudio_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,7,0,128,128,128,255,255,255,0, +255,255,0,255,0,255,255,0,0,0,0,192,192,192,0,0,0,33,249,4, +1,0,0,7,0,44,0,0,0,0,16,0,16,0,0,3,88,120,87,165, +254,144,49,64,41,84,141,17,98,186,125,5,85,108,93,217,96,133,0,140, +92,25,24,25,51,8,172,219,197,119,218,190,230,1,192,12,85,168,116,243, +1,7,131,66,160,64,132,25,93,43,128,128,216,248,117,120,129,1,97,90, +52,242,58,90,193,244,228,251,130,55,98,242,179,132,220,168,21,20,118,242, +253,16,49,32,9,0,59 +}; diff --git a/ediv/ideQT/gif/check.gif b/ediv/ideQT/gif/check.gif new file mode 100644 index 0000000..d3a023b Binary files /dev/null and b/ediv/ideQT/gif/check.gif differ diff --git a/ediv/ideQT/gif/check.h b/ediv/ideQT/gif/check.h new file mode 100644 index 0000000..a41ef3d --- /dev/null +++ b/ediv/ideQT/gif/check.h @@ -0,0 +1,7 @@ +static unsigned char check_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,127,127,127,0,0,0,255, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,36,156,143,169,59,34,193,14,120,81,210,218,110,117,16,59, +109,76,157,193,45,19,245,141,201,151,110,172,186,180,94,137,53,112,141,99, +5,0,59 +}; diff --git a/ediv/ideQT/gif/clear.gif b/ediv/ideQT/gif/clear.gif new file mode 100644 index 0000000..3aec2df Binary files /dev/null and b/ediv/ideQT/gif/clear.gif differ diff --git a/ediv/ideQT/gif/clear.h b/ediv/ideQT/gif/clear.h new file mode 100644 index 0000000..6bc1037 --- /dev/null +++ b/ediv/ideQT/gif/clear.h @@ -0,0 +1,9 @@ +static unsigned char clear_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,128,0,0,128,128,0,255, +0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,66,88,186,204, +52,45,170,7,167,44,180,94,60,122,112,205,243,4,223,37,14,68,64,76, +235,138,9,162,202,98,147,96,167,46,150,19,182,13,228,32,158,15,56,107, +1,126,17,130,75,169,75,238,136,142,37,147,22,82,90,167,212,197,85,7, +45,36,0,0,59 +}; diff --git a/ediv/ideQT/gif/clock.gif b/ediv/ideQT/gif/clock.gif new file mode 100644 index 0000000..8d49dc8 Binary files /dev/null and b/ediv/ideQT/gif/clock.gif differ diff --git a/ediv/ideQT/gif/clock.h b/ediv/ideQT/gif/clock.h new file mode 100644 index 0000000..37769c2 --- /dev/null +++ b/ediv/ideQT/gif/clock.h @@ -0,0 +1,9 @@ +static unsigned char clock_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,191,191,191,0,0,255,255, +0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,73,88,170,211, +189,144,13,65,233,139,83,0,18,8,176,80,70,140,221,8,50,2,55,174, +157,48,160,219,42,123,110,49,205,120,125,151,132,235,244,175,219,106,144,11, +106,70,196,217,231,101,75,225,90,204,166,83,101,170,45,50,49,154,53,148, +169,92,34,18,7,120,76,46,36,0,0,59 +}; diff --git a/ediv/ideQT/gif/comppc1.gif b/ediv/ideQT/gif/comppc1.gif new file mode 100644 index 0000000..05b7dc3 Binary files /dev/null and b/ediv/ideQT/gif/comppc1.gif differ diff --git a/ediv/ideQT/gif/comppc1.h b/ediv/ideQT/gif/comppc1.h new file mode 100644 index 0000000..4d9d76d --- /dev/null +++ b/ediv/ideQT/gif/comppc1.h @@ -0,0 +1,9 @@ +static unsigned char comppc1_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,7,0,191,191,191,255,0,255,255, +0,0,0,255,255,0,255,0,255,255,255,0,0,0,0,0,0,33,249,4, +1,0,0,7,0,44,0,0,0,0,16,0,16,0,0,3,62,120,106,220, +173,112,149,73,139,137,208,88,103,177,52,1,17,104,151,71,18,196,64,122, +7,201,149,152,86,77,112,228,220,241,173,151,242,236,95,26,129,143,246,144, +1,118,0,90,171,49,116,100,44,80,82,231,57,164,192,118,58,69,2,0, +59 +}; diff --git a/ediv/ideQT/gif/copy.gif b/ediv/ideQT/gif/copy.gif new file mode 100644 index 0000000..a1aa7c2 Binary files /dev/null and b/ediv/ideQT/gif/copy.gif differ diff --git a/ediv/ideQT/gif/copy.h b/ediv/ideQT/gif/copy.h new file mode 100644 index 0000000..feebec7 --- /dev/null +++ b/ediv/ideQT/gif/copy.h @@ -0,0 +1,8 @@ +static unsigned char copy_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,0,0,128,0,0,0,255, +255,255,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,57,156,143,57,193,173,24,132,20,236,153,56,99,176,90,131, +15,66,147,4,140,223,209,49,229,84,2,215,40,148,76,28,166,193,10,187, +24,75,53,145,238,187,193,72,15,153,47,86,28,34,21,160,230,201,2,141, +38,10,0,59 +}; diff --git a/ediv/ideQT/gif/cut.gif b/ediv/ideQT/gif/cut.gif new file mode 100644 index 0000000..6f89812 Binary files /dev/null and b/ediv/ideQT/gif/cut.gif differ diff --git a/ediv/ideQT/gif/cut.h b/ediv/ideQT/gif/cut.h new file mode 100644 index 0000000..402fc34 --- /dev/null +++ b/ediv/ideQT/gif/cut.h @@ -0,0 +1,7 @@ +static unsigned char cut_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,0,0,128,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,42,148,143,169,113,172,232,68,124,178,209,198,194,164,249,66, +237,65,225,1,4,192,40,156,192,122,173,170,113,42,241,155,62,115,141,39, +119,26,219,61,234,41,0,0,59 +}; diff --git a/ediv/ideQT/gif/delete.gif b/ediv/ideQT/gif/delete.gif new file mode 100644 index 0000000..111c749 Binary files /dev/null and b/ediv/ideQT/gif/delete.gif differ diff --git a/ediv/ideQT/gif/delete.h b/ediv/ideQT/gif/delete.h new file mode 100644 index 0000000..65a9ef0 --- /dev/null +++ b/ediv/ideQT/gif/delete.h @@ -0,0 +1,7 @@ +static unsigned char delete_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,192,192,192,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,52,148,127,128,24,189,124,154,91,83,40,25,148,169,116,78, +141,0,88,96,0,96,71,46,167,48,150,15,235,165,22,40,205,240,90,39, +172,11,115,17,227,83,89,118,175,141,75,99,42,22,87,134,2,0,59 +}; diff --git a/ediv/ideQT/gif/docsingl.gif b/ediv/ideQT/gif/docsingl.gif new file mode 100644 index 0000000..b7c157f Binary files /dev/null and b/ediv/ideQT/gif/docsingl.gif differ diff --git a/ediv/ideQT/gif/docsingl.h b/ediv/ideQT/gif/docsingl.h new file mode 100644 index 0000000..02f46f5 --- /dev/null +++ b/ediv/ideQT/gif/docsingl.h @@ -0,0 +1,7 @@ +static unsigned char docsingl_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,255,255,255,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,45,148,143,137,193,29,122,2,152,147,65,33,89,5,79,73, +202,53,94,248,85,35,72,117,11,217,112,39,234,38,153,147,189,168,26,177, +169,13,226,6,77,187,8,135,151,2,0,59 +}; diff --git a/ediv/ideQT/gif/dooropen.gif b/ediv/ideQT/gif/dooropen.gif new file mode 100644 index 0000000..075ff09 Binary files /dev/null and b/ediv/ideQT/gif/dooropen.gif differ diff --git a/ediv/ideQT/gif/dooropen.h b/ediv/ideQT/gif/dooropen.h new file mode 100644 index 0000000..f516b38 --- /dev/null +++ b/ediv/ideQT/gif/dooropen.h @@ -0,0 +1,8 @@ +static unsigned char dooropen_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,128,0,0,0,255,255,0, +0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,60,72,36,220, +46,42,10,16,130,24,24,195,184,40,184,217,176,73,64,9,102,163,50,153, +161,200,117,165,24,166,240,215,210,171,61,191,249,169,241,37,29,10,200,218, +113,122,55,34,160,229,58,198,152,184,37,179,41,121,60,34,9,0,59 +}; diff --git a/ediv/ideQT/gif/edit.gif b/ediv/ideQT/gif/edit.gif new file mode 100644 index 0000000..3cb9bd6 Binary files /dev/null and b/ediv/ideQT/gif/edit.gif differ diff --git a/ediv/ideQT/gif/edit.h b/ediv/ideQT/gif/edit.h new file mode 100644 index 0000000..a221263 --- /dev/null +++ b/ediv/ideQT/gif/edit.h @@ -0,0 +1,9 @@ +static unsigned char edit_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,255,0,0,0,255,255,255, +255,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,74,88,74,75, +254,42,18,192,200,184,215,197,37,28,206,3,179,17,93,102,89,225,86,144, +168,169,53,78,249,133,143,48,116,172,25,6,36,253,120,24,2,239,70,180, +217,90,194,222,241,39,75,22,137,39,84,210,232,251,156,120,202,91,43,168, +249,73,105,41,213,214,170,90,121,127,9,0,59 +}; diff --git a/ediv/ideQT/gif/ediv_icon.h b/ediv/ideQT/gif/ediv_icon.h new file mode 100644 index 0000000..1cff9a6 --- /dev/null +++ b/ediv/ideQT/gif/ediv_icon.h @@ -0,0 +1,42 @@ +static unsigned char ediv_icon[]={ +71,73,70,56,55,97,32,0,32,0,230,0,0,4,2,4,220,134,132,124,46,44,204,90,92,236,194,196,172,70,68,68, +26,28,220,166,164,244,226,228,196,114,116,212,74,76,36,14,12,140,62,60,100,42,44,212,90,92,236,178,180,244,210,212, +228,146,148,172,86,84,252,242,244,52,18,20,84,38,36,156,66,68,212,102,100,20,6,4,188,74,76,236,170,172,196,82, +84,220,142,140,124,54,52,244,202,204,252,234,236,220,110,108,180,78,76,84,34,36,236,162,164,116,46,44,212,98,100,236, +186,188,244,218,220,52,26,28,164,74,76,212,82,84,188,98,100,244,194,196,180,70,68,76,34,36,252,226,228,44,22,20, +228,154,156,252,250,252,164,66,68,28,14,12,140,58,60,220,126,124,12,2,4,228,130,132,76,30,28,228,162,164,44,18, +20,148,62,60,108,46,44,220,94,92,188,82,84,60,22,20,92,38,36,220,102,100,28,10,12,204,86,84,228,138,140,132, +54,52,244,186,188,252,218,220,124,50,52,204,94,92,236,198,196,172,74,76,68,30,28,244,230,228,212,114,116,212,78,76, +36,18,20,100,46,44,212,94,92,236,182,180,244,214,212,228,150,148,252,246,244,52,22,20,156,70,68,20,10,12,188,78, +76,236,174,172,196,86,84,244,206,204,252,238,236,220,114,116,236,166,164,116,50,52,220,98,100,236,190,188,244,222,220,60, +26,28,212,86,84,204,102,100,244,198,196,180,74,76,252,230,228,228,158,156,252,254,252,164,70,68,228,126,124,12,6,4, +228,134,132,228,166,164,148,66,68,188,86,84,92,42,44,220,106,108,228,142,140,132,58,60,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,32,0,32,0,0,7,255,128,0,130,131,0,55,55, +112,24,90,67,67,52,67,11,140,139,90,24,112,134,132,150,130,135,137,138,11,59,157,48,88,88,59,48,59,11,141,137, +148,151,130,136,138,67,157,88,102,6,6,77,77,176,102,64,64,59,81,166,112,112,151,55,137,52,81,20,40,77,46,46, +21,65,201,201,34,46,180,184,165,24,24,55,132,188,67,81,59,64,77,34,21,13,61,36,98,98,73,224,61,61,13,34, +57,6,161,11,146,189,133,24,52,11,88,6,46,65,61,73,53,60,115,22,51,89,22,115,60,12,140,136,145,82,33,135, +25,82,146,84,105,137,103,128,91,7,6,22,212,100,200,176,161,75,151,13,27,90,20,112,51,199,8,137,32,46,204,80, +160,161,37,19,13,10,102,42,144,48,98,33,196,6,34,1,200,156,56,1,225,196,139,37,119,54,168,201,82,67,76,144, +28,161,134,84,139,98,70,68,15,60,110,232,168,176,147,70,198,7,46,113,108,188,209,49,161,13,1,37,59,241,244,168, +96,96,7,141,104,67,176,228,104,128,180,203,25,48,101,218,188,224,160,66,197,25,21,10,255,238,92,105,227,165,139,154, +57,73,26,184,192,242,117,161,153,32,98,44,108,112,32,228,68,155,43,4,132,56,24,227,160,132,143,18,78,100,180,225, +146,33,69,13,41,34,14,42,218,209,164,65,13,53,83,84,200,57,124,133,203,20,31,167,81,59,240,114,248,195,147,25, +60,124,118,85,132,69,132,152,57,93,28,216,249,32,227,202,132,24,42,28,156,17,238,0,202,3,210,108,90,224,13,210, +4,6,35,44,21,58,20,112,160,226,78,239,43,165,75,8,185,96,135,251,148,227,146,169,108,177,144,164,78,142,29,142, +128,212,49,18,98,10,20,54,135,123,79,112,242,97,205,135,15,244,191,172,65,224,228,200,15,188,13,52,129,133,35,127, +225,177,69,9,42,232,64,218,21,84,220,17,129,131,16,22,17,192,27,56,216,240,67,108,117,52,49,210,2,234,213,16, +130,15,80,140,16,159,12,114,184,117,198,91,40,14,119,198,6,110,48,208,67,102,232,45,80,96,123,42,196,64,154,12, +16,92,224,0,106,167,157,182,163,3,33,100,209,129,57,154,197,83,129,17,76,132,118,71,255,27,189,201,240,197,27,103, +76,177,163,148,60,118,1,155,79,2,174,115,146,11,98,204,48,128,110,145,97,39,3,25,195,141,225,227,105,103,180,32, +129,86,34,104,184,206,16,48,228,208,3,15,63,128,56,218,21,189,181,193,6,20,195,245,168,194,6,7,32,225,70,16, +48,14,161,133,95,65,116,192,196,0,143,53,133,29,158,15,216,33,220,112,69,148,177,70,2,36,152,135,69,20,66,189, +83,219,156,63,76,113,6,83,19,200,96,106,27,31,120,177,132,7,39,200,144,198,10,2,188,104,6,12,143,84,179,195, +95,129,213,217,88,24,16,56,129,93,27,192,126,1,129,21,106,8,148,97,80,210,32,18,207,88,44,109,225,35,24,69, +232,240,192,180,58,224,128,70,1,61,233,117,208,58,237,192,97,13,22,46,244,208,65,68,185,9,231,131,15,66,148,224, +192,22,51,48,48,164,8,233,60,50,73,37,24,180,2,132,11,13,136,193,192,12,46,17,225,239,6,91,48,145,133,187, +13,84,208,196,51,90,160,162,202,59,59,96,209,68,61,250,242,96,129,27,110,244,195,131,86,64,82,252,180,237,16,243, +14,98,200,59,81,56,44,2,196,29,116,96,132,17,29,136,81,78,155,34,113,154,240,52,150,128,197,9,10,243,32,211, +192,205,13,16,218,12,16,180,154,82,137,47,192,112,242,138,44,77,228,48,139,25,7,145,194,177,194,169,0,192,75,34, +142,92,3,3,5,163,116,178,64,41,135,50,45,72,32,0,59 +}; diff --git a/ediv/ideQT/gif/emini.gif b/ediv/ideQT/gif/emini.gif new file mode 100644 index 0000000..14eb612 Binary files /dev/null and b/ediv/ideQT/gif/emini.gif differ diff --git a/ediv/ideQT/gif/emini.h b/ediv/ideQT/gif/emini.h new file mode 100644 index 0000000..648feff --- /dev/null +++ b/ediv/ideQT/gif/emini.h @@ -0,0 +1,35 @@ +static unsigned char emini_gif[]={ +71,73,70,56,55,97,16,0,16,0,230,0,0,4,2,4,196,130,132,124, +54,52,204,90,92,236,194,196,172,66,68,68,26,28,228,162,164,148,54,52, +188,110,108,36,14,12,244,226,228,212,66,68,100,42,44,156,66,68,228,146, +148,252,246,244,212,90,92,20,6,4,172,74,76,84,38,36,236,178,180,220, +114,116,52,22,20,244,234,236,196,82,84,132,58,60,100,46,44,212,126,124, +244,202,204,148,62,60,164,74,76,220,154,156,220,102,100,236,186,188,212,82, +84,228,134,132,92,34,36,44,22,20,252,226,228,164,66,68,28,14,12,188, +78,76,116,46,44,228,122,124,12,2,4,140,50,52,188,106,108,244,194,196, +180,66,68,76,34,36,156,58,60,44,18,20,220,98,100,28,10,12,180,74, +76,92,38,36,60,26,28,252,234,236,204,78,76,140,58,60,220,122,124,228, +154,156,244,190,188,228,142,140,68,30,28,236,170,172,148,58,60,36,18,20, +244,230,228,212,74,76,108,38,36,156,70,68,228,150,148,252,254,252,220,94, +92,20,10,12,236,182,180,220,118,116,52,26,28,108,46,44,244,206,204,156, +62,60,220,106,108,236,190,188,212,86,84,228,138,140,252,230,228,164,70,68, +116,50,52,12,6,4,140,54,52,204,102,100,244,198,196,180,70,68,180,78, +76,92,42,44,252,238,236,204,82,84,140,62,60,220,126,124,228,158,156,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0, +0,0,16,0,16,0,0,7,243,128,0,0,45,90,76,54,10,52,23,52, +68,41,18,90,130,130,18,41,52,65,20,56,56,20,20,6,38,54,18,145, +68,65,56,2,91,51,72,67,46,89,20,57,10,90,90,41,6,80,40,25, +73,77,7,21,32,5,99,56,23,157,23,27,88,17,29,24,78,53,78,16, +84,5,2,50,10,41,65,99,98,7,74,101,12,85,12,21,74,28,91,96, +52,10,20,5,75,11,74,34,36,64,36,48,74,21,67,13,52,52,56,42, +33,58,74,93,73,101,101,73,15,61,30,187,237,55,33,69,74,77,118,84, +25,49,48,134,50,34,10,100,124,168,210,65,73,24,11,35,34,140,24,240, +2,138,1,5,76,114,8,16,211,35,94,17,43,22,72,136,8,80,226,73, +167,118,72,70,244,128,129,1,194,9,24,9,142,4,33,34,161,69,198,6, +14,50,84,153,98,129,11,138,21,20,120,61,106,145,34,135,40,7,40,80, +12,201,130,99,21,147,22,130,180,216,160,145,131,2,152,6,56,100,92,192, +8,21,146,77,68,23,194,114,123,42,40,16,0,59 +}; diff --git a/ediv/ideQT/gif/export.gif b/ediv/ideQT/gif/export.gif new file mode 100644 index 0000000..47b5432 Binary files /dev/null and b/ediv/ideQT/gif/export.gif differ diff --git a/ediv/ideQT/gif/export.h b/ediv/ideQT/gif/export.h new file mode 100644 index 0000000..f0bfd87 --- /dev/null +++ b/ediv/ideQT/gif/export.h @@ -0,0 +1,8 @@ +static unsigned char export_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,191,191,191,255,255,255,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,59,56,186,212, +254,35,200,160,158,141,3,80,106,93,156,223,208,17,88,185,136,208,164,82, +2,218,148,235,32,180,158,42,207,56,77,82,88,158,139,31,201,205,55,83, +216,136,69,210,105,248,27,89,146,206,135,46,234,161,90,19,0,59 +}; diff --git a/ediv/ideQT/gif/find.gif b/ediv/ideQT/gif/find.gif new file mode 100644 index 0000000..2e62d7e Binary files /dev/null and b/ediv/ideQT/gif/find.gif differ diff --git a/ediv/ideQT/gif/find.h b/ediv/ideQT/gif/find.h new file mode 100644 index 0000000..9a2c501 --- /dev/null +++ b/ediv/ideQT/gif/find.h @@ -0,0 +1,7 @@ +static unsigned char find_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,255,255,255,0,0,0,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,48,148,143,137,193,199,161,68,0,208,204,154,158,107,249,65, +143,89,84,115,113,22,136,86,204,248,149,218,250,186,164,12,123,18,122,131, +18,155,241,110,31,211,44,108,145,162,177,88,0,0,59 +}; diff --git a/ediv/ideQT/gif/find2.gif b/ediv/ideQT/gif/find2.gif new file mode 100644 index 0000000..fbe0c00 Binary files /dev/null and b/ediv/ideQT/gif/find2.gif differ diff --git a/ediv/ideQT/gif/find2.h b/ediv/ideQT/gif/find2.h new file mode 100644 index 0000000..513ab46 --- /dev/null +++ b/ediv/ideQT/gif/find2.h @@ -0,0 +1,8 @@ +static unsigned char find2_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,255,0,0,0,255,255,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,54,88,186,220, +254,133,72,216,36,161,56,79,101,161,149,131,48,92,80,64,132,223,167,0, +128,41,190,97,124,177,102,44,164,164,226,218,40,35,213,175,142,143,96,58, +193,114,195,136,106,136,164,8,51,139,4,0,59 +}; diff --git a/ediv/ideQT/gif/firstaid.gif b/ediv/ideQT/gif/firstaid.gif new file mode 100644 index 0000000..be8b7e0 Binary files /dev/null and b/ediv/ideQT/gif/firstaid.gif differ diff --git a/ediv/ideQT/gif/firstaid.h b/ediv/ideQT/gif/firstaid.h new file mode 100644 index 0000000..5cd1b6c --- /dev/null +++ b/ediv/ideQT/gif/firstaid.h @@ -0,0 +1,9 @@ +static unsigned char firstaid_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,127,127,127,191,191,191,255, +0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,63,88,186,220, +222,226,185,168,168,92,246,70,193,11,5,68,40,142,4,67,12,104,58,16, +65,91,42,39,42,164,108,27,188,49,55,15,55,89,196,131,29,79,53,0, +157,90,170,64,10,73,106,54,127,34,199,104,17,146,84,47,216,236,34,1, +0,59 +}; diff --git a/ediv/ideQT/gif/fldropen.gif b/ediv/ideQT/gif/fldropen.gif new file mode 100644 index 0000000..fd60622 Binary files /dev/null and b/ediv/ideQT/gif/fldropen.gif differ diff --git a/ediv/ideQT/gif/fldropen.h b/ediv/ideQT/gif/fldropen.h new file mode 100644 index 0000000..4ab35cd --- /dev/null +++ b/ediv/ideQT/gif/fldropen.h @@ -0,0 +1,8 @@ +static unsigned char fldropen_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,127,127,127,191,191,191,255, +255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,53,88,186,220, +254,48,54,64,42,1,146,12,177,73,212,92,104,57,68,184,157,130,199,128, +232,169,46,101,103,205,149,2,106,193,144,239,131,90,226,186,96,238,85,17, +26,95,54,218,76,194,108,58,29,9,0,59 +}; diff --git a/ediv/ideQT/gif/fldrshut.gif b/ediv/ideQT/gif/fldrshut.gif new file mode 100644 index 0000000..1ad70c8 Binary files /dev/null and b/ediv/ideQT/gif/fldrshut.gif differ diff --git a/ediv/ideQT/gif/fldrshut.h b/ediv/ideQT/gif/fldrshut.h new file mode 100644 index 0000000..caff1a1 --- /dev/null +++ b/ediv/ideQT/gif/fldrshut.h @@ -0,0 +1,8 @@ +static unsigned char fldrshut_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,47,72,186,220, +254,48,58,48,234,0,114,4,177,71,180,160,229,104,92,185,5,30,51,152, +108,186,144,167,233,42,107,28,207,4,204,162,77,189,11,184,92,8,36,41, +26,143,141,4,0,59 +}; diff --git a/ediv/ideQT/gif/gears.gif b/ediv/ideQT/gif/gears.gif new file mode 100644 index 0000000..1f0b03b Binary files /dev/null and b/ediv/ideQT/gif/gears.gif differ diff --git a/ediv/ideQT/gif/gears.h b/ediv/ideQT/gif/gears.h new file mode 100644 index 0000000..075a08c --- /dev/null +++ b/ediv/ideQT/gif/gears.h @@ -0,0 +1,8 @@ +static unsigned char gears_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,191,191,191,127,127,127,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,71,84,32,25,33,227,63,4,58,140,37,56,142,52,102,53, +184,45,85,242,57,138,213,125,85,116,138,74,132,198,36,147,41,19,220,172, +48,242,144,96,50,185,96,76,11,4,128,166,51,1,83,138,82,207,3,56, +190,32,22,79,106,200,1,142,132,142,85,174,67,27,70,10,0,59 +}; diff --git a/ediv/ideQT/gif/gif2h.exe b/ediv/ideQT/gif/gif2h.exe new file mode 100644 index 0000000..f42e089 Binary files /dev/null and b/ediv/ideQT/gif/gif2h.exe differ diff --git a/ediv/ideQT/gif/grphbar.gif b/ediv/ideQT/gif/grphbar.gif new file mode 100644 index 0000000..1ab6304 Binary files /dev/null and b/ediv/ideQT/gif/grphbar.gif differ diff --git a/ediv/ideQT/gif/grphbar.h b/ediv/ideQT/gif/grphbar.h new file mode 100644 index 0000000..13f0d4e --- /dev/null +++ b/ediv/ideQT/gif/grphbar.h @@ -0,0 +1,9 @@ +static unsigned char grphbar_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,127,127,127,255,255,0,255, +0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,73,8,64,218, +238,165,144,72,171,93,182,146,77,103,142,67,88,40,204,198,56,225,0,68, +147,224,90,105,132,185,2,44,178,5,45,113,49,9,208,128,128,16,144,90, +73,114,47,97,160,16,27,181,146,66,230,237,168,83,74,7,163,133,105,203, +245,124,190,29,142,105,231,5,91,18,0,59 +}; diff --git a/ediv/ideQT/gif/help.gif b/ediv/ideQT/gif/help.gif new file mode 100644 index 0000000..dcd269e Binary files /dev/null and b/ediv/ideQT/gif/help.gif differ diff --git a/ediv/ideQT/gif/help.h b/ediv/ideQT/gif/help.h new file mode 100644 index 0000000..4f89df2 --- /dev/null +++ b/ediv/ideQT/gif/help.h @@ -0,0 +1,7 @@ +static unsigned char help_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,128,128,0,255,255,0,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,43,156,143,169,194,173,39,130,148,64,188,24,42,174,43,219, +17,113,73,104,109,223,88,82,231,165,62,8,233,190,94,12,205,180,193,220, +184,77,195,122,174,163,21,0,0,59 +}; diff --git a/ediv/ideQT/gif/help2.gif b/ediv/ideQT/gif/help2.gif new file mode 100644 index 0000000..af5abb3 Binary files /dev/null and b/ediv/ideQT/gif/help2.gif differ diff --git a/ediv/ideQT/gif/help2.h b/ediv/ideQT/gif/help2.h new file mode 100644 index 0000000..293a98d --- /dev/null +++ b/ediv/ideQT/gif/help2.h @@ -0,0 +1,8 @@ +static unsigned char help2_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,128,128,128,0,0,128,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,55,156,143,57,162,22,255,192,98,233,25,16,133,70,241,64, +189,57,129,36,6,96,136,5,87,118,82,220,56,181,239,209,130,34,25,135, +30,108,108,122,179,160,185,6,144,198,175,104,28,2,123,202,165,115,80,0, +0,59 +}; diff --git a/ediv/ideQT/gif/helpindx.gif b/ediv/ideQT/gif/helpindx.gif new file mode 100644 index 0000000..6db663a Binary files /dev/null and b/ediv/ideQT/gif/helpindx.gif differ diff --git a/ediv/ideQT/gif/helpindx.h b/ediv/ideQT/gif/helpindx.h new file mode 100644 index 0000000..61a9d8e --- /dev/null +++ b/ediv/ideQT/gif/helpindx.h @@ -0,0 +1,10 @@ +static unsigned char helpindx_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,7,0,191,191,191,127,127,127,0, +0,255,255,0,0,0,0,0,255,255,0,255,255,255,0,0,0,33,249,4, +1,0,0,7,0,44,0,0,0,0,16,0,16,0,0,3,90,120,122,86, +221,43,170,54,234,128,146,149,74,111,145,79,229,136,152,226,156,221,19,53, +68,187,13,45,241,45,133,220,217,117,20,16,33,128,18,129,197,14,21,120, +212,130,10,94,104,128,50,16,20,59,131,244,245,144,2,15,81,169,180,168, +117,6,121,192,104,49,12,62,180,0,104,0,144,144,86,63,5,240,184,26, +16,143,103,234,130,76,2,0,59 +}; diff --git a/ediv/ideQT/gif/hourglas.gif b/ediv/ideQT/gif/hourglas.gif new file mode 100644 index 0000000..f6cdb76 Binary files /dev/null and b/ediv/ideQT/gif/hourglas.gif differ diff --git a/ediv/ideQT/gif/hourglas.h b/ediv/ideQT/gif/hourglas.h new file mode 100644 index 0000000..217e681 --- /dev/null +++ b/ediv/ideQT/gif/hourglas.h @@ -0,0 +1,10 @@ +static unsigned char hourglas_gif[]={ +71,73,70,56,57,97,16,0,16,0,179,8,0,127,127,127,128,0,0,191, +191,191,0,0,128,255,255,0,255,255,255,0,0,0,0,0,255,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,8,0,44,0,0,0,0,16,0,16,0,0,4, +72,16,141,73,43,69,120,156,205,251,25,152,52,9,100,41,92,33,98,152, +65,1,24,105,184,10,1,81,16,111,44,215,109,0,235,187,130,15,24,91, +253,136,152,21,238,8,156,181,114,205,146,13,0,45,150,90,46,166,104,64, +226,145,80,18,143,24,148,177,152,201,72,96,4,0,59 +}; diff --git a/ediv/ideQT/gif/ignore.gif b/ediv/ideQT/gif/ignore.gif new file mode 100644 index 0000000..6c52907 Binary files /dev/null and b/ediv/ideQT/gif/ignore.gif differ diff --git a/ediv/ideQT/gif/ignore.h b/ediv/ideQT/gif/ignore.h new file mode 100644 index 0000000..f8b261b --- /dev/null +++ b/ediv/ideQT/gif/ignore.h @@ -0,0 +1,8 @@ +static unsigned char ignore_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,128,0,0,127,127,127,0, +0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,52,72,186,220, +254,109,72,21,68,80,114,176,76,132,39,92,36,121,66,232,140,222,4,129, +128,0,104,171,210,2,49,54,148,48,196,153,226,80,5,60,155,134,4,82, +9,41,150,99,109,201,100,38,0,0,59 +}; diff --git a/ediv/ideQT/gif/import.gif b/ediv/ideQT/gif/import.gif new file mode 100644 index 0000000..eaf094f Binary files /dev/null and b/ediv/ideQT/gif/import.gif differ diff --git a/ediv/ideQT/gif/import.h b/ediv/ideQT/gif/import.h new file mode 100644 index 0000000..fe16e20 --- /dev/null +++ b/ediv/ideQT/gif/import.h @@ -0,0 +1,9 @@ +static unsigned char import_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,191,191,191,255,0,0,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,65,72,58,218, +254,36,48,72,131,164,109,216,61,186,119,218,102,13,66,217,101,34,7,8, +228,20,138,164,105,18,239,200,182,222,20,73,113,233,179,141,75,11,208,97, +1,23,139,223,79,151,185,221,90,144,158,146,153,84,206,30,185,44,21,211, +72,0,0,59 +}; diff --git a/ediv/ideQT/gif/key.gif b/ediv/ideQT/gif/key.gif new file mode 100644 index 0000000..7380641 Binary files /dev/null and b/ediv/ideQT/gif/key.gif differ diff --git a/ediv/ideQT/gif/key.h b/ediv/ideQT/gif/key.h new file mode 100644 index 0000000..744be8a --- /dev/null +++ b/ediv/ideQT/gif/key.h @@ -0,0 +1,9 @@ +static unsigned char key_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,128,128,0,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,62,72,10,211, +3,42,202,39,170,120,50,142,26,130,29,25,1,0,215,224,85,96,182,149, +39,166,90,112,250,194,130,39,71,204,183,217,33,211,16,14,94,232,37,28, +42,26,181,139,81,211,40,46,119,202,37,16,121,123,70,165,211,65,2,0, +59 +}; diff --git a/ediv/ideQT/gif/led1off.gif b/ediv/ideQT/gif/led1off.gif new file mode 100644 index 0000000..a638a58 Binary files /dev/null and b/ediv/ideQT/gif/led1off.gif differ diff --git a/ediv/ideQT/gif/led1off.h b/ediv/ideQT/gif/led1off.h new file mode 100644 index 0000000..1c32b27 --- /dev/null +++ b/ediv/ideQT/gif/led1off.h @@ -0,0 +1,9 @@ +static unsigned char led1off_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,128,0,0,127,127,127,191, +191,191,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,74,88,170,212, +189,144,145,65,133,120,113,138,224,130,37,144,230,140,223,66,92,35,9,22, +19,215,88,64,119,177,131,35,0,120,252,130,147,147,227,29,30,138,240,211, +17,56,172,141,15,216,8,32,147,169,209,51,57,148,78,169,174,163,115,21, +58,109,182,220,8,107,36,46,155,11,9,0,59 +}; diff --git a/ediv/ideQT/gif/led1on.gif b/ediv/ideQT/gif/led1on.gif new file mode 100644 index 0000000..f727a8f Binary files /dev/null and b/ediv/ideQT/gif/led1on.gif differ diff --git a/ediv/ideQT/gif/led1on.h b/ediv/ideQT/gif/led1on.h new file mode 100644 index 0000000..0fb40ca --- /dev/null +++ b/ediv/ideQT/gif/led1on.h @@ -0,0 +1,10 @@ +static unsigned char led1on_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,6,0,128,0,0,127,127,127,191, +191,191,255,0,0,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,87,104,170,213, +189,144,21,66,133,120,113,138,224,130,45,144,54,13,4,89,124,203,57,57, +13,161,50,68,224,78,101,235,129,235,48,14,128,174,95,134,149,107,64,228, +173,56,193,139,175,7,0,20,116,200,147,172,193,115,78,2,200,228,138,229, +202,38,47,165,112,1,11,74,89,56,13,172,55,117,218,144,203,17,137,35, +78,175,27,18,0,59 +}; diff --git a/ediv/ideQT/gif/led2off.gif b/ediv/ideQT/gif/led2off.gif new file mode 100644 index 0000000..1503d8b Binary files /dev/null and b/ediv/ideQT/gif/led2off.gif differ diff --git a/ediv/ideQT/gif/led2off.h b/ediv/ideQT/gif/led2off.h new file mode 100644 index 0000000..c6c3e68 --- /dev/null +++ b/ediv/ideQT/gif/led2off.h @@ -0,0 +1,9 @@ +static unsigned char led2off_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,0,128,0,127,127,127,191, +191,191,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,74,88,170,212, +189,144,145,65,133,120,113,138,224,130,37,144,230,140,223,66,92,35,9,22, +19,215,88,64,119,177,131,35,0,120,252,130,147,147,227,29,30,138,240,211, +17,56,172,141,15,216,8,32,147,169,209,51,57,148,78,169,174,163,115,21, +58,109,182,220,8,107,36,46,155,11,9,0,59 +}; diff --git a/ediv/ideQT/gif/led2on.gif b/ediv/ideQT/gif/led2on.gif new file mode 100644 index 0000000..4e52661 Binary files /dev/null and b/ediv/ideQT/gif/led2on.gif differ diff --git a/ediv/ideQT/gif/led2on.h b/ediv/ideQT/gif/led2on.h new file mode 100644 index 0000000..b2bff92 --- /dev/null +++ b/ediv/ideQT/gif/led2on.h @@ -0,0 +1,10 @@ +static unsigned char led2on_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,6,0,0,128,0,127,127,127,191, +191,191,0,255,0,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,87,104,170,213, +189,144,21,66,133,120,113,138,224,130,45,144,54,13,4,89,124,203,57,57, +13,161,50,68,224,78,101,235,129,235,48,14,128,174,95,134,149,107,64,228, +173,56,193,139,175,7,0,20,116,200,147,172,193,115,78,2,200,228,138,229, +202,38,47,165,112,1,11,74,89,56,13,172,55,117,218,144,203,17,137,35, +78,175,27,18,0,59 +}; diff --git a/ediv/ideQT/gif/led3off.gif b/ediv/ideQT/gif/led3off.gif new file mode 100644 index 0000000..91e782b Binary files /dev/null and b/ediv/ideQT/gif/led3off.gif differ diff --git a/ediv/ideQT/gif/led3off.h b/ediv/ideQT/gif/led3off.h new file mode 100644 index 0000000..24832e1 --- /dev/null +++ b/ediv/ideQT/gif/led3off.h @@ -0,0 +1,9 @@ +static unsigned char led3off_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,128,128,0,127,127,127,191, +191,191,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,74,88,170,212, +189,144,145,65,133,120,113,138,224,130,37,144,230,140,223,66,92,35,9,22, +19,215,88,64,119,177,131,35,0,120,252,130,147,147,227,29,30,138,240,211, +17,56,172,141,15,216,8,32,147,169,209,51,57,148,78,169,174,163,115,21, +58,109,182,220,8,107,36,46,155,11,9,0,59 +}; diff --git a/ediv/ideQT/gif/led3on.gif b/ediv/ideQT/gif/led3on.gif new file mode 100644 index 0000000..1eab358 Binary files /dev/null and b/ediv/ideQT/gif/led3on.gif differ diff --git a/ediv/ideQT/gif/led3on.h b/ediv/ideQT/gif/led3on.h new file mode 100644 index 0000000..9e37a0f --- /dev/null +++ b/ediv/ideQT/gif/led3on.h @@ -0,0 +1,10 @@ +static unsigned char led3on_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,6,0,128,128,0,127,127,127,191, +191,191,255,255,0,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,87,104,170,213, +189,144,21,66,133,120,113,138,224,130,45,144,54,13,4,89,124,203,57,57, +13,161,50,68,224,78,101,235,129,235,48,14,128,174,95,134,149,107,64,228, +173,56,193,139,175,7,0,20,116,200,147,172,193,115,78,2,200,228,138,229, +202,38,47,165,112,1,11,74,89,56,13,172,55,117,218,144,203,17,137,35, +78,175,27,18,0,59 +}; diff --git a/ediv/ideQT/gif/library.gif b/ediv/ideQT/gif/library.gif new file mode 100644 index 0000000..40b9b83 Binary files /dev/null and b/ediv/ideQT/gif/library.gif differ diff --git a/ediv/ideQT/gif/library.h b/ediv/ideQT/gif/library.h new file mode 100644 index 0000000..4172ea7 --- /dev/null +++ b/ediv/ideQT/gif/library.h @@ -0,0 +1,9 @@ +static unsigned char library_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,7,0,128,128,0,127,127,127,0, +255,255,255,255,0,255,0,0,0,0,255,0,0,0,0,0,0,33,249,4, +1,0,0,7,0,44,0,0,0,0,16,0,16,0,0,3,72,120,186,107, +206,144,25,98,162,117,213,30,236,104,12,88,81,116,21,166,24,3,192,77, +165,144,161,170,72,110,79,16,12,142,204,110,238,54,216,6,157,199,208,67, +149,132,45,131,13,183,65,242,28,191,64,115,180,35,66,95,171,164,241,228, +180,58,164,180,85,88,163,73,0,0,59 +}; diff --git a/ediv/ideQT/gif/lock.gif b/ediv/ideQT/gif/lock.gif new file mode 100644 index 0000000..9ef3611 Binary files /dev/null and b/ediv/ideQT/gif/lock.gif differ diff --git a/ediv/ideQT/gif/lock.h b/ediv/ideQT/gif/lock.h new file mode 100644 index 0000000..48cb420 --- /dev/null +++ b/ediv/ideQT/gif/lock.h @@ -0,0 +1,8 @@ +static unsigned char lock_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,127,127,127,191,191,191,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,60,156,45,153,199,39,1,161,104,7,128,160,130,165,227,77, +132,113,158,19,82,35,248,49,202,186,170,209,251,166,130,101,41,52,32,199, +73,236,208,18,68,203,69,112,151,72,170,99,209,204,52,56,211,67,199,65, +180,162,84,70,1,0,59 +}; diff --git a/ediv/ideQT/gif/mail.gif b/ediv/ideQT/gif/mail.gif new file mode 100644 index 0000000..f75ea64 Binary files /dev/null and b/ediv/ideQT/gif/mail.gif differ diff --git a/ediv/ideQT/gif/mail.h b/ediv/ideQT/gif/mail.h new file mode 100644 index 0000000..55cc496 --- /dev/null +++ b/ediv/ideQT/gif/mail.h @@ -0,0 +1,8 @@ +static unsigned char mail_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,6,0,0,255,0,0,0,255,127, +127,127,255,0,0,0,0,0,255,255,255,0,0,0,0,0,0,33,249,4, +1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,45,104,186,220, +254,48,46,66,171,189,180,232,205,203,0,67,38,140,157,54,4,64,86,114, +67,171,106,99,44,112,239,74,19,92,188,214,182,134,253,22,137,112,72,44, +50,18,0,59 +}; diff --git a/ediv/ideQT/gif/monitor.gif b/ediv/ideQT/gif/monitor.gif new file mode 100644 index 0000000..bd75336 Binary files /dev/null and b/ediv/ideQT/gif/monitor.gif differ diff --git a/ediv/ideQT/gif/monitor.h b/ediv/ideQT/gif/monitor.h new file mode 100644 index 0000000..d02bcd6 --- /dev/null +++ b/ediv/ideQT/gif/monitor.h @@ -0,0 +1,9 @@ +static unsigned char monitor_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,7,0,191,191,191,127,127,127,255, +0,255,255,0,0,0,255,0,255,255,255,0,0,0,0,0,0,33,249,4, +1,0,0,7,0,44,0,0,0,0,16,0,16,0,0,3,77,104,186,220, +103,37,202,41,205,43,33,235,29,138,133,65,195,0,222,21,18,104,74,24, +228,135,25,196,48,196,51,91,130,176,76,175,173,9,11,64,32,239,246,82, +165,108,174,144,72,209,3,1,158,80,104,199,69,153,12,34,159,229,242,192, +237,178,158,150,174,248,193,201,132,197,218,69,55,1,0,59 +}; diff --git a/ediv/ideQT/gif/music.gif b/ediv/ideQT/gif/music.gif new file mode 100644 index 0000000..1420ee8 Binary files /dev/null and b/ediv/ideQT/gif/music.gif differ diff --git a/ediv/ideQT/gif/music.h b/ediv/ideQT/gif/music.h new file mode 100644 index 0000000..0169cb7 --- /dev/null +++ b/ediv/ideQT/gif/music.h @@ -0,0 +1,7 @@ +static unsigned char music_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,0,0,0,127,127,127,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,48,148,143,169,2,237,123,0,146,144,185,54,131,214,96,135, +190,81,209,148,121,32,103,50,150,168,26,77,120,162,156,196,186,152,237,153, +241,93,69,113,158,171,65,30,61,91,81,81,0,0,59 +}; diff --git a/ediv/ideQT/gif/new.gif b/ediv/ideQT/gif/new.gif new file mode 100644 index 0000000..a34f762 Binary files /dev/null and b/ediv/ideQT/gif/new.gif differ diff --git a/ediv/ideQT/gif/new.h b/ediv/ideQT/gif/new.h new file mode 100644 index 0000000..5c8fec8 --- /dev/null +++ b/ediv/ideQT/gif/new.h @@ -0,0 +1,7 @@ +static unsigned char new_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,0,0,0,255,255,255,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,43,148,143,121,192,205,106,64,152,244,41,73,167,4,55,235, +150,96,158,22,142,85,105,6,28,34,142,235,146,170,168,249,70,113,45,180, +30,238,244,22,4,12,6,11,0,59 +}; diff --git a/ediv/ideQT/gif/no.gif b/ediv/ideQT/gif/no.gif new file mode 100644 index 0000000..890c3f1 Binary files /dev/null and b/ediv/ideQT/gif/no.gif differ diff --git a/ediv/ideQT/gif/no.h b/ediv/ideQT/gif/no.h new file mode 100644 index 0000000..3e4fe91 --- /dev/null +++ b/ediv/ideQT/gif/no.h @@ -0,0 +1,7 @@ +static unsigned char no_gif[]={ +71,73,70,56,57,97,16,0,16,0,128,1,0,255,0,0,0,0,0,33, +249,4,1,0,0,1,0,44,0,0,0,0,16,0,16,0,0,2,44,140, +13,153,199,168,15,90,80,114,29,218,222,141,121,113,203,96,30,183,145,99, +8,78,17,136,109,170,67,186,147,26,59,101,77,163,85,10,67,248,253,147, +8,13,5,0,59 +}; diff --git a/ediv/ideQT/gif/open.gif b/ediv/ideQT/gif/open.gif new file mode 100644 index 0000000..b9dbad2 Binary files /dev/null and b/ediv/ideQT/gif/open.gif differ diff --git a/ediv/ideQT/gif/open.h b/ediv/ideQT/gif/open.h new file mode 100644 index 0000000..ad1ca44 --- /dev/null +++ b/ediv/ideQT/gif/open.h @@ -0,0 +1,8 @@ +static unsigned char open_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,128,128,0,255,255,255,255, +255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,53,72,186,220, +206,35,190,54,86,173,147,226,136,29,39,131,16,8,92,73,141,168,40,118, +74,152,166,44,8,151,116,164,14,64,174,235,215,136,239,187,13,9,24,180, +252,136,0,86,141,150,105,58,31,9,0,59 +}; diff --git a/ediv/ideQT/gif/panelize.gif b/ediv/ideQT/gif/panelize.gif new file mode 100644 index 0000000..9ee7335 Binary files /dev/null and b/ediv/ideQT/gif/panelize.gif differ diff --git a/ediv/ideQT/gif/panelize.h b/ediv/ideQT/gif/panelize.h new file mode 100644 index 0000000..9999df0 --- /dev/null +++ b/ediv/ideQT/gif/panelize.h @@ -0,0 +1,49 @@ +static unsigned char panelize_gif[]={ +71,73,70,56,55,97,16,0,16,0,247,255,0,0,0,0,253,255,253,187, +255,202,130,255,158,80,255,120,37,255,87,0,151,33,0,178,39,0,128,28, +216,216,216,210,210,210,132,132,132,255,255,255,246,246,246,254,254,254,249,249, +249,237,237,237,226,226,226,203,203,203,170,170,170,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,20,0,44,0,0,0,0,16,0,16,0,7,8, +121,0,41,8,28,72,176,160,193,131,5,1,40,92,200,144,161,64,0,1, +4,12,32,64,160,128,197,139,6,0,60,60,192,177,163,71,3,8,52,82, +104,72,114,225,195,4,10,20,44,0,144,178,165,74,145,0,24,52,104,176, +114,166,77,154,48,25,56,112,176,114,231,131,159,15,86,62,100,0,1,194, +202,162,72,141,230,140,16,97,37,211,167,77,151,70,133,202,84,232,72,6, +18,36,172,204,202,85,43,204,9,96,39,0,8,75,22,102,73,146,8,211, +6,4,0,59 +}; diff --git a/ediv/ideQT/gif/paste.gif b/ediv/ideQT/gif/paste.gif new file mode 100644 index 0000000..da33265 Binary files /dev/null and b/ediv/ideQT/gif/paste.gif differ diff --git a/ediv/ideQT/gif/paste.h b/ediv/ideQT/gif/paste.h new file mode 100644 index 0000000..66bca6c --- /dev/null +++ b/ediv/ideQT/gif/paste.h @@ -0,0 +1,9 @@ +static unsigned char paste_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,7,0,192,192,192,128,128,0,128, +128,128,0,0,128,255,255,0,255,255,255,0,0,0,0,0,0,33,249,4, +1,0,0,7,0,44,0,0,0,0,16,0,16,0,0,3,75,120,186,220, +110,208,56,21,33,33,85,210,32,130,193,159,209,9,154,72,2,104,42,122, +27,153,65,2,73,141,92,77,151,118,48,236,252,80,210,130,65,97,56,220, +181,106,66,98,65,56,56,172,70,204,221,146,103,200,37,149,197,39,39,218, +91,58,43,87,108,179,209,43,143,39,147,4,0,59 +}; diff --git a/ediv/ideQT/gif/pcm.h b/ediv/ideQT/gif/pcm.h new file mode 100644 index 0000000..94e754e --- /dev/null +++ b/ediv/ideQT/gif/pcm.h @@ -0,0 +1,56 @@ +static unsigned char PCM_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,3,0,0,0,0,228,228,220,194, +194,194,255,255,255,218,218,218,212,255,142,122,185,0,158,158,158,170,170,170, +242,242,242,187,188,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,11,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,23,8,28,72,176,160,193,131,8,19,42,92,200,144,33,0,0,6, +31,74,156,72,177,34,196,5,0,2,4,184,40,16,128,128,1,32,67,138, +28,41,146,192,195,0,5,12,112,196,248,145,164,75,146,25,11,164,92,201, +18,228,129,155,56,115,230,148,136,82,166,202,130,30,95,186,204,168,81,166, +79,154,53,95,18,32,32,0,1,130,152,70,143,70,108,57,224,166,211,171, +2,8,12,72,0,53,234,207,169,66,69,118,53,250,21,40,213,146,77,173, +102,52,96,192,43,210,142,84,173,102,29,41,177,173,212,131,65,195,210,181, +91,22,172,94,177,108,251,154,253,187,87,240,96,194,85,15,60,28,240,22, +238,223,155,115,67,54,118,140,152,192,205,1,38,19,230,213,107,249,64,72, +1,147,147,42,189,12,82,0,232,133,155,73,146,30,96,250,97,195,212,46, +91,211,180,72,81,1,197,207,160,223,2,136,202,187,119,1,0,172,115,107, +254,253,208,168,196,223,50,119,123,116,173,80,121,114,228,198,143,51,71,77, +124,55,244,231,200,67,19,116,110,60,170,117,229,13,49,94,18,79,94,252, +251,239,240,214,125,251,214,62,144,182,123,246,2,3,2,0,59 +}; diff --git a/ediv/ideQT/gif/picture.gif b/ediv/ideQT/gif/picture.gif new file mode 100644 index 0000000..4bc78b6 Binary files /dev/null and b/ediv/ideQT/gif/picture.gif differ diff --git a/ediv/ideQT/gif/picture.h b/ediv/ideQT/gif/picture.h new file mode 100644 index 0000000..54fd3f8 --- /dev/null +++ b/ediv/ideQT/gif/picture.h @@ -0,0 +1,9 @@ +static unsigned char picture_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,191,191,191,0,0,0,255, +255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,61,72,52,220, +206,74,189,57,226,122,33,56,59,243,142,152,246,73,77,38,54,28,19,0, +222,120,105,172,137,130,101,59,43,66,46,152,122,110,245,129,93,80,247,203, +101,140,67,65,113,7,60,22,147,186,225,19,218,91,246,174,138,4,0,59 + +}; diff --git a/ediv/ideQT/gif/print.gif b/ediv/ideQT/gif/print.gif new file mode 100644 index 0000000..20fcee0 Binary files /dev/null and b/ediv/ideQT/gif/print.gif differ diff --git a/ediv/ideQT/gif/print.h b/ediv/ideQT/gif/print.h new file mode 100644 index 0000000..94054ff --- /dev/null +++ b/ediv/ideQT/gif/print.h @@ -0,0 +1,9 @@ +static unsigned char print_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,128,128,128,192,192,192,255, +255,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,64,88,170,212, +238,107,145,65,43,37,145,141,55,113,158,86,229,69,221,179,65,90,120,5, +4,91,112,28,203,54,65,109,223,109,14,239,53,125,7,128,96,207,213,250, +9,142,189,198,107,23,243,20,127,195,209,146,41,205,88,23,131,171,182,144, +0,0,59 +}; diff --git a/ediv/ideQT/gif/prop.gif b/ediv/ideQT/gif/prop.gif new file mode 100644 index 0000000..4654a92 Binary files /dev/null and b/ediv/ideQT/gif/prop.gif differ diff --git a/ediv/ideQT/gif/prop.h b/ediv/ideQT/gif/prop.h new file mode 100644 index 0000000..b32d54b --- /dev/null +++ b/ediv/ideQT/gif/prop.h @@ -0,0 +1,9 @@ +static unsigned char prop_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,0,0,128,192,192,192,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,66,72,186,220, +174,35,74,2,128,27,33,235,81,27,198,90,86,73,81,240,133,193,40,8, +231,153,113,192,192,154,243,23,81,49,43,175,31,203,236,171,224,110,240,11, +26,133,197,136,78,226,91,0,143,188,164,140,52,45,66,145,78,170,246,193, +109,36,0,0,59 +}; diff --git a/ediv/ideQT/gif/proyecto.h b/ediv/ideQT/gif/proyecto.h new file mode 100644 index 0000000..a93a437 --- /dev/null +++ b/ediv/ideQT/gif/proyecto.h @@ -0,0 +1,73 @@ +static unsigned char proyecto_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,254,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1, +1,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,5,5,5,6, +6,6,7,7,7,8,8,8,9,9,9,10,10,10,10,10,10,11,11,11, +12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13, +13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,16, +16,16,19,19,19,28,29,28,39,41,40,47,50,50,53,57,57,57,60,61, +58,62,63,59,63,64,58,64,65,56,63,66,53,63,68,50,63,70,46,63, +72,42,62,74,41,62,76,40,63,77,40,63,77,39,64,78,39,64,79,36, +65,81,30,67,88,22,70,97,16,74,105,12,76,110,10,78,115,7,81,121, +5,84,127,3,87,132,3,91,137,3,97,146,2,103,157,1,106,162,0,108, +165,0,110,167,0,112,170,0,113,172,0,115,175,0,118,179,0,120,183,0, +121,184,1,123,186,1,125,189,1,128,193,2,130,195,2,134,202,3,136,204, +15,133,192,30,128,175,47,123,157,65,118,139,79,113,123,88,110,112,95,105, +101,99,102,94,101,100,90,103,101,90,106,102,90,108,104,91,109,104,91,110, +104,90,112,105,91,113,106,92,115,108,93,116,109,94,119,112,96,125,116,99, +127,120,103,130,123,107,132,125,110,134,128,112,136,129,114,137,131,115,139,132, +117,140,133,118,142,135,120,143,137,123,145,139,125,147,141,127,148,142,128,149, +144,130,151,145,131,152,145,131,152,146,132,153,147,133,154,148,134,154,149,136, +154,150,137,155,150,138,155,151,139,157,152,139,158,153,139,158,154,141,159,155, +142,161,156,142,161,156,143,162,157,143,163,157,144,164,158,144,164,159,146,164, +160,149,163,161,151,164,162,152,166,163,153,166,163,153,167,163,152,169,164,151, +170,164,150,171,165,151,172,165,150,174,166,149,177,166,146,181,167,143,185,168, +139,188,169,137,188,169,137,188,170,138,187,170,140,186,171,143,184,171,147,183, +172,151,181,173,155,180,173,160,180,175,164,180,176,167,181,177,169,183,180,172, +186,183,175,189,185,177,191,187,180,192,188,181,194,190,182,195,191,183,196,192, +183,197,193,184,198,194,185,199,195,186,200,196,188,201,197,189,202,198,190,203, +199,191,204,200,193,205,201,194,205,201,194,205,202,195,206,203,197,206,204,199, +207,204,199,208,205,199,209,205,198,209,206,199,210,207,199,211,208,200,213,209, +201,214,210,202,215,211,203,215,211,204,215,212,206,216,213,207,217,214,208,218, +215,209,219,216,210,221,218,211,222,219,212,223,220,213,224,221,214,225,222,216, +226,223,217,227,224,218,228,226,220,230,227,222,231,229,224,232,230,226,234,232, +228,235,234,231,236,235,232,236,235,233,238,237,235,239,239,237,240,240,239,242, +242,241,243,243,243,244,244,243,244,244,244,245,245,245,245,245,245,246,246,246, +247,247,246,247,247,247,248,248,248,249,248,248,248,248,248,249,248,248,249,247, +245,250,245,237,250,240,225,251,237,214,251,234,206,251,231,199,252,230,194,253, +228,186,253,226,180,254,225,177,254,224,175,254,223,173,254,221,167,254,219,160, +254,215,152,254,213,145,254,210,138,254,208,134,254,207,130,255,255,255,254,205, +125,33,249,4,1,0,0,0,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,1,8,28,72,176,160,193,131,8,19,42,92,200,80,224,129,134,16, +7,30,32,247,48,34,195,24,230,204,81,180,168,48,134,186,115,25,55,114, +52,232,81,157,201,144,21,23,242,88,201,146,101,73,117,50,62,106,20,151, +50,33,15,98,197,156,69,155,86,173,218,203,152,38,65,146,11,87,243,224, +205,101,207,168,89,187,246,243,163,80,113,225,188,121,59,208,146,71,65,30, +194,138,49,147,86,13,134,212,111,50,190,73,149,193,109,219,54,109,216,176, +93,147,208,7,15,29,29,18,15,200,157,75,183,174,221,186,112,114,72,36, +53,104,213,43,90,146,116,233,202,245,136,214,43,86,123,80,157,34,117,169, +146,27,68,132,248,224,97,116,160,13,14,137,150,12,197,210,101,42,153,178, +100,165,132,237,202,181,232,213,170,84,139,227,84,106,180,136,144,30,60,7, +48,92,118,88,234,17,48,102,211,88,89,179,70,77,26,51,82,194,116,209, +114,133,2,69,169,81,152,46,49,34,212,231,192,173,10,18,75,73,50,54, +13,27,183,90,222,180,161,64,165,108,216,46,90,40,232,121,255,66,49,42, +14,166,74,139,214,28,224,133,76,130,67,83,146,144,81,179,46,14,252,59, +20,198,126,217,66,241,142,30,10,82,114,96,146,73,37,108,20,178,30,50, +211,60,116,0,124,212,93,179,77,54,215,160,160,15,10,190,216,231,31,38, +170,85,82,73,27,139,24,200,158,123,0,44,40,9,49,209,40,85,205,52, +18,178,81,92,127,197,193,225,72,35,141,180,193,8,34,30,66,231,16,41, +144,0,179,76,52,209,60,179,140,132,239,176,193,226,59,227,29,130,136,140, +51,22,242,128,5,179,133,72,202,35,187,20,179,140,50,198,0,35,33,61, +88,210,211,159,127,40,20,136,8,100,130,60,176,70,147,7,80,114,8,45, +192,8,51,140,126,40,120,242,79,150,226,241,55,222,31,132,16,242,71,24, +15,168,65,166,35,131,184,98,203,104,179,20,215,230,155,112,106,137,130,31, +127,220,233,70,158,100,50,2,136,42,175,200,2,11,10,72,32,33,197,160, +88,122,50,30,10,120,232,209,71,24,109,180,241,128,25,100,186,118,200,35, +168,82,42,133,20,88,180,169,105,113,117,216,85,113,7,30,97,144,33,134, +24,15,172,36,209,31,136,84,130,201,40,150,160,48,4,171,171,10,138,70, +24,115,208,97,71,24,106,164,97,134,25,15,20,68,215,3,15,72,64,129, +176,171,34,129,130,8,34,120,192,193,6,24,92,80,65,5,20,72,64,45, +68,194,86,138,194,72,10,9,202,238,187,240,198,43,175,66,1,1,0,59 + +}; diff --git a/ediv/ideQT/gif/redo.gif b/ediv/ideQT/gif/redo.gif new file mode 100644 index 0000000..a4b8116 Binary files /dev/null and b/ediv/ideQT/gif/redo.gif differ diff --git a/ediv/ideQT/gif/redo.h b/ediv/ideQT/gif/redo.h new file mode 100644 index 0000000..503876c --- /dev/null +++ b/ediv/ideQT/gif/redo.h @@ -0,0 +1,6 @@ +static unsigned char redo_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,128,128,128,0,0,128,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,32,148,143,169,203,237,47,64,152,193,73,52,79,213,171,102, +222,125,198,150,80,100,116,10,102,26,0,208,11,199,242,140,20,0,59 +}; diff --git a/ediv/ideQT/gif/report.gif b/ediv/ideQT/gif/report.gif new file mode 100644 index 0000000..59e28f5 Binary files /dev/null and b/ediv/ideQT/gif/report.gif differ diff --git a/ediv/ideQT/gif/report.h b/ediv/ideQT/gif/report.h new file mode 100644 index 0000000..c971d84 --- /dev/null +++ b/ediv/ideQT/gif/report.h @@ -0,0 +1,9 @@ +static unsigned char report_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,0,255,255,0,0,255,255, +255,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,66,88,170,212, +222,43,22,50,170,133,114,134,205,41,201,148,85,133,95,228,53,163,179,56, +98,251,12,66,216,142,0,21,63,232,224,213,2,236,247,177,75,237,135,27, +233,120,63,162,208,6,43,234,142,40,96,211,5,193,145,80,165,213,236,34, +177,226,18,0,59 +}; diff --git a/ediv/ideQT/gif/resource.gif b/ediv/ideQT/gif/resource.gif new file mode 100644 index 0000000..91b03fd Binary files /dev/null and b/ediv/ideQT/gif/resource.gif differ diff --git a/ediv/ideQT/gif/resource.h b/ediv/ideQT/gif/resource.h new file mode 100644 index 0000000..5116f2f --- /dev/null +++ b/ediv/ideQT/gif/resource.h @@ -0,0 +1,9 @@ +static unsigned char resource_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,7,0,127,127,127,191,191,191,0, +0,255,255,255,0,255,0,0,255,255,255,0,0,0,0,0,0,33,249,4, +1,0,0,7,0,44,0,0,0,0,16,0,16,0,0,3,71,120,186,108, +252,207,8,7,163,184,244,152,189,21,255,30,33,102,149,38,18,206,215,45, +198,153,22,112,177,106,160,33,7,178,92,218,49,79,178,50,27,136,70,225, +197,96,41,192,0,240,250,32,53,131,232,235,248,52,40,153,154,160,182,184, +50,30,127,30,21,231,144,0,0,59 +}; diff --git a/ediv/ideQT/gif/retry.gif b/ediv/ideQT/gif/retry.gif new file mode 100644 index 0000000..8ac34fd Binary files /dev/null and b/ediv/ideQT/gif/retry.gif differ diff --git a/ediv/ideQT/gif/retry.h b/ediv/ideQT/gif/retry.h new file mode 100644 index 0000000..cfa403b --- /dev/null +++ b/ediv/ideQT/gif/retry.h @@ -0,0 +1,8 @@ +static unsigned char retry_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,128,0,0,127,127,127,0, +0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,59,72,170,211, +189,144,185,57,216,114,36,136,64,168,172,132,32,94,79,7,134,163,249,148, +138,40,168,235,73,0,2,16,73,144,198,221,108,27,197,183,31,136,165,35, +145,64,174,15,4,83,196,8,41,189,103,52,72,85,36,0,0,59 +}; diff --git a/ediv/ideQT/gif/save.gif b/ediv/ideQT/gif/save.gif new file mode 100644 index 0000000..3181dd8 Binary files /dev/null and b/ediv/ideQT/gif/save.gif differ diff --git a/ediv/ideQT/gif/save.h b/ediv/ideQT/gif/save.h new file mode 100644 index 0000000..8dda55d --- /dev/null +++ b/ediv/ideQT/gif/save.h @@ -0,0 +1,8 @@ +static unsigned char save_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,128,128,0,192,192,192,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,55,156,143,105,194,237,190,128,8,180,82,49,112,150,214,182, +56,117,151,4,138,163,38,112,102,138,170,34,27,73,15,3,144,91,141,231, +117,43,207,240,61,59,197,130,129,95,170,215,16,46,124,15,133,19,81,0, +0,59 +}; diff --git a/ediv/ideQT/gif/search.h b/ediv/ideQT/gif/search.h new file mode 100644 index 0000000..d0e65ee --- /dev/null +++ b/ediv/ideQT/gif/search.h @@ -0,0 +1,64 @@ +static unsigned char search_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,255,255,255,255,255,204,255, +255,153,255,255,102,255,255,51,255,255,0,255,204,255,255,204,204,255,204,153, +255,204,102,255,204,51,255,204,0,255,153,255,255,153,204,255,153,153,255,153, +102,255,153,51,255,153,0,255,102,255,255,102,204,255,102,153,255,102,102,255, +102,51,255,102,0,255,51,255,255,51,204,255,51,153,255,51,102,255,51,51, +255,51,0,255,0,255,255,0,204,255,0,153,255,0,102,255,0,51,255,0, +0,204,255,255,204,255,204,204,255,153,204,255,102,204,255,51,204,255,0,204, +204,255,204,204,204,204,204,153,204,204,102,204,204,51,204,204,0,204,153,255, +204,153,204,204,153,153,204,153,102,204,153,51,204,153,0,204,102,255,204,102, +204,204,102,153,204,102,102,204,102,51,204,102,0,204,51,255,204,51,204,204, +51,153,204,51,102,204,51,51,204,51,0,204,0,255,204,0,204,204,0,153, +204,0,102,204,0,51,204,0,0,153,255,255,153,255,204,153,255,153,153,255, +102,153,255,51,153,255,0,153,204,255,153,204,204,153,204,153,153,204,102,153, +204,51,153,204,0,153,153,255,153,153,204,153,153,153,153,153,102,153,153,51, +153,153,0,153,102,255,153,102,204,153,102,153,153,102,102,153,102,51,153,102, +0,153,51,255,153,51,204,153,51,153,153,51,102,153,51,51,153,51,0,153, +0,255,153,0,204,153,0,153,153,0,102,153,0,51,153,0,0,102,255,255, +102,255,204,102,255,153,102,255,102,102,255,51,102,255,0,102,204,255,102,204, +204,102,204,153,102,204,102,102,204,51,102,204,0,102,153,255,102,153,204,102, +153,153,102,153,102,102,153,51,102,153,0,102,102,255,102,102,204,102,102,153, +102,102,102,102,102,51,102,102,0,102,51,255,102,51,204,102,51,153,102,51, +102,102,51,51,102,51,0,102,0,255,102,0,204,102,0,153,102,0,102,102, +0,51,102,0,0,51,255,255,51,255,204,51,255,153,51,255,102,51,255,51, +51,255,0,51,204,255,51,204,204,51,204,153,51,204,102,51,204,51,51,204, +0,51,153,255,51,153,204,51,153,153,51,153,102,51,153,51,51,153,0,51, +102,255,51,102,204,51,102,153,51,102,102,51,102,51,51,102,0,51,51,255, +51,51,204,51,51,153,51,51,102,51,51,51,51,51,0,51,0,255,51,0, +204,51,0,153,51,0,102,51,0,51,51,0,0,0,255,255,0,255,204,0, +255,153,0,255,102,0,255,51,0,255,0,0,204,255,0,204,204,0,204,153, +0,204,102,0,204,51,0,204,0,0,153,255,0,153,204,0,153,153,0,153, +102,0,153,51,0,153,0,0,102,255,0,102,204,0,102,153,0,102,102,0, +102,51,0,102,0,0,51,255,0,51,204,0,51,153,0,51,102,0,51,51, +0,51,0,0,0,255,0,0,204,0,0,153,0,0,102,0,0,51,238,0, +0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0,0,68, +0,0,34,0,0,17,0,0,0,238,0,0,221,0,0,187,0,0,170,0, +0,136,0,0,119,0,0,85,0,0,68,0,0,34,0,0,17,0,0,0, +238,0,0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0, +0,68,0,0,34,0,0,17,238,238,238,221,221,221,187,187,187,170,170,170, +136,136,136,119,119,119,85,85,85,68,68,68,34,34,34,17,17,17,0,0, +0,33,249,4,1,0,0,3,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,7,8,28,72,176,96,193,127,8,19,26,92,200,144,224,191,109,215, +56,28,1,135,176,161,197,131,28,2,32,24,49,130,226,191,139,23,255,105, +67,176,145,227,145,138,32,27,254,227,32,128,163,75,148,41,13,138,68,192, +193,37,71,152,49,9,206,226,96,193,230,136,111,31,115,30,196,86,211,230, +26,156,66,7,124,27,113,132,219,163,151,65,147,14,244,54,226,31,63,117, +255,70,204,66,154,244,159,183,125,36,0,252,123,196,85,101,66,133,3,254, +217,3,16,232,44,200,179,112,19,246,171,103,207,109,72,184,253,242,246,243, +23,55,230,217,64,43,234,213,59,32,248,0,0,43,109,209,222,253,119,79, +48,9,36,143,31,219,155,92,111,5,63,197,12,17,226,3,128,132,205,156, +78,157,216,200,121,12,217,94,224,21,172,202,10,76,72,226,18,50,208,160, +145,37,123,134,108,14,146,219,246,8,231,83,253,15,95,63,75,183,145,212, +3,64,28,0,137,39,200,158,117,10,190,34,64,140,178,255,0,248,35,29, +182,56,100,18,36,156,8,123,22,236,118,224,221,11,251,29,173,246,116,187, +122,231,224,229,145,144,114,102,219,94,189,126,81,7,206,181,215,229,54,27, +227,232,243,35,105,195,30,201,1,125,241,173,70,215,10,86,216,166,159,126, +143,57,3,25,62,1,166,165,207,100,43,224,163,199,129,7,178,33,12,9, +0,46,196,24,132,43,4,50,33,133,193,145,176,28,69,26,110,184,130,105, +247,236,195,143,129,20,202,193,151,89,86,208,101,218,100,93,176,162,78,41, +122,204,241,4,18,115,232,81,138,71,22,253,3,142,63,129,77,54,99,61, +248,232,195,207,146,136,4,194,194,10,13,150,232,79,62,238,209,117,128,123, +6,4,32,216,97,170,201,116,214,62,250,64,81,133,12,98,230,115,89,151, +153,197,165,166,84,14,173,217,80,64,0,59 +}; diff --git a/ediv/ideQT/gif/sion.h b/ediv/ideQT/gif/sion.h new file mode 100644 index 0000000..762e03c --- /dev/null +++ b/ediv/ideQT/gif/sion.h @@ -0,0 +1,519 @@ +static unsigned char sion_png[]={ +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,140, +0,0,0,93,8,2,0,0,0,248,192,25,227,0,0,10,59,105,67,67, +80,80,104,111,116,111,115,104,111,112,32,73,67,67,32,112,114,111,102,105, +108,101,0,0,120,156,157,150,119,84,83,217,22,135,207,189,55,189,80,146, +16,138,148,208,107,104,82,2,72,13,189,72,145,46,42,49,9,16,74,192, +144,0,34,54,68,84,112,68,81,145,166,8,50,40,224,128,163,67,145,177, +34,138,133,1,81,177,235,4,25,68,212,113,112,20,27,150,73,100,173,25, +223,188,121,239,205,155,223,31,247,126,107,159,189,207,221,103,239,125,214,186, +0,144,252,131,5,194,76,88,9,128,12,161,88,20,225,231,197,136,141,139, +103,96,7,1,12,240,0,3,108,0,224,112,179,179,66,22,248,70,2,153, +2,124,216,140,108,153,19,248,23,189,186,14,32,249,251,42,211,63,140,193, +0,255,159,148,185,89,34,49,0,80,152,140,231,242,248,217,92,25,23,201, +56,61,87,156,37,183,79,201,152,182,52,77,206,48,74,206,34,89,130,50, +86,147,115,242,44,91,124,246,153,101,15,57,243,50,132,60,25,203,115,206, +226,101,240,228,220,39,227,141,57,18,190,140,145,96,25,23,231,8,248,185, +50,190,38,99,131,116,73,134,64,198,111,228,177,25,124,78,54,0,40,146, +220,46,230,115,83,100,108,45,99,146,40,50,130,45,227,121,0,224,72,201, +95,240,210,47,88,204,207,19,203,15,197,206,204,90,46,18,36,167,136,25, +38,92,83,134,141,147,19,139,225,207,207,77,231,139,197,204,48,14,55,141, +35,226,49,216,153,25,89,28,225,114,0,102,207,252,89,20,121,109,25,178, +34,59,216,56,57,56,48,109,45,109,190,40,212,127,93,252,155,146,247,118, +150,94,132,127,238,25,68,31,248,195,246,87,126,153,13,0,176,166,101,181, +217,250,135,109,105,21,0,93,235,1,80,187,253,135,205,96,47,0,138,178, +190,117,14,125,113,30,186,124,94,82,196,226,44,103,43,171,220,220,92,75, +1,159,107,41,47,232,239,250,159,14,127,67,95,124,207,82,190,221,239,229, +97,120,243,147,56,146,116,49,67,94,55,110,102,122,166,68,196,200,206,226, +112,249,12,230,159,135,248,31,7,254,117,30,22,17,252,36,190,136,47,148, +69,68,203,166,76,32,76,150,181,91,200,19,136,5,153,66,134,64,248,159, +154,248,15,195,254,164,217,185,150,137,218,248,17,208,150,88,2,165,33,26, +64,126,30,0,40,42,17,32,9,123,100,43,208,239,125,11,198,71,3,249, +205,139,209,153,152,157,251,207,130,254,125,87,184,76,254,200,22,36,127,142, +99,71,68,50,184,18,81,206,236,154,252,90,2,52,32,0,69,64,3,234, +64,27,232,3,19,192,4,182,192,17,184,0,15,224,3,2,65,40,136,4, +113,96,49,224,130,20,144,1,68,32,23,20,128,181,160,24,148,130,173,96, +39,168,6,117,160,17,52,131,54,112,24,116,129,99,224,52,56,7,46,129, +203,96,4,220,1,82,48,14,158,128,41,240,10,204,64,16,132,133,200,16, +21,82,135,116,32,67,200,28,178,133,88,144,27,228,3,5,67,17,80,28, +148,8,37,67,66,72,2,21,64,235,160,82,168,28,170,134,234,161,102,232, +91,232,40,116,26,186,0,13,67,183,160,81,104,18,250,21,122,7,35,48, +9,166,193,90,176,17,108,5,179,96,79,56,8,142,132,23,193,201,240,50, +56,31,46,130,183,192,149,112,3,124,16,238,132,79,195,151,224,17,88,10, +63,129,167,17,128,16,17,58,162,139,48,17,22,194,70,66,145,120,36,9, +17,33,171,144,18,164,2,105,64,218,144,30,164,31,185,138,72,145,167,200, +91,20,6,69,69,49,80,76,148,11,202,31,21,133,226,162,150,161,86,161, +54,163,170,81,7,80,157,168,62,212,85,212,40,106,10,245,17,77,70,107, +162,205,209,206,232,0,116,44,58,25,157,139,46,70,87,160,155,208,29,232, +179,232,17,244,56,250,21,6,131,161,99,140,49,142,24,127,76,28,38,21, +179,2,179,25,179,27,211,142,57,133,25,198,140,97,166,177,88,172,58,214, +28,235,138,13,197,114,176,98,108,49,182,10,123,16,123,18,123,5,59,142, +125,131,35,226,116,112,182,56,95,92,60,78,136,43,196,85,224,90,112,39, +112,87,112,19,184,25,188,18,222,16,239,140,15,197,243,240,203,241,101,248, +70,124,15,126,8,63,142,159,33,40,19,140,9,174,132,72,66,42,97,45, +161,146,208,70,56,75,184,75,120,65,36,18,245,136,78,196,112,162,128,184, +134,88,73,60,68,60,79,28,37,190,37,81,72,102,36,54,41,129,36,33, +109,33,237,39,157,34,221,34,189,32,147,201,70,100,15,114,60,89,76,222, +66,110,38,159,33,223,39,191,81,160,42,88,42,4,40,240,20,86,43,212, +40,116,42,92,81,120,166,136,87,52,84,244,84,92,172,152,175,88,161,120, +68,113,72,241,169,18,94,201,72,137,173,196,81,90,165,84,163,116,84,233, +134,210,180,50,85,217,70,57,84,57,67,121,179,114,139,242,5,229,71,20, +44,197,136,226,67,225,81,138,40,251,40,103,40,99,84,132,170,79,101,83, +185,212,117,212,70,234,89,234,56,13,67,51,166,5,208,82,105,165,180,111, +104,131,180,41,21,138,138,157,74,180,74,158,74,141,202,113,21,41,29,161, +27,209,3,232,233,244,50,250,97,250,117,250,59,85,45,85,79,85,190,234, +38,213,54,213,43,170,175,213,230,168,121,168,241,213,74,212,218,213,70,212, +222,169,51,212,125,212,211,212,183,169,119,169,223,211,64,105,152,105,132,107, +228,106,236,209,56,171,241,116,14,109,142,203,28,238,156,146,57,135,231,220, +214,132,53,205,52,35,52,87,104,238,211,28,208,156,214,210,214,242,211,202, +210,170,210,58,163,245,84,155,174,237,161,157,170,189,67,251,132,246,164,14, +85,199,77,71,160,179,67,231,164,206,99,134,10,195,147,145,206,168,100,244, +49,166,116,53,117,253,117,37,186,245,186,131,186,51,122,198,122,81,122,133, +122,237,122,247,244,9,250,44,253,36,253,29,250,189,250,83,6,58,6,33, +6,5,6,173,6,183,13,241,134,44,195,20,195,93,134,253,134,175,141,140, +141,98,140,54,24,117,25,61,50,86,51,14,48,206,55,110,53,190,107,66, +54,113,55,89,102,210,96,114,205,20,99,202,50,77,51,221,109,122,217,12, +54,179,55,75,49,171,49,27,50,135,205,29,204,5,230,187,205,135,45,208, +22,78,22,66,139,6,139,27,76,18,211,147,153,195,108,101,142,90,210,45, +131,45,11,45,187,44,159,89,25,88,197,91,109,179,234,183,250,104,109,111, +157,110,221,104,125,199,134,98,19,104,83,104,211,99,243,171,173,153,45,215, +182,198,246,218,92,242,92,223,185,171,231,118,207,125,110,103,110,199,183,219, +99,119,211,158,106,31,98,191,193,190,215,254,131,131,163,131,200,161,205,97, +210,209,192,49,209,177,214,241,6,139,198,10,99,109,102,157,119,66,59,121, +57,173,118,58,230,244,214,217,193,89,236,124,216,249,23,23,166,75,154,75, +139,203,163,121,198,243,248,243,26,231,141,185,234,185,114,92,235,93,165,110, +12,183,68,183,189,110,82,119,93,119,142,123,131,251,3,15,125,15,158,71, +147,199,132,167,169,103,170,231,65,207,103,94,214,94,34,175,14,175,215,108, +103,246,74,246,41,111,196,219,207,187,196,123,208,135,226,19,229,83,237,115, +223,87,207,55,217,183,213,119,202,207,222,111,133,223,41,127,180,127,144,255, +54,255,27,1,90,1,220,128,230,128,169,64,199,192,149,129,125,65,164,160, +5,65,213,65,15,130,205,130,69,193,61,33,112,72,96,200,246,144,187,243, +13,231,11,231,119,133,130,208,128,208,237,161,247,194,140,195,150,133,125,31, +142,9,15,11,175,9,127,24,97,19,81,16,209,191,128,186,96,201,130,150, +5,175,34,189,34,203,34,239,68,153,68,73,162,122,163,21,163,19,162,155, +163,95,199,120,199,148,199,72,99,173,98,87,198,94,138,211,136,19,196,117, +199,99,227,163,227,155,226,167,23,250,44,220,185,112,60,193,62,161,56,225, +250,34,227,69,121,139,46,44,214,88,156,190,248,248,18,197,37,156,37,71, +18,209,137,49,137,45,137,239,57,161,156,6,206,244,210,128,165,181,75,167, +184,108,238,46,238,19,158,7,111,7,111,146,239,202,47,231,79,36,185,38, +149,39,61,74,118,77,222,158,60,153,226,158,82,145,242,84,192,22,84,11, +158,167,250,167,214,165,190,78,11,77,219,159,246,41,61,38,189,61,3,151, +145,152,113,84,72,17,166,9,251,50,181,51,243,50,135,179,204,179,138,179, +164,203,156,151,237,92,54,37,10,18,53,101,67,217,139,178,187,197,52,217, +207,212,128,196,68,178,94,50,154,227,150,83,147,243,38,55,58,247,72,158, +114,158,48,111,96,185,217,242,77,203,39,242,125,243,191,94,129,90,193,93, +209,91,160,91,176,182,96,116,165,231,202,250,85,208,170,165,171,122,87,235, +175,46,90,61,190,198,111,205,129,181,132,181,105,107,127,40,180,46,44,47, +124,185,46,102,93,79,145,86,209,154,162,177,245,126,235,91,139,21,138,69, +197,55,54,184,108,168,219,136,218,40,216,56,184,105,238,166,170,77,31,75, +120,37,23,75,173,75,43,74,223,111,230,110,190,248,149,205,87,149,95,125, +218,146,180,101,176,204,161,108,207,86,204,86,225,214,235,219,220,183,29,40, +87,46,207,47,31,219,30,178,189,115,7,99,71,201,142,151,59,151,236,188, +80,97,87,81,183,139,176,75,178,75,90,25,92,217,93,101,80,181,181,234, +125,117,74,245,72,141,87,77,123,173,102,237,166,218,215,187,121,187,175,236, +241,216,211,86,167,85,87,90,247,110,175,96,239,205,122,191,250,206,6,163, +134,138,125,152,125,57,251,30,54,70,55,246,127,205,250,186,185,73,163,169, +180,233,195,126,225,126,233,129,136,3,125,205,142,205,205,45,154,45,101,173, +112,171,164,117,242,96,194,193,203,223,120,127,211,221,198,108,171,111,167,183, +151,30,2,135,36,135,30,127,155,248,237,245,195,65,135,123,143,176,142,180, +125,103,248,93,109,7,181,163,164,19,234,92,222,57,213,149,210,37,237,142, +235,30,62,26,120,180,183,199,165,167,227,123,203,239,247,31,211,61,86,115, +92,229,120,217,9,194,137,162,19,159,78,230,159,156,62,149,117,234,233,233, +228,211,99,189,75,122,239,156,137,61,115,173,47,188,111,240,108,208,217,243, +231,124,207,157,233,247,236,63,121,222,245,252,177,11,206,23,142,94,100,93, +236,186,228,112,169,115,192,126,160,227,7,251,31,58,6,29,6,59,135,28, +135,186,47,59,93,238,25,158,55,124,226,138,251,149,211,87,189,175,158,187, +22,112,237,210,200,252,145,225,235,81,215,111,222,72,184,33,189,201,187,249, +232,86,250,173,231,183,115,110,207,220,89,115,23,125,183,228,158,210,189,138, +251,154,247,27,126,52,253,177,93,234,32,61,62,234,61,58,240,96,193,131, +59,99,220,177,39,63,101,255,244,126,188,232,33,249,97,197,132,206,68,243, +35,219,71,199,38,125,39,47,63,94,248,120,252,73,214,147,153,167,197,63, +43,255,92,251,204,228,217,119,191,120,252,50,48,21,59,53,254,92,244,252, +211,175,155,95,168,191,216,255,210,238,101,239,116,216,244,253,87,25,175,102, +94,151,188,81,127,115,224,45,235,109,255,187,152,119,19,51,185,239,177,239, +43,63,152,126,232,249,24,244,241,238,167,140,79,159,126,3,247,132,243,251, +168,245,247,125,0,0,0,4,103,65,77,65,0,0,177,142,124,251,81,147, +0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0,0,249,255, +0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,151,0,0,23,111, +151,169,153,212,0,0,29,148,73,68,65,84,120,156,98,12,13,13,101,24, +5,131,27,0,4,16,211,64,59,96,20,16,6,0,1,52,26,73,67,0, +0,4,208,104,36,13,1,0,16,64,44,3,237,128,193,2,88,89,254,113, +178,255,97,99,251,203,201,254,247,223,63,198,239,63,153,127,255,102,6,146, +127,254,14,124,58,6,8,160,145,30,73,226,194,223,212,21,62,72,137,126, +21,17,248,193,203,245,155,131,253,15,51,243,127,134,255,12,191,255,50,253, +248,201,252,229,27,235,235,247,156,183,31,241,223,125,204,255,233,43,219,64, +57,18,32,128,70,104,36,177,179,254,85,146,253,164,165,244,78,93,225,163, +48,255,119,36,25,70,6,96,20,49,48,112,50,48,240,113,51,136,9,125, +87,146,249,108,170,253,250,233,43,174,211,87,197,175,221,19,124,255,137,157, +254,174,5,8,160,161,23,73,204,12,255,153,25,254,1,25,255,24,24,255, +50,48,253,39,81,59,55,231,111,61,213,119,134,26,111,20,101,62,49,49, +254,103,4,137,49,254,135,153,242,31,20,75,140,16,6,194,70,166,255,114, +18,95,101,37,238,217,25,115,28,191,40,113,242,138,216,247,31,116,13,55, +128,0,26,26,145,4,12,54,94,134,159,138,140,239,229,25,62,136,49,126, +229,98,248,197,196,240,255,7,3,203,123,6,206,167,255,249,238,253,23,122, +201,192,13,140,48,130,230,168,201,127,116,183,124,164,40,253,153,1,28,13, +168,113,3,181,8,217,82,136,212,63,176,50,70,70,6,96,145,232,103,255, +64,77,254,195,150,67,242,207,94,115,83,211,135,120,1,64,0,13,129,72, +2,70,143,22,227,107,51,198,39,202,140,239,4,25,190,179,128,179,17,4, +252,103,96,252,202,200,250,228,63,255,249,255,146,64,244,140,129,15,87,198, +226,227,254,229,110,245,24,152,129,56,216,254,130,52,130,178,208,127,70,184, +41,200,145,3,139,18,8,128,102,53,160,40,52,215,49,104,200,127,16,243, +255,177,241,160,194,229,219,66,84,245,40,78,0,16,64,204,218,218,218,244, +177,137,60,32,201,240,57,144,233,154,15,211,77,37,198,247,220,12,191,153, +16,169,31,4,128,193,198,198,240,87,132,241,27,48,22,21,24,63,124,102, +96,127,205,192,253,15,37,63,128,128,178,204,39,127,135,135,6,234,111,89, +152,192,218,129,193,205,248,31,102,0,35,172,132,3,51,254,195,24,144,88, +130,114,193,42,16,166,50,114,177,255,85,150,249,252,225,11,251,139,183,92, +52,244,60,12,0,4,208,160,142,36,21,198,183,81,76,151,140,25,159,113, +48,252,129,164,111,28,8,88,210,253,7,70,149,10,227,59,96,25,8,204, +79,240,162,15,216,64,176,53,122,17,226,116,95,66,244,27,52,118,161,25, +2,22,37,224,232,96,130,199,18,8,128,68,128,144,9,37,98,24,160,246, +195,210,8,48,71,234,40,127,248,249,155,249,209,11,30,90,135,3,64,0, +13,222,226,78,134,241,147,47,227,77,93,198,151,12,224,2,9,175,90,72, +190,248,47,198,240,21,152,231,126,254,99,57,246,95,14,200,231,225,252,29, +228,116,223,64,227,45,48,98,254,131,202,72,72,76,252,135,68,17,56,147, +128,243,212,127,134,111,63,89,128,193,253,231,15,184,88,3,182,20,152,25, +56,88,255,114,176,255,101,102,130,152,13,86,15,2,208,184,132,212,103,44, +204,255,252,108,31,126,254,202,122,254,166,48,77,131,2,32,128,6,105,36, +113,51,252,242,102,188,105,204,248,148,129,112,12,193,1,40,136,37,24,190, +0,163,246,21,3,247,71,1,238,16,231,251,106,114,31,65,33,251,31,209, +102,99,132,213,54,31,62,179,3,27,214,15,95,240,60,121,201,13,12,232, +111,63,88,126,255,97,130,216,5,12,125,96,151,150,151,251,183,48,255,15, +121,201,47,234,114,31,5,249,126,50,34,10,64,40,0,198,19,176,83,21, +224,240,16,200,184,112,139,134,241,4,16,64,131,52,146,128,25,200,128,241, +57,35,9,49,4,1,32,29,178,140,31,252,148,238,177,91,179,137,9,127, +135,214,64,224,154,140,9,92,136,253,252,197,124,249,174,192,245,251,2,15, +158,241,126,248,194,246,239,31,118,243,63,126,97,120,241,150,243,54,3,223, +137,203,98,66,124,63,21,164,190,216,24,188,84,148,250,4,140,100,112,134, +130,181,57,254,51,240,113,253,14,176,127,244,238,19,59,237,202,61,128,0, +26,140,117,18,31,195,79,63,166,27,192,6,55,172,30,34,9,48,254,145, +102,103,115,225,224,22,248,7,46,157,192,5,20,184,162,249,246,131,245,250, +3,129,29,199,101,246,159,150,122,246,134,251,251,79,150,255,255,137,50,28, +168,242,249,27,174,155,15,249,129,17,44,200,251,139,139,243,47,35,170,62, +96,253,36,192,251,251,202,61,193,191,180,25,67,2,8,160,193,24,73,242, +140,31,220,153,238,112,49,252,38,61,134,24,126,75,176,125,118,23,254,207, +203,2,141,96,70,72,249,198,120,251,49,223,218,125,10,251,206,72,189,122, +207,73,98,238,132,130,31,191,152,239,60,225,187,253,136,95,82,244,187,32, +223,47,112,53,197,8,179,128,81,84,224,39,144,123,231,49,31,25,38,19, +4,0,1,52,24,35,73,135,241,165,5,227,99,102,68,23,147,88,240,75, +158,227,139,155,240,63,62,86,6,112,131,13,210,148,126,246,154,107,195,1, +185,221,167,164,129,209,67,185,219,190,124,103,189,241,64,0,152,99,20,36, +190,50,131,179,13,164,29,1,44,75,101,197,191,62,125,205,245,250,3,7, +229,182,160,1,128,0,26,116,117,18,176,150,23,100,248,193,138,212,99,37, +18,252,150,100,255,226,44,252,143,135,25,156,192,65,224,203,55,150,125,103, +36,207,220,16,249,244,149,149,138,46,4,154,182,245,168,204,219,143,236,129, +246,143,217,217,254,254,7,103,76,96,69,197,198,250,223,203,234,233,99,96, +51,228,27,53,173,3,2,128,0,26,248,113,120,52,0,116,16,23,35,176, +160,99,192,53,118,128,21,252,17,99,251,106,47,248,143,135,5,150,253,24, +159,191,228,92,186,83,121,223,89,73,234,198,16,28,156,184,34,186,118,191, +220,183,111,44,76,208,220,14,26,69,148,17,251,102,12,108,241,83,27,0, +4,208,160,203,73,12,224,145,83,146,212,255,21,102,253,226,38,250,87,136, +5,82,67,252,254,201,184,255,156,248,193,139,18,95,190,211,214,119,167,174, +137,0,155,18,97,206,15,120,56,193,125,237,127,140,140,76,255,157,141,95, +0,11,189,219,84,173,156,0,2,104,208,69,18,48,134,190,254,103,133,52, +114,137,201,76,255,89,153,190,218,9,253,21,98,133,228,161,111,95,153,87, +236,87,184,120,91,144,230,14,5,131,139,119,4,89,88,254,135,58,61,4, +246,171,128,229,30,176,185,200,199,253,199,209,232,213,221,39,188,255,136,107, +58,18,3,0,2,104,208,21,119,192,160,126,195,192,253,139,129,168,212,243, +159,141,233,171,163,208,111,25,78,112,103,136,241,238,125,158,201,235,52,232, +22,67,16,112,246,134,208,186,3,114,127,255,48,129,90,121,96,103,168,201, +126,214,82,252,68,69,43,0,2,104,208,69,18,16,60,103,224,121,199,64, +84,75,236,135,46,239,79,117,30,72,45,116,253,14,223,162,189,74,207,222, +80,161,9,71,42,56,115,93,232,200,37,49,208,112,31,40,158,24,216,88, +254,89,233,188,97,34,121,170,11,39,0,8,160,193,216,4,255,201,192,34, +197,248,89,129,241,3,116,110,0,7,248,165,204,245,221,78,148,129,137,233, +207,47,166,237,199,36,215,31,149,253,74,223,185,56,56,0,182,239,238,61, +231,230,227,250,35,45,250,29,210,109,2,246,109,223,127,98,127,74,165,20, +3,16,64,131,49,39,125,103,96,61,246,95,238,21,3,190,81,150,191,18, +236,223,108,68,254,179,48,254,249,205,184,230,160,236,174,179,146,191,254,12, +164,95,128,45,136,53,7,100,239,60,229,5,13,32,254,3,102,166,255,238, +102,207,5,120,126,83,197,112,128,0,26,140,145,4,4,55,254,139,30,248, +167,248,141,129,21,60,104,141,81,110,112,50,125,181,17,249,199,203,242,233, +35,235,188,237,74,39,174,138,12,132,27,209,193,175,223,76,155,143,72,125, +250,198,14,174,156,24,68,5,126,153,168,191,167,138,201,0,1,52,72,35, +9,216,198,59,252,95,254,232,127,249,223,12,76,232,131,207,12,255,127,232, +241,255,145,224,248,246,149,101,197,65,185,43,247,248,169,86,246,83,12,30, +188,224,222,127,78,244,31,116,108,143,209,92,251,29,31,55,21,50,19,64, +0,13,198,58,9,2,126,48,176,62,250,47,192,206,248,71,154,241,51,43, +195,63,88,253,244,255,183,42,207,55,107,177,119,111,217,22,238,85,188,241, +144,38,99,101,148,128,135,47,185,88,152,25,148,165,191,50,130,38,180,254, +124,251,193,122,247,25,165,171,33,0,2,104,240,70,18,3,184,114,186,251, +95,232,19,3,59,31,195,79,126,198,159,76,192,210,94,152,253,179,183,204, +151,175,204,83,182,168,62,122,69,143,169,107,82,1,176,171,244,228,21,151, +186,204,87,1,158,63,192,84,37,38,240,243,246,19,158,79,148,13,20,1, +4,208,160,142,36,32,0,118,152,30,48,8,62,100,16,248,202,192,206,12, +108,187,57,8,254,96,102,155,187,67,241,209,155,193,24,67,16,240,251,47, +211,135,47,108,250,74,159,88,152,255,115,178,253,3,146,151,238,241,83,98, +32,64,0,13,246,72,98,0,55,112,223,49,112,93,253,47,198,163,207,206, +45,198,56,107,155,226,131,183,52,95,86,64,33,120,253,145,253,207,63,70, +96,126,2,45,4,227,255,5,44,241,222,127,38,127,1,44,64,0,13,210, +134,3,38,80,146,250,38,39,247,115,249,97,185,39,31,6,111,30,66,6, +135,46,9,95,127,196,11,44,241,56,216,254,89,106,189,167,100,140,8,32, +128,134,70,36,1,251,240,198,106,31,128,222,190,255,124,104,196,16,16,252, +254,195,180,227,180,216,143,159,204,192,190,173,174,226,103,25,209,239,132,245, +224,0,0,1,52,52,34,73,69,250,235,197,59,252,151,239,13,186,182,28, +126,240,224,57,215,137,107,160,129,68,96,51,207,195,236,53,48,169,145,103, +14,64,0,13,129,72,226,100,255,251,238,51,219,205,39,131,189,30,194,4, +192,14,220,142,51,98,87,31,240,49,252,103,212,83,252,172,33,247,133,60, +115,0,2,104,8,68,210,159,63,76,47,223,15,192,94,6,170,128,47,223, +153,247,158,23,249,245,135,153,137,241,191,133,198,7,96,75,143,12,67,0, +2,104,8,68,210,239,191,140,255,7,207,160,2,233,224,214,99,238,195,151, +5,129,53,147,142,194,23,53,233,175,100,152,0,16,64,67,32,146,134,58, +0,38,176,131,151,132,223,126,98,99,97,98,176,214,122,79,70,102,2,8, +160,209,72,162,7,120,251,137,117,203,73,177,63,127,65,153,201,72,133,228, +249,64,128,0,26,141,36,58,129,179,183,249,110,63,229,102,99,97,48,87, +255,72,106,102,2,8,160,209,72,162,19,0,102,163,157,103,69,190,255,98, +82,147,254,166,77,98,51,15,32,128,40,157,202,100,101,101,229,231,231,23, +21,21,21,16,16,224,226,226,98,98,98,250,253,251,247,199,143,31,223,188, +121,3,36,63,125,162,230,84,63,46,192,195,195,3,180,93,88,88,24,232, +18,118,118,246,127,255,254,125,251,246,237,243,231,207,175,95,191,6,186,225, +199,143,31,116,112,3,49,224,214,83,174,11,119,249,44,53,63,90,106,125, +188,120,159,151,120,141,0,1,68,126,36,41,43,43,91,88,88,104,104,104, +8,9,9,1,131,137,5,12,24,192,203,4,129,241,244,235,215,47,96,12, +61,123,246,236,238,221,187,39,79,158,124,250,244,41,30,163,56,57,57,67, +67,67,5,5,5,129,225,11,114,19,11,203,177,99,199,128,186,240,59,0, +104,175,165,165,165,186,186,186,148,148,20,48,146,128,209,3,212,8,76,37, +64,169,191,127,255,254,249,243,7,24,85,239,223,191,127,252,248,241,217,179, +103,47,92,184,240,243,231,79,130,158,98,100,68,31,190,249,143,209,178,228, +229,229,21,19,19,19,23,23,7,58,24,98,29,80,205,219,183,111,239,223, +191,255,226,197,11,252,230,239,57,47,164,40,254,67,83,230,155,186,244,183, +155,79,137,29,61,1,8,32,70,50,206,22,226,230,230,246,240,240,112,115, +115,3,186,146,24,245,207,159,63,223,183,111,223,145,35,71,128,62,193,170, +128,143,143,175,179,179,19,152,21,224,34,235,214,173,91,177,98,5,46,3, +129,193,4,76,31,78,78,78,192,132,66,140,3,128,41,230,242,229,203,187, +119,239,62,127,254,60,102,160,195,1,48,232,189,189,189,129,229,1,68,13, +48,194,128,145,189,99,199,142,7,15,30,48,128,83,18,48,69,2,211,132, +182,182,182,132,132,4,48,16,32,137,18,2,128,105,2,152,113,111,220,184, +1,76,94,64,187,32,169,13,43,48,83,251,148,228,250,252,246,51,206,105, +91,101,128,165,31,49,238,7,8,32,146,115,18,208,125,177,177,177,166,166, +166,12,168,169,12,45,13,34,75,73,74,74,70,71,71,219,217,217,45,94, +188,24,152,162,49,205,4,42,6,134,35,92,23,36,116,112,57,0,24,49, +113,113,113,154,154,154,152,22,33,187,1,89,156,141,141,205,216,216,88,95, +95,31,24,79,91,182,108,1,134,38,86,147,129,165,165,131,131,3,48,50, +144,5,79,157,58,245,232,209,35,160,127,189,188,188,128,145,132,203,10,96, +132,73,130,129,141,141,205,137,19,39,86,175,94,141,43,87,93,121,200,243, +224,37,167,138,212,15,101,201,239,87,30,18,53,31,8,16,64,164,53,28, +152,153,153,129,1,132,28,67,140,48,0,100,3,75,57,96,5,0,36,209, +196,193,123,228,254,203,202,202,102,102,102,202,201,201,145,100,35,26,208,211, +211,43,42,42,130,196,16,196,88,76,187,32,42,49,29,0,12,71,79,79, +207,156,156,28,96,100,96,53,28,152,252,225,105,5,98,14,176,132,4,154, +224,239,239,15,177,148,17,188,57,9,14,144,245,194,5,129,149,180,173,173, +45,208,167,192,236,142,213,150,111,63,153,246,93,18,0,58,203,66,237,19, +70,225,138,29,0,4,16,105,57,201,200,200,8,152,30,25,144,98,8,88, +241,0,51,199,205,155,55,129,45,133,239,223,191,3,115,0,48,34,129,85, +148,136,136,136,170,170,170,137,137,9,48,97,66,20,3,73,96,241,24,16, +16,48,115,230,76,98,170,7,76,160,168,168,152,154,154,10,108,164,32,199, +4,144,124,249,242,229,149,43,87,128,233,253,221,187,119,192,84,2,20,4, +150,69,192,90,74,77,77,77,75,75,11,18,37,240,96,5,134,117,82,82, +210,212,169,83,33,241,129,7,64,212,251,249,249,1,243,46,36,122,144,45, +69,86,131,166,11,168,0,104,11,176,228,92,185,114,37,214,210,21,152,153, +110,63,225,50,80,252,34,43,242,243,209,107,194,35,94,0,1,68,90,36, +25,26,26,2,83,10,60,134,128,133,245,162,69,139,174,94,189,138,213,41, +187,118,237,2,22,50,64,183,2,67,10,174,0,152,11,15,31,62,12,172, +27,72,178,151,1,92,158,4,5,5,1,171,107,228,192,2,54,222,128,101, +11,208,34,96,235,0,83,11,176,58,1,38,20,96,238,49,51,51,3,38, +29,184,70,96,125,6,108,206,108,222,188,25,79,253,4,1,192,114,18,158, +107,225,113,3,76,136,144,42,7,104,38,164,225,192,128,26,91,16,197,142, +142,142,167,79,159,6,90,132,105,44,48,51,173,57,38,90,28,240,196,86, +235,227,178,131,98,4,59,77,0,1,68,66,36,1,163,71,90,90,26,194, +6,58,2,88,172,45,93,186,20,152,132,113,169,7,250,4,232,202,219,183, +111,23,23,23,3,235,91,136,32,176,13,6,204,94,100,68,18,176,182,0, +106,132,115,129,14,0,182,24,103,205,154,117,253,250,117,92,90,128,161,9, +172,201,129,185,28,88,157,68,68,68,0,173,134,228,39,160,94,96,124,3, +165,110,221,186,69,208,94,136,122,32,0,22,21,64,207,2,83,3,48,227, +66,138,116,14,14,14,96,11,19,210,148,0,22,110,104,241,4,44,54,32, +169,1,171,177,15,95,179,159,187,199,99,170,250,249,248,13,190,123,47,9, +108,105,2,8,32,18,34,9,152,172,144,43,85,96,145,5,116,55,65,93, +31,62,124,216,187,119,175,140,140,12,48,206,32,21,3,208,63,200,165,7, +49,0,88,100,1,115,36,60,55,0,181,3,11,171,121,243,230,225,137,33, +56,0,106,217,186,117,43,80,111,100,100,36,188,197,12,108,194,1,67,144, +152,72,130,0,96,106,91,182,108,25,214,142,4,208,112,96,110,203,202,202, +66,206,229,16,0,236,27,224,49,115,239,69,1,19,149,47,86,154,159,8, +70,18,64,0,145,16,73,200,181,37,144,1,44,247,129,85,20,254,14,16, +4,0,123,60,247,238,221,131,232,5,6,19,25,189,75,37,37,37,96,195, +9,217,37,192,162,12,79,38,198,4,64,245,192,218,84,87,87,23,238,5, +3,3,131,141,27,55,2,11,76,252,26,129,9,2,216,121,152,61,123,54, +176,198,197,165,6,152,86,214,175,95,15,172,47,145,11,85,6,112,95,5, +40,130,171,165,250,248,13,251,153,219,188,6,10,223,118,240,253,126,243,9, +223,114,34,128,0,34,33,146,128,89,231,203,23,196,120,6,208,245,192,86, +0,176,12,1,150,39,192,18,0,232,91,92,205,1,160,247,128,181,58,241, +22,97,2,5,5,5,96,236,194,179,17,176,129,0,204,157,36,229,69,96, +206,3,54,166,117,116,116,224,34,192,132,15,236,78,224,143,36,72,181,7, +140,75,60,49,4,1,192,214,19,208,85,192,70,13,178,32,164,210,194,211, +157,216,113,78,80,85,234,135,141,230,231,13,39,241,157,128,3,16,64,36, +68,18,208,50,96,27,1,152,24,225,45,81,96,193,21,22,22,6,20,7, +150,105,192,110,193,51,48,0,246,66,128,157,86,160,200,231,207,159,9,182, +160,136,1,64,127,202,203,203,35,139,0,11,122,130,125,123,76,112,241,226, +69,160,171,128,85,5,36,118,129,85,44,48,119,2,83,24,126,93,64,5, +15,31,62,36,104,248,215,175,95,129,134,163,69,18,193,100,244,226,3,235, +209,235,124,166,202,95,118,156,19,248,241,27,103,119,8,32,128,72,107,221, +29,56,112,0,216,9,128,55,31,32,142,0,166,23,97,48,128,175,14,3, +166,59,96,158,3,70,24,208,135,192,134,3,176,172,3,70,24,73,22,33, +3,96,93,136,60,24,1,4,192,24,34,41,27,65,192,251,247,239,129,169, +7,50,74,2,105,14,224,234,48,33,131,231,207,159,19,99,56,176,198,253, +243,231,15,169,78,2,130,99,55,120,76,148,191,90,170,127,217,127,5,231, +10,14,128,0,34,45,146,128,57,26,216,203,137,142,142,134,183,214,48,187, +117,64,207,115,130,1,48,89,1,171,1,72,251,226,206,157,59,192,2,225, +220,185,115,4,203,13,76,0,76,242,192,194,29,89,132,188,113,91,96,182, +6,166,119,100,17,96,243,129,160,46,226,131,30,115,220,143,24,240,225,43, +203,201,91,60,246,218,159,79,223,225,249,242,3,123,102,2,8,32,146,167, +42,128,45,215,73,147,38,1,235,225,87,175,94,49,32,117,236,225,78,252, +143,10,128,149,22,48,231,217,219,219,3,187,250,121,121,121,240,216,37,30, +0,77,70,30,37,99,32,37,224,144,1,208,49,104,67,106,104,198,226,178, +157,12,187,72,2,167,239,112,51,49,254,87,151,194,153,124,1,2,136,156, +81,112,96,173,3,108,254,110,216,176,1,88,63,1,171,98,96,67,83,68, +68,132,135,135,7,152,228,145,149,193,7,26,32,92,96,169,8,236,219,106, +104,104,172,90,181,106,251,246,237,196,91,7,172,243,208,234,54,96,196,147, +225,108,96,221,134,230,66,72,119,103,192,193,187,47,44,71,174,243,105,203, +254,56,255,128,11,235,49,58,0,1,68,254,84,5,176,232,59,8,6,192, +58,3,24,73,192,158,16,48,182,100,101,101,129,36,176,160,131,180,62,225, +138,225,165,34,80,28,216,145,132,244,10,137,180,8,50,65,133,44,66,228, +232,59,26,0,150,192,104,227,105,148,212,148,212,5,7,175,241,38,58,188, +145,23,249,117,255,21,150,244,7,16,64,84,216,191,8,76,230,144,118,29, +3,56,181,2,195,66,64,64,0,216,21,7,54,112,229,228,228,212,212,212, +20,21,21,225,189,87,32,9,172,174,205,204,204,72,138,36,180,94,51,48, +29,224,233,127,224,2,192,164,3,116,21,132,13,41,196,128,233,140,36,19, +104,7,126,254,102,188,250,132,83,93,234,39,214,72,2,8,32,42,111,50, +5,22,250,95,193,0,216,201,189,124,249,50,3,120,106,206,213,213,213,199, +199,7,152,225,224,202,128,217,142,120,51,129,241,250,228,201,19,100,17,96, +126,5,154,64,76,203,24,25,0,75,102,228,193,27,96,139,6,215,156,197, +128,128,11,15,56,253,140,63,73,8,252,6,182,203,209,164,0,2,136,132, +72,2,182,176,129,149,10,164,224,2,230,24,96,52,0,91,228,4,147,51, +48,181,174,92,185,18,88,99,185,187,187,195,3,8,200,37,201,3,192,118, +60,48,191,2,163,25,98,59,48,167,134,132,132,76,153,50,133,248,209,116, +96,90,1,54,94,144,69,128,113,76,204,112,9,221,192,231,239,204,79,222, +177,234,203,127,199,140,36,128,0,34,33,146,128,197,5,48,67,192,185,192, +208,63,115,230,12,193,97,21,8,184,127,255,62,50,151,212,169,10,160,118, +96,151,11,216,78,129,139,152,155,155,95,187,118,141,200,6,8,176,189,16, +27,27,11,236,17,35,247,22,78,158,60,73,70,127,128,166,0,152,153,44, +84,191,114,178,253,67,155,177,5,8,32,18,154,224,183,110,221,2,246,7, +25,96,173,0,96,237,237,226,226,66,140,70,96,5,128,28,190,12,224,246, +33,241,246,50,128,35,21,50,54,131,60,179,23,22,22,6,204,157,4,155, +209,124,124,124,105,105,105,214,214,214,200,115,28,64,7,156,62,125,154,36, +55,208,1,124,252,198,252,232,13,155,148,32,122,7,3,32,128,72,200,73, +47,95,190,124,240,224,1,188,101,5,25,187,3,146,103,207,158,5,150,27, +88,71,128,128,73,24,216,240,179,179,179,3,182,20,224,35,111,64,6,176, +111,75,170,7,128,53,220,137,19,39,28,29,29,225,131,82,192,134,98,92, +92,156,170,170,234,190,125,251,128,205,16,180,166,26,80,25,208,169,192,54, +11,48,34,13,12,12,144,197,129,45,145,117,235,214,145,49,176,68,7,240, +244,29,171,130,40,232,48,61,228,17,2,128,0,34,109,236,14,88,188,0, +59,58,144,201,86,72,71,21,152,156,189,189,189,239,221,187,7,172,219,63, +124,248,240,229,203,23,96,219,1,216,244,130,180,241,128,173,59,96,37,15, +100,48,32,117,152,128,5,23,25,243,73,64,237,43,86,172,0,22,185,240, +65,82,200,92,53,48,5,88,90,90,62,127,254,28,50,211,3,204,109,192, +250,146,139,139,11,168,82,73,73,73,76,76,12,62,50,203,0,142,33,160, +243,54,109,218,180,119,239,94,82,29,64,31,240,233,59,243,155,207,44,220, +236,255,144,71,31,0,2,136,180,214,221,133,11,23,182,109,219,22,24,24, +8,241,57,188,235,163,11,6,184,116,33,135,17,176,192,4,118,102,191,125, +251,70,134,7,128,122,167,78,157,10,44,187,12,13,13,25,144,250,94,192, +168,146,3,3,130,182,3,201,221,187,119,175,94,189,154,12,219,233,6,222, +127,101,230,96,69,25,105,3,8,32,146,155,224,144,130,2,152,129,224,35, +190,196,140,117,66,2,8,88,42,206,153,51,231,234,213,171,4,85,226,2, +111,223,190,157,54,109,90,112,112,48,176,58,132,47,243,35,232,0,136,153, +192,206,22,176,157,121,252,248,113,60,235,173,136,119,9,49,234,201,27,82, +250,241,139,233,207,95,20,31,1,4,16,201,145,4,44,208,15,30,60,8, +236,186,2,171,7,200,194,68,228,145,5,92,0,152,9,174,92,185,178,117, +235,86,96,193,136,41,11,244,12,100,192,6,238,43,60,102,2,219,147,11, +23,46,4,150,153,192,38,53,208,1,104,43,176,176,2,96,244,92,191,126, +125,215,174,93,248,39,38,224,227,70,200,129,75,140,239,32,0,146,104,144, +245,18,51,54,136,9,254,131,119,251,32,139,0,4,224,212,142,81,0,6, +97,40,128,174,222,193,69,208,201,19,120,255,27,120,21,39,199,62,16,178, +20,90,90,247,144,159,104,200,255,49,127,150,35,227,208,134,189,247,90,107, +206,249,172,25,75,25,100,158,182,6,118,62,44,48,117,42,71,19,122,16, +37,4,16,246,21,74,83,178,206,110,194,179,119,233,107,173,233,145,165,148, +51,136,10,239,88,204,222,123,173,229,122,120,159,115,106,87,175,225,8,1, +193,73,41,69,105,66,2,6,48,175,182,192,140,49,176,164,40,83,182,188, +35,59,95,39,35,247,115,9,32,138,34,9,25,0,27,17,64,239,1,131, +27,146,244,32,163,162,192,120,162,202,188,31,49,182,67,0,196,118,200,58, +103,96,205,71,121,0,13,6,0,16,64,84,27,22,250,9,6,212,50,109, +104,217,78,107,0,16,64,163,91,95,134,0,0,8,160,209,72,26,2,0, +32,128,70,35,105,8,0,128,0,26,86,145,100,105,105,233,235,235,75,222, +148,224,96,6,0,1,68,167,72,210,214,214,142,143,143,7,182,152,201,208, +43,44,44,12,217,57,67,80,165,151,151,87,108,108,172,184,184,56,25,182, +80,29,216,216,216,0,29,131,188,166,147,108,0,16,128,116,51,70,129,24, +4,162,104,14,32,158,192,51,216,120,12,11,47,236,21,108,172,45,172,173, +4,177,223,199,126,144,144,173,150,164,10,19,51,51,38,205,127,195,247,111, +117,7,172,1,52,16,9,106,10,174,60,99,83,57,173,9,234,128,166,44, +140,40,96,129,170,247,62,198,72,164,247,46,27,137,28,85,188,133,76,63, +238,31,40,135,197,36,129,54,248,55,60,226,222,57,151,82,130,117,74,41, +168,106,85,164,7,176,12,169,189,214,58,86,133,156,115,173,85,35,118,249, +32,126,251,121,116,11,54,88,107,181,151,235,59,226,226,162,202,221,6,138, +172,103,13,116,177,247,62,113,37,33,33,213,249,26,198,24,246,53,231,148, +89,76,228,23,66,104,173,141,49,94,146,192,71,0,210,205,86,197,67,32, +138,226,251,12,38,49,10,70,49,137,81,139,65,16,17,147,201,40,8,10, +255,135,241,5,196,32,248,209,68,48,40,24,52,25,44,62,128,197,230,59, +236,143,21,182,47,219,134,203,220,195,185,231,192,192,97,102,254,102,18,211, +250,190,175,235,58,26,49,9,73,173,109,91,168,163,87,28,199,108,216,247, +221,178,44,89,150,161,117,28,71,81,20,228,149,44,203,222,71,66,158,231, +33,74,211,52,162,40,130,163,105,26,141,56,52,77,83,223,247,12,105,24, +134,235,186,243,60,147,10,193,1,28,183,130,32,96,114,16,62,159,79,158, +231,164,84,42,111,248,5,28,21,234,186,126,239,171,36,73,34,216,174,235, +202,58,12,67,18,238,178,44,182,109,43,138,242,242,41,203,18,51,126,217, +158,231,105,154,38,93,20,97,133,157,48,20,4,225,121,158,174,235,182,109, +251,250,249,1,71,148,84,85,21,221,169,3,56,12,3,198,112,168,38,73, +114,223,247,117,93,142,227,64,248,21,164,170,42,136,165,105,250,30,27,81, +20,97,240,56,142,255,49,233,91,0,82,238,24,85,66,24,12,2,48,120, +8,27,65,176,17,21,43,175,162,176,119,176,20,60,161,133,176,197,90,40, +34,218,174,133,183,216,15,114,130,199,235,4,147,249,51,243,207,216,152,228, +15,247,221,49,78,223,247,180,147,134,207,231,195,95,18,237,219,194,227,188, +67,20,58,166,105,26,206,201,134,189,146,116,223,247,29,129,176,235,129,148, +186,200,182,195,48,52,77,227,213,186,174,40,193,52,128,136,2,231,153,166, +101,89,146,117,219,54,54,4,149,36,137,28,132,131,80,93,215,9,214,247, +251,125,191,223,26,198,173,138,206,243,172,86,219,182,16,166,105,50,152,220, +74,80,234,121,30,141,12,235,9,152,140,242,122,189,172,86,183,112,1,146, +231,185,54,176,206,121,158,76,83,85,85,81,20,240,37,123,28,71,19,151, +101,57,142,3,89,148,163,40,2,66,250,64,25,187,235,186,238,251,206,178, +172,174,107,57,134,201,31,113,28,11,165,89,194,253,207,223,34,63,1,40, +183,67,28,10,97,32,8,160,92,132,91,112,129,194,169,112,28,4,129,192, +96,72,17,53,40,4,166,151,232,89,254,11,77,80,223,128,32,33,109,211, +157,217,153,37,41,236,7,39,137,187,235,58,41,153,231,153,166,184,138,148, +188,171,129,65,61,252,244,190,239,59,173,153,12,231,56,142,181,167,53,198, +104,20,245,215,117,229,156,67,8,172,134,214,101,89,20,43,82,101,145,97, +24,200,173,30,79,144,164,45,64,37,112,21,143,83,237,91,74,217,182,13, +107,30,207,243,76,41,201,4,94,218,182,197,29,222,113,253,118,14,53,207, +223,22,238,247,125,91,245,198,99,62,109,25,170,101,138,5,209,205,19,211, +52,9,227,56,14,86,160,69,137,145,108,170,34,29,75,84,209,117,93,197, +38,229,32,247,125,207,76,117,47,225,213,14,173,230,57,159,36,32,208,84, +130,250,85,69,214,85,136,79,141,5,127,175,159,0,156,219,209,13,128,32, +12,4,80,103,37,44,208,57,89,202,23,46,169,134,63,245,195,160,180,90, +232,29,36,103,253,144,36,33,230,75,218,24,195,100,65,174,182,51,32,35, +150,46,235,117,43,220,144,238,178,139,38,163,214,228,207,147,84,41,3,154, +1,167,232,199,58,227,57,166,41,251,205,90,203,100,61,33,110,153,146,47, +99,102,200,7,206,115,78,60,224,136,34,217,9,142,104,217,163,44,244,28, +241,116,47,40,4,224,26,216,35,31,41,96,226,229,190,36,49,78,193,140, +60,85,21,23,111,143,8,107,8,8,154,66,143,86,246,34,78,190,117,191, +235,175,198,122,28,183,0,172,155,65,10,0,33,12,3,125,116,223,47,14, +14,4,81,47,130,30,23,172,113,155,102,139,110,30,66,72,115,4,135,210, +241,195,171,249,146,45,1,197,11,211,56,223,120,126,90,24,101,183,141,3, +34,192,246,244,13,218,95,32,74,188,253,118,252,160,154,185,150,99,85,177, +10,236,70,60,209,22,68,31,194,94,1,175,153,219,240,24,54,212,113,137, +128,143,141,73,36,200,44,50,8,212,62,71,155,41,167,118,19,217,190,224, +122,94,254,229,240,112,8,64,201,29,165,0,16,130,64,0,237,72,222,255, +116,61,26,88,34,66,218,254,34,146,44,103,148,204,126,132,224,96,11,221, +60,51,98,177,197,232,40,85,177,14,239,139,154,246,139,250,189,27,181,241, +146,64,40,197,111,112,137,175,144,167,51,174,42,254,131,156,107,102,136,16, +211,243,157,6,202,5,95,192,69,98,108,37,79,251,82,158,214,47,224,218, +237,135,98,55,99,65,159,163,165,50,250,181,78,126,40,169,250,99,214,209, +162,178,168,228,37,153,210,183,41,0,165,246,114,3,49,8,3,1,148,178, +16,93,208,1,141,80,19,215,148,183,79,140,54,66,201,101,151,99,228,200, +150,173,249,32,252,7,146,76,133,24,16,228,57,39,176,19,124,178,196,152, +225,138,144,192,185,196,155,5,238,32,172,236,213,34,173,236,189,131,32,207, +70,42,128,134,18,208,54,212,239,227,117,93,134,20,114,120,80,132,142,248, +157,149,128,33,97,208,83,107,101,121,37,165,222,101,47,136,153,156,50,146, +46,25,227,230,239,38,222,245,148,239,243,213,89,109,130,79,26,40,251,193, +151,181,225,241,90,107,188,3,82,229,17,68,170,63,62,91,192,89,234,131, +223,114,19,24,99,160,229,181,214,239,125,126,159,143,0,156,220,209,10,128, +32,12,133,225,247,127,66,161,155,96,79,210,135,63,72,183,229,133,136,109, +118,180,109,103,97,246,237,111,198,40,7,129,119,246,136,67,72,19,202,71, +33,214,227,42,211,235,173,197,52,234,17,25,180,185,139,232,36,91,165,229, +97,75,150,212,72,130,140,133,64,179,200,182,240,98,110,108,246,253,201,42, +49,233,19,91,54,130,244,218,152,133,29,72,172,23,95,164,66,30,111,115, +113,146,162,168,6,106,185,118,233,96,225,193,131,57,232,70,159,7,45,90, +106,7,171,144,174,198,79,107,45,42,237,132,201,86,184,145,123,201,53,88, +88,192,172,3,130,156,153,252,24,120,48,128,239,40,195,189,139,113,96,168, +231,119,121,4,16,213,230,147,70,1,237,0,64,0,13,171,177,187,225,10, +0,2,104,52,146,134,0,0,8,160,209,72,26,2,0,32,128,70,35,105, +8,0,128,0,26,141,164,33,0,0,2,104,52,146,134,0,0,8,48,0, +162,143,201,39,155,129,43,225,0,0,0,0,73,69,78,68,174,66,96,130 + +}; diff --git a/ediv/ideQT/gif/sion.png b/ediv/ideQT/gif/sion.png new file mode 100644 index 0000000..4c13834 Binary files /dev/null and b/ediv/ideQT/gif/sion.png differ diff --git a/ediv/ideQT/gif/sortasc.gif b/ediv/ideQT/gif/sortasc.gif new file mode 100644 index 0000000..5818cef Binary files /dev/null and b/ediv/ideQT/gif/sortasc.gif differ diff --git a/ediv/ideQT/gif/sortasc.h b/ediv/ideQT/gif/sortasc.h new file mode 100644 index 0000000..586c377 --- /dev/null +++ b/ediv/ideQT/gif/sortasc.h @@ -0,0 +1,8 @@ +static unsigned char sortasc_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,128,128,128,0,0,128,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,54,156,39,167,161,6,2,218,96,77,88,73,207,67,113,85, +123,121,90,98,64,98,121,129,167,132,41,160,186,146,136,108,100,46,29,228, +249,221,0,122,55,99,233,14,33,132,194,7,124,21,107,172,166,162,0,0, +59 +}; diff --git a/ediv/ideQT/gif/sortdes.gif b/ediv/ideQT/gif/sortdes.gif new file mode 100644 index 0000000..681abfd Binary files /dev/null and b/ediv/ideQT/gif/sortdes.gif differ diff --git a/ediv/ideQT/gif/sortdes.h b/ediv/ideQT/gif/sortdes.h new file mode 100644 index 0000000..9a358df --- /dev/null +++ b/ediv/ideQT/gif/sortdes.h @@ -0,0 +1,8 @@ +static unsigned char sortdes_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,3,0,128,128,128,0,0,128,0, +0,0,0,0,0,33,249,4,1,0,0,3,0,44,0,0,0,0,16,0, +16,0,0,2,55,156,142,163,26,107,123,220,104,210,136,74,93,196,114,115, +120,41,225,146,89,200,200,84,106,90,161,100,5,8,192,167,121,83,128,103, +177,49,43,64,222,51,217,114,139,157,40,248,11,38,18,175,149,115,80,0, +0,59 +}; diff --git a/ediv/ideQT/gif/sound.gif b/ediv/ideQT/gif/sound.gif new file mode 100644 index 0000000..4cb0d63 Binary files /dev/null and b/ediv/ideQT/gif/sound.gif differ diff --git a/ediv/ideQT/gif/sound.h b/ediv/ideQT/gif/sound.h new file mode 100644 index 0000000..623206d --- /dev/null +++ b/ediv/ideQT/gif/sound.h @@ -0,0 +1,9 @@ +static unsigned char sound_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,191,191,191,255, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,72,72,186,211, +75,226,177,48,192,80,81,146,17,128,7,82,182,5,148,71,45,226,88,146, +23,196,112,44,124,137,28,76,221,224,83,85,94,221,65,130,224,142,116,227, +228,116,60,139,204,37,225,217,90,169,77,143,216,98,50,44,128,223,35,218, +168,97,52,175,170,21,76,78,0,0,59 +}; diff --git a/ediv/ideQT/gif/time.gif b/ediv/ideQT/gif/time.gif new file mode 100644 index 0000000..a866b6c Binary files /dev/null and b/ediv/ideQT/gif/time.gif differ diff --git a/ediv/ideQT/gif/time.h b/ediv/ideQT/gif/time.h new file mode 100644 index 0000000..88cea7a --- /dev/null +++ b/ediv/ideQT/gif/time.h @@ -0,0 +1,9 @@ +static unsigned char time_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,191,191,191,127,127,127,255, +0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,71,88,179,220, +245,112,144,73,231,130,111,136,205,183,28,152,84,81,34,152,141,36,19,81, +1,19,144,43,49,0,50,1,148,107,64,215,246,107,42,188,224,103,37,34, +8,22,181,223,7,149,204,237,40,0,95,108,6,197,157,38,173,197,203,18, +99,114,51,141,176,170,144,0,0,59 +}; diff --git a/ediv/ideQT/gif/tips.h b/ediv/ideQT/gif/tips.h new file mode 100644 index 0000000..3c9c1b7 --- /dev/null +++ b/ediv/ideQT/gif/tips.h @@ -0,0 +1,74 @@ +static unsigned char tips_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,0,0,0,51,51,51,0, +0,0,56,56,57,31,53,93,10,45,115,8,48,126,26,56,102,20,56,119, +42,53,73,37,54,83,52,58,68,36,59,99,26,74,126,41,64,90,55,72, +90,34,69,107,41,79,117,57,86,117,103,46,46,107,50,49,114,57,57,83, +67,30,68,65,63,74,73,72,84,85,86,77,90,102,78,95,113,86,99,102, +89,102,115,86,120,121,123,74,74,101,101,101,110,110,110,110,116,121,112,102, +102,120,122,119,0,40,137,10,56,134,1,54,154,1,60,161,5,68,140,11, +74,152,13,80,157,26,73,129,23,85,150,2,68,169,0,76,180,13,87,163, +1,83,184,24,73,167,19,94,168,25,87,180,8,97,186,24,98,172,20,106, +191,40,86,133,42,84,154,41,86,172,34,91,182,48,94,179,63,99,136,59, +103,149,36,97,185,44,115,180,57,100,180,0,92,196,16,93,192,0,97,199, +9,108,210,24,105,199,20,114,206,24,118,212,32,109,201,41,119,200,36,125, +215,57,115,198,50,122,208,72,107,134,65,107,144,81,107,132,84,119,153,77, +121,166,71,113,188,84,125,166,89,124,191,71,123,199,59,137,191,28,162,255, +42,130,217,54,135,216,63,150,223,46,137,228,58,141,226,63,149,224,40,170, +255,51,170,255,88,138,188,108,143,143,117,145,145,106,150,189,73,135,202,66, +135,214,86,131,201,87,138,210,81,145,220,70,150,228,86,158,226,75,162,223, +68,176,255,88,168,234,93,173,251,87,182,255,101,138,200,97,142,210,105,147, +202,101,151,213,117,149,202,116,155,215,99,166,210,121,174,201,120,168,220,104, +168,229,105,178,230,103,187,255,114,172,228,125,182,232,119,183,242,91,194,255, +124,193,235,117,194,254,137,13,13,135,25,24,159,10,3,154,30,30,166,20, +6,182,41,12,164,40,40,164,50,50,178,55,42,159,111,9,131,92,91,141, +119,64,143,124,81,156,122,123,177,87,76,193,60,20,208,72,15,209,83,27, +209,89,48,220,100,33,226,110,36,236,119,35,197,84,74,194,118,118,0,0, +0,156,144,80,160,131,64,168,148,96,203,152,0,204,157,16,205,162,30,205, +163,32,206,168,48,208,171,50,242,134,45,203,173,70,206,176,74,209,178,75, +211,182,84,204,182,96,199,185,115,209,189,112,212,195,127,137,137,137,128,141, +152,155,135,134,129,156,167,156,158,172,132,161,166,131,161,191,144,175,179,166, +169,166,167,189,186,179,179,179,128,153,204,136,167,216,155,182,217,130,172,231, +136,183,235,131,186,243,150,185,229,147,189,244,172,189,196,160,188,230,155,194, +204,144,194,219,134,198,237,135,196,252,134,209,255,148,199,234,147,202,249,156, +209,251,161,199,204,161,202,217,190,210,216,169,192,229,166,204,245,172,213,255, +183,201,230,183,213,235,183,219,253,175,229,252,185,231,253,191,242,255,217,159, +159,204,194,137,201,198,153,213,197,133,214,205,158,197,202,172,204,207,180,212, +209,171,217,215,188,204,215,204,210,217,204,211,217,213,193,206,232,200,218,231, +192,222,253,210,222,238,221,224,207,220,228,217,195,226,254,202,229,255,202,235, +255,197,248,255,215,230,237,209,230,254,212,234,254,222,229,243,219,236,246,220, +237,254,219,240,255,226,226,201,236,234,212,225,235,239,229,235,244,227,241,254, +238,246,247,234,245,254,236,249,255,241,233,231,240,246,254,245,249,254,253,254, +254,33,249,4,1,0,0,0,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,1,8,28,72,176,32,136,131,8,11,42,92,8,0,161,67,55,120, +34,222,113,2,130,161,193,135,17,137,33,243,163,103,75,22,36,69,138,52, +0,17,192,98,67,16,16,137,21,251,227,198,75,150,34,66,98,10,33,66, +147,72,131,12,37,45,130,240,163,6,36,17,153,49,105,10,137,241,226,69, +140,24,42,48,228,100,184,19,40,208,162,47,126,88,137,163,203,25,147,20, +74,77,130,232,51,180,232,209,29,85,234,56,35,7,79,223,191,127,250,204, +96,93,186,16,132,158,24,63,206,228,138,102,238,172,93,127,253,244,233,195, +103,101,173,214,60,47,226,216,189,219,47,47,61,122,248,228,245,205,170,19, +176,224,193,120,243,226,35,69,74,222,188,197,108,21,130,112,12,185,176,222, +111,159,182,189,195,135,230,196,133,204,6,233,196,152,66,56,239,222,84,161, +222,141,46,125,154,224,162,219,139,4,130,152,99,36,200,217,200,122,241,181, +251,164,237,157,187,121,180,115,166,73,3,107,17,38,68,31,26,242,14,226, +15,248,94,124,173,64,137,123,167,238,29,26,19,15,2,104,255,209,226,231, +21,191,76,147,160,55,12,99,100,71,117,215,248,230,201,19,101,202,157,186, +238,104,80,180,72,131,76,93,58,90,182,64,66,8,5,37,129,64,69,18, +46,232,35,89,124,243,132,243,73,54,247,165,163,135,22,107,76,227,159,49, +107,44,129,3,78,57,25,104,68,130,250,104,99,74,59,243,188,163,205,39, +228,168,211,78,24,122,164,243,206,52,198,168,97,68,11,18,4,192,22,8, +81,32,136,143,62,160,153,18,143,59,163,152,162,78,52,143,120,96,12,52, +127,116,113,3,14,54,162,6,128,19,74,160,32,205,94,222,124,114,138,56, +159,112,243,78,20,22,112,2,68,22,49,64,208,164,69,80,36,129,66,52, +241,189,83,101,40,160,164,40,8,27,193,236,146,134,11,3,56,73,80,153, +82,226,35,219,59,216,124,98,202,52,211,64,243,5,28,211,240,162,194,2, +118,14,4,66,148,191,148,104,95,58,166,172,82,13,160,112,128,33,136,30, +46,32,106,82,67,73,156,160,203,60,246,249,71,78,51,128,194,8,135,32, +107,184,144,64,162,186,25,129,130,46,220,249,122,151,78,169,128,42,35,136, +49,152,174,186,41,8,174,218,193,93,58,179,150,90,13,52,201,244,145,198, +14,39,104,170,149,17,39,156,241,14,176,192,78,218,11,29,76,208,112,130, +1,7,172,202,106,67,204,198,49,143,58,211,60,195,139,21,52,184,112,66, +1,10,32,58,230,174,52,160,96,197,47,116,4,97,46,182,9,212,185,238, +166,186,197,128,194,9,39,148,128,238,2,234,218,136,175,102,45,152,144,173, +189,247,14,92,80,147,12,111,171,48,195,10,111,26,16,0,59 +}; diff --git a/ediv/ideQT/gif/tools.gif b/ediv/ideQT/gif/tools.gif new file mode 100644 index 0000000..2a6e037 Binary files /dev/null and b/ediv/ideQT/gif/tools.gif differ diff --git a/ediv/ideQT/gif/tools.h b/ediv/ideQT/gif/tools.h new file mode 100644 index 0000000..5327f5c --- /dev/null +++ b/ediv/ideQT/gif/tools.h @@ -0,0 +1,10 @@ +static unsigned char tools_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,6,0,128,0,0,127,127,127,128, +128,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,82,104,38,98, +245,79,73,41,96,9,50,220,105,203,212,152,211,53,217,230,136,5,67,42, +158,228,189,170,59,137,108,124,206,92,220,186,79,152,50,59,133,102,96,42, +0,142,71,135,143,40,33,56,157,52,7,179,9,32,52,10,68,236,84,65, +168,50,134,131,112,176,107,109,104,30,98,42,33,53,211,182,200,142,4,0, +59 +}; diff --git a/ediv/ideQT/gif/trash.gif b/ediv/ideQT/gif/trash.gif new file mode 100644 index 0000000..0192ef8 Binary files /dev/null and b/ediv/ideQT/gif/trash.gif differ diff --git a/ediv/ideQT/gif/trash.h b/ediv/ideQT/gif/trash.h new file mode 100644 index 0000000..71a7b5d --- /dev/null +++ b/ediv/ideQT/gif/trash.h @@ -0,0 +1,8 @@ +static unsigned char trash_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,191,191,191,127,127,127,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,60,72,170,211, +189,16,142,64,71,92,46,231,56,4,248,84,104,73,154,118,77,104,128,94, +68,55,0,233,72,10,111,173,202,109,75,195,170,154,75,59,27,14,19,236, +13,25,65,222,81,39,244,157,146,171,103,72,196,42,57,32,9,0,59 +}; diff --git a/ediv/ideQT/gif/trashful.gif b/ediv/ideQT/gif/trashful.gif new file mode 100644 index 0000000..97f6063 Binary files /dev/null and b/ediv/ideQT/gif/trashful.gif differ diff --git a/ediv/ideQT/gif/trashful.h b/ediv/ideQT/gif/trashful.h new file mode 100644 index 0000000..4656b39 --- /dev/null +++ b/ediv/ideQT/gif/trashful.h @@ -0,0 +1,9 @@ +static unsigned char trashful_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,191,191,191,127,127,127,255, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,67,72,170,211, +189,16,142,64,71,92,46,231,56,4,248,84,104,73,154,198,9,194,0,76, +83,48,98,168,42,87,18,74,173,1,238,50,93,250,169,174,202,168,167,194, +233,44,72,91,14,216,122,17,136,184,230,201,55,219,157,66,162,203,179,244, +208,122,33,9,0,59 +}; diff --git a/ediv/ideQT/gif/undo.gif b/ediv/ideQT/gif/undo.gif new file mode 100644 index 0000000..1a944de Binary files /dev/null and b/ediv/ideQT/gif/undo.gif differ diff --git a/ediv/ideQT/gif/undo.h b/ediv/ideQT/gif/undo.h new file mode 100644 index 0000000..a7e7173 --- /dev/null +++ b/ediv/ideQT/gif/undo.h @@ -0,0 +1,6 @@ +static unsigned char undo_gif[]={ +71,73,70,56,57,97,16,0,16,0,145,2,0,128,128,128,0,0,128,0, +0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, +16,0,0,2,32,148,143,169,203,237,175,130,12,32,133,35,17,213,247,70, +238,125,216,180,132,194,148,105,21,4,152,208,11,199,114,83,0,0,59 +}; diff --git a/ediv/ideQT/gif/unpanelize.gif b/ediv/ideQT/gif/unpanelize.gif new file mode 100644 index 0000000..212a0b9 Binary files /dev/null and b/ediv/ideQT/gif/unpanelize.gif differ diff --git a/ediv/ideQT/gif/unpanelize.h b/ediv/ideQT/gif/unpanelize.h new file mode 100644 index 0000000..937f146 --- /dev/null +++ b/ediv/ideQT/gif/unpanelize.h @@ -0,0 +1,49 @@ +static unsigned char unpanelize_gif[]={ +71,73,70,56,55,97,16,0,16,0,247,255,0,0,0,0,253,255,253,187, +255,202,130,255,158,80,255,120,37,255,87,0,151,33,0,178,39,0,128,28, +216,216,216,210,210,210,132,132,132,255,255,255,246,246,246,254,254,254,249,249, +249,237,237,237,226,226,226,203,203,203,170,170,170,205,205,205,185,185,185,197, +197,197,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,33,249,4,1,0,0,23,0,44,0,0,0,0,16,0,16,0,7,8, +124,0,1,8,28,72,144,224,133,11,0,2,8,24,64,128,64,129,135,16, +13,0,56,8,224,128,197,139,24,13,32,152,136,176,160,71,129,20,19,40, +24,73,178,228,2,142,0,24,52,88,201,178,229,73,138,12,28,200,156,249, +160,230,131,151,8,25,64,216,201,243,163,64,6,17,130,10,77,184,176,161, +196,148,66,135,102,220,152,82,130,211,167,62,1,76,152,74,117,66,74,10, +88,41,84,136,138,84,232,214,131,96,193,2,176,64,150,236,215,176,98,63, +162,93,139,54,32,0,59 +}; diff --git a/ediv/ideQT/gif/vcrfsfor.gif b/ediv/ideQT/gif/vcrfsfor.gif new file mode 100644 index 0000000..234453d Binary files /dev/null and b/ediv/ideQT/gif/vcrfsfor.gif differ diff --git a/ediv/ideQT/gif/vcrfsfor.h b/ediv/ideQT/gif/vcrfsfor.h new file mode 100644 index 0000000..1f72dc5 --- /dev/null +++ b/ediv/ideQT/gif/vcrfsfor.h @@ -0,0 +1,9 @@ +static unsigned char vcrfsfor_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,255,255,255,0, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,67,40,186,220, +36,35,202,41,197,27,33,235,29,134,133,1,33,142,35,224,93,33,73,154, +31,38,70,196,80,158,224,43,195,4,139,218,49,172,215,189,96,142,230,10, +202,68,191,162,10,73,76,45,135,173,0,96,74,173,18,41,88,90,99,187, +120,122,69,9,0,59 +}; diff --git a/ediv/ideQT/gif/vcrpause.gif b/ediv/ideQT/gif/vcrpause.gif new file mode 100644 index 0000000..5228300 Binary files /dev/null and b/ediv/ideQT/gif/vcrpause.gif differ diff --git a/ediv/ideQT/gif/vcrpause.h b/ediv/ideQT/gif/vcrpause.h new file mode 100644 index 0000000..2c38c7b --- /dev/null +++ b/ediv/ideQT/gif/vcrpause.h @@ -0,0 +1,9 @@ +static unsigned char vcrpause_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,255,255,255,0, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,66,40,186,220, +36,35,202,41,197,27,33,235,29,134,133,1,33,142,35,224,93,33,73,154, +31,38,70,4,76,176,232,59,196,247,124,130,54,46,210,60,159,12,232,18, +230,136,41,213,111,87,84,234,90,1,128,116,74,101,82,174,187,134,118,225, +236,138,18,0,59 +}; diff --git a/ediv/ideQT/gif/vcrplay.gif b/ediv/ideQT/gif/vcrplay.gif new file mode 100644 index 0000000..4d40cfa Binary files /dev/null and b/ediv/ideQT/gif/vcrplay.gif differ diff --git a/ediv/ideQT/gif/vcrplay.h b/ediv/ideQT/gif/vcrplay.h new file mode 100644 index 0000000..5bdcb3a --- /dev/null +++ b/ediv/ideQT/gif/vcrplay.h @@ -0,0 +1,9 @@ +static unsigned char vcrplay_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,255,255,255,0, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,66,40,186,220, +36,35,202,41,197,27,33,235,29,134,133,1,33,142,35,224,93,161,56,144, +132,249,97,99,68,186,104,44,139,52,104,223,57,172,222,173,147,238,55,19, +250,8,171,226,43,197,194,25,3,128,168,116,106,164,88,133,141,236,162,201, +37,37,0,0,59 +}; diff --git a/ediv/ideQT/gif/vcrrecrd.gif b/ediv/ideQT/gif/vcrrecrd.gif new file mode 100644 index 0000000..481895b Binary files /dev/null and b/ediv/ideQT/gif/vcrrecrd.gif differ diff --git a/ediv/ideQT/gif/vcrrecrd.h b/ediv/ideQT/gif/vcrrecrd.h new file mode 100644 index 0000000..1c0f756 --- /dev/null +++ b/ediv/ideQT/gif/vcrrecrd.h @@ -0,0 +1,9 @@ +static unsigned char vcrrecrd_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,255,255,255,0, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,64,40,186,220, +36,35,202,41,197,27,33,235,29,134,133,1,33,142,35,224,93,33,73,154, +31,38,154,17,240,158,160,72,205,109,122,19,44,106,79,56,31,79,34,27, +230,84,43,154,11,25,4,1,158,208,168,146,66,165,53,174,11,166,86,148, +0,0,59 +}; diff --git a/ediv/ideQT/gif/vcrrewnd.gif b/ediv/ideQT/gif/vcrrewnd.gif new file mode 100644 index 0000000..b6b3353 Binary files /dev/null and b/ediv/ideQT/gif/vcrrewnd.gif differ diff --git a/ediv/ideQT/gif/vcrrewnd.h b/ediv/ideQT/gif/vcrrewnd.h new file mode 100644 index 0000000..49424f5 --- /dev/null +++ b/ediv/ideQT/gif/vcrrewnd.h @@ -0,0 +1,9 @@ +static unsigned char vcrrewnd_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,255,255,255,0, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,66,40,186,220, +36,35,202,41,197,27,33,235,29,134,133,1,33,142,35,224,93,33,73,154, +31,54,14,68,36,178,168,40,203,4,13,198,55,156,159,59,158,240,215,74, +197,134,58,151,170,4,84,46,137,40,128,116,74,109,82,174,192,134,118,241, +236,138,18,0,59 +}; diff --git a/ediv/ideQT/gif/vcrstop.gif b/ediv/ideQT/gif/vcrstop.gif new file mode 100644 index 0000000..1845477 Binary files /dev/null and b/ediv/ideQT/gif/vcrstop.gif differ diff --git a/ediv/ideQT/gif/vcrstop.h b/ediv/ideQT/gif/vcrstop.h new file mode 100644 index 0000000..5ca3acd --- /dev/null +++ b/ediv/ideQT/gif/vcrstop.h @@ -0,0 +1,9 @@ +static unsigned char vcrstop_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,4,0,127,127,127,255,255,255,0, +255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,4,0,44,0,0,0,0,16,0,16,0,0,3,63,40,186,220, +36,35,202,41,197,27,33,235,29,134,133,1,33,142,35,224,93,33,73,154, +31,38,82,34,139,190,83,124,130,180,100,183,41,76,200,56,130,15,232,82, +149,110,69,227,15,25,0,56,159,80,36,101,122,107,88,23,202,172,40,1, +0,59 +}; diff --git a/ediv/ideQT/gif/video.gif b/ediv/ideQT/gif/video.gif new file mode 100644 index 0000000..5bb9a05 Binary files /dev/null and b/ediv/ideQT/gif/video.gif differ diff --git a/ediv/ideQT/gif/video.h b/ediv/ideQT/gif/video.h new file mode 100644 index 0000000..7c8cc99 --- /dev/null +++ b/ediv/ideQT/gif/video.h @@ -0,0 +1,9 @@ +static unsigned char video_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,5,0,255,0,0,0,255,0,127, +127,127,191,191,191,0,0,0,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,5,0,44,0,0,0,0,16,0,16,0,0,3,66,88,69,218, +254,100,176,71,163,164,152,196,137,225,237,138,166,73,162,35,14,232,153,134, +164,224,190,66,58,182,104,29,75,120,43,70,55,33,248,180,218,160,167,113, +21,97,174,213,162,5,16,4,140,26,211,241,181,43,53,170,72,99,167,26, +85,36,0,0,59 +}; diff --git a/ediv/ideQT/gif/wld.h b/ediv/ideQT/gif/wld.h new file mode 100644 index 0000000..13c5ed6 --- /dev/null +++ b/ediv/ideQT/gif/wld.h @@ -0,0 +1,64 @@ +static unsigned char WLD_gif[]={ +71,73,70,56,55,97,32,0,32,0,247,0,0,255,255,255,255,255,204,255, +255,153,255,255,102,255,255,51,255,255,0,255,204,255,255,204,204,255,204,153, +255,204,102,255,204,51,255,204,0,255,153,255,255,153,204,255,153,153,255,153, +102,255,153,51,255,153,0,255,102,255,255,102,204,255,102,153,255,102,102,255, +102,51,255,102,0,255,51,255,255,51,204,255,51,153,255,51,102,255,51,51, +255,51,0,255,0,255,255,0,204,255,0,153,255,0,102,255,0,51,255,0, +0,204,255,255,204,255,204,204,255,153,204,255,102,204,255,51,204,255,0,204, +204,255,204,204,204,204,204,153,204,204,102,204,204,51,204,204,0,204,153,255, +204,153,204,204,153,153,204,153,102,204,153,51,204,153,0,204,102,255,204,102, +204,204,102,153,204,102,102,204,102,51,204,102,0,204,51,255,204,51,204,204, +51,153,204,51,102,204,51,51,204,51,0,204,0,255,204,0,204,204,0,153, +204,0,102,204,0,51,204,0,0,153,255,255,153,255,204,153,255,153,153,255, +102,153,255,51,153,255,0,153,204,255,153,204,204,153,204,153,153,204,102,153, +204,51,153,204,0,153,153,255,153,153,204,153,153,153,153,153,102,153,153,51, +153,153,0,153,102,255,153,102,204,153,102,153,153,102,102,153,102,51,153,102, +0,153,51,255,153,51,204,153,51,153,153,51,102,153,51,51,153,51,0,153, +0,255,153,0,204,153,0,153,153,0,102,153,0,51,153,0,0,102,255,255, +102,255,204,102,255,153,102,255,102,102,255,51,102,255,0,102,204,255,102,204, +204,102,204,153,102,204,102,102,204,51,102,204,0,102,153,255,102,153,204,102, +153,153,102,153,102,102,153,51,102,153,0,102,102,255,102,102,204,102,102,153, +102,102,102,102,102,51,102,102,0,102,51,255,102,51,204,102,51,153,102,51, +102,102,51,51,102,51,0,102,0,255,102,0,204,102,0,153,102,0,102,102, +0,51,102,0,0,51,255,255,51,255,204,51,255,153,51,255,102,51,255,51, +51,255,0,51,204,255,51,204,204,51,204,153,51,204,102,51,204,51,51,204, +0,51,153,255,51,153,204,51,153,153,51,153,102,51,153,51,51,153,0,51, +102,255,51,102,204,51,102,153,51,102,102,51,102,51,51,102,0,51,51,255, +51,51,204,51,51,153,51,51,102,51,51,51,51,51,0,51,0,255,51,0, +204,51,0,153,51,0,102,51,0,51,51,0,0,0,255,255,0,255,204,0, +255,153,0,255,102,0,255,51,0,255,0,0,204,255,0,204,204,0,204,153, +0,204,102,0,204,51,0,204,0,0,153,255,0,153,204,0,153,153,0,153, +102,0,153,51,0,153,0,0,102,255,0,102,204,0,102,153,0,102,102,0, +102,51,0,102,0,0,51,255,0,51,204,0,51,153,0,51,102,0,51,51, +0,51,0,0,0,255,0,0,204,0,0,153,0,0,102,0,0,51,238,0, +0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0,0,68, +0,0,34,0,0,17,0,0,0,238,0,0,221,0,0,187,0,0,170,0, +0,136,0,0,119,0,0,85,0,0,68,0,0,34,0,0,17,0,0,0, +238,0,0,221,0,0,187,0,0,170,0,0,136,0,0,119,0,0,85,0, +0,68,0,0,34,0,0,17,238,238,238,221,221,221,187,187,187,170,170,170, +136,136,136,119,119,119,85,85,85,68,68,68,34,34,34,17,17,17,0,0, +0,33,249,4,1,0,0,0,0,44,0,0,0,0,32,0,32,0,7,8, +255,0,1,8,28,72,176,160,193,131,8,19,42,92,200,176,225,193,127,16, +35,26,140,72,145,162,66,112,222,192,125,251,7,160,34,69,127,254,250,177, +98,5,81,225,191,35,217,178,109,132,216,111,159,75,125,48,99,194,12,84, +18,225,191,71,217,180,85,156,25,168,167,207,158,250,246,213,156,56,43,91, +196,17,220,254,245,211,247,179,105,32,125,252,134,22,164,168,237,200,8,136, +78,157,234,235,39,85,32,197,108,71,182,93,195,246,79,29,211,172,61,249, +109,229,72,144,98,55,108,219,178,141,24,209,237,31,63,180,105,89,233,27, +74,209,219,136,109,216,230,206,133,120,54,43,191,150,123,57,82,4,55,66, +219,136,107,220,228,142,48,170,215,233,190,126,34,213,210,172,56,194,234,85, +136,129,71,204,250,215,116,31,171,126,119,153,114,45,9,113,150,224,207,39, +5,151,61,203,138,223,62,213,255,234,178,245,250,239,245,92,109,215,4,111, +251,119,251,105,32,174,179,226,26,157,218,219,183,243,141,151,255,125,195,153, +83,219,242,182,205,157,191,38,11,142,122,182,71,224,182,105,161,27,62,49, +244,136,53,218,143,204,210,166,109,205,44,111,16,185,173,129,95,94,182,244, +109,175,213,179,79,10,238,223,172,53,220,208,55,149,100,176,197,246,152,54, +235,105,195,77,119,240,109,211,205,35,187,13,244,15,55,246,197,55,23,54, +8,178,55,156,116,255,108,51,11,132,19,225,55,88,68,20,78,150,77,130, +73,221,196,205,44,223,36,53,209,35,21,118,248,155,126,227,69,246,136,55, +219,172,24,33,111,185,97,179,146,140,127,97,147,160,117,107,60,50,154,68, +15,121,132,94,123,66,166,164,35,146,12,85,244,136,85,215,128,115,100,87, +14,117,212,151,69,89,38,84,81,151,96,134,41,230,152,98,6,4,0,59 + +}; diff --git a/ediv/ideQT/gif/zoomin.gif b/ediv/ideQT/gif/zoomin.gif new file mode 100644 index 0000000..dc20d2d Binary files /dev/null and b/ediv/ideQT/gif/zoomin.gif differ diff --git a/ediv/ideQT/gif/zoomin.h b/ediv/ideQT/gif/zoomin.h new file mode 100644 index 0000000..7b5b200 --- /dev/null +++ b/ediv/ideQT/gif/zoomin.h @@ -0,0 +1,9 @@ +static unsigned char zoomin_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,6,0,255,255,0,191,191,191,127, +127,127,255,0,0,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,68,104,42,213, +162,48,154,34,106,45,18,82,18,56,97,89,229,13,94,37,81,93,48,164, +96,180,13,48,252,97,174,144,174,92,11,137,29,217,153,39,129,231,71,203, +80,44,140,2,32,179,104,80,12,0,29,211,213,152,26,171,86,106,49,59, +193,114,39,134,4,0,59 +}; diff --git a/ediv/ideQT/gif/zoomout.gif b/ediv/ideQT/gif/zoomout.gif new file mode 100644 index 0000000..44995fd Binary files /dev/null and b/ediv/ideQT/gif/zoomout.gif differ diff --git a/ediv/ideQT/gif/zoomout.h b/ediv/ideQT/gif/zoomout.h new file mode 100644 index 0000000..e901881 --- /dev/null +++ b/ediv/ideQT/gif/zoomout.h @@ -0,0 +1,9 @@ +static unsigned char zoomout_gif[]={ +71,73,70,56,57,97,16,0,16,0,162,6,0,255,255,0,191,191,191,127, +127,127,255,0,0,255,255,255,0,0,0,0,0,0,0,0,0,33,249,4, +1,0,0,6,0,44,0,0,0,0,16,0,16,0,0,3,64,104,42,213, +162,48,154,34,106,45,18,210,64,120,96,89,229,117,93,37,81,228,8,70, +219,224,186,31,198,10,41,185,66,98,253,61,167,48,198,25,5,197,194,40, +0,130,134,34,197,0,184,33,53,141,231,41,42,133,202,170,19,42,22,147, +0,0,59 +}; diff --git a/ediv/ideQT/gif2h/gif2h.c b/ediv/ideQT/gif2h/gif2h.c new file mode 100644 index 0000000..2efc435 --- /dev/null +++ b/ediv/ideQT/gif2h/gif2h.c @@ -0,0 +1,56 @@ +#include +#include +#include + +int main(int argc, char *argv[]) +{ + int tamano; + FILE *f; + FILE *f2; + int i; + char h[256]; + char* a; + unsigned char b; + + if(argc!=2) { + printf("Usar: %s \n",argv[0]); + exit(1); + } + + if((f=fopen(argv[1],"rb"))==NULL) { + printf("Error abriendo archivo\n"); + exit(1); + } + + fseek(f,0,SEEK_END); + tamano=ftell(f); + fseek(f,0,SEEK_SET); + + strcpy(h,argv[1]); + a=strchr(h,'.'); + *(a+1)='h'; + *(a+2)=0; + + if((f2=fopen(h,"w"))==NULL) { + printf("Error escribiendo %s\n",h); + fclose(f); + exit(1); + } + + *(strchr(argv[1],'.'))='_'; + + fprintf(f2,"static unsigned char %s[]={\n",argv[1]); + + for(i=0;i +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=gif2h - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "gif2h.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "gif2h.mak" CFG="gif2h - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "gif2h - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "gif2h - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "gif2h - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "gif2h - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "gif2h - Win32 Release" +# Name "gif2h - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\gif2h.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ediv/ideQT/gif2h/gif2h.plg b/ediv/ideQT/gif2h/gif2h.plg new file mode 100644 index 0000000..da9c493 --- /dev/null +++ b/ediv/ideQT/gif2h/gif2h.plg @@ -0,0 +1,32 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: gif2h - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "D:\DOCUME~1\ER_MAK~1\CONFIG~1\Temp\RSPEF.tmp" with contents +[ +/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/gif2h.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\ediv\ideQT\gif2h\gif2h.c" +] +Creating command line "cl.exe @D:\DOCUME~1\ER_MAK~1\CONFIG~1\Temp\RSPEF.tmp" +Creating temporary file "D:\DOCUME~1\ER_MAK~1\CONFIG~1\Temp\RSPF0.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/gif2h.pdb" /debug /machine:I386 /out:"Debug/gif2h.exe" /pdbtype:sept +.\Debug\gif2h.obj +] +Creating command line "link.exe @D:\DOCUME~1\ER_MAK~1\CONFIG~1\Temp\RSPF0.tmp" +

    Output Window

    +Compiling... +gif2h.c +Linking... + + + +

    Results

    +gif2h.exe - 0 error(s), 0 warning(s) +
    + + diff --git a/ediv/ideQT/gif2h/gif2h.vcproj b/ediv/ideQT/gif2h/gif2h.vcproj new file mode 100644 index 0000000..6744c80 --- /dev/null +++ b/ediv/ideQT/gif2h/gif2h.vcproj @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/ideQT/ideQT.dsp b/ediv/ideQT/ideQT.dsp new file mode 100644 index 0000000..e6ace79 --- /dev/null +++ b/ediv/ideQT/ideQT.dsp @@ -0,0 +1,353 @@ +# Microsoft Developer Studio Project File - Name="ideQT" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ideQT - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ideQT.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ideQT.mak" CFG="ideQT - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ideQT - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ideQT - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ideQT - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(QTDIR)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_THREAD_SUPPORT" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib wsock32.lib $(QTDIR)\lib\qt-mt230nc.lib $(QTDIR)\lib\qtmain.lib /nologo /subsystem:windows /machine:I386 /out:"Release/edivide.exe" + +!ELSEIF "$(CFG)" == "ideQT - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c +# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "$(QTDIR)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_THREAD_SUPPORT" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib wsock32.lib $(QTDIR)\lib\qt-mt230nc.lib $(QTDIR)\lib\qtmain.lib /nologo /subsystem:windows /debug /machine:I386 /out:"Debug/edivide.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "ideQT - Win32 Release" +# Name "ideQT - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" +# Begin Source File + +SOURCE=.\about.cpp +# End Source File +# Begin Source File + +SOURCE=.\ideqtwindow.cpp +# End Source File +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# Begin Source File + +SOURCE=.\moc_about.cpp +# End Source File +# Begin Source File + +SOURCE=.\moc_ideqtwindow.cpp +# End Source File +# Begin Source File + +SOURCE=.\moc_nuevo_propiedades.cpp +# End Source File +# Begin Source File + +SOURCE=.\moc_nuevoimpl.cpp +# End Source File +# Begin Source File + +SOURCE=.\moc_proyecto.cpp +# End Source File +# Begin Source File + +SOURCE=.\nuevo_propiedades.cpp +# End Source File +# Begin Source File + +SOURCE=.\nuevoimpl.cpp +# End Source File +# Begin Source File + +SOURCE=.\proyecto.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\about.h + +!IF "$(CFG)" == "ideQT - Win32 Release" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\about.h +InputName=about + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ELSEIF "$(CFG)" == "ideQT - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\about.h +InputName=about + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\ideqtwindow.h + +!IF "$(CFG)" == "ideQT - Win32 Release" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\ideqtwindow.h +InputName=ideqtwindow + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ELSEIF "$(CFG)" == "ideQT - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\ideqtwindow.h +InputName=ideqtwindow + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\main.h +# End Source File +# Begin Source File + +SOURCE=.\nuevo_propiedades.h + +!IF "$(CFG)" == "ideQT - Win32 Release" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\nuevo_propiedades.h +InputName=nuevo_propiedades + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ELSEIF "$(CFG)" == "ideQT - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\nuevo_propiedades.h +InputName=nuevo_propiedades + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\nuevoimpl.h + +!IF "$(CFG)" == "ideQT - Win32 Release" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\nuevoimpl.h +InputName=nuevoimpl + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ELSEIF "$(CFG)" == "ideQT - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\nuevoimpl.h +InputName=nuevoimpl + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\proyecto.h + +!IF "$(CFG)" == "ideQT - Win32 Release" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\proyecto.h +InputName=proyecto + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ELSEIF "$(CFG)" == "ideQT - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Moc'ing $(InputName).h ... +InputDir=. +InputPath=.\proyecto.h +InputName=proyecto + +"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp + +# End Custom Build + +!ENDIF + +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\ediv.ico +# End Source File +# Begin Source File + +SOURCE=.\res.rc +# End Source File +# End Group +# Begin Group "kwrite" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\kwrite\highlight.cpp +# End Source File +# Begin Source File + +SOURCE=.\kwrite\highlight.h +# End Source File +# Begin Source File + +SOURCE=.\kwrite\kwdoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\kwrite\kwdoc.h +# End Source File +# Begin Source File + +SOURCE=.\kwrite\kwview.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\readme.txt +# End Source File +# End Target +# End Project diff --git a/ediv/ideQT/ideQT.dsw b/ediv/ideQT/ideQT.dsw new file mode 100644 index 0000000..98b6f76 --- /dev/null +++ b/ediv/ideQT/ideQT.dsw @@ -0,0 +1,41 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "gif2h"=.\gif2h\gif2h.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ideQT"=.\ideQT.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ediv/ideQT/ideQT.ncb b/ediv/ideQT/ideQT.ncb new file mode 100644 index 0000000..679d060 --- /dev/null +++ b/ediv/ideQT/ideQT.ncb @@ -0,0 +1 @@ +Microsoft C/C++ program database 2.00 diff --git a/ediv/ideQT/ideQT.opt b/ediv/ideQT/ideQT.opt new file mode 100644 index 0000000..63a60f6 Binary files /dev/null and b/ediv/ideQT/ideQT.opt differ diff --git a/ediv/ideQT/ideQT.plg b/ediv/ideQT/ideQT.plg new file mode 100644 index 0000000..4fe1361 --- /dev/null +++ b/ediv/ideQT/ideQT.plg @@ -0,0 +1,64 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: ideQT - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP10.tmp" with contents +[ +/nologo /MD /W3 /Gm /GX /ZI /Od /I "d:\Qt\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_THREAD_SUPPORT" /FR"Debug/" /Fp"Debug/ideQT.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\edivz\ideQT\about.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP10.tmp" +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP11.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib wsock32.lib d:\Qt\lib\qt-mt230nc.lib d:\Qt\lib\qtmain.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/edivide.pdb" /debug /machine:I386 /out:"Debug/edivide.exe" /pdbtype:sept +.\Debug\about.obj +.\Debug\ideqtwindow.obj +.\Debug\main.obj +.\Debug\moc_about.obj +.\Debug\moc_ideqtwindow.obj +.\Debug\moc_nuevo_propiedades.obj +.\Debug\moc_nuevoimpl.obj +.\Debug\moc_proyecto.obj +.\Debug\nuevo_propiedades.obj +.\Debug\nuevoimpl.obj +.\Debug\proyecto.obj +.\Debug\highlight.obj +.\Debug\kwdoc.obj +.\Debug\res.res +] +Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP11.tmp" +

    Output Window

    +Compiling... +about.cpp +Linking... +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP13.tmp" with contents +[ +/nologo /o"Debug/ideQT.bsc" +.\Debug\about.sbr +.\Debug\ideqtwindow.sbr +.\Debug\main.sbr +.\Debug\moc_about.sbr +.\Debug\moc_ideqtwindow.sbr +.\Debug\moc_nuevo_propiedades.sbr +.\Debug\moc_nuevoimpl.sbr +.\Debug\moc_proyecto.sbr +.\Debug\nuevo_propiedades.sbr +.\Debug\nuevoimpl.sbr +.\Debug\proyecto.sbr +.\Debug\highlight.sbr +.\Debug\kwdoc.sbr] +Creating command line "bscmake.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP13.tmp" +Creating browse info file... +

    Output Window

    + + + +

    Results

    +edivide.exe - 0 error(s), 0 warning(s) +
    + + diff --git a/ediv/ideQT/ideQT.sln b/ediv/ideQT/ideQT.sln new file mode 100644 index 0000000..c0eaa09 --- /dev/null +++ b/ediv/ideQT/ideQT.sln @@ -0,0 +1,27 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gif2h", "gif2h\gif2h.vcproj", "{29668928-86D2-4EF1-823D-64BC139B3F24}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ideQT", "ideQT.vcproj", "{79BBCF95-8FCC-4490-846B-E39B69E2E9BD}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {29668928-86D2-4EF1-823D-64BC139B3F24}.Debug.ActiveCfg = Debug|Win32 + {29668928-86D2-4EF1-823D-64BC139B3F24}.Debug.Build.0 = Debug|Win32 + {29668928-86D2-4EF1-823D-64BC139B3F24}.Release.ActiveCfg = Release|Win32 + {29668928-86D2-4EF1-823D-64BC139B3F24}.Release.Build.0 = Release|Win32 + {79BBCF95-8FCC-4490-846B-E39B69E2E9BD}.Debug.ActiveCfg = Debug|Win32 + {79BBCF95-8FCC-4490-846B-E39B69E2E9BD}.Debug.Build.0 = Debug|Win32 + {79BBCF95-8FCC-4490-846B-E39B69E2E9BD}.Release.ActiveCfg = Release|Win32 + {79BBCF95-8FCC-4490-846B-E39B69E2E9BD}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/ideQT/ideQT.suo b/ediv/ideQT/ideQT.suo new file mode 100644 index 0000000..0efddae Binary files /dev/null and b/ediv/ideQT/ideQT.suo differ diff --git a/ediv/ideQT/ideQT.vcproj b/ediv/ideQT/ideQT.vcproj new file mode 100644 index 0000000..5871a83 --- /dev/null +++ b/ediv/ideQT/ideQT.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/ideQT/ideqtwindow.cpp b/ediv/ideQT/ideqtwindow.cpp new file mode 100644 index 0000000..eb7bf04 --- /dev/null +++ b/ediv/ideQT/ideqtwindow.cpp @@ -0,0 +1,236 @@ +#include "ideqtwindow.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "gif/ediv_icon.h" +#include "gif/b_file.h" +#include "gif/b_open.h" +#include "gif/b_disk.h" +#include "gif/prop.h" +#include "gif/print.h" +#include "gif/dooropen.h" +#include "gif/b_person.h" +#include "gif/cdaudio.h" +#include "gif/calculat.h" +#include "gif/mail.h" +#include "gif/b_twist.h" +#include "gif/vcrplay.h" +#include "gif/gears.h" +#include "gif/vcrfsfor.h" +#include "gif/tools.h" +#include "gif/library.h" +#include "gif/sound.h" +#include "gif/comppc1.h" +#include "gif/helpindx.h" +#include "gif/help.h" +#include "gif/bookopen.h" +#include "gif/emini.h" + +#include "main.h" +#include "nuevoimpl.h" +#include "about.h" + +QPixmap* _pillagif(unsigned char* datos, int tamano) +{ + QByteArray *bm=new QByteArray(tamano); + CHECK_PTR(bm); + bm->assign((char*)datos,tamano); + QPixmap* ret=new QPixmap(*bm); + CHECK_PTR(ret); + return ret; +} + + +ideQTWindow::ideQTWindow( QWidget* parent, const char* name, WFlags f ) + : QMainWindow( parent, name, f ) +{ + setCaption("eDIV"); + + QPixmap *iconoe=pillagif(ediv_icon); + setIcon(*iconoe); + + qApp->setStyle( new QPlatinumStyle ); + + mdi = new QWorkspace( this, "workspace" ); + mdi->setBackgroundMode( PaletteDark ); + + QPopupMenu *mnuArchivo = new QPopupMenu( this ); + CHECK_PTR(mnuArchivo); + mnuArchivo->insertTearOffHandle(); + mnuArchivo->insertItem(icono(b_file_gif), "&Nuevo...", this, SLOT(fileNew()), CTRL+Key_N ); + mnuArchivo->insertItem(icono(b_open_gif), "&Abrir...", this, 0, CTRL+Key_O); + mnuArchivo->insertItem("&Cerrar",this,0); + mnuArchivo->insertItem(icono(b_disk_gif), "&Guardar", this, 0, CTRL+Key_S ); + mnuArchivo->insertItem("Guardar c&omo...",this,0); + mnuArchivo->insertSeparator(); + mnuArchivo->insertItem(icono(prop_gif), "&Propiedades...",this,0); + mnuArchivo->insertItem("Con&figurar impresora...",this,0); + mnuArchivo->insertItem(icono(print_gif), "&Imprimir",this,0); + mnuArchivo->insertSeparator(); + mnuArchivo->insertItem(icono(dooropen_gif), "&Salir",this,SLOT(ConfirmaSalir()),CTRL+Key_Q); + + QPopupMenu *mnuHerramientas = new QPopupMenu(this); + CHECK_PTR(mnuHerramientas); + mnuHerramientas->insertTearOffHandle(); + mnuHerramientas->insertItem("&Fusionador de paletas",this,0); + mnuHerramientas->insertItem("&Generador de explosiones",this,0); + mnuHerramientas->insertItem(icono(b_person_gif), "Generador de &sprites",this,0); + mnuHerramientas->insertItem("Generador de &texturas",this,0); + mnuHerramientas->insertItem(icono(cdaudio_gif), "&CDiv Player",this,0); + mnuHerramientas->insertItem(icono(calculat_gif), "C&alculadora",this,0); + mnuHerramientas->insertSeparator(); + mnuHerramientas->insertItem("&Navegador web",this,0); + mnuHerramientas->insertItem(icono(mail_gif), "E-&Mail",this,0); + mnuHerramientas->insertItem(icono(b_twist_gif), "eDIV &EnchufingNET",this,0); + mnuHerramientas->insertSeparator(); + mnuHerramientas->insertItem("¡Estoy enc&hufad@!",this,0); + mnuHerramientas->setCheckable(TRUE); + + QPopupMenu *mnuCompilar = new QPopupMenu(this); + CHECK_PTR(mnuCompilar); + mnuCompilar->insertTearOffHandle(); + mnuCompilar->insertItem(icono(vcrplay_gif),"&Ejecutar",this,0,Key_F10); + mnuCompilar->insertItem(icono(gears_gif),"&Compilar",this,0,Key_F11); + mnuCompilar->insertItem(icono(vcrfsfor_gif),"&Trazar programa",this,0,Key_F12); + mnuCompilar->insertItem("Crear &distribución...",this,0); + + QPopupMenu *mnuSistema = new QPopupMenu(this); + CHECK_PTR(mnuSistema); + mnuSistema->insertTearOffHandle(); + mnuSistema->insertItem(icono(tools_gif),"&Preferencias...",this,0); + mnuSistema->insertItem(icono(library_gif),"&Gestor de librerías",this,0); + mnuSistema->insertItem(icono(sound_gif),"&Ajustar volumen...",this,0); + mnuSistema->insertItem(icono(comppc1_gif),"&Información del sistema",this,0); + + mnuVentana = new QPopupMenu(this); + CHECK_PTR(mnuVentana); + //mnuVentana->setCheckable( TRUE ); + connect( mnuVentana, SIGNAL( aboutToShow() ), + this, SLOT( MuestraMenuVentana() ) ); + + QPopupMenu *mnuAyuda = new QPopupMenu(this); + CHECK_PTR(mnuAyuda); + mnuAyuda->insertTearOffHandle(); + mnuAyuda->insertItem(icono(helpindx_gif),"&Contenido",this,0,CTRL+Key_H); + mnuAyuda->insertItem("&Buscar ayuda sobre...",this,0,CTRL+SHIFT+Key_H); + mnuAyuda->insertItem(icono(help_gif),"&Ayuda sensible",this,0,Key_F1); + mnuAyuda->insertItem(icono(bookopen_gif),"B&iblioteca eTK",this,0); + mnuAyuda->insertSeparator(); + mnuAyuda->insertItem("&Sion Entertainment en la Red",this,0); + mnuAyuda->insertItem("&eDivCentral.com",this,0); + mnuAyuda->insertSeparator(); + mnuAyuda->insertItem(icono(emini_gif),"Acerca &de...",this,SLOT(muestra_about())); + + + //QToolBar *menutb=new QToolBar(this); + //CHECK_PTR(menutb); + + QMenuBar *menu=new QMenuBar(this); + CHECK_PTR(menu); + menu->insertItem("&Archivo", mnuArchivo); + menu->insertItem("&Herramientas", mnuHerramientas); + menu->insertItem("&Compilar",mnuCompilar); + menu->insertItem("&Sistema",mnuSistema); + menu->insertItem("&Ventana",mnuVentana); + menu->insertItem("A&yuda",mnuAyuda); + + QToolBar *maintb=new QToolBar("principal",this,QMainWindow::Top,TRUE); + CHECK_PTR(maintb); + + QToolButton *tbNuevo=new QToolButton (*pillagif(b_file_gif), "Nuevo", QString::null, this, SLOT(fileNew()), maintb); + + QToolButton *tbAbrir=new QToolButton (*pillagif(b_open_gif), "Abrir", QString::null, this, 0, maintb); + QToolButton *tbGuardar=new QToolButton (*pillagif(b_disk_gif), "Guardar", QString::null, this, 0, maintb); + maintb->addSeparator(); + QToolButton *tbProp=new QToolButton (*pillagif(prop_gif), "Propiedades", QString::null, this, 0, maintb); + QToolButton *tbImprimir=new QToolButton (*pillagif(print_gif), "Imprimir", QString::null, this, 0, maintb); + + QToolBar *compilartb=new QToolBar(this); + CHECK_PTR(compilartb); + + QToolButton *tbEjecutar=new QToolButton (*pillagif(vcrplay_gif), "Ejecutar", QString::null, this, 0, compilartb); + QToolButton *tbTrazar=new QToolButton (*pillagif(vcrfsfor_gif), "Trazar programa", QString::null, this, 0, compilartb); + QToolButton *tbCompilar=new QToolButton (*pillagif(gears_gif), "Compilar", QString::null, this, 0, compilartb); + + QToolBar *ayudatb=new QToolBar(this); + CHECK_PTR(ayudatb); + + QToolButton *tbContenido=new QToolButton (*pillagif(helpindx_gif), "Temas de ayuda", QString::null, this, 0, ayudatb); + QToolButton *tbAyuda=new QToolButton (*pillagif(help_gif), "Ayuda sensible", QString::null, this, 0, ayudatb); + + setCentralWidget( mdi ); + +} + + +void ideQTWindow::fileNew() +{ + // Use your own documentclass + + /*QMessageBox("a","a",QMessageBox::NoIcon,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + QWidget *doc = new QWidget( mdi, "$MSDEVPROJECTNAME document" ); + doc->setCaption( tr("Document%1").arg( mdi->windowList().count()+1 ) ); + doc->show();*/ + //QWidget *dialognew = new Nuevo(0,0,TRUE); + //dialognew->show(); + QWidget *dialognew = new Nuevo(0,0,TRUE,0,this); + dialognew->show(); +} + + +void ideQTWindow::ConfirmaSalir() +{ + QMessageBox mb( "Salir de eDIV", + "¿Seguro que deseas salir?", + QMessageBox::NoIcon, + QMessageBox::Yes | QMessageBox::Default, + QMessageBox::No | QMessageBox::Escape, + QMessageBox::NoButton); + mb.setButtonText(QMessageBox::Yes,"Sí"); + if ( mb.exec() == QMessageBox::Yes ) qApp->quit(); +} + + +void ideQTWindow::MuestraMenuVentana() +{ + mnuVentana->clear(); + int cascadeId = mnuVentana->insertItem("&Cascada", mdi, SLOT(cascade() ) ); + int tileId = mnuVentana->insertItem("&Mosaico", mdi, SLOT(tile() ) ); + if ( mdi->windowList().isEmpty() ) { + mnuVentana->setItemEnabled( cascadeId, FALSE ); + mnuVentana->setItemEnabled( tileId, FALSE ); + } + mnuVentana->insertSeparator(); + QWidgetList windows = mdi->windowList(); + for ( int i = 0; i < int(windows.count()); ++i ) { + int id = mnuVentana->insertItem(windows.at(i)->caption(), + this, SLOT( MenuVentanaActivado( int ) ) ); + mnuVentana->setItemParameter( id, i ); + mnuVentana->setItemChecked( id, mdi->activeWindow() == windows.at(i) ); + } +} + + +void ideQTWindow::MenuVentanaActivado( int id ) +{ + QWidget* w = mdi->windowList().at( id ); + if ( w ) { + w->showNormal(); + w->setFocus(); + } +} + +void ideQTWindow::muestra_about() +{ + QWidget *dialogabout = new About(0,0,WType_Modal,this); + dialogabout->show(); +} diff --git a/ediv/ideQT/ideqtwindow.h b/ediv/ideQT/ideqtwindow.h new file mode 100644 index 0000000..4552b78 --- /dev/null +++ b/ediv/ideQT/ideqtwindow.h @@ -0,0 +1,37 @@ +#ifndef __IDEQTWINDOW_H__ +#define __IDEQTWINDOW_H__ + +#include +#include +#include + + +class QWorkspace; + +class ideQTWindow : public QMainWindow +{ + Q_OBJECT +public: + ideQTWindow( QWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel ); + +protected slots: + void fileNew(); + void ConfirmaSalir(); + void muestra_about(); + +private slots: + void MuestraMenuVentana(); + void MenuVentanaActivado( int id ); + +private: + QPopupMenu* mnuVentana; +}; + +#define pillagif(a) _pillagif(a,sizeof(a)) +#define icono(a) QIconSet(*pillagif(a)) + + +QPixmap* _pillagif(unsigned char* datos, int tamano); + + +#endif //__IDEQTWINDOW_H__ \ No newline at end of file diff --git a/ediv/ideQT/kwrite/highlight.cpp b/ediv/ideQT/kwrite/highlight.cpp new file mode 100644 index 0000000..73f87e2 --- /dev/null +++ b/ediv/ideQT/kwrite/highlight.cpp @@ -0,0 +1,215 @@ +#include "highlight.h" + +#include "kwdoc.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ISO/IEC 9899:1990 (aka ANSI C) +// "interrupt" isn´t an ANSI keyword, but an extension of some C compilers +const char *cKeywords[] = { + "break", "case", "continue", "default", "do", "else", "enum", "extern", + "for", "goto", "if", "interrupt", "return", "sizeof", "struct", "switch", + "typedef", "union", "while", 0L}; + +const char *cTypes[] = { + "auto", "char", "const", "double", "float", "int", "long", "register", + "short", "signed", "static", + "unsigned", "void", "volatile", 0L}; + +// DANI/HAMMER 1996:1999 (aka ANSI DIV xD) +const char *divKeywords[] = { + "begin", "break", "clone", "continue", "debug", "end", "for", "from", "function", + "global", "if", "local", "offset", "private", "program", "repeat", "sizeof", + "struct", "switch", "to", "until", "while", 0L}; + +const char *divTypes[] = { + "byte", "int", "string", "word", 0L}; + + +const char fontSizes[] = {4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,32,48,64,0}; + +//default item style indexes +const int dsNormal = 0; +const int dsKeyword = 1; +const int dsDataType = 2; +const int dsDecVal = 3; +const int dsBaseN = 4; +const int dsFloat = 5; +const int dsChar = 6; +const int dsString = 7; +const int dsComment = 8; +const int dsOthers = 9; + + +bool testWw(char c) { + static unsigned char data[] = {0,0,0,0,0,0,255,3,254,255,255,135,254,255,255,7}; + if (c & 128) return false; + return !(data[c >> 3] & (1 << (c & 7))); +} + + +// --------------------------------------------------------------------------- + +HlItem::HlItem(int attribute, int context) + : attr(attribute), ctx(context) { +} + +// --------------------------------------------------------------------------- + +HlItemWw::HlItemWw(int attribute, int context) + : HlItem(attribute,context) { +} + +// --------------------------------------------------------------------------- + +HlCharDetect::HlCharDetect(int attribute, int context, char c) + : HlItem(attribute,context), sChar(c) { +} + +const char *HlCharDetect::checkHgl(const char *str) { + if (*str == sChar) return str + 1; + return 0L; + + +} + +// --------------------------------------------------------------------------- + +Hl2CharDetect::Hl2CharDetect(int attribute, int context, const char *s) + : HlItem(attribute,context) { + sChar[0] = s[0]; + sChar[1] = s[1]; +} + +const char *Hl2CharDetect::checkHgl(const char *str) { + if (str[0] == sChar[0] && str[1] == sChar[1]) return str + 2; + return 0L; +} + +// --------------------------------------------------------------------------- + +HlStringDetect::HlStringDetect(int attribute, int context, const char *s) + : HlItem(attribute,context) { + len = strlen(s); + str = new char[len]; + memcpy(str,s,len); +} + +HlStringDetect::~HlStringDetect() { + delete str; +} + +const char *HlStringDetect::checkHgl(const char *s) { + if (memcmp(s,str,len) == 0) return s + len; + return 0L; +} + +// --------------------------------------------------------------------------- + +HlRangeDetect::HlRangeDetect(int attribute, int context, const char *s) + : HlItem(attribute,context) { + sChar[0] = s[0]; + sChar[1] = s[1]; +} + +const char *HlRangeDetect::checkHgl(const char *s) { + if (*s == sChar[0]) { + do { + s++; + if (!*s) return 0L; + } while (*s != sChar[1]); + return s + 1; + } + return 0L; +} + +// --------------------------------------------------------------------------- + +KeywordData::KeywordData(const char *str) { + len = strlen(str); + s = new char[len]; + memcpy(s,str,len); +} + +KeywordData::~KeywordData() { + delete s; +} + +// --------------------------------------------------------------------------- + +HlKeyword::HlKeyword(int attribute, int context) + : HlItemWw(attribute,context) { + words.setAutoDelete(true); +} + +HlKeyword::~HlKeyword() { +} + + +void HlKeyword::addWord(const char *s) { + KeywordData *word; + word = new KeywordData(s); + words.append(word); +} + +void HlKeyword::addList(const char **list) { + + while (*list) { + addWord(*list); + list++; + } +} + +const char *HlKeyword::checkHgl(const char *s) { + int z, count, len; + KeywordData *word; + + count = words.count(); + len = strlen(s); + for (z = 0; z < count; z++) { + word = words.at(z); + if (len>=word->len && memcmp(s,word->s,word->len) == 0) { + return s + word->len; + } + } + return 0L; +} + +// --------------------------------------------------------------------------- + +HlCaseInsensitiveKeyword::HlCaseInsensitiveKeyword(int attribute, int context) + : HlKeyword(attribute,context) { +} + +HlCaseInsensitiveKeyword::~HlCaseInsensitiveKeyword() { +} + + +const char *HlCaseInsensitiveKeyword::checkHgl(const char *s) { + int z, count; + KeywordData *word; + + count = words.count(); + for (z = 0; z < count; z++) { + word = words.at(z); +#ifndef _WIN32 + if (_strncasecmp(s,word->s,word->len) == 0) { +#else + if (_strnicmp(s,word->s,word->len) == 0) { +#endif // !_WIN32 + return s + word->len; + } + } + return 0L; +} + +// --------------------------------------------------------------------------- diff --git a/ediv/ideQT/kwrite/highlight.h b/ediv/ideQT/kwrite/highlight.h new file mode 100644 index 0000000..4337d95 --- /dev/null +++ b/ediv/ideQT/kwrite/highlight.h @@ -0,0 +1,93 @@ +#ifndef _HIGHLIGHT_H_ +#define _HIGHLIGHT_H_ + +#include +#include +#include +#include + +#define CTX_UNDEF -1 + +class TextLine; +class Attribute; + +bool testWw(char c); //whole word check: false for '_','0'-'9','A'-'Z','a'-'z' + +class HlItem { + public: + HlItem(int attribute, int context); + virtual bool startEnable(char) {return true;} + virtual bool endEnable(char) {return true;} + virtual const char *checkHgl(const char *) = 0; + int attr; + int ctx; +}; + +class HlItemWw : public HlItem { + public: + HlItemWw(int attribute, int context); + virtual bool startEnable(char c) {return testWw(c);} + virtual bool endEnable(char c) {return testWw(c);} +}; + +class HlCharDetect : public HlItem { + public: + HlCharDetect(int attribute, int context, char); + virtual const char *checkHgl(const char *); + protected: + char sChar; +}; + +class Hl2CharDetect : public HlItem { + public: + Hl2CharDetect(int attribute, int context, const char *); + virtual const char *checkHgl(const char *); + protected: + char sChar[2]; +}; + +class HlStringDetect : public HlItem { + public: + HlStringDetect(int attribute, int context, const char *); + virtual ~HlStringDetect(); + virtual const char *checkHgl(const char *); + protected: + char *str; + int len; +}; + +class HlRangeDetect : public HlItem { + public: + HlRangeDetect(int attribute, int context, const char *); + virtual const char *checkHgl(const char *); + protected: + char sChar[2]; +}; + +class KeywordData { + public: + KeywordData(const char *); + ~KeywordData(); + char *s; + int len; +}; + +class HlKeyword : public HlItemWw { + public: + HlKeyword(int attribute, int context); + virtual ~HlKeyword(); + void addWord(const char *); + void addList(const char **); + virtual const char *checkHgl(const char *); + protected: + QList words; +}; + +class HlCaseInsensitiveKeyword : public HlKeyword { + public: + HlCaseInsensitiveKeyword(int attribute, int context); + virtual ~HlCaseInsensitiveKeyword(); + virtual const char *checkHgl(const char *); +}; + +#endif //_HIGHLIGHT_H_ diff --git a/ediv/ideQT/kwrite/kwdoc.cpp b/ediv/ideQT/kwrite/kwdoc.cpp new file mode 100644 index 0000000..6a88deb --- /dev/null +++ b/ediv/ideQT/kwrite/kwdoc.cpp @@ -0,0 +1,14 @@ +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "kwdoc.h" + diff --git a/ediv/ideQT/kwrite/kwdoc.h b/ediv/ideQT/kwrite/kwdoc.h new file mode 100644 index 0000000..1cec42c --- /dev/null +++ b/ediv/ideQT/kwrite/kwdoc.h @@ -0,0 +1,15 @@ +#ifndef _KWDOC_H_ +#define _KWDOC_H_ + +#include +#include +#include +#include +#include + +#include "highlight.h" +#include "kwview.h" + + + +#endif //_KWDOC_H_ diff --git a/ediv/ideQT/kwrite/kwview.h b/ediv/ideQT/kwrite/kwview.h new file mode 100644 index 0000000..e61255b --- /dev/null +++ b/ediv/ideQT/kwrite/kwview.h @@ -0,0 +1,23 @@ +#ifndef _KWVIEV_H_ +#define _KWVIEV_H_ + +#include + +#include +#include + +struct PointStruc { + int x; + int y; +}; + +class KWrite : public QWidget +{ + Q_OBJECT +}; + +class KWriteView +{ +}; + +#endif //_KWVIEW_H_ diff --git a/ediv/ideQT/main.cpp b/ediv/ideQT/main.cpp new file mode 100644 index 0000000..e77dcf7 --- /dev/null +++ b/ediv/ideQT/main.cpp @@ -0,0 +1,39 @@ +#include + +#define main_cpp +#include "main.h" +#include "ideqtwindow.h" + +#ifdef _WIN32 +# include +#else +# include +#endif + + +int main( int argc, char** argv ) +{ + QApplication app( argc, argv ); + +#ifdef _WIN32 + HKEY subkey; + if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", 0, KEY_READ, &subkey) == ERROR_SUCCESS) { + DWORD dwType,dwLen; + unsigned char datos[512]; + RegQueryValueEx(subkey,"Personal",NULL,&dwType,datos,&dwLen); + RegCloseKey(subkey); + Main.personal_folder.setLatin1((char*)datos); + } +#else + Main.personal_folder.setLatin1(getenv("HOME")); +#endif + Main.projects_folder = Main.personal_folder + "/" PROJECTS_FOLDER_NAME; + + MainWindow=new ideQTWindow(0,"MainWindow"); + app.setMainWidget(MainWindow); + + MainWindow->show(); + + return app.exec(); +} + diff --git a/ediv/ideQT/main.h b/ediv/ideQT/main.h new file mode 100644 index 0000000..f310444 --- /dev/null +++ b/ediv/ideQT/main.h @@ -0,0 +1,33 @@ +#ifndef __MAIN_H__ +#define __MAIN_H__ + +#include +#include +#include "ideqtwindow.h" + +#define PROJECTS_FOLDER_NAME "Mis proyectos de eDIV" + +#ifdef main_cpp +# define EXTERN +#else +# define EXTERN extern +#endif + +EXTERN class _main { + +public: + QString personal_folder; + QString projects_folder; + + typedef struct { + QString nombre; + QString directorio; + } t_proyecto; + + t_proyecto proyecto_actual; +} Main; + +EXTERN ideQTWindow* MainWindow; +EXTERN QWorkspace* mdi; + +#endif //__MAIN_H__ \ No newline at end of file diff --git a/ediv/ideQT/moc_aaa.cpp b/ediv/ideQT/moc_aaa.cpp new file mode 100644 index 0000000..2deb059 --- /dev/null +++ b/ediv/ideQT/moc_aaa.cpp @@ -0,0 +1,72 @@ +/**************************************************************************** +** Form1 meta object code from reading C++ file 'aaa.h' +** +** Created: Sat Jul 13 02:38:37 2002 +** by: The Qt MOC ($Id$) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#define Q_MOC_Form1 +#if !defined(Q_MOC_OUTPUT_REVISION) +#define Q_MOC_OUTPUT_REVISION 8 +#elif Q_MOC_OUTPUT_REVISION != 8 +#error "Moc format conflict - please regenerate all moc files" +#endif + +#include "aaa.h" +#include +#include + +#if defined(Q_SPARCWORKS_FUNCP_BUG) +#define Q_AMPERSAND +#else +#define Q_AMPERSAND & +#endif + + +const char *Form1::className() const +{ + return "Form1"; +} + +QMetaObject *Form1::metaObj = 0; + +void Form1::initMetaObject() +{ + if ( metaObj ) + return; + if ( strcmp(QDialog::className(), "QDialog") != 0 ) + badSuperclassWarning("Form1","QDialog"); + (void) staticMetaObject(); +} + +#ifndef QT_NO_TRANSLATION +QString Form1::tr(const char* s) +{ + return ((QNonBaseApplication*)qApp)->translate("Form1",s); +} + +#endif // QT_NO_TRANSLATION +QMetaObject* Form1::staticMetaObject() +{ + if ( metaObj ) + return metaObj; + (void) QDialog::staticMetaObject(); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + QMetaData::Access *slot_tbl_access = 0; + metaObj = QMetaObject::new_metaobject( + "Form1", "QDialog", + 0, 0, + 0, 0, +#ifndef QT_NO_PROPERTIES + 0, 0, + 0, 0, +#endif // QT_NO_PROPERTIES + 0, 0 ); + metaObj->set_slot_access( slot_tbl_access ); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + return metaObj; +} diff --git a/ediv/ideQT/moc_about.cpp b/ediv/ideQT/moc_about.cpp new file mode 100644 index 0000000..3a3d019 --- /dev/null +++ b/ediv/ideQT/moc_about.cpp @@ -0,0 +1,72 @@ +/**************************************************************************** +** About meta object code from reading C++ file 'about.h' +** +** Created: Mon Jul 8 15:45:30 2002 +** by: The Qt MOC ($Id$) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#define Q_MOC_About +#if !defined(Q_MOC_OUTPUT_REVISION) +#define Q_MOC_OUTPUT_REVISION 8 +#elif Q_MOC_OUTPUT_REVISION != 8 +#error "Moc format conflict - please regenerate all moc files" +#endif + +#include "about.h" +#include +#include + +#if defined(Q_SPARCWORKS_FUNCP_BUG) +#define Q_AMPERSAND +#else +#define Q_AMPERSAND & +#endif + + +const char *About::className() const +{ + return "About"; +} + +QMetaObject *About::metaObj = 0; + +void About::initMetaObject() +{ + if ( metaObj ) + return; + if ( strcmp(QWidget::className(), "QWidget") != 0 ) + badSuperclassWarning("About","QWidget"); + (void) staticMetaObject(); +} + +#ifndef QT_NO_TRANSLATION +QString About::tr(const char* s) +{ + return ((QNonBaseApplication*)qApp)->translate("About",s); +} + +#endif // QT_NO_TRANSLATION +QMetaObject* About::staticMetaObject() +{ + if ( metaObj ) + return metaObj; + (void) QWidget::staticMetaObject(); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + QMetaData::Access *slot_tbl_access = 0; + metaObj = QMetaObject::new_metaobject( + "About", "QWidget", + 0, 0, + 0, 0, +#ifndef QT_NO_PROPERTIES + 0, 0, + 0, 0, +#endif // QT_NO_PROPERTIES + 0, 0 ); + metaObj->set_slot_access( slot_tbl_access ); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + return metaObj; +} diff --git a/ediv/ideQT/moc_ideqtwindow.cpp b/ediv/ideQT/moc_ideqtwindow.cpp new file mode 100644 index 0000000..bd81a82 --- /dev/null +++ b/ediv/ideQT/moc_ideqtwindow.cpp @@ -0,0 +1,98 @@ +/**************************************************************************** +** ideQTWindow meta object code from reading C++ file 'ideqtwindow.h' +** +** Created: Fri Jul 12 23:18:31 2002 +** by: The Qt MOC ($Id$) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#define Q_MOC_ideQTWindow +#if !defined(Q_MOC_OUTPUT_REVISION) +#define Q_MOC_OUTPUT_REVISION 8 +#elif Q_MOC_OUTPUT_REVISION != 8 +#error "Moc format conflict - please regenerate all moc files" +#endif + +#include "ideqtwindow.h" +#include +#include + +#if defined(Q_SPARCWORKS_FUNCP_BUG) +#define Q_AMPERSAND +#else +#define Q_AMPERSAND & +#endif + + +const char *ideQTWindow::className() const +{ + return "ideQTWindow"; +} + +QMetaObject *ideQTWindow::metaObj = 0; + +void ideQTWindow::initMetaObject() +{ + if ( metaObj ) + return; + if ( strcmp(QMainWindow::className(), "QMainWindow") != 0 ) + badSuperclassWarning("ideQTWindow","QMainWindow"); + (void) staticMetaObject(); +} + +#ifndef QT_NO_TRANSLATION +QString ideQTWindow::tr(const char* s) +{ + return ((QNonBaseApplication*)qApp)->translate("ideQTWindow",s); +} + +#endif // QT_NO_TRANSLATION +QMetaObject* ideQTWindow::staticMetaObject() +{ + if ( metaObj ) + return metaObj; + (void) QMainWindow::staticMetaObject(); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + typedef void(ideQTWindow::*m1_t0)(); + typedef void(ideQTWindow::*m1_t1)(); + typedef void(ideQTWindow::*m1_t2)(); + typedef void(ideQTWindow::*m1_t3)(); + typedef void(ideQTWindow::*m1_t4)(int); + m1_t0 v1_0 = Q_AMPERSAND ideQTWindow::fileNew; + m1_t1 v1_1 = Q_AMPERSAND ideQTWindow::ConfirmaSalir; + m1_t2 v1_2 = Q_AMPERSAND ideQTWindow::muestra_about; + m1_t3 v1_3 = Q_AMPERSAND ideQTWindow::MuestraMenuVentana; + m1_t4 v1_4 = Q_AMPERSAND ideQTWindow::MenuVentanaActivado; + QMetaData *slot_tbl = QMetaObject::new_metadata(5); + QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(5); + slot_tbl[0].name = "fileNew()"; + slot_tbl[0].ptr = *((QMember*)&v1_0); + slot_tbl_access[0] = QMetaData::Protected; + slot_tbl[1].name = "ConfirmaSalir()"; + slot_tbl[1].ptr = *((QMember*)&v1_1); + slot_tbl_access[1] = QMetaData::Protected; + slot_tbl[2].name = "muestra_about()"; + slot_tbl[2].ptr = *((QMember*)&v1_2); + slot_tbl_access[2] = QMetaData::Protected; + slot_tbl[3].name = "MuestraMenuVentana()"; + slot_tbl[3].ptr = *((QMember*)&v1_3); + slot_tbl_access[3] = QMetaData::Private; + slot_tbl[4].name = "MenuVentanaActivado(int)"; + slot_tbl[4].ptr = *((QMember*)&v1_4); + slot_tbl_access[4] = QMetaData::Private; + metaObj = QMetaObject::new_metaobject( + "ideQTWindow", "QMainWindow", + slot_tbl, 5, + 0, 0, +#ifndef QT_NO_PROPERTIES + 0, 0, + 0, 0, +#endif // QT_NO_PROPERTIES + 0, 0 ); + metaObj->set_slot_access( slot_tbl_access ); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + return metaObj; +} diff --git a/ediv/ideQT/moc_nuevo_propiedades.cpp b/ediv/ideQT/moc_nuevo_propiedades.cpp new file mode 100644 index 0000000..d79a324 --- /dev/null +++ b/ediv/ideQT/moc_nuevo_propiedades.cpp @@ -0,0 +1,88 @@ +/**************************************************************************** +** Nuevo_Propiedades meta object code from reading C++ file 'nuevo_propiedades.h' +** +** Created: Sun Jul 14 23:22:00 2002 +** by: The Qt MOC ($Id$) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#define Q_MOC_Nuevo_Propiedades +#if !defined(Q_MOC_OUTPUT_REVISION) +#define Q_MOC_OUTPUT_REVISION 8 +#elif Q_MOC_OUTPUT_REVISION != 8 +#error "Moc format conflict - please regenerate all moc files" +#endif + +#include "nuevo_propiedades.h" +#include +#include + +#if defined(Q_SPARCWORKS_FUNCP_BUG) +#define Q_AMPERSAND +#else +#define Q_AMPERSAND & +#endif + + +const char *Nuevo_Propiedades::className() const +{ + return "Nuevo_Propiedades"; +} + +QMetaObject *Nuevo_Propiedades::metaObj = 0; + +void Nuevo_Propiedades::initMetaObject() +{ + if ( metaObj ) + return; + if ( strcmp(QDialog::className(), "QDialog") != 0 ) + badSuperclassWarning("Nuevo_Propiedades","QDialog"); + (void) staticMetaObject(); +} + +#ifndef QT_NO_TRANSLATION +QString Nuevo_Propiedades::tr(const char* s) +{ + return ((QNonBaseApplication*)qApp)->translate("Nuevo_Propiedades",s); +} + +#endif // QT_NO_TRANSLATION +QMetaObject* Nuevo_Propiedades::staticMetaObject() +{ + if ( metaObj ) + return metaObj; + (void) QDialog::staticMetaObject(); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + typedef void(Nuevo_Propiedades::*m1_t0)(int); + typedef void(Nuevo_Propiedades::*m1_t1)(); + typedef void(Nuevo_Propiedades::*m1_t2)(); + m1_t0 v1_0 = Q_AMPERSAND Nuevo_Propiedades::set_tamano_mapa; + m1_t1 v1_1 = Q_AMPERSAND Nuevo_Propiedades::Aceptar; + m1_t2 v1_2 = Q_AMPERSAND Nuevo_Propiedades::Cancelar; + QMetaData *slot_tbl = QMetaObject::new_metadata(3); + QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(3); + slot_tbl[0].name = "set_tamano_mapa(int)"; + slot_tbl[0].ptr = *((QMember*)&v1_0); + slot_tbl_access[0] = QMetaData::Protected; + slot_tbl[1].name = "Aceptar()"; + slot_tbl[1].ptr = *((QMember*)&v1_1); + slot_tbl_access[1] = QMetaData::Protected; + slot_tbl[2].name = "Cancelar()"; + slot_tbl[2].ptr = *((QMember*)&v1_2); + slot_tbl_access[2] = QMetaData::Protected; + metaObj = QMetaObject::new_metaobject( + "Nuevo_Propiedades", "QDialog", + slot_tbl, 3, + 0, 0, +#ifndef QT_NO_PROPERTIES + 0, 0, + 0, 0, +#endif // QT_NO_PROPERTIES + 0, 0 ); + metaObj->set_slot_access( slot_tbl_access ); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + return metaObj; +} diff --git a/ediv/ideQT/moc_nuevoimpl.cpp b/ediv/ideQT/moc_nuevoimpl.cpp new file mode 100644 index 0000000..235c164 --- /dev/null +++ b/ediv/ideQT/moc_nuevoimpl.cpp @@ -0,0 +1,98 @@ +/**************************************************************************** +** Nuevo meta object code from reading C++ file 'nuevoimpl.h' +** +** Created: Wed Jul 10 01:54:25 2002 +** by: The Qt MOC ($Id$) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#define Q_MOC_Nuevo +#if !defined(Q_MOC_OUTPUT_REVISION) +#define Q_MOC_OUTPUT_REVISION 8 +#elif Q_MOC_OUTPUT_REVISION != 8 +#error "Moc format conflict - please regenerate all moc files" +#endif + +#include "nuevoimpl.h" +#include +#include + +#if defined(Q_SPARCWORKS_FUNCP_BUG) +#define Q_AMPERSAND +#else +#define Q_AMPERSAND & +#endif + + +const char *Nuevo::className() const +{ + return "Nuevo"; +} + +QMetaObject *Nuevo::metaObj = 0; + +void Nuevo::initMetaObject() +{ + if ( metaObj ) + return; + if ( strcmp(QDialog::className(), "QDialog") != 0 ) + badSuperclassWarning("Nuevo","QDialog"); + (void) staticMetaObject(); +} + +#ifndef QT_NO_TRANSLATION +QString Nuevo::tr(const char* s) +{ + return ((QNonBaseApplication*)qApp)->translate("Nuevo",s); +} + +#endif // QT_NO_TRANSLATION +QMetaObject* Nuevo::staticMetaObject() +{ + if ( metaObj ) + return metaObj; + (void) QDialog::staticMetaObject(); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + typedef void(Nuevo::*m1_t0)(int); + typedef void(Nuevo::*m1_t1)(); + typedef void(Nuevo::*m1_t2)(); + typedef void(Nuevo::*m1_t3)(); + typedef void(Nuevo::*m1_t4)(int); + m1_t0 v1_0 = Q_AMPERSAND Nuevo::ListaClick; + m1_t1 v1_1 = Q_AMPERSAND Nuevo::Aceptar; + m1_t2 v1_2 = Q_AMPERSAND Nuevo::Cancelar; + m1_t3 v1_3 = Q_AMPERSAND Nuevo::Examinar; + m1_t4 v1_4 = Q_AMPERSAND Nuevo::combo_tipo_selecciona; + QMetaData *slot_tbl = QMetaObject::new_metadata(5); + QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(5); + slot_tbl[0].name = "ListaClick(int)"; + slot_tbl[0].ptr = *((QMember*)&v1_0); + slot_tbl_access[0] = QMetaData::Protected; + slot_tbl[1].name = "Aceptar()"; + slot_tbl[1].ptr = *((QMember*)&v1_1); + slot_tbl_access[1] = QMetaData::Protected; + slot_tbl[2].name = "Cancelar()"; + slot_tbl[2].ptr = *((QMember*)&v1_2); + slot_tbl_access[2] = QMetaData::Protected; + slot_tbl[3].name = "Examinar()"; + slot_tbl[3].ptr = *((QMember*)&v1_3); + slot_tbl_access[3] = QMetaData::Protected; + slot_tbl[4].name = "combo_tipo_selecciona(int)"; + slot_tbl[4].ptr = *((QMember*)&v1_4); + slot_tbl_access[4] = QMetaData::Protected; + metaObj = QMetaObject::new_metaobject( + "Nuevo", "QDialog", + slot_tbl, 5, + 0, 0, +#ifndef QT_NO_PROPERTIES + 0, 0, + 0, 0, +#endif // QT_NO_PROPERTIES + 0, 0 ); + metaObj->set_slot_access( slot_tbl_access ); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + return metaObj; +} diff --git a/ediv/ideQT/moc_proyecto.cpp b/ediv/ideQT/moc_proyecto.cpp new file mode 100644 index 0000000..4505377 --- /dev/null +++ b/ediv/ideQT/moc_proyecto.cpp @@ -0,0 +1,83 @@ +/**************************************************************************** +** Proyecto meta object code from reading C++ file 'proyecto.h' +** +** Created: Mon Jul 15 22:13:13 2002 +** by: The Qt MOC ($Id$) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#define Q_MOC_Proyecto +#if !defined(Q_MOC_OUTPUT_REVISION) +#define Q_MOC_OUTPUT_REVISION 8 +#elif Q_MOC_OUTPUT_REVISION != 8 +#error "Moc format conflict - please regenerate all moc files" +#endif + +#include "proyecto.h" +#include +#include + +#if defined(Q_SPARCWORKS_FUNCP_BUG) +#define Q_AMPERSAND +#else +#define Q_AMPERSAND & +#endif + + +const char *Proyecto::className() const +{ + return "Proyecto"; +} + +QMetaObject *Proyecto::metaObj = 0; + +void Proyecto::initMetaObject() +{ + if ( metaObj ) + return; + if ( strcmp(QWidget::className(), "QWidget") != 0 ) + badSuperclassWarning("Proyecto","QWidget"); + (void) staticMetaObject(); +} + +#ifndef QT_NO_TRANSLATION +QString Proyecto::tr(const char* s) +{ + return ((QNonBaseApplication*)qApp)->translate("Proyecto",s); +} + +#endif // QT_NO_TRANSLATION +QMetaObject* Proyecto::staticMetaObject() +{ + if ( metaObj ) + return metaObj; + (void) QWidget::staticMetaObject(); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + typedef void(Proyecto::*m1_t0)(); + typedef void(Proyecto::*m1_t1)(QWidget*); + m1_t0 v1_0 = Q_AMPERSAND Proyecto::save; + m1_t1 v1_1 = Q_AMPERSAND Proyecto::updateProyectoActual; + QMetaData *slot_tbl = QMetaObject::new_metadata(2); + QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(2); + slot_tbl[0].name = "save()"; + slot_tbl[0].ptr = *((QMember*)&v1_0); + slot_tbl_access[0] = QMetaData::Public; + slot_tbl[1].name = "updateProyectoActual(QWidget*)"; + slot_tbl[1].ptr = *((QMember*)&v1_1); + slot_tbl_access[1] = QMetaData::Protected; + metaObj = QMetaObject::new_metaobject( + "Proyecto", "QWidget", + slot_tbl, 2, + 0, 0, +#ifndef QT_NO_PROPERTIES + 0, 0, + 0, 0, +#endif // QT_NO_PROPERTIES + 0, 0 ); + metaObj->set_slot_access( slot_tbl_access ); +#ifndef QT_NO_PROPERTIES +#endif // QT_NO_PROPERTIES + return metaObj; +} diff --git a/ediv/ideQT/nuevo_propiedades.cpp b/ediv/ideQT/nuevo_propiedades.cpp new file mode 100644 index 0000000..f156d4f --- /dev/null +++ b/ediv/ideQT/nuevo_propiedades.cpp @@ -0,0 +1,268 @@ +#include "nuevo_propiedades.h" +#include "ideqtwindow.h" +#include "proyecto.h" +#include "main.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +Nuevo_Propiedades::Nuevo_Propiedades (int categoria, int tipo, QString fichero, bool enmemoria, QWidget * parent, const char * name, bool modal, WFlags f) + : QDialog (parent, name, modal, f) +{ + _categoria=categoria; + _tipo=tipo; + _fichero=fichero; + _enmemoria=enmemoria; + + QGridLayout* grid1; + QLabel* label1; + QLabel* label2; + + QGroupBox* group1; + QHBoxLayout* hbox1; + QListBox* tamanos; + QButtonGroup* group2; + QRadioButton* bpp_8; + QRadioButton* bpp_16; + QRadioButton* bpp_24; + QRadioButton* bpp_32; + + QLabel* labelz; + QCheckBox* checkz; + + int i; + QString a,b; + QDir* d; + + int num_tamanos[]= {320,200, 320,240, 320,400, 360,240, 360,360, + 376,282, 400,300, 512,384, 640,400, 640,480, + 800,600, 960,720, 1024,768, 1152,864, 1280,960, + 1280,1024, 1600,1200, 1900,1600}; + + QIntValidator* valsize=new QIntValidator(0,65535,this); + + QStringList categorias; + categorias << "o proyecto" << "o programa" << "o mapa" << "o fichero" << "a paleta" << "a fuente" << "o mundo 3D" << "o fichero musical" << "o fichero de sonido" << "o vídeo"; + + setCaption("Propiedades de nuev" + categorias[categoria]); + setFixedSize(300,200); + + QVBoxLayout* vbox1 = new QVBoxLayout(this); + vbox1->setMargin(6); + vbox1->setSpacing(5); + + switch(categoria) { + case 0: + grid1=new QGridLayout(this,2,2); + grid1->setSpacing(5); + vbox1->addLayout(grid1); + + label1=new QLabel("Nombre del proyecto:",this); + grid1->addWidget(label1,0,0); + + d=new QDir(fichero); + i=1; + while(1) { + if(d->cd("Proyecto"+QString::number(i))) { + d->cdUp(); + i++; + } + else { + break; + } + + } + edit_nombre=new QLineEdit(this); + grid1->addWidget(edit_nombre,0,1); + edit_nombre->setText("Proyecto"+QString::number(i)); + edit_nombre->selectAll(); + edit_nombre->setFocus(); + QWhatsThis::add(edit_nombre,"Introduce aquí el nombre que quieres dar a tu proyecto, aquí típicamente se escribe el título provisional del juego que se quiere hacer :)"); + + label2=new QLabel("Comentarios:\n(Autor, copyright, etc.)",this); + grid1->addWidget(label2,1,0,Qt::AlignTop); + + edit_comentarios=new QMultiLineEdit(this); + edit_comentarios->setWordWrap(QMultiLineEdit::WidgetWidth); + grid1->addWidget(edit_comentarios,1,1); + QWhatsThis::add(edit_comentarios,"Escribe aquí cualquier cosa que creas que deberían saber aquellos que vean este proyecto: tu nombre, tu página web, tu correo electrónico, una descripción del juego..."); + + directorios=new QCheckBox("Agrupar los archivos en directorios según su categoría",this); + vbox1->addWidget(directorios); + directorios->setChecked(TRUE); + QWhatsThis::add(directorios,"Activa esta casilla para mantener clasificados los ficheros de tu proyecto en carpetas según sean archivos de mapas, FPG's, sonidos, ficheros de música, etc. Tu carpeta de proyecto estará más ordenada de este modo."); + + copiar=new QCheckBox("Si se añade algún archivo externo, copiarlo a la carpeta del proyecto",this); + vbox1->addWidget(copiar); + QWhatsThis::add(copiar,"Si activas esta casilla, al añadir al proyecto un archivo que no esté dentro de la carpeta del proyecto, se copiará en ella. De esta forma podrás localizar rápidamente cualquier archivo que use tu juego con sólo echar un vistazo a la carpeta del proyecto. Sin embargo, puedes dejar desactivada esta opción si quieres ahorrar espacio en disco."); + + break; + + case 2: + group1=new QGroupBox(0,Qt::Vertical,"Tamaño",this); + vbox1->addWidget(group1); + + hbox1=new QHBoxLayout(group1->layout()); + hbox1->setSpacing(8); + + grid1=new QGridLayout(group1); + grid1->setSpacing(8); + hbox1->addLayout(grid1); + + label1=new QLabel("Ancho:",group1); + grid1->addWidget(label1,0,0); + edit_x=new QLineEdit("320",group1); + grid1->addWidget(edit_x,0,1); + edit_x->setValidator(valsize); + QWhatsThis::add(edit_x,"Escribe aquí la resolución horizontal que quieres que tenga el nuevo mapa."); + + label2=new QLabel("Alto:",group1); + grid1->addWidget(label2,1,0); + edit_y=new QLineEdit("200",group1); + grid1->addWidget(edit_y,1,1); + edit_y->setValidator(valsize); + QWhatsThis::add(edit_y,"Escribe aquí la resolución vertical que quieres que tenga el nuevo mapa."); + + tamanos=new QListBox(group1); + hbox1->addWidget(tamanos); + + for(i=0;iinsertItem(a + "x" + b); + } + tamanos->setCurrentItem(0); + connect(tamanos,SIGNAL(highlighted(int)),this,SLOT(set_tamano_mapa(int))); + QWhatsThis::add(tamanos,"Puedes elegir en esta lista uno de los tamaños predefinidos, o bien escribir el tamaño que desees directamente en las cajas de la izquierda."); + + group2=new QButtonGroup(4,Qt::Vertical,"Profundidad de color",this); + vbox1->addWidget(group2); + if(tipo==1 || tipo==2) { + bpp_8=new QRadioButton("8 bits/pixel (256 colores)",group2); + bpp_8->setChecked(TRUE); + QWhatsThis::add(bpp_8,"Los mapas de 8 bits por pixel soportan hasta 256 colores distintos, y usan para ello una paleta de colores indexados."); + } + bpp_16=new QRadioButton("16 bits/pixel (65.536 colores)", group2); + QWhatsThis::add(bpp_16,"Los mapas de 16 bits, llamados de alta densidad, soportan hasta 65.536 colores distintos."); + if(tipo!=1 && tipo!=2) { + bpp_16->setChecked(TRUE); + } + bpp_24=new QRadioButton("24 bits/pixel (16,7 millones de colores)",group2); + QWhatsThis::add(bpp_24,"Los mapas de 24 bits, llamados de color verdadero, soportan infinidad de colores. Son los que dan una mayor calidad de imagen."); + if(tipo==1 || tipo==3) { + bpp_32=new QRadioButton("32 bits/pixel (24 bits + canal alpha)",group2); + QWhatsThis::add(bpp_32,"Los mapas de 32 bits son similares a los de 24 bits, con la diferencia de que contienen un canal alpha, o lo que es lo mismo, un canal de transparencia, con el que se puede atribuir un nivel de transparencia a cada pixel individual."); + } + + break; + + default: + labelz=new QLabel("No hace falta indicar ninguna propiedad para crear este tipo de archivo. Pulsa Aceptar para continuar.",this); + labelz->setAlignment(Qt::AlignCenter); + vbox1->addWidget(labelz); + checkz=new QCheckBox("No volver a mostrar este mensaje",this); + vbox1->addWidget(checkz); + } + + QHBoxLayout* hboxfinal = new QHBoxLayout(this); + vbox1->addLayout(hboxfinal); + hboxfinal->setAlignment(Qt::AlignRight|Qt::AlignBottom); + + QSpacerItem* spacerfinal = new QSpacerItem(20,20,QSizePolicy::Expanding); + hboxfinal->addItem(spacerfinal); + + QPushButton* boton_aceptar = new QPushButton("Aceptar",this); + boton_aceptar->setDefault(TRUE); + hboxfinal->addWidget(boton_aceptar); + QWhatsThis::add(boton_aceptar,"Pulsa este botón para crear un nuev" + categorias[categoria] + " con las características que has seleccionado."); + connect(boton_aceptar,SIGNAL(clicked()),this,SLOT(Aceptar())); + + QPushButton* boton_cancelar = new QPushButton("Cancelar",this); + boton_cancelar->setAccel(Qt::Key_Escape); + hboxfinal->addWidget(boton_cancelar); + QWhatsThis::add(boton_cancelar,"Pulsa este botón para cerrar esta ventana sin crear un nuevo archivo."); + connect(boton_cancelar,SIGNAL(clicked()),this,SLOT(Cancelar())); + +} + +void Nuevo_Propiedades::set_tamano_mapa(int index) +{ + int num_tamanos[]= {320,200, 320,240, 320,400, 360,240, 360,360, + 376,282, 400,300, 512,384, 640,400, 640,480, + 800,600, 960,720, 1024,768, 1152,864, 1280,960, + 1280,1024, 1600,1200, 1900,1600}; + + edit_x->setText(QString::number(num_tamanos[index*2])); + edit_y->setText(QString::number(num_tamanos[index*2+1])); + +} + +void Nuevo_Propiedades::Aceptar() +{ + Proyecto* proj; + QDir* d; + + switch(_categoria) { + case 0: + if(edit_nombre->text().length()==0) { + QMessageBox mb("Error","Tienes que escribir un nombre para el proyecto.",QMessageBox::Warning,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + mb.exec(); + edit_nombre->setFocus(); + return; + } + + if(edit_nombre->text().left(8)=="Proyecto" && edit_nombre->text().at(8).isDigit()) { + QMessageBox mb("Aviso","El nombre que has introducido ("+edit_nombre->text()+") es poco descriptivo.\n¿Seguro que deseas mantener este nombre?",QMessageBox::NoIcon,QMessageBox::Yes,QMessageBox::No|QMessageBox::Default,QMessageBox::NoButton); + mb.setButtonText(QMessageBox::Yes,"Sí"); + //QCheckBox* mbcheck=new QCheckBox("No mostrar este mensaje de nuevo",&mb); + if(mb.exec()==QMessageBox::No) { + edit_nombre->setFocus(); + return; + } + } + + d=new QDir(_fichero); + if(!d->mkdir(edit_nombre->text())) { + if(d->cd(edit_nombre->text())) { + QMessageBox mb("Error","Ya existe una carpeta de proyecto con ese nombre. Introduce un nombre distinto.",QMessageBox::Warning,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + mb.exec(); + } else { + QMessageBox mb("Error","Error al crear la carpeta del proyecto.\nEs posible que hayas introducido un nombre con caracteres incorrectos.",QMessageBox::Warning,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + mb.exec(); + } + edit_nombre->setFocus(); + return; + } + d->cd(edit_nombre->text()); + //_fichero.prepend(d->canonicalPath()+"/"); + //_fichero.append("/"+edit_nombre->text()+".epj"); + _fichero=d->canonicalPath()+"/"+edit_nombre->text()+".epj"; + proj=new Proyecto(edit_nombre->text(),_fichero,edit_comentarios->text(),directorios->isChecked(),copiar->isChecked(),mdi); + proj->show(); + if(!_enmemoria) proj->save(); + + + } + + delete this; +} + +void Nuevo_Propiedades::Cancelar() +{ + delete this; +} + diff --git a/ediv/ideQT/nuevo_propiedades.h b/ediv/ideQT/nuevo_propiedades.h new file mode 100644 index 0000000..bb0849b --- /dev/null +++ b/ediv/ideQT/nuevo_propiedades.h @@ -0,0 +1,32 @@ +#include +#include +#include +#include +#include + +class Nuevo_Propiedades : public QDialog +{ + Q_OBJECT +public: + Nuevo_Propiedades (int categoria, int tipo, QString fichero, bool enmemoria, QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0); + +protected slots: + void set_tamano_mapa(int index); + void Aceptar(); + void Cancelar(); + +private: + int _categoria; + int _tipo; + QString _fichero; + bool _enmemoria; + + QLineEdit* edit_nombre; + QMultiLineEdit* edit_comentarios; + QCheckBox* directorios; + QCheckBox* copiar; + + QLineEdit* edit_x; + QLineEdit* edit_y; + +}; \ No newline at end of file diff --git a/ediv/ideQT/nuevo_window.cpp b/ediv/ideQT/nuevo_window.cpp new file mode 100644 index 0000000..3cf39d6 --- /dev/null +++ b/ediv/ideQT/nuevo_window.cpp @@ -0,0 +1,36 @@ +#include "nuevo_window.h" +#include "ideqtwindow.h" + +#include +#include +#include + +#include "gif/b_file.h" + +#define pillagif(a) _pillagif(a,sizeof(a)) +#define icono(a) QIconSet(*pillagif(a)) +/* +QPixmap* _pillagif(unsigned char* datos, int tamano) +{ + QByteArray *bm=new QByteArray(tamano); + CHECK_PTR(bm); + bm->assign((char*)datos,tamano); + QPixmap* ret=new QPixmap(*bm); + CHECK_PTR(ret); + return ret; +}*/ + + +nuevo_window::nuevo_window( QWidget* parent, const char* name, WFlags f ) + : QWidget( parent, name, f ) +{ + setCaption("Crear nuevo archivo"); + + QPixmap *icono=pillagif(b_file_gif); + setIcon(*icono); + + + +} + + diff --git a/ediv/ideQT/nuevo_window.h b/ediv/ideQT/nuevo_window.h new file mode 100644 index 0000000..47bfbb5 --- /dev/null +++ b/ediv/ideQT/nuevo_window.h @@ -0,0 +1,14 @@ +#include +#include + + +class QWidget; + +class nuevo_window : public QWidget +{ + Q_OBJECT +public: + nuevo_window( QWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel ); + +}; + diff --git a/ediv/ideQT/nuevoimpl.cpp b/ediv/ideQT/nuevoimpl.cpp new file mode 100644 index 0000000..b154b8c --- /dev/null +++ b/ediv/ideQT/nuevoimpl.cpp @@ -0,0 +1,556 @@ +#include "nuevoimpl.h" +#include "ideqtwindow.h" +#include "nuevo_propiedades.h" +#include "main.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "gif/b_file.h" +#include "gif/proyecto.h" +#include "gif/PRG.h" +#include "gif/MAP.h" +#include "gif/FPG.h" +#include "gif/PAL.h" +#include "gif/FNT.h" +#include "gif/WLD.h" +#include "gif/MOD.h" +#include "gif/WAV.h" +#include "gif/FLI.h" + +#include "gif/PCX.h" +#include "gif/PNG.h" +#include "gif/BMP.h" +#include "gif/JPG.h" + +#include "gif/MIDI.h" +#include "gif/IT.h" +#include "gif/XM.h" +#include "gif/S3M.h" + +#include "gif/OGG.h" +#include "gif/MP3.h" +#include "gif/WMA.h" +#include "gif/PCM.h" + +#include "gif/FLC.h" +#include "gif/MPG.h" +#include "gif/MOV.h" +#include "gif/AVI.h" + +#include "gif/ayuda.h" + + +/* + * Constructs a Nuevo which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +Nuevo::Nuevo( QWidget* parent, const char* name, bool modal, WFlags fl, QWidget* padre ) + : QDialog( parent, name, modal, fl ) +{ + setCaption("Crear archivo nuevo"); + setFixedSize(500,350); + + QPixmap *icono=pillagif(b_file_gif); + setIcon(*icono); + + if(padre) + move(padre->x()+padre->width()/2-width()/2,padre->y()+padre->height()/2-height()/2); + + QHBoxLayout* hbox1 = new QHBoxLayout(this); + + QListBox* lista = new QListBox(this); + hbox1->addWidget(lista); + + QWhatsThis::add(lista,"Elige en esta lista qué tipo de archivo quieres añadir a tu proyecto."); + + icono=pillagif(proyecto_gif); + lista->insertItem(*icono,"Proyecto"); + icono=pillagif(PRG_gif); + lista->insertItem(*icono,"Programa"); + icono=pillagif(MAP_gif); + lista->insertItem(*icono,"Mapa"); + icono=pillagif(FPG_gif); + lista->insertItem(*icono,"Fichero para gráficos"); + icono=pillagif(PAL_gif); + lista->insertItem(*icono,"Paleta de 8 bits"); + icono=pillagif(FNT_gif); + lista->insertItem(*icono,"Fuente de letra"); + icono=pillagif(WLD_gif); + lista->insertItem(*icono,"Mundo 3D"); + icono=pillagif(MOD_gif); + lista->insertItem(*icono,"Fichero musical"); + icono=pillagif(WAV_gif); + lista->insertItem(*icono,"Fichero de sonido"); + icono=pillagif(FLI_gif); + lista->insertItem(*icono,"Vídeo"); + + lista->setMinimumWidth(200); + lista->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding)); + QVBoxLayout* vbox1 = new QVBoxLayout(this); + hbox1->addLayout(vbox1); + + QGroupBox* box_descripcion = new QGroupBox(1,Qt::Vertical,"Descripción",this); + vbox1->addWidget(box_descripcion); + vbox1->setSpacing(6); + vbox1->setMargin(6); + + descripcion = new QLabel("Elige el tipo de archivo que quieres añadir a tu proyecto.",box_descripcion); + QWhatsThis::add(descripcion,"Aquí se muestra una descripción del elemento que eliges en la lista de la izquierda."); + descripcion->setAlignment(Qt::AlignLeft|Qt::AlignTop); + descripcion->setIndent(2); + descripcion->setTextFormat(Qt::RichText); + connect(lista,SIGNAL(highlighted(int)),this,SLOT(ListaClick(int))); + + box_opciones = new QGroupBox(this); + box_opciones->setTitle("Opciones"); + box_opciones->setColumnLayout(0, Qt::Vertical ); + + vbox1->addWidget(box_opciones); + + QVBoxLayout* vbox2 = new QVBoxLayout(box_opciones->layout()); + + label1 = new QLabel("Tipo de archivo:",box_opciones); + label1->setEnabled(FALSE); + vbox2->addWidget(label1); + + combo_tipo = new QComboBox(box_opciones); + combo_tipo->setEnabled(FALSE); + vbox2->addWidget(combo_tipo); + QWhatsThis::add(combo_tipo,"Si el tipo de recurso que has elegido permite almacenarse en distintos formatos, puedes elegir en esta lista el que más te convenga."); + connect(combo_tipo,SIGNAL(highlighted(int)),this,SLOT(combo_tipo_selecciona(int))); + + label2 = new QLabel("Ruta y nombre del archivo:",box_opciones); + label2->setEnabled(FALSE); + vbox2->addWidget(label2); + + edit_ruta = new QLineEdit(box_opciones); + edit_ruta->setEnabled(FALSE); + vbox2->addWidget(edit_ruta); + QWhatsThis::add(edit_ruta,"Escribe una ruta en esta caja si quieres que el archivo se guarde directamente en el disco nada más crearlo. Con algunos tipos de archivo esto es opcional."); + + QHBoxLayout* hbox2 = new QHBoxLayout(box_opciones); + //hbox2->setSpacing(6); + hbox2->setMargin(4); + vbox2->addLayout(hbox2); + + QSpacerItem* spacer1 = new QSpacerItem(20,20,QSizePolicy::Expanding,QSizePolicy::Minimum); + hbox2->addItem(spacer1); + + boton_examinar = new QPushButton("Examinar...",box_opciones); + boton_examinar->setEnabled(FALSE); + hbox2->addWidget(boton_examinar); + QWhatsThis::add(boton_examinar,"Pulsa este botón para buscar una ruta donde guardar el archivo."); + connect(boton_examinar,SIGNAL(clicked()),this,SLOT(Examinar())); + + QHBoxLayout* hbox3 = new QHBoxLayout(this); + vbox1->addLayout(hbox3); + hbox3->setSpacing(12); + hbox3->setMargin(5); + + QSpacerItem* spacer2 = new QSpacerItem(20,20,QSizePolicy::Expanding,QSizePolicy::Minimum); + hbox3->addItem(spacer2); + + boton_aceptar = new QPushButton("Aceptar",this); + boton_aceptar->setEnabled(FALSE); + boton_aceptar->setDefault(TRUE); + hbox3->addWidget(boton_aceptar); + connect(boton_aceptar,SIGNAL(clicked()),this,SLOT(Aceptar())); + QWhatsThis::add(boton_aceptar,"Pulsa este botón para pasar al siguiente paso."); + + QPushButton* boton_cancelar = new QPushButton("Cancelar",this); + hbox3->addWidget(boton_cancelar); + connect(boton_cancelar,SIGNAL(clicked()),this,SLOT(Cancelar())); + QWhatsThis::add(boton_cancelar,"Pulsa este botón para cerrar esta ventana sin crear un nuevo archivo."); + boton_cancelar->setAccel(Key_Escape); + +} + + +void Nuevo::ListaClick(int index) +{ + QPixmap* icono; + label1->setEnabled(TRUE); + combo_tipo->setEnabled(TRUE); + label2->setEnabled(TRUE); + edit_ruta->setEnabled(TRUE); + boton_examinar->setEnabled(TRUE); + boton_aceptar->setEnabled(TRUE); + combo_tipo->clear(); + + QString directorio; + if(!Main.proyecto_actual.nombre) + directorio=Main.personal_folder; + else + directorio=Main.proyecto_actual.directorio; + edit_ruta->setText(directorio + "/"); + edit_ruta->setSelection(edit_ruta->text().length()-20,20); + edit_ruta->setFocus(); + switch(index) { + case 0: // Proyecto (EPJ) + set_descripcion(0,0); + label1->setEnabled(FALSE); + combo_tipo->setEnabled(FALSE); + edit_ruta->setText(Main.projects_folder); + break; + case 1: // PRG + set_descripcion(1,0); + label1->setEnabled(FALSE); + combo_tipo->setEnabled(FALSE); + break; + case 2: // MAP + set_descripcion(2,0); + icono=pillagif(MAP_gif); + combo_tipo->insertItem(*icono,"MAP (Mapa de DIV Games Studio)"); + icono=pillagif(PCX_gif); + combo_tipo->insertItem(*icono,"PCX (PCSoft PCX)"); + icono=pillagif(PNG_gif); + combo_tipo->insertItem(*icono,"PNG (Portable Network Graphics)"); + icono=pillagif(BMP_gif); + combo_tipo->insertItem(*icono,"BMP (Mapa de bits de Windows)"); + icono=pillagif(JPG_gif); + combo_tipo->insertItem(*icono,"JPG (JPEG Independent Group)"); + break; + case 3: // FPG + set_descripcion(3,0); + label1->setEnabled(FALSE); + combo_tipo->setEnabled(FALSE); + break; + case 4: // PAL + set_descripcion(4,0); + label1->setEnabled(FALSE); + combo_tipo->setEnabled(FALSE); + break; + case 5: // FNT + set_descripcion(5,0); + label1->setEnabled(FALSE); + combo_tipo->setEnabled(FALSE); + break; + case 6: // WLD + set_descripcion(6,0); + icono=pillagif(WLD_gif); + combo_tipo->insertItem(*icono,"WLD (Mapa 3D de DIV Games Studio 2)"); + combo_tipo->insertItem(*icono,"WLD2 (Mapa reducido de M8Designer)"); + break; + case 7: // MOD/MIDI + set_descripcion(7,0); + icono=pillagif(MIDI_gif); + combo_tipo->insertItem(*icono,"MID (Archivo MIDI)"); + icono=pillagif(IT_gif); + combo_tipo->insertItem(*icono,"IT (Impulse Tracker)"); + icono=pillagif(XM_gif); + combo_tipo->insertItem(*icono,"XM (Fast Tracker)"); + icono=pillagif(S3M_gif); + combo_tipo->insertItem(*icono,"S3M (Scream Tracker)"); + icono=pillagif(MOD_gif); + combo_tipo->insertItem(*icono,"MOD (ProTracker)"); + break; + case 8: // WAV + set_descripcion(8,0); + icono=pillagif(WAV_gif); + combo_tipo->insertItem(*icono,"WAV (Microsoft ADPCM)"); + icono=pillagif(OGG_gif); + combo_tipo->insertItem(*icono,"OGG (OGG Vorbis)"); + icono=pillagif(MP3_gif); + combo_tipo->insertItem(*icono,"MP3 (Fraunhoffer MP3)"); + icono=pillagif(WMA_gif); + combo_tipo->insertItem(*icono,"WMA (Windows Media Audio)"); + icono=pillagif(PCM_gif); + combo_tipo->insertItem(*icono,"PCM (DIV Games Studio 1)"); + break; + case 9: // FLI + set_descripcion(9,0); + icono=pillagif(FLI_gif); + combo_tipo->insertItem(*icono,"FLI (Autodesk Animator)"); + icono=pillagif(FLC_gif); + combo_tipo->insertItem(*icono,"FLC (Autodesk Animator Pro)"); + icono=pillagif(MPG_gif); + combo_tipo->insertItem(*icono,"MPG (Motion Picture Engineering Group)"); + icono=pillagif(MOV_gif); + combo_tipo->insertItem(*icono,"MOV (Apple QuickTime)"); + icono=pillagif(AVI_gif); + combo_tipo->insertItem(*icono,"AVI (Audio & Video Interlaced)"); + } +} + +void Nuevo::Aceptar() +{ + int ret; + + QDir d; + + if(_categoria!=0) { + QFileInfo f(edit_ruta->text()); + d=f.dir(); + } + else { + d.setPath(edit_ruta->text()); + } + + if(edit_ruta->text().contains('<') || edit_ruta->text().contains('>') || !d.exists()) { + if(_categoria==0 || _categoria==1) { + QMessageBox mb("Ruta o nombre de archivo incorrecto", + "Para crear un proyecto o un programa debes introducir la ruta correcta.\nLos programas y proyectos deben guardarse en disco al crearlos.", + QMessageBox::NoIcon, + QMessageBox::Ok | QMessageBox::Default, + QMessageBox::NoButton, + QMessageBox::NoButton); + mb.exec(); + return; + } + else { + while(1) { + QMessageBox mb( "¿Crear archivo sin guardar?", + "No has introducido un nombre de archivo correcto.\n¿Deseas crear el archivo sin guardarlo en disco?", + QMessageBox::NoIcon, + QMessageBox::Yes | QMessageBox::Default, + QMessageBox::Cancel | QMessageBox::Escape, + QMessageBox::Retry); + mb.setButtonText(QMessageBox::Yes,"Sí"); + mb.setButtonText(QMessageBox::Cancel,"Cancelar"); + mb.setButtonText(QMessageBox::Retry,"Ayuda"); + ret=mb.exec(); + //if( ret == QMessageBox::Cancel ) { return; } + if( ret == QMessageBox::Yes ) break; + else if( ret == QMessageBox::Retry ) { + QMessageBox mb2( "Ayuda", + "Si creas el archivo sin guardarlo en disco, el archivo se creará en una ventana del escritorio de eDIV sin escribirse en el disco. La única diferencia será que el archivo no estará realmente guardado en disco hasta que no uses la opción Guardar o Guardar como... del menú Archivo. Es útil no guardar los archivos en disco para usarlos como temporales, por ejemplo, un mapa que sólo vayamos a usar para tratar algunas imágenes y luego copiarlas a otros mapas. Pero ten presente que un juego no podrá acceder a un archivo hasta que esté guardado en disco.", + QMessageBox::Information, + QMessageBox::Ok | QMessageBox::Default, + QMessageBox::NoButton, + QMessageBox::NoButton); + QPixmap* icono=pillagif(ayuda_gif); + mb2.setIconPixmap(*icono); + mb2.exec(); + } + else return; + } + hide(); + Nuevo_Propiedades* prop = new Nuevo_Propiedades(_categoria,_tipo,edit_ruta->text(),TRUE,this,0,TRUE); + prop->exec(); + } + } + else { + hide(); + Nuevo_Propiedades* prop = new Nuevo_Propiedades(_categoria,_tipo,edit_ruta->text(),FALSE,this,0,TRUE); + prop->exec(); + } + + delete this; + +} + +void Nuevo::Cancelar() +{ + delete this; +} + +class ExaminarProyecto : public QFileDialog +{ +public: + ExaminarProyecto(QWidget * parent=0, const char * name = 0, bool modal = FALSE) + : QFileDialog(parent, name, modal) + { + QLabel* labelinfo1=new QLabel("Dentro del directorio que selecciones aquí se creará una nueva carpeta con\nel nombre del proyecto, donde se guardarán los archivos del proyecto.",this); + //labelinfo1->setTextFormat(Qt::RichText); + labelinfo1->setBackgroundColor(QColor(255,255,170)); + labelinfo1->setMargin(5); + labelinfo1->setFrameShape(QFrame::Box); + QLabel* labelinfo2=new QLabel(this); + QPixmap* imagen=pillagif(ayuda_gif); + labelinfo2->setPixmap(*imagen); + labelinfo2->setAlignment(Qt::AlignHCenter|Qt::AlignTop); + addWidgets(labelinfo2,labelinfo1,0); + setCaption("Directorio de proyecto"); + setMode(QFileDialog::DirectoryOnly); + } +}; + +void Nuevo::Examinar() +{ + if(_categoria==0) { + ExaminarProyecto* dialogo = new ExaminarProyecto(this,0,TRUE); +// dialogo->setDir(Main.projects_folder); + dialogo->setDir(edit_ruta->text()); + dialogo->setSelection(""); + dialogo->exec(); + edit_ruta->setText(dialogo->selectedFile()); + } + else { + QFileDialog* dialogo = new QFileDialog(this,0,TRUE); + dialogo->setMode(QFileDialog::AnyFile); + dialogo->setDir(edit_ruta->text()); + switch(_categoria) { + case 1: dialogo->setFilter("Programas (*.prg)"); break; + case 2: switch(_tipo) { + case 1: dialogo->setFilter("Mapa de DIV Games Studio (*.map)"); break; + case 2: dialogo->setFilter("PCSoft PCX (*.pcx)"); break; + case 3: dialogo->setFilter("Portable Network Graphics (*.png)"); break; + case 4: dialogo->setFilter("Mapa de bits de Windows (*.bmp)"); break; + case 5: dialogo->setFilter("JPEG Independent Group (*.jpg *.jpeg *.jpe)"); + }; break; + case 3: dialogo->setFilter("Fichero para gráficos (*.fpg)"); break; + case 4: dialogo->setFilter("Paleta de 8 bits (*.pal)"); break; + case 5: dialogo->setFilter("Fuente de letra (*.fnt)"); break; + case 6: dialogo->setFilter("Mapa 3D (*.wld)"); break; + case 7: switch(_tipo) { + case 1: dialogo->setFilter("Archivo MIDI (*.mid *.midi)"); break; + case 2: dialogo->setFilter("Módulo de Impulse Tracker (*.it)"); break; + case 3: dialogo->setFilter("Módulo de Fast Tracker 2 (*.xm)"); break; + case 4: dialogo->setFilter("Módulo de Scream Tracker (*.s3m)"); break; + case 5: dialogo->setFilter("Módulo de ProTracker (*.mod)"); + }; break; + case 8: switch(_tipo) { + case 1: dialogo->setFilter("Microsoft ADPCM (*.wav)"); break; + case 2: dialogo->setFilter("OGG Vorbis (*.ogg)"); break; + case 3: dialogo->setFilter("Fraunhoffer MP3 (*.mp3)"); break; + case 4: dialogo->setFilter("Windows Media Audio (*.wma)"); break; + case 5: dialogo->setFilter("Sonido de Div Games Studio 1 (*.pcm)"); + }; break; + case 9: switch(_tipo) { + case 1: dialogo->setFilter("Autodesk Animator (*.fli)"); break; + case 2: dialogo->setFilter("Autodesk Animator Pro (*.flc)"); break; + case 3: dialogo->setFilter("Motion Picture Engineering Group (*.mpg *.mpeg *.mpe)"); break; + case 4: dialogo->setFilter("Apple QuickTime (*.mov)"); break; + case 5: dialogo->setFilter("Audio & Video Interlaced (*.avi)"); break; + } + } + dialogo->exec(); + edit_ruta->setText(dialogo->selectedFile()); + } +} + +void Nuevo::set_descripcion(int categoria, int tipo) +{ + + _categoria=categoria; + _tipo=(tipo==0)?1:tipo; + switch(categoria) { + case 0: // Proyecto (EPJ) + descripcion->setText("Elige esta opción para comenzar un nuevo proyecto con eDIV. En el directorio indicado en la caja de abajo (por defecto, tu directorio \"Mis proyectos de eDIV\") se creará una nueva carpeta con el nombre del proyecto, donde se guardarán el propio fichero de proyecto (*.epj) y los distintos archivos de recursos que se le vayan añadiendo."); + break; + case 1: // PRG + descripcion->setText("Los archivos PRG son ficheros fuente en los que se escribe el código del juego."); + break; + case 2: // MAP + descripcion->setText("Los mapas contienen gráficos que pueden cargarse, mostrarse y modificarse en un juego."); + switch(tipo) { + case 1: + descripcion->setText(descripcion->text() + "
    Los MAP son los mapas clásicos de DIV Games Studio. No tienen compresión, pero permiten colocar puntos de control."); + break; + case 2: + descripcion->setText(descripcion->text() + "
    Los PCX no tienen pérdida de calidad y tienen una pequeña compresión."); + break; + case 3: + descripcion->setText(descripcion->text() + "
    Los PNG sólo pueden usarse en modos de 16 bits o más y no tienen pérdida de calidad."); + break; + case 4: + descripcion->setText(descripcion->text() + "
    Los BMP no tienen pérdida de calidad, pero tampoco tienen compresión. Sin embargo, es un formato muy extendido."); + break; + case 5: + descripcion->setText(descripcion->text() + "
    Los JPG son conocidos por su algoritmo de compresión, que hace que ocupen muy poco, a costa de una pequeña pérdida de calidad. Sólo pueden usarse en modos de 16 bits o más."); + break; + } + break; + case 3: // FPG + descripcion->setText("Los ficheros para gráficos (FPG) contienen varios mapas en un mismo fichero. Son útiles para tener los mapas agrupados y ordenados en pocos ficheros."); + break; + case 4: // PAL + descripcion->setText("Las paletas sólo se usan en modos de 8 bits (256 colores). Un juego carga paletas según necesite una tabla de colores u otra."); + break; + case 5: // FNT + descripcion->setText("Las fuentes de letra se usan para escribir textos en pantalla con distintos estilos con las funciones write(), write_int() y write_in_map()."); + break; + case 6: // WLD + descripcion->setText("Los mundos 3D se utilizan en el modo 8. Se crean dibujando regiones 2D que luego en el juego aparecen como paredes, suelos y techos en 3D."); + switch(tipo) { + case 1: + descripcion->setText(descripcion->text() + "
    El WLD es el formato clásido de DIV Games Studio 2."); + break; + case 2: + descripcion->setText(descripcion->text() + "
    El WLD2 es similar al WLD, con la diferencia de que ocupa menos. No puede abrirse desde el editor de DIV 2, pero sí pueden leerlo los juegos hechos con él."); + break; + } + break; + case 7: // MOD/MIDI + descripcion->setText("Los ficheros musicales (módulos o MIDI) contienen una composición musical. Se diferencian de los ficheros de sonido en que se componen mediante una partitura o un secuenciador, y ocupan mucha menos memoria."); + switch(tipo) { + case 1: + descripcion->setText(descripcion->text() + "
    Los archivos MIDI son realmente pequeños y sencillos de componer. La desventaja es que no suenan con la misma calidad en todas las tarjetas de sonido."); + break; + case 2: + descripcion->setText(descripcion->text() + "
    Los archivos IT, superiores a los XM, son módulos de música formada por formas de onda secuenciadas. Pueden llegar a tener gran calidad."); + break; + case 3: + descripcion->setText(descripcion->text() + "
    Los archivos XM, superiores a los S3M, son módulos de música formada por formas de onda secuenciadas. Pueden llegar a tener gran calidad."); + break; + case 4: + descripcion->setText(descripcion->text() + "
    Los archivos S3M, son módulos de música formada por formas de onda secuenciadas. Pueden llegar a tener gran calidad."); + break; + case 5: + descripcion->setText(descripcion->text() + "
    Los archivos MOD, son módulos de música formada por formas de onda secuenciadas. Este formato en particular es antiguo y sólo soporta 4 canales de sonido."); + } + break; + case 8: // WAV + descripcion->setText("Los ficheros de sonido se usan para los efectos de sonido de los juegos o para música con calidad digital."); + switch(tipo) { + case 1: + descripcion->setText(descripcion->text() + "
    Los WAV alcanzan una gran calidad, y no tienen un nivel de compresión muy alto pero se leen rápidamente, por ello son ideales para los efectos de sonido que se repiten frecuentemente."); + break; + case 2: + descripcion->setText(descripcion->text() + "
    Los OGG tienen una gran compresión y una calidad prácticamente a nivel de CD Audio. Son ideales para música digital."); + break; + case 3: + descripcion->setText(descripcion->text() + "
    Los MP3 son, posiblemente, los archivos de audio digital más extendidos a través de Internet. Tienen una compresión y calidad muy altas.
    NOTA: Este formato no es gratuito. Consulta la documentación para conocer los detalles acerca del MP3."); + break; + case 4: + descripcion->setText(descripcion->text() + "
    Los WMA son el contraataque de Microsoft a los MP3. Tienen una calidad y compresión similares, pero a diferencia del MP3, es un formato libre."); + break; + case 5: + descripcion->setText(descripcion->text() + "
    Los PCM son un formato muy antiguo cuyo soporte sólo incluimos por razones de compatibilidad."); + } + break; + case 9: // FLI + descripcion->setText("Los ficheros de animación y de vídeo se usan para insertar películas o secuencias cinemáticas no interactivas (como videos de introducción, etc)."); + switch(tipo) { + case 1: + descripcion->setText(descripcion->text() + "
    El formato FLI es antiguo y sólo soporta 256 colores, pero es rápido y sencillo de crear y de manejar."); + break; + case 2: + descripcion->setText(descripcion->text() + "
    El FLC es similar al FLI, pero con la diferencia de que admite tamaños superiores a 320x200 pixels."); + break; + case 3: + descripcion->setText(descripcion->text() + "
    El MPG es un formato con calidad aceptable y compresión alta. Es muy utilizado en videojuegos profesionales."); + break; + case 4: + descripcion->setText(descripcion->text() + "
    El formato MOV tiene gran calidad aunque no tanta compresión como el MPG. Es más recomendado para grandes resoluciones."); + break; + case 5: + descripcion->setText(descripcion->text() + "
    TODO: ¿ké codec de AVI metemos?"); + break; + } + } +} + +void Nuevo::combo_tipo_selecciona(int index) +{ + set_descripcion(_categoria,index+1); +} + diff --git a/ediv/ideQT/nuevoimpl.h b/ediv/ideQT/nuevoimpl.h new file mode 100644 index 0000000..85b5d24 --- /dev/null +++ b/ediv/ideQT/nuevoimpl.h @@ -0,0 +1,41 @@ +#ifndef NUEVO_H +#define NUEVO_H + +#include +#include +#include +#include +#include + +class Nuevo : public QDialog +{ + Q_OBJECT + +public: + Nuevo( QWidget* parent = 0, const char* name = 0, bool modal=TRUE, WFlags fl = 0, QWidget* padre = 0 ); + +protected slots: + void ListaClick(int index); + void Aceptar(); + void Cancelar(); + void Examinar(); + void combo_tipo_selecciona(int index); + +private: + QLabel* descripcion; + QGroupBox* box_opciones; + QLabel* label1; + QComboBox* combo_tipo; + QLabel* label2; + QLineEdit* edit_ruta; + QPushButton* boton_examinar; + QPushButton* boton_aceptar; + + int _categoria; + int _tipo; + + void set_descripcion(int categoria, int tipo); + +}; + +#endif // NUEVO_H diff --git a/ediv/ideQT/proyecto.cpp b/ediv/ideQT/proyecto.cpp new file mode 100644 index 0000000..6c5ec1d --- /dev/null +++ b/ediv/ideQT/proyecto.cpp @@ -0,0 +1,221 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "main.h" +#include "proyecto.h" +#include "ideqtwindow.h" + +#include "gif/proyecto.h" +#include "gif/prop.h" +#include "gif/bycategory.h" +#include "gif/byextension.h" +#include "gif/sortasc.h" +#include "gif/no.h" +/*#include "gif/panelize.h" +#include "gif/unpanelize.h"*/ + + +Proyecto::Proyecto(QString nombre, QString fichero, QString descripcion, bool directorios, bool copiar, QWidget* parent) + : QWidget(parent) +{ + _nombre=nombre; + _fichero=fichero; + _descripcion=descripcion; + _directorios=directorios; + _copiar=copiar; + + setCaption("Proyecto: "+nombre); + QPixmap* icono=pillagif(proyecto_gif); + setIcon(*icono); + + QVBoxLayout* vbox1=new QVBoxLayout(this); + + QHBoxLayout* hbox1=new QHBoxLayout(this); + vbox1->addLayout(hbox1); + hbox1->setMargin(3); + hbox1->setSpacing(6); + + //QToolBar *toolbar=new QToolBar(caption(),(QMainWindow*)this,QMainWindow::Top,TRUE); + + + QPushButton* tbProp=new QPushButton(*pillagif(prop_gif),QString::null,this); + //tbProp->setFlat(TRUE); + tbProp->setFocusPolicy(QWidget::NoFocus); + tbProp->setFixedSize(24,24); + hbox1->addWidget(tbProp); + QToolTip::add(tbProp,"Propiedades del proyecto"); + + QFrame* sep1=new QFrame(this); + sep1->setFrameStyle(QFrame::VLine | QFrame::Sunken); + sep1->setLineWidth(1); + sep1->setMidLineWidth(0); + hbox1->addWidget(sep1); + + QButtonGroup* grupo=new QButtonGroup(3,Qt::Horizontal,this); + grupo->setFrameStyle(QFrame::NoFrame); + grupo->setMargin(0); + grupo->setLineWidth(0); + grupo->setMidLineWidth(0); + grupo->setExclusive(TRUE); + grupo->layout()->setMargin(0); + +/* QHBoxLayout* grupo=new QHBoxLayout(this); + hbox1->addLayout(grupo);*/ + + QPushButton* tbCategorias=new QPushButton(*pillagif(bycategory_gif),QString::null,grupo); + tbCategorias->setFixedSize(24,24); + tbCategorias->setToggleButton(TRUE); + tbCategorias->setOn(TRUE); + tbCategorias->setFocusPolicy(QWidget::NoFocus); + QToolTip::add(tbCategorias,"Agrupar por categoría"); +// grupo->insert(tbCategorias); +// grupo->addWidget(tbCategorias); + + QPushButton* tbExtensiones=new QPushButton(*pillagif(byextension_gif),QString::null,grupo); + tbExtensiones->setFixedSize(24,24); + tbExtensiones->setToggleButton(TRUE); + tbExtensiones->setFocusPolicy(QWidget::NoFocus); + QToolTip::add(tbExtensiones,"Agrupar por extensión"); +// grupo->insert(tbExtensiones); +// grupo->addWidget(tbExtensiones); + + QPushButton* tbNombre=new QPushButton(*pillagif(sortasc_gif),QString::null,grupo); + tbNombre->setFixedSize(24,24); + tbNombre->setToggleButton(TRUE); + tbNombre->setFocusPolicy(QWidget::NoFocus); + QToolTip::add(tbNombre,"Mostrar desagrupados, por nombre"); +// grupo->insert(tbNombre); +// grupo->addWidget(tbNombre); + + hbox1->addWidget(grupo); + + QFrame* sep2=new QFrame(this); + sep2->setFrameStyle(QFrame::VLine | QFrame::Sunken); + sep2->setLineWidth(1); + sep2->setMidLineWidth(0); + hbox1->addWidget(sep2); + + QPushButton* tbQuitar=new QPushButton(*pillagif(no_gif),QString::null,this); + //tbQuitar->setFlat(TRUE); + tbQuitar->setFocusPolicy(QWidget::NoFocus); + tbQuitar->setFixedSize(24,24); + hbox1->addWidget(tbQuitar); + QToolTip::add(tbQuitar,"Excluir del proyecto"); + + QSpacerItem* spacer1=new QSpacerItem(20,20,QSizePolicy::Expanding); + hbox1->addItem(spacer1); + +/* tbPanelize=new QPushButton(*pillagif(panelize_gif),QString::null,this); + tbPanelize->setFocusPolicy(QWidget::NoFocus); + tbPanelize->setFixedSize(24,24); + tbPanelize->setToggleButton(TRUE); + hbox1->addWidget(tbPanelize); + QToolTip::add(tbPanelize,"Acoplar ventana"); + connect(tbPanelize,SIGNAL(toggled(bool)),this,SLOT(panelizar(bool))); +*/ + QListView* vista=new QListView(this); + vbox1->addWidget(vista); + vista->addColumn("Lista de archivos"); + vista->setColumnWidthMode(0,QListView::Maximum); + //vista->header()->setClickEnabled( FALSE, vista->header()->count() - 1 ); + vista->header()->hide(); + vista->setSelectionMode(QListView::Extended); + vista->setRootIsDecorated(TRUE); + //QListViewItem* a=new QListViewItem(vista,"Hola"); + + statusbar=new QStatusBar(this); + vbox1->addWidget(statusbar); + statusbar->message("0 archivo(s) - 0 bytes"); + + xmldoc=new QDomDocument("eDIV_project"); + + QDomComment c=xmldoc->createComment(" eDIV Project 0.1 "); + xmldoc->appendChild(c); + + xmlproject=xmldoc->createElement("project"); + xmlproject.setAttribute("version","0.1"); + xmlproject.setAttribute("name",nombre); + xmlproject.setAttribute("copyfiles",copiar); + xmlproject.setAttribute("subdirs",directorios); + xmldoc->appendChild(xmlproject); + + QDomElement xmldescriptionelement=xmldoc->createElement("description"); + xmldescription=xmldoc->createTextNode(descripcion); + xmldescriptionelement.appendChild(xmldescription); + xmlproject.appendChild(xmldescriptionelement); + + xmlfilelist=xmldoc->createElement("filelist"); + xmlproject.appendChild(xmlfilelist); + + //connect(this,SIGNAL(focusInEvent()),this,SLOT(updateProyectoActual())); + //focusInEvent(NULL); + connect(mdi,SIGNAL(windowActivated(QWidget*)),this,SLOT(updateProyectoActual(QWidget*))); + +} + + +/*void Proyecto::panelizar(bool panelizado) +{ + if(panelizado) { + tbPanelize->setIconSet(*pillagif(unpanelize_gif)); + //toolbar=new QToolBar("a",MainWindow,QMainWindow::Left); + reparent(MainWindow,0,QPoint(0,0),TRUE); + } + else { + tbPanelize->setIconSet(*pillagif(panelize_gif)); + reparent(mdi,0,QPoint(0,0),TRUE); + //delete toolbar; + } + +}*/ + + +void Proyecto::save() +{ + QFile f(_fichero); + while(1) { + if(f.open(IO_WriteOnly)) { + QTextStream (&f) << "" << xmldoc->toString(); + f.close(); + break; + } + else { + QMessageBox msg("Error","Error al escribir \""+_fichero+"\".\nComprueba que tienes permiso de escritura sobre el archivo y que hay suficiente espacio libre en el disco.",QMessageBox::Warning,QMessageBox::Abort,QMessageBox::Retry,QMessageBox::Ignore); + msg.setButtonText(QMessageBox::Abort,"Abortar"); + msg.setButtonText(QMessageBox::Retry,"Reintentar"); + msg.setButtonText(QMessageBox::Ignore,"Ignorar"); + int ret=msg.exec(); + if(ret==QMessageBox::Abort) { + delete this; + break; + } + else if(ret==QMessageBox::Ignore) { + break; + } + } + } +} + + +void Proyecto::updateProyectoActual(QWidget* w) +{ + if(w==this) { + QFileInfo f(_fichero); + Main.proyecto_actual.nombre=_nombre; + Main.proyecto_actual.directorio=f.dirPath(); + +#ifdef _DEBUG + qDebug("proyecto_actual.nombre=\"%s\"\n",Main.proyecto_actual.nombre.latin1()); + qDebug("proyecto_actual.directorio=\"%s\"\n",Main.proyecto_actual.directorio.latin1()); +#endif + } +} diff --git a/ediv/ideQT/proyecto.h b/ediv/ideQT/proyecto.h new file mode 100644 index 0000000..4e74d48 --- /dev/null +++ b/ediv/ideQT/proyecto.h @@ -0,0 +1,36 @@ +#include +//#include +#include +#include + +class Proyecto : public QWidget +{ + Q_OBJECT + +public: + Proyecto(QString nombre, QString fichero, QString descripcion, bool directorios, bool copiar, QWidget* parent); + +public slots: + void save(); + +protected slots: +// void panelizar(bool panelizado); + void updateProyectoActual(QWidget* w); + +protected: + QString _nombre; + QString _fichero; + QString _descripcion; + bool _directorios; + bool _copiar; + +private: +/* QPushButton* tbPanelize; + QToolBar* toolbar;*/ + QStatusBar* statusbar; + + QDomDocument* xmldoc; + QDomElement xmlproject; + QDomText xmldescription; + QDomElement xmlfilelist; +}; diff --git a/ediv/ideQT/res.aps b/ediv/ideQT/res.aps new file mode 100644 index 0000000..91a4591 Binary files /dev/null and b/ediv/ideQT/res.aps differ diff --git a/ediv/ideQT/res.rc b/ediv/ideQT/res.rc new file mode 100644 index 0000000..b7c94cb --- /dev/null +++ b/ediv/ideQT/res.rc @@ -0,0 +1,72 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Spanish (Modern) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESN) +#ifdef _WIN32 +LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON DISCARDABLE "ediv.ico" +#endif // Spanish (Modern) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/ediv/ideQT/resource.h b/ediv/ideQT/resource.h new file mode 100644 index 0000000..4d07b09 --- /dev/null +++ b/ediv/ideQT/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by res.rc +// +#define IDI_ICON1 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/ediv/language.txt b/ediv/language.txt new file mode 100644 index 0000000..5345892 --- /dev/null +++ b/ediv/language.txt @@ -0,0 +1,303 @@ +/** ** + * FICHERO DE MENSAJES DE EDIV PARA TRADUCIR * + * * + * Por favor no useis un editor de msdos para modificar * + * el fichero... graciaas :) * + * * + * Tened cuidado con respetar: * + * - La numeración de las líneas * + * - Las comillas * + * - Las comas del final de cada línea * + * - Los símbolos reservados de C (%s, \n, etc) * + * - Las instrucciones de preprocesador (#ifdef, #else, etc) * + ** **/ + +// Idioma: Español + +// ERRORES DE COMPILACION + +/* 0 */ "", +/* 1 */ "Llegó el final dentro de un comentario", +/* 2 */ "Excedida la capacidad del vector de nombres", +/* 3 */ "Literal sin cerrar", +/* 4 */ "Símbolo no reconocido", +/* 5 */ "Carácter no reconocido", +/* 6 */ "Excedida la capacidad de la tabla de objetos", +/* 7 */ "Esperando '='", +/* 8 */ "Esperando una opción de compilación", +/* 9 */ "Esperando ';'", +/* 10 */ "Se esperaba un operando", +/* 11 */ "Expresión incorrecta", +/* 12 */ "Asignación a cadena incorrecta", +/* 13 */ "Asignación incorrecta", +/* 14 */ "No se puede calcular el offset del dato", +/* 15 */ "No se puede calcular el offset", +/* 16 */ "No se puede realizar el incremento", +/* 17 */ "Local no se puede acceder", +/* 18 */ "Esperando ')'", +/* 19 */ "Esperando ']'", +/* 20 */ "No es un tipo de proceso", +/* 21 */ "Esperando el nombre de un proceso", +/* 22 */ "Esperando '('", +/* 23 */ "Esperando un nombre", +/* 24 */ "No se puede calcular el tamaño", +/* 25 */ "Expresión incorrecta", +/* 26 */ "No se puede recibir una estructura como parámetro", +/* 27 */ "Esperando el nombre de la estructura", +/* 28 */ "Declaración incorrecta de puntero a una estructura", +/* 29 */ "Esperando el nombre de la cadena", +/* 30 */ "El nombre no es nuevo", +/* 31 */ "Cadena de texto de longitud negativa", +/* 32 */ "Cadena de texto demasiado larga", +/* 33 */ "No se puede especificar una tabla como parámetro", +/* 34 */ "Nombre desconocido: %s", +/* 35 */ "Se esperaba una coma", +/* 36 */ "Se esperaba otro parámetro", +/* 37 */ "No se puede acceder a datos PRIVATE externos", +/* 38 */ "Número de parámetros incorrecto", +/* 39 */ "Esperando un elemento de la estructura", +/* 40 */ "Tabla de longitud negativa", +/* 41 */ "La longitud no coincide con la declaración anterior", +/* 42 */ "No se puede inicializar un parámetro", +/* 43 */ "Estructura de longitud negativa", +/* 44 */ "Esperando PROGRAM", +/* 45 */ "Esperando el nombre del programa", +/* 46 */ "Se esperaba un literal", +/* 47 */ "Una estructura debe contener, al menos, un elemento", +/* 48 */ "Demasiados valores para la tabla", +/* 49 */ "Literal demasiado largo", +/* 50 */ "Valor BYTE fuera del rango (0...255)", +/* 51 */ "Valor WORD fuera del rango (0...65535)", +/* 52 */ "No se puede duplicar 0 o menos veces", +/* 53 */ "Inicialización incorrecta", +/* 54 */ "Se esperaba una expresión constante", +/* 55 */ "Demasiados valores para la estructura", +/* 56 */ "Esperando BEGIN", +/* 57 */ "Esperando END", +/* 58 */ "Esperando UNTIL", +/* 59 */ "Esperando una variable", // (para el FROM) +/* 60 */ "Esperando TO", +/* 61 */ "Sentencia FROM incorrecta", // (from==to) +/* 62 */ "El valor STEP no es válido", +/* 63 */ "Esperando CASE, DEFAULT o END", +/* 64 */ "Esperando ':'", +/* 65 */ "BREAK no aparece dentro de un bucle", +/* 66 */ "CONTINUE no aparece dentro de un bucle", +/* 67 */ "Se esperaba una sentencia", +/* 68 */ "Expresión sin sentido", +/* 69 */ "Asignación dentro de una condición", +/* 70 */ "Esperando el nombre del proceso o función", +/* 71 */ "Esperando PROCESS o FUNCTION", +/* 72 */ "Parámetro no válido", +/* 73 */ "ELSEIF no aparece dentro de un bloque IF", + + +// ADVERTENCIAS + +/* 0 */ "", +/* 1 */ "SETUP_PROGRAM: Característica desfasada", +/* 2 */ "IMPORT: Sintaxis antigua, se ignora", + + +// ERRORES DE DLL + +/* 1 */ "Sobrepasado buffer de nombres de objeto", +/* 2 */ "Objeto '%s': El nombre no es nuevo", +/* 3 */ "Demasiados objetos declarados", +/* 4 */ "Funcion '%s': El nombre no es nuevo", +/* 5 */ "Error declarando objeto '%s'", +/* 6 */ "Objeto '%s': Declaración ilegal dentro de struct", +/* 7 */ "Objeto '%s': Declaración de un miembro fuera de struct", +/* 8 */ "Tamaño ilegal del string '%s'", +/* 9 */ "EndStruct sin Struct", +/* 10 */ "Una estructura debe contener al menos un elemento", + + +// ERRORES DE LTLEX.DEF + +/* 0 */ "", +/* 1 */ "Archivo ltlex.def no encontrado", +/* 2 */ "Se esperaba un valor hexadecimal (&00..&FF)", +/* 3 */ "Demasiados símbolos definidos", +/* 4 */ "Símbolo no válido", + + +// MENSAJES DEL COMPILADOR + +/* 0 */ " **** Compilador eDIV " VERSION " ****\nCopyright (c) 2001 Sion Entertainment\nhttp://www.edivcentral.com\n", +/* 1 */ "ATENCION: Esta version de eDIV esta inacabada.\nPor favor informe de cualquier bug a: bugs@edivcentral.com\n", +/* 2 */ "Ayuda de opciones de comando:\n\n", +/* 3 */ "%s [opciones] archivo.prg [ejecutable]\n\n", +/* 4 */ "Lista de opciones:\n", +/* 5 */ " -h, --help Muestra esta ayuda y sale\n", +/* 6 */ " -d, --debug Genera información adicional de depurado\n", +/* 7 */ " -l, --list Guarda el listado EML como \n", +/* 8 */ " -t, --table Guarda la tabla de objetos como \n", +/* 9 */ " -c, --check No genera un ejecutable (para comprobar sintaxis, etc.)\n", +/* 10 */ " -s, --system Sistema Operativo destino (por defecto %s)\n", +/* 11 */ " -v, --version Muestra versión y sale\n\n", +/* 12 */ "Parámetro --system: debe indicar un sistema destino\nConsulte la documentación para obtener ayuda\n", +/* 13 */ "Parámetro erróneo: %s\nUse la opción -h para ver la ayuda\n", +/* 14 */ "Parámetro -s: debe indicar un sistema destino\nConsulte la documentación para obtener ayuda\n", +/* 15 */ "Parámetro erróneo: -%c\nUse la opción -h para ver la ayuda\n", +/* 16 */ "No se ha especificado un archivo\nUse la opción -h para ver la ayuda\n", +/* 17 */ "edivc: Error al abrir archivo %s.\n", +/* 18 */ "edivc: Compilando: %s\n", +/* 19 */ "edivc: ERROR: No se encuentra %s\n", +/* 20 */ "edivc: ERROR: Formato incorrecto de %s\n", +/* 21 */ "edivc: Interrumpido (%d advertencias)\n", +/* 22 */ "edivc: Finalizado con éxito (%d advertencias)\n", +/* 23 */ "edivc: Salida con errores\n", +/* 24 */ "edivc: ERROR: Memoria insuficiente\n", +/* 25 */ "%s:%d:%d: ERROR %d: ", +/* 26 */ "%s:%d: Advertencia: ", +/* 27 */ "Precompilando...\n", +/* 28 */ "Compilando...\n", +/* 29 */ "Error creando archivo de intercambio\n", +/* 30 */ "Generando listados...\n", +/* 31 */ "Guardando ejecutable...\n", +/* 32 */ "Guardando información de depurado...\n", +/* 33 */ "Error escribiendo ejecutable\n", +/* 34 */ "Compilación finalizada.\n", +/* 35 */ "%s: ERROR: ", +/* 36 */ "Error creando archivo %s\n", +/* 37 */ "Listado de objetos de %s - eDIV versión " VERSION "\n\n", +/* 38 */ "\tbloque(%u), anterior(%u)\n", +/* 39 */ "Código EML de %s - eDIV versión " VERSION "\n", +/* 40 */ "edivc: ERROR: %s\n\n", +/* 41 */ "edivc: %s (linea %d) ERROR: %s\n\n", +/* 42 */ "edivc: Interrumpido - se han encontrado errores\n", +#ifdef _WIN32 +/* 43 */ "No se encuentra ninguna DLL\n", +/* 44 */ "", +#else +/* 43 */ "No se encuentra ninguna librería\n", +/* 44 */ "Directorio %s/ no encontrado\n", +#endif +/* 45 */ "Error al cargar librería %s\n", +#ifdef _WIN32 +/* 46 */ "No puedo cargar %s\n", +/* 47 */ "No se encuentra ExportaFuncs en %s - DLL no válida\n", +#else +/* 46 */ "No puedo cargar %s (%s)\n", +/* 47 */ "No se encuentra ExportaFuncs en %s - Librería no válida (%s)\n", +#endif +/* 48 */ " -n, --news Muestra las últimas noticias de eDivCentral.com y sale\n", +/* 49 */ "Error: no se ha configurado un servidor de noticias en ediv.cfg\n", +/* 50 */ "Error: el fichero recibido no es del tipo esperado\n" // ojo, este no lleva coma + + +// ERRORES DE TIEMPO DE EJECUCIÓN DEL STUB + +/* 100 */ "No hay memoria suficiente para ejecutar el programa.", +/* 101 */ "Llamada a key() con un código de tecla inexistente.", +/* 102 */ "No se pudo cargar la paleta, archivo no encontrado.", +/* 103 */ "Se intentó cargar un archivo de paleta inválido.", +/* 104 */ "Demasiados ficheros FPG abiertos a la vez.", +/* 105 */ "No se pudo cargar el fichero, archivo no encontrado.", +/* 106 */ "Se intentó cargar un fichero FPG no válido.", +/* 107 */ "Número de scroll inválido (debe estar entre 0 y 9).", +/* 108 */ "Número de región inválido (fuera de rango).", +/* 109 */ "Código de fichero inválido.", +/* 110 */ "Código de gráfico inválido.", +/* 111 */ "Se intentó usar un fichero FPG antes de cargarlo.", +/* 112 */ "Se necesita un código de gráfico para el scroll.", +/* 113 */ "Se han cargado demasiados fuentes de letras.", +/* 114 */ "No se pudo cargar el fuente, archivo no encontrado.", +/* 115 */ "Se intentó cargar un archivo de fuente no válido.", +/* 116 */ "Código identificador de fuente de letras inválido.", +/* 117 */ "Código de centrado de texto inválido.", +/* 118 */ "Hay demasiados textos activos en el programa.", +/* 119 */ "Indentificador de texto no válido.", +/* 120 */ "Región de pantalla definida incorrectamente.", +/* 121 */ "Se intentó utilizar un gráfico que no existe.", +/* 122 */ "Se intentó escribir un bloque fuera de la memoria.", +/* 123 */ "No se pudo abrir el archivo para escritura.", +/* 124 */ "No se pudo escribir el archivo (ver espacio en disco).", +/* 125 */ "Se intentó leer un bloque fuera de la memoria.", +/* 126 */ "No se pudo abrir el archivo para lectura.", +/* 127 */ "No se pudo leer el archivo.", +/* 128 */ "No se pudo cargar el efecto de sonido.", +/* 129 */ "No se pudo tocar el efecto de sonido solicitado.", +/* 130 */ "No se pudo iniciar la animación solicitada.", +/* 131 */ "Número de modo 7 inválido (debe estar entre 0 y 9).", +/* 132 */ "Se necesita un código de gráfico para el modo 7.", +/* 133 */ "Número de punto de control inválido.", +/* 134 */ "Número de botón incorrecto (debe estar entre 0 y 3).", +/* 135 */ "Número de eje incorrecto (debe estar entre 0 y 3).", +/* 136 */ "Dirección de la tabla de paleta fuera de la memoria.", +/* 137 */ "No se pueden comprobar regiones en gráficos de m-7.", +/* 138 */ "Código de información gráfica incorrecto.", +/* 139 */ "No se pueden comprobar colisiones en gráficos de m-7.", +/* 140 */ "Acceso fuera de rango.", +/* 141 */ "Se intentó acceder a un proceso inválido.", +/* 142 */ "El proceso parece bloqueado, esperando FRAME.", +/* 143 */ "No se pudo cargar el mapa, archivo no encontrado.", +/* 144 */ "Se intentó cargar un archivo de mapa inválido.", +/* 145 */ "Se ha intentado hacer una división entre cero.", +/* 146 */ "El tamaño de la región es incorrecto.", +/* 147 */ "No se pudo cargar FLI/FLC, archivo no encontrado.", +/* 148 */ "Valor de timeout incorrecto (debe ser entre 1 y 60).", +/* 149 */ "Número de jugadores incorrecto (debe ser entre 2 y 8).", +/* 150 */ "Sólo se pueden enviar datos globales.", +/* 151 */ "Tamaño de casilla inválido (debe ser entre 1 y 256).", +/* 152 */ "Mapa de búsqueda no válido (desde 1x1 hasta 128x128).", +/* 153 */ "Tamaño de mapa incorrecto (de 1x1 a 32768x32768).", +/* 154 */ "Número de color incorrecto (debe ser de 0 a 255).", +/* 155 */ "El centro está fuera de los límites del gráfico.", +/* 156 */ "El objeto se encuentra fuera del mapa y sera eliminado.", +/* 157 */ "Textura del mapa no encontrada.", +/* 158 */ "El tamaño de la textura es incorrecto.", +/* 159 */ "No se pudo cargar el mundo, archivo no encontrado.", +/* 160 */ "No se pudo cargar el mundo, archivo no válido.", +/* 161 */ "El número de bandera no es válido.", +/* 162 */ "Dispositivo inválido (sólo 1-IPX,2-SERIAL,3-MODEM).", +/* 163 */ "Tamaño de paquete inválido (sólo de 1 a 199).", +/* 164 */ "La cadena de texto destino no es válida.", +/* 165 */ "Se intentó acceder a un puntero nulo.", +/* 166 */ "El modo de acceso al archivo no es válido.", +/* 167 */ "No se pudo cargar el módulo.", +/* 168 */ "Demasiados errores ignorados.", +/* 169 */ "Demasiados archivos abiertos.", +/* 170 */ "Identificador de archivo (handle) no válido.", +/* 171 */ "Valor fuera de rango.", +/* 172 */ "Demasiados objetos gráficos visualizados.", +/* 173 */ "Tipo de objeto gráfico no conocido.", +/* 174 */ "Porcentaje de tinta fuera de rango (0..15).", +/* 175 */ "Número de objeto gráfico no válido.", +/* 176 */ "Error variable de vpe: Textura de mapa [a] no encontrada en fichero [b].", +/* 177 */ "Textura de mapa.", +/* 178 */ "no encontrada en fichero.", +/* 179 */ "Se realizaron demasiadas peticiones de memoria dinámica.", +/* 180 */ "El puntero no se corresponde con ninguno de los bloques reservados.", +/* 181 */ "No se pueden reservar bloques de menos de una posición.", +/* 182 */ "Se intentó (des)encriptar un bloque fuera de la memoria.", +/* 183 */ "No se puede cargar otra paleta cuando está forzada la actual.", +/* 184 */ "", +/* 185 */ "", +/* 186 */ "", +/* 187 */ "", +/* 188 */ "", +/* 189 */ "", +/* 190 */ "", +/* 191 */ "", +/* 192 */ "", +/* 193 */ "", +/* 194 */ "", +/* 195 */ "", +/* 196 */ "", +/* 197 */ "", +/* 198 */ "", +/* 199 */ "", +/* 200 */ "Archivo con datos corrompidos, no se pudo cargar.", + + +// ERRORES CRÍTICOS DEL STUB + +/* 0 */ "", +/* 1 */ "Error leyendo el código del programa", +/* 2 */ "Error en el formato de código", +/* 3 */ "Redefinicion del tipo de proceso", +/* 4 */ "No se pudo reservar memoria para la pila", +/* 5 */ "Librería no encontrada: %s", +/* 6 */ "%s no es una librería válida de eDIV", diff --git a/ediv/license b/ediv/license new file mode 100644 index 0000000..d91454a --- /dev/null +++ b/ediv/license @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ediv/propuestas.txt b/ediv/propuestas.txt new file mode 100644 index 0000000..4e13976 --- /dev/null +++ b/ediv/propuestas.txt @@ -0,0 +1,269 @@ + vic + he descubierto 2 bugs de DIV2 + asi los pones en la lista ^^ + okey + di :D + pues + 1) DIV hace declarar la region 0 con define_region (la cual no se deberia porque es la pantalla completa) + ej: + define_region(0,0,0,320,480); + cuando en vez las regiones da declarar van desde 1 hasta 31 + 2) cuando se declara una regione de 0,0 DIV da error y sale, pero eso deberia ser posible (por cierto se puede en fenix, mirar: test_define_region.prg hecho por mi xD ) + todo aqui ^^ + +Don't say there will never be a div3. But if there's a div3 what new statements should be in it? +I have some: +Refresh_screen(); +redraws the screen, handy if you use splitscreen and restore_type=no_restore. Then if you erase one of the scrollwindows you could use refresh_screen() to restore the screen only one frame +Save_world(filename); +saves the world made in Mode 8 +Start_tilescroll(offset structure,width,height,tilewidth,tileheight) +start a tilemapbased scrolling. Much faster than using map_put/map_xput +Darkmap(file,graph) +makes a map darker +Lightmap(file,graph) +makes a map lighter +Recolourmap(file,graph,%red,%green,%blue); +makes map more red, green etc. +save_pal(file); +saves current pallette +new extras for flags: 16: anti-aliase with background,32: no transparent colour, so colour 0 is just visible +set_trans_perc(percentage) +if flags=4 you can change how visible the object is. +____________________ +----------- +Even though you would Beat Me Up, I'm still a really cool player too(My gamenames are hidden in this text) +-------- + Dazzy +DIV MANIAC + +Status: Offline +  posted on 4/11/01 at 12:13 PM +well if I'd like to see hardware accelerated 2D, the DLL writing process cleaned up, ie to allow use of dll's writeen in VB , delphi C/c++, probably have to be rewritten but so be it! +theres alot of things but I don't see the point of dissusing them until at least DIV2 makes an appearence!! ____________________ +Dazzy + MikeH +DIV Regular + + +Status: Offline +  posted on 4/11/01 at 10:57 PM +I would be for a complete rewrite of the div engine. +Limited Support for OOP (Object Orientated Programming). +DirectX based (of course) +Support for mp3 \ midi files. +Unlimited color depth +and unlimited food +____________________ +<> <> +MikeH's Lore: +Never cast finger of death when scratching your bottom +<> <> +Visit InnerEdge Games Homepage at http://WWW.InnerEdgeGames.com + Mike_S +DIV Regular + + +Status: Offline +  posted on 6/11/01 at 09:57 AM +I'm with that (the food part anyway) + Er_Makina +DIV Junior + +Status: Offline +   posted on 6/12/01 at 05:16 AM +if you don't mind, i'm collecting these suggestions for implementing them (or some of them) in eDIV. +byez.. +Er_Makina + +WINDOWS... +I like the flags=(4,40%) ; +idia +i think you can alrady change map collor's in div one... don't know exacly how, but i'm sure if done it. ____________________ +sent me an e-mail, +or just fissit my (old, but totally flash based) home page ;-) + futgiz +DIV Senior + + +Status: Offline +  posted on 8/12/01 at 13:09 +..semi-transperency.. + ____________________ +Behind you.. +[ MystiqGames.cjb.net ] [ Email ] +[ Lone Wolf ] [ Rally Forever ] [ Hostile Contact ] [ RTS Tutorial ] [ Bomber Brothers 1.01 ] [ Super Space ] [ Doesnt have an name actually.. ] [ Airplane Attack 2 ] + Tovi +DIV MANIAC + + +Status: Offline +  posted on 8/12/01 at 18:22 +Here's some random stupidity: +New Commands: +-------------------------------------------------------------------------------------------- +Compress(filename) +Compresses everything to one bit, for easy storage +Hack(gamename) +This automaticly hacks into any game from div-arena, and de-compiles it so you can use it for evil purpouses. +Explosion(x,y,size,speed,length,red,blue,green) +Creates a totally random explosion from nowhere, works real fast. +Destroy_OS(name of OS) +Destroys any type of OS worldwide, so if you would say 'destroy_os(windowsXP)' WindowsXP would stop existing +Heal_my_game() +Auto-debugs your game, so you don't have to deal with nasty bugs yourself. +New globals: +----------------------------------------------------------------------------------------------- +[None] +New Locals: +----------------------------------------------------------------------------------------------- +Blur=value (0-100) [default=0] Makes a process blurry. +x_size=value (0-256) [default=100] stretches a graphic on the x axis +y_size=value (0-256) [default=100] stretches a graphic on the y axis +END +____________________ + + + futgiz +DIV Senior + + +Status: Offline +  posted on 8/12/01 at 18:31 +A really cool particly explosion would be something like "AAAAAAAAAAAAAHHH". Hmm well i like explosions. ____________________ +Behind you.. +[ MystiqGames.cjb.net ] [ Email ] +[ Lone Wolf ] [ Rally Forever ] [ Hostile Contact ] [ RTS Tutorial ] [ Bomber Brothers 1.01 ] [ Super Space ] [ Doesnt have an name actually.. ] [ Airplane Attack 2 ] + Mike_S +DIV Regular + + +Status: Offline +  posted on 10/12/01 at 15:45 +I want the following function added in: +make_game(game genre,game coolness); +game coolness being an integer from 1 to 100. + X_stream +DIV Junior + + +Status: Offline +  posted on 10/12/01 at 21:59 +quote: +I want the following function added in: +make_game(game genre,game coolness); +game coolness being an integer from 1 to 100. +Lol, It would make the manual a hack of a lot easyer ____________________ +sent me an e-mail, +or just fissit my (old, but totally flash based) home page ;-) + antzrhere +DIV Regular + +Status: Online +  posted on 10/12/01 at 22:46 +dont_randomly_crash_on_me(); +tear_my_hair_out_for_me(); +feed_me(); ____________________ +The Future is Today...Worry about it tomorrow.... + Mike_S +DIV Regular + + +Status: Offline +  posted on 11/12/01 at 09:47 +Some old people actually have life support systems with those functions built in. + +[jeDIVe] oye yo tengo una sugerencia pal ediv +[19:38] > pues dimela hombre :) +[19:39] [jeDIVe] estaria bien k pudieras compilar los PRG a un bytecode con extension LIB o algo asi, y k hubiera una seccion LINKER para k se linkeara ese archivo al bytecode dle juego cuando se fuera a formar el EXE +[19:39] [jeDIVe] de esta forma +[19:39] [jeDIVe] se podria programar, por ejemplo, un engine 3D de bajo nivel con, por ejemplo +[19:39] [jeDIVe] las funciones basicas de opengl +[19:40] [jeDIVe] y k desde ediv +[19:40] [jeDIVe] se creara un engine completo +[19:40] [jeDIVe] despues +[19:40] [jeDIVe] podrias distribuir con un LIB el engine +[19:40] [jeDIVe] puediendo proteger el source asi + +[20:11] [CicTec] crear funciones avanzadas de write y write_int +[20:11] [CicTec] o anadir en las normales unos parametros +[20:12] > cuales? +[20:12] [CicTec] los parametros son: region,flags,size +[20:12] [CicTec] exspecialmente region +[20:13] [CicTec] para visualizar o mover un texto en una region sin crear procesos +[20:13] [CicTec] y utilizar write_in_map +[20:13] [CicTec] las funciones nuevas pueden ser: +[20:13] [CicTec] xwrite +[20:13] [CicTec] xwrite_int +[20:13] [CicTec] y tb +[20:13] [CicTec] xwrite_in_map xD + +// bucles con procesos al estilo de los objetos de VB, Blitz, etc +[16:49] [CicTec] for each VAR of PROCESO; +[16:49] [CicTec] end + +[23:03] [CicTec] son funciones +[23:03] [CicTec] mas que otro para comodidad +[23:04] [CicTec] una que se puede llamar tipo qclear o qreset +[23:04] [CicTec] que limpia uan estructura, tabla,o campo de estructura +[23:04] [CicTec] sin necesidad de crear un loop o un elenco largo de declaraciones +[23:04] [CicTec] funciona tipo asi: +[23:05] [CicTec] tenemos una estructura... +[23:05] [CicTec] struct str[99] +[23:05] [CicTec] string txt; +[23:05] [CicTec] int x; +[23:05] [CicTec] int y; +[23:05] [CicTec] byte color[255]; +[23:05] [CicTec] end +[23:06] [CicTec] digamos que ya es inicializada a caso +[23:06] [CicTec] y quieremos poner todo a 0 y "" +[23:06] [CicTec] hacemos asi: +[23:06] [CicTec] qclear(&str); +[23:07] [CicTec] si quieremos en vez hacer solo un campo tipo del color hacemos: +[23:07] [CicTec] qclear(&str.color); +[23:07] [CicTec] solo de un index: +[23:07] [CicTec] qclear(&str[9].color); +[23:07] [CicTec] etc... +[23:08] [CicTec] y otra funcione siempre de comodidad es: +[23:08] [CicTec] qassign +[23:08] [CicTec] copia una estructura,tabla o campo en otra +[23:08] [CicTec] claro que tiene que haber la misma dimencion +[23:08] [CicTec] un ej: +[23:08] [CicTec] qassign(&str,&strtemp); +[23:09] [CicTec] un campo +[23:09] [CicTec] qassign(&str.color,&strtemp.color); +[23:09] [CicTec] etc...etc...etc... + + +[18:58] [rst] tu imaginate lo que ayudaria en un compilador +[18:58] [rst] bueno +[18:58] [rst] en el editor +[18:58] [rst] cuando hacemos un for o un loop +[18:58] [rst] cualquier bucle bamos +[18:58] [rst] pues +[18:58] > sip +[18:58] [rst] que el editor nos colorease esa zona +[18:58] [rst] comprendes pòr donde voy ? +[18:59] [rst] facilidad de visualizacion del codigo +[18:59] > hmm mas u menos +[18:59] > si +[18:59] [rst] hay editores que usan eso +[18:59] > el visual studio 7 hace algo asi +[18:59] [rst] por ejemplo +[18:59] [rst] vrmlpad +[18:59] > cuando cerramos un parentesis, o un if +[18:59] > indica en negrita +[18:59] > que sentencia estamos cerrando +[18:59] [rst] ajam +[18:59] [rst] de eso se trata +[18:59] [rst] asi luego siempre visualizando ligeramente vemos el alcanze del bucle +[19:00] [rst] creo ayudaria un monton + +[@Daijo] todos los compiladores ke aparecen empiezan a utilizar recolectores de basura ke kedan mu monos x'D +[@Daijo] no te suena 'garbage collector'? +[@Daijo] te suena eso de que asignas memoria y no liberas? +( ver dmgc60a8.zip ) +http://www.cs.ukc.ac.uk/people/staff/rej/gc.html + +screen_color(int color) +rellena el fondo con un color \ No newline at end of file diff --git a/ediv/src/VISUAL C 6 Y 7.txt b/ediv/src/VISUAL C 6 Y 7.txt new file mode 100644 index 0000000..dd76486 --- /dev/null +++ b/ediv/src/VISUAL C 6 Y 7.txt @@ -0,0 +1,3 @@ +IMPORTANTE + DE MOMENTO LA CARPETA DE VISUAL C NO COMPILA, MIENTRAS K LA DE VISUAL C 6 SI QUE COMPILA BIEN, +SIN EMBARGO, AMBAS CARPETAS CONTIENEN PROYECTOS DE VISUAL C 7 \ No newline at end of file diff --git a/ediv/src/bmp2fnt/b2f.c b/ediv/src/bmp2fnt/b2f.c new file mode 100644 index 0000000..daecd94 --- /dev/null +++ b/ediv/src/bmp2fnt/b2f.c @@ -0,0 +1,173 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 +#include "edivfont.h" + + +int main(int argc, char* argv[]) +{ + FILE *fp ; + int im ; + FILE *img ; + FILE *out ; + char* pool; + struct _fuente_control_s fuente_control_s ; + char tras[3] ; + char none[3] ; + SDL_Surface *imagen ; + int i , x , y ; + char *px ; + fpos_t pos ; + + out = fopen("stdout.txt", "w" ) ; + +/* + fuente_control_s.rect['A'].x = 220 ; + fuente_control_s.rect['A'].y = 3 ; + fuente_control_s.rect['A'].w = 7 ; + fuente_control_s.rect['A'].h = 7 ; +*/ + + imagen = SDL_LoadBMP("fuente.bmp") ; + SDL_LockSurface( imagen ); + + // Se calculan los rects + px = imagen->pixels ; + + + // Color de borde ( El primero k se encuentra + none[0] = *(px + 0) ; + none[1] = *(px + 1) ; + none[2] = *(px + 2) ; + + // Colo trasparente ( Fila 1, Columna1, corresponde al caracter 0 ) + tras[0] = *(px + imagen->pitch + 3 + 0) ; + tras[1] = *(px + imagen->pitch + 3 + 1) ; + tras[2] = *(px + imagen->pitch + 3 + 2) ; + + + i = 1 ; + x = 3 ; + y = 0 ; + for ( x = 3 ; x < imagen->w ; x++ ) + { + for ( y = 0 ; y < imagen->h ; y++ ) + { + if (*(px + imagen->pitch*y + x*3 + 0) != none[0] || + *(px + imagen->pitch*y + x*3 + 1) != none[1] || + *(px + imagen->pitch*y + x*3 + 2) != none[2] ) + { + fuente_control_s.rect[i].x = x ; + fuente_control_s.rect[i].y = y ; + for ( ; y < imagen->h ; y++ ) + { + if (*(px + imagen->pitch*y + x*3 + 0) == none[0] && + *(px + imagen->pitch*y + x*3 + 1) == none[1] && + *(px + imagen->pitch*y + x*3 + 2) == none[2] ) + break ; + } + y--; + fuente_control_s.rect[i].h = y - fuente_control_s.rect[i].y + 1; + + for ( ; x < imagen->w ; x++ ) + { + if (*(px + imagen->pitch*y + x*3 + 0) == none[0] && + *(px + imagen->pitch*y + x*3 + 1) == none[1] && + *(px + imagen->pitch*y + x*3 + 2) == none[2] ) + break ; + } + x--; + fuente_control_s.rect[i].w = x - fuente_control_s.rect[i].x + 1 ; + x++; + + fprintf(out, "%i: %i,%i-%i,%i\n" , + i , + fuente_control_s.rect[i].x , + fuente_control_s.rect[i].y , + fuente_control_s.rect[i].w , + fuente_control_s.rect[i].h ) ; + + i++; + break ; + } + } + if ( i > 255) + break ; + } + + //SDL_UnlockSurface( imagen ); + //SDL_FreeSurface( imagen ) ; + + //im = open( "fuente.bmp" , O_RDONLY | O_BINARY ) ; + fp = fopen("fuente.fnt" , "w" ) ; + + fuente_control_s.offset_imagen = sizeof( fuente_control_s ) ; + fuente_control_s.size_imagen = imagen->w * imagen->h * imagen->format->BytesPerPixel ; + fuente_control_s.w = imagen->w ; + fuente_control_s.h = imagen->h ; + fuente_control_s.bytespp = imagen->format->BytesPerPixel ; + + printf("Sizeof control: %i\nOffset imagen: %i\nSizeof imagen: %i" , + fuente_control_s.offset_imagen, fuente_control_s.offset_imagen , + fuente_control_s.size_imagen ) ; + getchar(); + + //close(im) ; + //img = fopen("fuente.bmp" , "r" ) ; + + if(!(pool = malloc(fuente_control_s.size_imagen + 1) ) ) + printf("ERROR: Memoria insuficiente\n"); + + // generamos la imagen a guardar + for ( x = 0 ; x < imagen->w ; x++ ) + for ( y = 0 ; y < imagen->h ; y++ ) + for ( i = 0 ; i < imagen->format->BytesPerPixel ; i++ ) + pool[ ( x + y * imagen->w ) * imagen->format->BytesPerPixel + i ] = *(px + ( y * imagen->pitch ) + ( x * imagen->format->BytesPerPixel ) + i ) ; + + SDL_UnlockSurface( imagen ); + + + //fread( pool , 1 , fuente_control_s.size_imagen , img ) ; + printf("\nescribe: %i" , fwrite( &fuente_control_s , 1 , sizeof(fuente_control_s) , fp ) ); + //fwrite( &fuente_control_s , 1 , fuente_control_s.offset_imagen , fp ) ; + + pos = fuente_control_s.offset_imagen ; + fsetpos(fp , &pos ) ; + + //fwrite( &fuente_control_s , 1 , 2060 , fp ) ; + printf( "\n%i\n" , ftell( fp ) ) ; + getchar() ; + + + fwrite( pool , 1 , fuente_control_s.size_imagen , fp ) ; + + free(pool) ; + + return 0 ; +} + + diff --git a/ediv/src/bmp2fnt/b2f.dsp b/ediv/src/bmp2fnt/b2f.dsp new file mode 100644 index 0000000..447cefd --- /dev/null +++ b/ediv/src/bmp2fnt/b2f.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="b2f" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=b2f - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "b2f.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "b2f.mak" CFG="b2f - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "b2f - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "b2f - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "b2f - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "b2f - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\shared" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/b2f.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "b2f - Win32 Release" +# Name "b2f - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\b2f.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\shared\edivfont.h +# End Source File +# End Group +# End Target +# End Project diff --git a/ediv/src/bmp2fnt/b2f.sln b/ediv/src/bmp2fnt/b2f.sln new file mode 100644 index 0000000..933d04d --- /dev/null +++ b/ediv/src/bmp2fnt/b2f.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "b2f", "b2f.vcproj", "{892F2A1D-847C-45C1-B7D9-3F421D749FA5}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {892F2A1D-847C-45C1-B7D9-3F421D749FA5}.Debug.ActiveCfg = Debug|Win32 + {892F2A1D-847C-45C1-B7D9-3F421D749FA5}.Debug.Build.0 = Debug|Win32 + {892F2A1D-847C-45C1-B7D9-3F421D749FA5}.Release.ActiveCfg = Release|Win32 + {892F2A1D-847C-45C1-B7D9-3F421D749FA5}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/bmp2fnt/b2f.suo b/ediv/src/bmp2fnt/b2f.suo new file mode 100644 index 0000000..0a55e71 Binary files /dev/null and b/ediv/src/bmp2fnt/b2f.suo differ diff --git a/ediv/src/bmp2fnt/b2f.vcproj b/ediv/src/bmp2fnt/b2f.vcproj new file mode 100644 index 0000000..004842d --- /dev/null +++ b/ediv/src/bmp2fnt/b2f.vcproj @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/bmp2fnt/b2f.vcproj.vspscc b/ediv/src/bmp2fnt/b2f.vcproj.vspscc new file mode 100644 index 0000000..8390beb --- /dev/null +++ b/ediv/src/bmp2fnt/b2f.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:bmp2fnt" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/ediv/src/dlls/dinmem/dinmem.c b/ediv/src/dlls/dinmem/dinmem.c new file mode 100644 index 0000000..5d56a4e --- /dev/null +++ b/ediv/src/dlls/dinmem/dinmem.c @@ -0,0 +1,50 @@ + +#include +#include "../../shared/varindex.h" +#include "dinmem.h" + + + + + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ + + FUNCTION("malloc",1,eDiv_Malloc) ; + FUNCTION("free",1,eDiv_Free) ; + return TRUE ; + +} + +int eDiv_Malloc(FUNCTION_PARAMS) +{ + int longitud ; + int *puntero ; + longitud = getparm() ; + + puntero = calloc(longitud,4) ; + if ( puntero == NULL ) + return 0 ; + else + return ( puntero - fp->mem ) ; +} + +int eDiv_Free(FUNCTION_PARAMS) +{ + int offset ; + int *puntero ; + offset = getparm() ; + puntero = &fp->mem[offset] ; + free( puntero ) ; + + return 1 ; +} + + + +//============== Entrypoints ===================================================== + + + + + diff --git a/ediv/src/dlls/dinmem/dinmem.def b/ediv/src/dlls/dinmem/dinmem.def new file mode 100644 index 0000000..d0ed5e2 --- /dev/null +++ b/ediv/src/dlls/dinmem/dinmem.def @@ -0,0 +1,3 @@ +LIBRARY dinmem +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/dinmem/dinmem.h b/ediv/src/dlls/dinmem/dinmem.h new file mode 100644 index 0000000..dc7ab0d --- /dev/null +++ b/ediv/src/dlls/dinmem/dinmem.h @@ -0,0 +1,3 @@ + +int eDiv_Malloc(FUNCTION_PARAMS) ; +int eDiv_Free(FUNCTION_PARAMS) ; \ No newline at end of file diff --git a/ediv/src/dlls/dinmem/dinmem.sln b/ediv/src/dlls/dinmem/dinmem.sln new file mode 100644 index 0000000..88ce0be --- /dev/null +++ b/ediv/src/dlls/dinmem/dinmem.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dinmem", "dinmem.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/dinmem/dinmem.suo b/ediv/src/dlls/dinmem/dinmem.suo new file mode 100644 index 0000000..a8e855f Binary files /dev/null and b/ediv/src/dlls/dinmem/dinmem.suo differ diff --git a/ediv/src/dlls/dinmem/dinmem.vcproj b/ediv/src/dlls/dinmem/dinmem.vcproj new file mode 100644 index 0000000..f3b4e39 --- /dev/null +++ b/ediv/src/dlls/dinmem/dinmem.vcproj @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/dlls/dlls.sln b/ediv/src/dlls/dlls.sln new file mode 100644 index 0000000..bb758bf --- /dev/null +++ b/ediv/src/dlls/dlls.sln @@ -0,0 +1,92 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strings", "strings\strings.vcproj", "{F83A4960-9687-42C4-B722-14A028A9C393}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dinmem", "dinmem\dinmem.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "edivstd", "edivstd\edivstd.vcproj", "{7205B875-5EFC-4C86-8C38-2F6A66DCEBF2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "file", "file\file.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "graphics\graphics.vcproj", "{595A2626-DD40-44EC-A2B8-FB513D15D8C9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "input", "input\input.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scroll", "scroll\scroll.vcproj", "{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text", "text\text.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "math", "math\math.vcproj", "{5F3C5CEB-002A-4132-BCA3-65CE524A23E9}" +EndProject +Global + GlobalSection(SourceCodeControl) = preSolution + SccNumberOfProjects = 4 + SccProjectUniqueName0 = dinmem\\dinmem.vcproj + SccProjectName0 = \u0022$/dlls\u0022,\u0020YCAAAAAA + SccLocalPath0 = .. + SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe + SccProjectFilePathRelativizedFromConnection0 = dlls\\dinmem\\ + SccProjectUniqueName1 = file\\file.vcproj + SccProjectName1 = \u0022$/dlls\u0022,\u0020YCAAAAAA + SccLocalPath1 = .. + SccProvider1 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe + SccProjectFilePathRelativizedFromConnection1 = dlls\\file\\ + SccProjectUniqueName2 = input\\input.vcproj + SccProjectName2 = \u0022$/dlls\u0022,\u0020YCAAAAAA + SccLocalPath2 = .. + SccProvider2 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe + SccProjectFilePathRelativizedFromConnection2 = dlls\\input\\ + SccProjectUniqueName3 = text\\text.vcproj + SccProjectName3 = \u0022$/dlls\u0022,\u0020YCAAAAAA + SccLocalPath3 = .. + SccProvider3 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe + SccProjectFilePathRelativizedFromConnection3 = dlls\\text\\ + EndGlobalSection + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {F83A4960-9687-42C4-B722-14A028A9C393}.Debug.ActiveCfg = Debug|Win32 + {F83A4960-9687-42C4-B722-14A028A9C393}.Debug.Build.0 = Debug|Win32 + {F83A4960-9687-42C4-B722-14A028A9C393}.Release.ActiveCfg = Release|Win32 + {F83A4960-9687-42C4-B722-14A028A9C393}.Release.Build.0 = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32 + {7205B875-5EFC-4C86-8C38-2F6A66DCEBF2}.Debug.ActiveCfg = Debug|Win32 + {7205B875-5EFC-4C86-8C38-2F6A66DCEBF2}.Debug.Build.0 = Debug|Win32 + {7205B875-5EFC-4C86-8C38-2F6A66DCEBF2}.Release.ActiveCfg = Release|Win32 + {7205B875-5EFC-4C86-8C38-2F6A66DCEBF2}.Release.Build.0 = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32 + {595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Debug.ActiveCfg = Debug|Win32 + {595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Debug.Build.0 = Debug|Win32 + {595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Release.ActiveCfg = Release|Win32 + {595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Release.Build.0 = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.ActiveCfg = Debug|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.Build.0 = Debug|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.ActiveCfg = Release|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.Build.0 = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32 + {5F3C5CEB-002A-4132-BCA3-65CE524A23E9}.Debug.ActiveCfg = Debug|Win32 + {5F3C5CEB-002A-4132-BCA3-65CE524A23E9}.Debug.Build.0 = Debug|Win32 + {5F3C5CEB-002A-4132-BCA3-65CE524A23E9}.Release.ActiveCfg = Release|Win32 + {5F3C5CEB-002A-4132-BCA3-65CE524A23E9}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/dlls.suo b/ediv/src/dlls/dlls.suo new file mode 100644 index 0000000..0bbfced Binary files /dev/null and b/ediv/src/dlls/dlls.suo differ diff --git a/ediv/src/dlls/edivstd/Makefile b/ediv/src/dlls/edivstd/Makefile new file mode 100644 index 0000000..a656c59 --- /dev/null +++ b/ediv/src/dlls/edivstd/Makefile @@ -0,0 +1,8 @@ +LDFLAGS = -ggdb +CFLAGS = -Wall +CC = gcc + +TARGET = ../../../bin/so/edivstd.so + +$(TARGET): edivstd.c + $(CC) $(LDFLAGS) $(CFLAGS) -I../ -shared -Wl,-soname,edivstd.so -o $@ $< \ No newline at end of file diff --git a/ediv/src/dlls/edivstd/edivstd.c b/ediv/src/dlls/edivstd/edivstd.c new file mode 100644 index 0000000..e9178d8 --- /dev/null +++ b/ediv/src/dlls/edivstd/edivstd.c @@ -0,0 +1,227 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* EDIVSTD.DLL + * Esta librería contiene los datos más básicos que puede requerir un programa + * DIV, tal como las opciones de compilación, estructura reserved, etc. + */ + +#include +#include "../../shared/varindex.h" + +#include "main.h" + +int last_type ; +int last_proc ; + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ + + // CONSTANTES PREDEFINIDAS + + // Opciones de compilación + CONST("_max_process",0); + CONST("_extended_conditions",1); + CONST("_simple_conditions",2); + CONST("_case_sensitive",3); + CONST("_ignore_errors",4); + CONST("_free_sintax",5); + CONST("_no_check",6); + CONST("_no_strfix",7); + CONST("_no_optimization",8); + CONST("_no_range_check",9); + CONST("_no_id_check",10); + CONST("_no_null_check",11); + + // Indicadores de ventanas (cnumber) + CONST("c_0",1); + CONST("c_1",2); + CONST("c_2",4); + CONST("c_3",8); + CONST("c_4",16); + CONST("c_5",32); + CONST("c_6",64); + CONST("c_7",128); + CONST("c_8",256); + CONST("c_9",512); + + // True y false + CONST("true",1); + CONST("false",0); + + // Rango de INT + CONST("max_int",2147483647); + CONST("min_int",-2147483648); + + // Señales entre procesos + CONST("s_kill",0); + CONST("s_wakeup",1); + CONST("s_sleep",2); + CONST("s_freeze",3); + CONST("s_kill_tree",100); + CONST("s_wakeup_tree",101); + CONST("s_sleep_tree",102); + CONST("s_freeze_tree",103); + + + // DATOS GLOBALES PREDEFINIDOS + + // Contadores de tiempo + GLOBAL_ARRAY("timer",9); + + // Tiempo máximo de ejecución para un proceso + GLOBAL("max_process_time",500); + + // Argumentos de línea de comando + GLOBAL("argc",0); + GLOBAL_ARRAY("argv",9); + + + // DATOS LOCALES PREDEFINIDOS + + // Estructura reserved - POR HACER: ¿preservar compatibilidad con DIV? + LOCAL_STRUCT("reserved",0); + _INT("process_id",0); + _INT("id_scan",0); + _INT("process_type",0); // usado por VisualDIV ;) + _INT("type_scan",0); + _INT("status",2); + _INT("parameters",0); + _INT("param_offset",0); + _INT("program_index",0); + _INT("stack_pointer",0); + _INT("is_executed",0); + _INT("is_painted",0); + _INT("m8_object",-1); // usado por VPE en DIV2 + _INT("old_ctype",0); + _INT("frame_percent",0); + _INT("box_x0",0); + _INT("box_y0",0); + _INT("box_x1",0); + _INT("box_y1",0); + _INT("f_count",0); + _INT("caller_id",0); + END_STRUCT; + + // Jerarquía de procesos + LOCAL("father",0); + LOCAL("son",0); + LOCAL("smallbro",0); + LOCAL("bigbro",0); + + // Variables locales varias + LOCAL("priority",0); + LOCAL("ctype",0); + LOCAL("x",0); + LOCAL("y",0); + LOCAL("z",0); + LOCAL("graph",0); + LOCAL("size",0); + LOCAL("angle",0); + LOCAL("region",0); + LOCAL("file",0); + LOCAL("xgraph",0); + LOCAL("height",1); + LOCAL("cnumber",0); + LOCAL("resolution",0); + LOCAL("flags",0); + LOCAL("transparency",128) ; + + FUNCTION("get_id",1,eDiv_GetId) ; + FUNCTION("define_region",5,eDiv_DefineRegion) ; + + ENTRYPOINT( first_load ) ; + + // POR HACER: funciones signal, get_id, system, exit, ignore_error... + + return TRUE; +} + +int eDiv_GetId(FUNCTION_PARAMS) +{ + int i ,id1 ; + int a = getparm() ; + if ( last_type == a ) + i = last_proc+1 ; + else + i = 0 ; + last_type = a ; + for ( ; i < *fp->num_procs ; i++ ) + { + last_proc = i ; + id1 = fp->procs_s[ fp->proc_orden[ i ] ].id ; + //Si el proceso se corresponde con el type + if ( fp->mem[ id1 + fp->varindex[ _res_process_type ] ] == a ) + { + return ( fp->procs_s[ fp->proc_orden[ i ] ].id ) ; + } + } + last_proc = -1 ; + return 0 ; +} + +int eDiv_DefineRegion(FUNCTION_PARAMS) +{ + int n , x , y , w , h ; + h = getparm() ; + w = getparm() ; + y = getparm() ; + x = getparm() ; + n = getparm() ; + + if ( n > 31 || n < 1 ) + return -1 ; + + regions[n].x = x ; + regions[n].y = y ; + regions[n].w = w ; + regions[n].h = h ; + + + return 1 ; +} + + + + +//---------------------------- ENTRYPOINTS ----------------------------------------------- + + + +void first_load(FUNCTION_PARAMS) +{ + int i ; + + for ( i = 0 ; i < 32 ; i++ ) + { + regions[i].x = 0 ; + regions[i].y = 0 ; + regions[i].w = 0 ; + regions[i].h = 0 ; + } + + + fp->regions = regions ; + fp->existe.regions = 1 ; + + +} + + diff --git a/ediv/src/dlls/edivstd/edivstd.def b/ediv/src/dlls/edivstd/edivstd.def new file mode 100644 index 0000000..8c7cce4 --- /dev/null +++ b/ediv/src/dlls/edivstd/edivstd.def @@ -0,0 +1,3 @@ +LIBRARY edivstd +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/edivstd/edivstd.dsp b/ediv/src/dlls/edivstd/edivstd.dsp new file mode 100644 index 0000000..a3131ac --- /dev/null +++ b/ediv/src/dlls/edivstd/edivstd.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="edivstd" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=edivstd - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "edivstd.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "edivstd.mak" CFG="edivstd - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "edivstd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "edivstd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "edivstd - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 1 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\dll\edivstd.dll" + +!ELSEIF "$(CFG)" == "edivstd - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 1 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\dll\edivstd.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "edivstd - Win32 Release" +# Name "edivstd - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\edivstd.c +# End Source File +# Begin Source File + +SOURCE=.\edivstd.def +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\export.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ediv/src/dlls/edivstd/edivstd.dsw b/ediv/src/dlls/edivstd/edivstd.dsw new file mode 100644 index 0000000..4c220d3 --- /dev/null +++ b/ediv/src/dlls/edivstd/edivstd.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "edivstd"=.\edivstd.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ediv/src/dlls/edivstd/edivstd.plg b/ediv/src/dlls/edivstd/edivstd.plg new file mode 100644 index 0000000..84665ce --- /dev/null +++ b/ediv/src/dlls/edivstd/edivstd.plg @@ -0,0 +1,33 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: edivstd - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP1C9.tmp" with contents +[ +/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /Fp"Debug/edivstd.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\ediv\src\dlls\edivstd\edivstd.c" +] +Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP1C9.tmp" +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP1CA.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/edivstd.pdb" /debug /machine:I386 /def:".\edivstd.def" /out:"..\..\..\bin\dll\edivstd.dll" /implib:"Debug/edivstd.lib" /pdbtype:sept +.\Debug\edivstd.obj +] +Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP1CA.tmp" +

    Output Window

    +Compiling... +edivstd.c +d:\ediv\src\dlls\edivstd\edivstd.c(73) : warning C4146: unary minus operator applied to unsigned type, result still unsigned +Linking... + + + +

    Results

    +edivstd.dll - 0 error(s), 1 warning(s) +
    + + diff --git a/ediv/src/dlls/edivstd/edivstd.sln b/ediv/src/dlls/edivstd/edivstd.sln new file mode 100644 index 0000000..7180110 --- /dev/null +++ b/ediv/src/dlls/edivstd/edivstd.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "edivstd", "edivstd.vcproj", "{241E8C84-4593-4290-9D89-06BC64F00E38}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {241E8C84-4593-4290-9D89-06BC64F00E38}.Debug.ActiveCfg = Debug|Win32 + {241E8C84-4593-4290-9D89-06BC64F00E38}.Debug.Build.0 = Debug|Win32 + {241E8C84-4593-4290-9D89-06BC64F00E38}.Release.ActiveCfg = Release|Win32 + {241E8C84-4593-4290-9D89-06BC64F00E38}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/edivstd/edivstd.suo b/ediv/src/dlls/edivstd/edivstd.suo new file mode 100644 index 0000000..6133f27 Binary files /dev/null and b/ediv/src/dlls/edivstd/edivstd.suo differ diff --git a/ediv/src/dlls/edivstd/edivstd.vcproj b/ediv/src/dlls/edivstd/edivstd.vcproj new file mode 100644 index 0000000..cc08aa9 --- /dev/null +++ b/ediv/src/dlls/edivstd/edivstd.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/dlls/edivstd/edivstd.vcproj.vspscc b/ediv/src/dlls/edivstd/edivstd.vcproj.vspscc new file mode 100644 index 0000000..424d834 --- /dev/null +++ b/ediv/src/dlls/edivstd/edivstd.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:dlls\\edivstd" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/ediv/src/dlls/edivstd/main.h b/ediv/src/dlls/edivstd/main.h new file mode 100644 index 0000000..1c9368d --- /dev/null +++ b/ediv/src/dlls/edivstd/main.h @@ -0,0 +1,8 @@ + + + +struct _regions regions[32] ; + +// Prototipos +int eDiv_GetId(FUNCTION_PARAMS) ; +int eDiv_DefineRegion(FUNCTION_PARAMS) ; \ No newline at end of file diff --git a/ediv/src/dlls/export.h b/ediv/src/dlls/export.h new file mode 100644 index 0000000..b7cc7e9 --- /dev/null +++ b/ediv/src/dlls/export.h @@ -0,0 +1,341 @@ + +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* Este fichero es la cabecera para las DLL's de eDIV. + * Para saber cómo se utiliza, consulte el eDIV SDK de la documentación de eDIV + * ESTE FICHERO -NO- HA DE SER MODIFICADO PARA CREAR DLLs, TAN SÓLO POR + * DESARROLLADORES DE eDIV. EN CASO DE SER MODIFICADO, SE PERDERÁ LA + * COMPATIBILIDAD CON eDIV Y EL RESTO DE DLLs. + * En caso de encontrar cualquier bug o anomalía en este archivo, por favor + * notifíquelo a Sion Entertainment en bugs@edivcentral.com + */ + +#ifdef __cplusplus +extern "C" { +#endif + +// COMPATIBILIDAD WIN <-> LINUX + +#ifdef _WIN32 +//# define DllMain() WINAPI DllMain(HINSTANCE hInst, DWORD reason, LPVOID) +# include +#else + typedef enum { FALSE, TRUE } bool; +#endif + +#include + +// Funciones de exportación de datos +typedef int (TYPEOF_EDIV_Export)(char* cadena, int nparam, void* hfuncion); +typedef int (TYPEOF_EDIV_Export_Const)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Global)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Global_Tab)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Global_Struct)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Member_Int)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Member_Str)(char* cadena, int tamano); +typedef int (TYPEOF_EDIV_Export_Member_Tab)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_EndStruct)(); +typedef int (TYPEOF_EDIV_Export_Local)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Local_Tab)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Local_Struct)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Entrypoint)(int ep, void* hfuncion); +typedef int (TYPEOF_EDIV_Export_Priority)(int priority); + +// Call_Entrypoint +typedef int (TYPEOF_Call_Entrypoint)(int ep, ...); + +// Dibuja +typedef int (TYPEOF_Dibuja)(SDL_Surface *, SDL_Rect, SDL_Rect, int, int); + +// estilo BO2K, sólo para "defaultear" las funciones como NULL +/*extern TYPEOF_EDIV_Export *EDIV_Export; +extern TYPEOF_EDIV_Export_Const *EDIV_Export_Const; +extern TYPEOF_EDIV_Export_Global *EDIV_Export_Global; +extern TYPEOF_EDIV_Export_Global_Tab *EDIV_Export_Global_Tab; +extern TYPEOF_EDIV_Export_Global_Struct *EDIV_Export_Global_Struc; +extern TYPEOF_EDIV_Export_Member_Int *EDIV_Export_Member_Int; +extern TYPEOF_EDIV_Export_Member_Str *EDIV_Export_Member_Str; +extern TYPEOF_EDIV_Export_Member_Tab *EDIV_Export_Member_Tab; +extern TYPEOF_EDIV_Export_EndStruct *EDIV_Export_EndStruct; +extern TYPEOF_EDIV_Export_Local *EDIV_Export_Local; +extern TYPEOF_EDIV_Export_Local_Tab *EDIV_Export_Local_Tab; +extern TYPEOF_EDIV_Export_Local_Struct *EDIV_Export_Local_Struct; +extern TYPEOF_EDIV_Export_Entrypoint *EDIV_Export_Entrypoint; +extern TYPEOF_EDIV_Export_Priority *EDIV_Export_Priority;*/ + +/*TYPEOF_EDIV_Export *EDIV_Export =NULL; +TYPEOF_EDIV_Export_Const *EDIV_Export_Const =NULL; +TYPEOF_EDIV_Export_Global *EDIV_Export_Global =NULL; +TYPEOF_EDIV_Export_Global_Tab *EDIV_Export_Global_Tab =NULL; +TYPEOF_EDIV_Export_Global_Struct *EDIV_Export_Global_Struct=NULL; +TYPEOF_EDIV_Export_Member_Int *EDIV_Export_Member_Int =NULL; +TYPEOF_EDIV_Export_Member_Str *EDIV_Export_Member_Str =NULL; +TYPEOF_EDIV_Export_Member_Tab *EDIV_Export_Member_Tab =NULL; +TYPEOF_EDIV_Export_EndStruct *EDIV_Export_EndStruct =NULL; +TYPEOF_EDIV_Export_Local *EDIV_Export_Local =NULL; +TYPEOF_EDIV_Export_Local_Tab *EDIV_Export_Local_Tab =NULL; +TYPEOF_EDIV_Export_Local_Struct *EDIV_Export_Local_Struct =NULL; +TYPEOF_EDIV_Export_Entrypoint *EDIV_Export_Entrypoint =NULL; +TYPEOF_EDIV_Export_Priority *EDIV_Export_Priority =NULL;*/ + + +// EXPORTAFUNCS_PARAMS deben usarse como parámetros para ExportaFuncs +#define EXPORTAFUNCS_PARAMS \ +TYPEOF_EDIV_Export *EDIV_Export ,\ +TYPEOF_EDIV_Export_Const *EDIV_Export_Const ,\ +TYPEOF_EDIV_Export_Global *EDIV_Export_Global ,\ +TYPEOF_EDIV_Export_Global_Tab *EDIV_Export_Global_Tab ,\ +TYPEOF_EDIV_Export_Global_Struct *EDIV_Export_Global_Struct,\ +TYPEOF_EDIV_Export_Member_Int *EDIV_Export_Member_Int ,\ +TYPEOF_EDIV_Export_Member_Str *EDIV_Export_Member_Str ,\ +TYPEOF_EDIV_Export_Member_Tab *EDIV_Export_Member_Tab ,\ +TYPEOF_EDIV_Export_EndStruct *EDIV_Export_EndStruct ,\ +TYPEOF_EDIV_Export_Local *EDIV_Export_Local ,\ +TYPEOF_EDIV_Export_Local_Tab *EDIV_Export_Local_Tab ,\ +TYPEOF_EDIV_Export_Local_Struct *EDIV_Export_Local_Struct ,\ +TYPEOF_EDIV_Export_Entrypoint *EDIV_Export_Entrypoint ,\ +TYPEOF_EDIV_Export_Priority *EDIV_Export_Priority + + +///////////// +// ENTRY-POINTS +/////////// +// Estas funciones son llamadas por el STUB en determinados eventos +// (Cuando una DLL hace cierta acción, lo avisa al Stub y el stub se encarga de llamar +// a las correspondientes rutinas de las dll's, ordenadas por prioridad) +///////// + +// Constantes para EDIV_Export_Entrypoint + +#define EDIV_set_video_mode 1 // Al activar un nuevo modo de vídeo +#define EDIV_process_palette 2 // Al cargar una paleta +#define EDIV_process_active_palette 3 // Al modificar la paleta activa (usada en los fades) +#define EDIV_process_sound 4 // Al cargar un efecto sonoro +#define EDIV_process_map 5 // Al cargar un mapa +#define EDIV_process_fpg 6 // Al cargar un FPG +#define EDIV_process_fnt 7 // Al cargar una fuente +#define EDIV_background_to_buffer 8 // Volcar el fondo al buffer +#define EDIV_buffer_to_video 9 // Volcar el buffer a la memoria de video +#define EDIV_post_process_scroll 10 // Tras dibujar una ventana de scroll (sin los sprites) +#define EDIV_post_process_m7 11 // Tras dibujar una ventana de modo7 (sin los sprites) +#define EDIV_post_process_m8 12 // Tras dibujar una ventana de modo8 (sin los sprites) +#define EDIV_post_process_buffer 13 // Tras haber terminado de dibujarlo todo +#define EDIV_post_process 14 // Tras ejecutar el frame de un proceso (cualquier %) +#define EDIV_put_sprite 15 // Dibujar un sprite +#define EDIV_ss_init 16 // Inicio de salvapantallas +#define EDIV_ss_frame 17 // Frame de salvapantallas +#define EDIV_ss_end 18 // Fin de salvapantallas +#define EDIV_frame 19 // En cada frame +#define EDIV_trace 20 // Después de ejecutar cada instrucción de bytecode (solo en debug) +#define EDIV_debug 21 // Invocar al trazador - sentencia debug (solo en debug) +#define EDIV_first_load 22 // Se ejecuta al cargar la DLL en ejecucion + + +// Voy a poner unos #defines para que la declaración de datos sea un poco más BASIC... :p +#ifdef CONST +# undef CONST +#endif +#define FUNCTION EDIV_Export +#define CONST EDIV_Export_Const +#define GLOBAL EDIV_Export_Global +#define GLOBAL_ARRAY EDIV_Export_Global_Tab +#define GLOBAL_STRUCT EDIV_Export_Global_Struct +#define _INT EDIV_Export_Member_Int +#define _STRING EDIV_Export_Member_Str +#define _ARRAY EDIV_Export_Member_Tab +#define END_STRUCT EDIV_Export_EndStruct() +#define LOCAL EDIV_Export_Local +#define LOCAL_ARRAY EDIV_Export_Local_Tab +#define LOCAL_STRUCT EDIV_Export_Local_Struct +#define ENTRYPOINT(e) EDIV_Export_Entrypoint(EDIV_##e,e) +#define PRIORITY EDIV_Export_Priority + + +// FUNCTION_PARAMS deben usarse como parametros para TODAS las funciones +// ¡ojo! debe ser igual en extern.h +#define FUNCTION_PARAMS struct _fun_params *fp + + +//struct _procs_s &procs_s, \ + +struct _procs_s{ + int id ; // offset de los datos locales del proceso + int tipo ; // tipo de proceso + int orden ; // indice en proc_orden[] + int num_params ; // numero de parametros k coje ( NO SE PARA K SIRVE PERO PARA ALGO ESTARA CBP NO ? ) + int imem ; // Posicion en la k se quedo suspendido el proceso + int priority ; // Priority + int frame; // Frame completado + int graph ; +}; + +struct _regions +{ + int x , y , w , h ; +} ; + +struct _existe { + int regions ; + int dibuja ; +} ; +struct _file +{ + SDL_Surface *Surface ; + int existe ; + struct + { + int x , y ; + } cpoint[ 20 ] ; +} ; + +struct _files +{ + int num ; + int existe ; + struct _file *mapa ; +} ; + +struct _fun_params{ + int *pila ; + int *sp ; + int *mem ; + int *varindex ; + struct _procs_s *procs_s ; + int *num_procs ; + int *proc_orden ; + int *proceso_actual ; + struct _regions *regions ; + struct _existe existe ; + struct _files *files ; + TYPEOF_Dibuja *Dibuja ; // <- Tienes una funcion identica a esta variable (Daijo) <<- Y que? , la funcion no esta dentro de esta estructura :P (Riseven) + TYPEOF_Call_Entrypoint *Call_Entrypoint ; +} ; + + +// Se usa igual que el getparm() de DIV +#define getparm() fp->pila[(*fp->sp)--] +#define getstrparm() (char*)&fp->mem[fp->pila[(*fp->sp)--]] + +// Y esto por si los despistes xD +#define retval(a) return (a) + + +// Prototipos de los entrypoints + +void set_video_mode(void); +void process_palette(void); +void process_active_palette(void); +void process_sound(char *sound,int lenght); +void process_fpg(char *fpg,int fpg_lenght); +void process_map(char *map,int map_lenght); +void process_fnt(char *fnt,int fnt_lenght); +void background_to_buffer(void); +void buffer_to_video(void); +void post_process_scroll(void); +void post_process_m7(void); +void post_process_m8(void); +void post_process_buffer(void); +void post_process(void); +void put_sprite(unsigned char * si, int x,int y, int an, int al, int xg, int yg, + int ang, int size, int flags); +void ss_init(void); +void ss_frame(void); +void ss_end(void); +void frame(FUNCTION_PARAMS); +void trace(int imem, char* nombreprg, int* lin, void* dbg); +void debug(int imem, char* nombreprg, int* lin, void* dbg); +void first_load(FUNCTION_PARAMS) ; + +////////////////////////////// + + +//// VARIABLES INDEXADAS //// + +// copio y pasteo brutalmente, no pongo #include para que el export.h sea independiente +/* +#define var(a) mem[varindex[a]] + + +////////////////////////////// +/// GLOBALES /// +////////////////////////////// + +#define _glo_timer 0 +#define _glo_max_process_time 1 +#define _glo_argc 2 +#define _glo_argv 3 + + +////////////////////////////// +/// LOCALES /// +////////////////////////////// + +// Estructura reserved + +#define _res_process_id 4 +#define _res_id_scan 5 +#define _res_process_type 6 +#define _res_type_scan 7 +#define _res_status 8 +#define _res_parameters 9 +#define _res_param_offset 10 +#define _res_program_index 11 +#define _res_stack_pointer 12 +#define _res_is_executed 13 +#define _res_is_painted 14 +#define _res_m8_object 15 +#define _res_old_ctype 16 +#define _res_frame_percent 17 +#define _res_box_x0 18 +#define _res_box_y0 19 +#define _res_box_x1 20 +#define _res_box_y1 21 +#define _res_f_count 22 +#define _res_caller_id 23 + +// Jerarquía de procesos +#define _loc_father 24 +#define _loc_son 25 +#define _loc_smallbro 26 +#define _loc_bigbro 27 + +// Variables locales varias +#define _loc_priority 28 +#define _loc_ctype 29 +#define _loc_x 30 +#define _loc_y 31 +#define _loc_z 32 +#define _loc_graph 33 +#define _loc_size 34 +#define _loc_angle 35 +#define _loc_region 36 +#define _loc_file 37 +#define _loc_xgraph 38 +#define _loc_height 39 +#define _loc_cnumber 40 +#define _loc_resolution 41 +#define _loc_flags 42 +#define _loc_transparency 43 +*/ + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/ediv/src/dlls/file/file.c b/ediv/src/dlls/file/file.c new file mode 100644 index 0000000..f59204e --- /dev/null +++ b/ediv/src/dlls/file/file.c @@ -0,0 +1,153 @@ + +#include +#include +#include "../../shared/varindex.h" +#include "file.h" + + + + + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ + + CONST("seek_cur",SEEK_CUR) ; + CONST("seek_set",SEEK_SET) ; + CONST("seek_end",SEEK_END) ; + + FUNCTION("fopen",2,eDiv_Fopen) ; + FUNCTION("fwrite",3,eDiv_Fwrite) ; + FUNCTION("fread",3,eDiv_Fread) ; + FUNCTION("ftell",1,eDiv_Ftell) ; + FUNCTION("fseek",3,eDiv_Fseek) ; + FUNCTION("flush",0,eDiv_Flush) ; + FUNCTION("fclose",1,eDiv_Fclose) ; + return TRUE ; + +} + +FILE *fichero[0xFF] ; +int existe[0xFF] ; + +int eDiv_Fopen(FUNCTION_PARAMS) +{ + int i ; + char *filename ; + char *modo ; + + modo = getstrparm() ; + filename = getstrparm() ; + + for ( i = 1 ; i < 0xFF ; i++ ) + if ( existe[i] == 0 ) + break ; + if ( i == 0xFF ) + return 0 ; + + + fichero[i] = fopen( filename, modo ) ; + if ( fichero[i] == NULL ) + return 0 ; + + existe[i] = 1 ; + return i ; +} + +int eDiv_Fwrite(FUNCTION_PARAMS) +{ + int offset , longitud , handle ; + int escrito ; + handle = getparm() ; + longitud = getparm() ; + offset = getparm() ; + + if ( !existe[handle] ) + return 0 ; + + escrito = fwrite( &fp->mem[ offset ] , 4 , longitud , fichero[handle] ) ; + + if ( escrito == longitud ) + return 1 ; + else + return 0 ; +} + +int eDiv_Fread(FUNCTION_PARAMS) +{ + int offset, longitud , handle ; + int leido ; + handle = getparm() ; + longitud = getparm() ; + offset = getparm() ; + + if ( !existe[handle] ) + return 0 ; + + leido = fread( &fp->mem[ offset ] , 4 , longitud , fichero[handle] ) ; + + if ( leido == longitud ) + return 1 ; + else + return 0 ; +} + +int eDiv_Ftell(FUNCTION_PARAMS) +{ + int handle ; + + if ( !existe[handle] ) + return -1 ; + + return (int)ftell( fichero[handle] ) ; +} + +int eDiv_Fseek(FUNCTION_PARAMS) +{ + int handle , posicion, modo ; + modo = getparm() ; + posicion = getparm() ; + handle = getparm() ; + + if ( !existe[handle] ) + return -1 ; + + if ( fseek( fichero[handle] , posicion , modo ) == 0 ) + return 1 ; + else + return -2 ; + +} + + +int eDiv_Flush(FUNCTION_PARAMS) +{ + return _flushall() ; +} + +int eDiv_Fclose(FUNCTION_PARAMS) +{ + int handle, num ; + + if ( handle == 0 ) + if ( ( num = _fcloseall() ) == EOF ) + return 0 ; + else + return num ; + else + if ( !existe[handle] ) + return 0 ; + else + if ( ( num = fclose( fichero[handle] ) ) == EOF ) + return 0 ; + else + return num ; +} + + + +//============== Entrypoints ===================================================== + + + + + diff --git a/ediv/src/dlls/file/file.def b/ediv/src/dlls/file/file.def new file mode 100644 index 0000000..6972183 --- /dev/null +++ b/ediv/src/dlls/file/file.def @@ -0,0 +1,3 @@ +LIBRARY file +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/file/file.h b/ediv/src/dlls/file/file.h new file mode 100644 index 0000000..a5ee7eb --- /dev/null +++ b/ediv/src/dlls/file/file.h @@ -0,0 +1,8 @@ + +int eDiv_Fopen(FUNCTION_PARAMS) ; +int eDiv_Fwrite(FUNCTION_PARAMS) ; +int eDiv_Fread(FUNCTION_PARAMS) ; +int eDiv_Ftell(FUNCTION_PARAMS) ; +int eDiv_Fseek(FUNCTION_PARAMS) ; +int eDiv_Flush(FUNCTION_PARAMS) ; +int eDiv_Fclose(FUNCTION_PARAMS) ; \ No newline at end of file diff --git a/ediv/src/dlls/file/file.sln b/ediv/src/dlls/file/file.sln new file mode 100644 index 0000000..21571bd --- /dev/null +++ b/ediv/src/dlls/file/file.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text", "file.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/file/file.suo b/ediv/src/dlls/file/file.suo new file mode 100644 index 0000000..4be94a7 Binary files /dev/null and b/ediv/src/dlls/file/file.suo differ diff --git a/ediv/src/dlls/file/file.vcproj b/ediv/src/dlls/file/file.vcproj new file mode 100644 index 0000000..8918c12 --- /dev/null +++ b/ediv/src/dlls/file/file.vcproj @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/dlls/graphics/change.log b/ediv/src/dlls/graphics/change.log new file mode 100644 index 0000000..7dc8f91 --- /dev/null +++ b/ediv/src/dlls/graphics/change.log @@ -0,0 +1,10 @@ + ******************* + *eDIV GRAPHICS.DLL* + ******************* + +15-1-02 + +- Este es el primer CHANGE.LOG que ago pa esta dll. +- Estan todas las funciones menos la MAP_BLOCK_COPY +- El frame ya rula, y tb esta definido como un ENTRYPOINT +- Carga MAP y PCX, FPGS y sus respectivas paletas y los respectivos puntos de control de cada mapa :D diff --git a/ediv/src/dlls/graphics/dll.dsp b/ediv/src/dlls/graphics/dll.dsp new file mode 100644 index 0000000..c5d2ac3 --- /dev/null +++ b/ediv/src/dlls/graphics/dll.dsp @@ -0,0 +1,332 @@ +# Microsoft Developer Studio Project File - Name="DLL" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=DLL - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DLL.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DLL.mak" CFG="DLL - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DLL - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"C:\ROOT\CVS\ediv\bin\dll\video.dll" + +!ELSEIF "$(CFG)" == "DLL - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"C:\ROOT\CVS\ediv\bin\dll\video.dll" /pdbtype:sept +# SUBTRACT LINK32 /debug + +!ENDIF + +# Begin Target + +# Name "DLL - Win32 Release" +# Name "DLL - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\files.c +# End Source File +# Begin Source File + +SOURCE=.\g_blit.c +# End Source File +# Begin Source File + +SOURCE=.\g_draw.c +# End Source File +# Begin Source File + +SOURCE=.\g_flic.c +# End Source File +# Begin Source File + +SOURCE=.\g_main.c +# End Source File +# Begin Source File + +SOURCE=.\g_maps.c +# End Source File +# Begin Source File + +SOURCE=.\g_pal.c +# End Source File +# Begin Source File + +SOURCE=.\graphics.def +# End Source File +# Begin Source File + +SOURCE=.\img_pcx.c +# End Source File +# Begin Source File + +SOURCE=.\img_png.c +# End Source File +# Begin Source File + +SOURCE=.\main.c +# End Source File +# Begin Source File + +SOURCE=.\xctype.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\export.h +# End Source File +# Begin Source File + +SOURCE=.\files.h +# End Source File +# Begin Source File + +SOURCE=.\flic.h +# End Source File +# Begin Source File + +SOURCE=.\fmath.h +# End Source File +# Begin Source File + +SOURCE=.\fxi.h +# End Source File +# Begin Source File + +SOURCE=.\graphics.h +# End Source File +# Begin Source File + +SOURCE=.\grlib.h +# End Source File +# Begin Source File + +SOURCE=.\offsets.h +# End Source File +# Begin Source File + +SOURCE=.\xctype.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Group "zlib" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\zlib\adler32.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\compress.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\crc32.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\deflate.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\gzio.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\infblock.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\infcodes.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\inffast.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\inflate.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\inftrees.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\infutil.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\trees.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\uncompr.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\zutil.c +# End Source File +# End Group +# Begin Group "libpng" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\libpng\png.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngerror.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pnggccrd.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngget.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngmem.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngpread.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngread.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngrio.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngrtran.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngrutil.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngset.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngtrans.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngvcrd.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngwio.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngwrite.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngwtran.c +# End Source File +# Begin Source File + +SOURCE=.\libpng\pngwutil.c +# End Source File +# End Group +# Begin Group "sdl" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\sdl\lib\SDL.lib +# End Source File +# Begin Source File + +SOURCE=.\sdl\lib\SDLmain.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/ediv/src/dlls/graphics/dll.plg b/ediv/src/dlls/graphics/dll.plg new file mode 100644 index 0000000..b92966d --- /dev/null +++ b/ediv/src/dlls/graphics/dll.plg @@ -0,0 +1,100 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: DLL - Win32 Release-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\RooT\CONFIG~1\Temp\RSP8D.tmp" with contents +[ +/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /Fp"Release/DLL.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +"C:\ROOT\SION\GDLL\DLL\g_blit.c" +"C:\ROOT\SION\GDLL\DLL\g_main.c" +"C:\ROOT\SION\GDLL\DLL\main.c" +] +Creating command line "cl.exe @C:\DOCUME~1\RooT\CONFIG~1\Temp\RSP8D.tmp" +Creating temporary file "C:\DOCUME~1\RooT\CONFIG~1\Temp\RSP8E.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/video.pdb" /machine:I386 /def:".\graphics.def" /out:"C:\ROOT\CVS\ediv\bin\dll\video.dll" /implib:"Release/video.lib" +.\Release\files.obj +.\Release\g_blit.obj +.\Release\g_draw.obj +.\Release\g_flic.obj +.\Release\g_main.obj +.\Release\g_maps.obj +.\Release\g_pal.obj +.\Release\img_pcx.obj +.\Release\img_png.obj +.\Release\main.obj +.\Release\xctype.obj +.\Release\adler32.obj +.\Release\compress.obj +.\Release\crc32.obj +.\Release\deflate.obj +.\Release\gzio.obj +.\Release\infblock.obj +.\Release\infcodes.obj +.\Release\inffast.obj +.\Release\inflate.obj +.\Release\inftrees.obj +.\Release\infutil.obj +.\Release\trees.obj +.\Release\uncompr.obj +.\Release\zutil.obj +.\Release\png.obj +.\Release\pngerror.obj +.\Release\pnggccrd.obj +.\Release\pngget.obj +.\Release\pngmem.obj +.\Release\pngpread.obj +.\Release\pngread.obj +.\Release\pngrio.obj +.\Release\pngrtran.obj +.\Release\pngrutil.obj +.\Release\pngset.obj +.\Release\pngtrans.obj +.\Release\pngvcrd.obj +.\Release\pngwio.obj +.\Release\pngwrite.obj +.\Release\pngwtran.obj +.\Release\pngwutil.obj +.\sdl\lib\SDL.lib +.\sdl\lib\SDLmain.lib +] +Creating command line "link.exe @C:\DOCUME~1\RooT\CONFIG~1\Temp\RSP8E.tmp" +

    Output Window

    +Compiling... +g_blit.c +C:\ROOT\SION\GDLL\DLL\g_blit.c(463) : warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data +C:\ROOT\SION\GDLL\DLL\g_blit.c(485) : warning C4101: 'orig16' : unreferenced local variable +C:\ROOT\SION\GDLL\DLL\g_blit.c(485) : warning C4101: 'ptr16' : unreferenced local variable +C:\ROOT\SION\GDLL\DLL\g_blit.c(485) : warning C4101: 'base16' : unreferenced local variable +C:\ROOT\SION\GDLL\DLL\g_blit.c(474) : warning C4101: 'cx' : unreferenced local variable +C:\ROOT\SION\GDLL\DLL\g_blit.c(485) : warning C4101: 'c16' : unreferenced local variable +g_main.c +C:\ROOT\SION\GDLL\DLL\g_blit.c(681) : warning C4700: local variable 'orig' used without having been initialized +C:\ROOT\SION\GDLL\DLL\g_main.c(72) : warning C4101: 'lptr' : unreferenced local variable +C:\ROOT\SION\GDLL\DLL\g_main.c(71) : warning C4101: 'n' : unreferenced local variable +C:\ROOT\SION\GDLL\DLL\g_main.c(155) : warning C4013: 'free' undefined; assuming extern returning int +C:\ROOT\SION\GDLL\DLL\g_main.c(336) : warning C4098: 'gr_init' : 'void' function returning a value +main.c +C:\ROOT\SION\GDLL\DLL\offsets.h(96) : warning C4005: 'PRIORITY' : macro redefinition + C:\ROOT\SION\GDLL\DLL\export.h(190) : see previous definition of 'PRIORITY' +C:\ROOT\SION\GDLL\DLL\main.c(129) : warning C4013: 'gr_blit' undefined; assuming extern returning int +C:\ROOT\SION\GDLL\DLL\main.c(280) : warning C4013: 'gr_rotated_blit' undefined; assuming extern returning int +C:\ROOT\SION\GDLL\DLL\main.c(393) : warning C4047: 'initializing' : 'const char *' differs in levels of indirection from 'const int ' +C:\ROOT\SION\GDLL\DLL\main.c(406) : warning C4047: 'function' : 'struct _grlib *' differs in levels of indirection from 'const int ' +C:\ROOT\SION\GDLL\DLL\main.c(406) : warning C4024: 'grlib_unload_map' : different types for formal and actual parameter 1 +C:\ROOT\SION\GDLL\DLL\main.c(79) : warning C4716: 'eDIV_PRINTF' : must return a value +Linking... + Creating library Release/video.lib and object Release/video.exp +video.exp : warning LNK4070: /OUT:graphics.dll directive in .EXP differs from output filename "C:\ROOT\CVS\ediv\bin\dll\video.dll"; ignoring directive + + + +

    Results

    +VIDEO.DLL - 0 error(s), 19 warning(s) +
    + + diff --git a/ediv/src/dlls/graphics/export.h.antiguo b/ediv/src/dlls/graphics/export.h.antiguo new file mode 100644 index 0000000..ae0f4a8 --- /dev/null +++ b/ediv/src/dlls/graphics/export.h.antiguo @@ -0,0 +1,122 @@ +/* + * eDiv Compiler + * Copyright (C) 2001 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* Este fichero es la cabecera para las DLL's de eDIV. + * Para saber cómo se utiliza, consulte el eDIV SDK de la documentación de eDIV + * ESTE FICHERO -NO- HA DE SER MODIFICADO PARA CREAR DLLs, TAN SÓLO POR + * DESARROLLADORES DE eDIV. EN CASO DE SER MODIFICADO, SE PERDERÁ LA + * COMPATIBILIDAD CON eDIV Y EL RESTO DE DLLs. + * En caso de encontrar cualquier bug o anomalía en este archivo, por favor + * notifíquelo a Sion Entertainment en bugs@edivcentral.com + */ + +// COMPATIBILIDAD WIN <-> LINUX + +#ifdef WIN32 +# define DllMain() WINAPI DllMain(HINSTANCE hInst, DWORD reason, LPVOID) +# include +#else + typedef enum { FALSE, TRUE } bool; +#endif + +// Funciones de exportación de datos +typedef int (TYPEOF_EDIV_Export)(char* cadena, int nparam, void* hfuncion); +typedef int (TYPEOF_EDIV_Export_Const)(char* cadena, int valor); +typedef int* (TYPEOF_EDIV_Export_Global)(char* cadena, int valor); +typedef int* (TYPEOF_EDIV_Export_Global_Tab)(char* cadena, int numregs); +typedef void* (TYPEOF_EDIV_Export_Global_Struct)(char* cadena, int numregs); +typedef int* (TYPEOF_EDIV_Export_Member_Int)(char* cadena, int valor); +typedef char* (TYPEOF_EDIV_Export_Member_Str)(char* cadena, int tamano); +typedef int* (TYPEOF_EDIV_Export_Member_Tab)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_EndStruct)(); +typedef int (TYPEOF_EDIV_Export_Local)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Local_Tab)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Local_Struct)(char* cadena, int numregs); + +// estilo BO2K, sólo para "defaultear" las funciones como NULL +/*extern TYPEOF_EDIV_Export *EDIV_Export; +extern TYPEOF_EDIV_Export_Const *EDIV_Export_Const; +extern TYPEOF_EDIV_Export_Global *EDIV_Export_Global; +extern TYPEOF_EDIV_Export_Global_Tab *EDIV_Export_Global_Tab; +extern TYPEOF_EDIV_Export_Global_Struct *EDIV_Export_Global_Struc; +extern TYPEOF_EDIV_Export_Member_Int *EDIV_Export_Member_Int; +extern TYPEOF_EDIV_Export_Member_Str *EDIV_Export_Member_Str; +extern TYPEOF_EDIV_Export_Member_Tab *EDIV_Export_Member_Tab; +extern TYPEOF_EDIV_Export_EndStruct *EDIV_Export_EndStruct; +extern TYPEOF_EDIV_Export_Local *EDIV_Export_Local; +extern TYPEOF_EDIV_Export_Local_Tab *EDIV_Export_Local_Tab; +extern TYPEOF_EDIV_Export_Local_Struct *EDIV_Export_Local_Struct;*/ + +/*TYPEOF_EDIV_Export *EDIV_Export =NULL; +TYPEOF_EDIV_Export_Const *EDIV_Export_Const =NULL; +TYPEOF_EDIV_Export_Global *EDIV_Export_Global =NULL; +TYPEOF_EDIV_Export_Global_Tab *EDIV_Export_Global_Tab =NULL; +TYPEOF_EDIV_Export_Global_Struct *EDIV_Export_Global_Struct=NULL; +TYPEOF_EDIV_Export_Member_Int *EDIV_Export_Member_Int =NULL; +TYPEOF_EDIV_Export_Member_Str *EDIV_Export_Member_Str =NULL; +TYPEOF_EDIV_Export_Member_Tab *EDIV_Export_Member_Tab =NULL; +TYPEOF_EDIV_Export_EndStruct *EDIV_Export_EndStruct =NULL; +TYPEOF_EDIV_Export_Local *EDIV_Export_Local =NULL; +TYPEOF_EDIV_Export_Local_Tab *EDIV_Export_Local_Tab =NULL; +TYPEOF_EDIV_Export_Local_Struct *EDIV_Export_Local_Struct =NULL;*/ + + +// EXPORTAFUNCS_PARAMS deben usarse como parßmetros para ExportaFuncs +#define EXPORTAFUNCS_PARAMS \ +TYPEOF_EDIV_Export *EDIV_Export ,\ +TYPEOF_EDIV_Export_Const *EDIV_Export_Const ,\ +TYPEOF_EDIV_Export_Global *EDIV_Export_Global ,\ +TYPEOF_EDIV_Export_Global_Tab *EDIV_Export_Global_Tab ,\ +TYPEOF_EDIV_Export_Global_Struct *EDIV_Export_Global_Struct,\ +TYPEOF_EDIV_Export_Member_Int *EDIV_Export_Member_Int ,\ +TYPEOF_EDIV_Export_Member_Str *EDIV_Export_Member_Str ,\ +TYPEOF_EDIV_Export_Member_Tab *EDIV_Export_Member_Tab ,\ +TYPEOF_EDIV_Export_EndStruct *EDIV_Export_EndStruct ,\ +TYPEOF_EDIV_Export_Local *EDIV_Export_Local ,\ +TYPEOF_EDIV_Export_Local_Tab *EDIV_Export_Local_Tab ,\ +TYPEOF_EDIV_Export_Local_Struct *EDIV_Export_Local_Struct + + +// Voy a poner unos #defines para que la declaración de datos sea un poco más BASIC... :p +#ifdef CONST +# undef CONST +#endif +#define FUNCTION EDIV_Export +#define CONST EDIV_Export_Const +#define GLOBAL EDIV_Export_Global +#define GLOBAL_ARRAY EDIV_Export_Global_Tab +#define GLOBAL_STRUCT EDIV_Export_Global_Struct +#define _INT EDIV_Export_Member_Int +#define _STRING EDIV_Export_Member_Str +#define _ARRAY EDIV_Export_Member_Tab +#define END_STRUCT EDIV_Export_EndStruct() +#define LOCAL EDIV_Export_Local +#define LOCAL_ARRAY EDIV_Export_Local_Tab +#define LOCAL_STRUCT EDIV_Export_Local_Struct + + +// FUNCTION_PARAMS deben usarse como parametros para TODAS las funciones +#define FUNCTION_PARAMS int *params, int sp + +// Se usa igual que el getparm() de DIV +#define getparm() params[--sp] + +// Y esto por si los despistes xD +#define retval(a) return (a) diff --git a/ediv/src/dlls/graphics/files.c b/ediv/src/dlls/graphics/files.c new file mode 100644 index 0000000..f2128d4 --- /dev/null +++ b/ediv/src/dlls/graphics/files.c @@ -0,0 +1,470 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 "files.h" + +char * possible_paths[32] = +{ + "", + 0 +} ; + +#define MAX_X_FILES 256 + +typedef struct +{ + char name[40] ; + int offset ; + long pos ; + int size ; + int eof ; + FILE * fp ; +} +XFILE ; + +XFILE x_file[MAX_X_FILES] ; + +int x_files_count = 0 ; + +/* Añade un nuevo archivo al PATH */ + +void file_add_xfile (file * fp, long offset, char * name, int size) +{ + assert (x_files_count < MAX_X_FILES) ; + assert (fp->type == F_FILE) ; + + x_file[x_files_count].fp = fp->fp ; + x_file[x_files_count].offset = offset ; + x_file[x_files_count].size = size ; + x_file[x_files_count].pos = offset ; + x_file[x_files_count].eof = 0 ; + strncpy (x_file[x_files_count].name, name, 39) ; + x_file[x_files_count].name[39] = 0 ; + + x_files_count++ ; +} + +/* Lee un bloque de datos del fichero */ + + +int file_read (file * fp, void * buffer, int len) +{ + assert (len != 0); + + if (fp->type == F_XFILE) + { + XFILE * xf ; + int result ; + + xf = &x_file[fp->n] ; + + if (len + xf->pos > xf->offset + xf->size) + { + xf->eof = 1 ; + len = xf->size + xf->offset - xf->pos ; + } + fseek (xf->fp, xf->pos, SEEK_SET) ; + result = fread (buffer, 1, len, xf->fp) ; + xf->pos = ftell (xf->fp) ; + return result ; + } + if (fp->type == F_GZFILE) + { + int result = gzread (fp->gz, buffer, len) ; + if ((fp->error = result < 0) != 0) + result = 0 ; + return result ; + } + + return fread (buffer, 1, len, fp->fp) ; +} + +/* Guarda una cadena "cuoteada" al disco */ + +int file_puts (file * fp, const char * buffer) +{ + char dest[1024], * optr ; + const char * ptr ; + + ptr = buffer ; + optr = dest ; + while (*ptr) + { + if (optr > dest+1000) + { + *optr++ = '\\' ; + *optr++ = '\n' ; + *optr = 0 ; + file_write (fp, dest, optr-dest) ; + optr = dest ; + } + if (*ptr == '\n') + { + *optr++ = '\\' ; + *optr++ = 'n' ; + ptr++ ; + continue ; + } + if (*ptr == '\\') + { + *optr++ = '\\' ; + *optr++ = *ptr++ ; + continue ; + } + *optr++ = *ptr++ ; + } + *optr++ = '\n' ; + return file_write (fp, dest, optr-dest) ; +} + +/* Recupera una cadena de un fichero y la "descuotea" */ + +int file_gets (file * fp, char * buffer, int len) +{ + char * ptr, * result ; + + if (fp->type == F_XFILE) + { + XFILE * xf ; + int l = 0, result = 0 ; + char * ptr = buffer ; + + xf = &x_file[fp->n] ; + + fseek (xf->fp, xf->pos, SEEK_SET) ; + while (l < len) + { + if (xf->pos >= xf->offset + xf->size) + { + xf->eof = 1 ; + break ; + } + fread (ptr, 1, 1, xf->fp) ; + result++ ; + xf->pos++ ; + if (*ptr++ == '\n') + break ; + } + *ptr = 0 ; + xf->pos = ftell(xf->fp) ; + } + else if (fp->type == F_GZFILE) + { + result = gzgets (fp->gz, buffer, len) ; + } + else + { + result = fgets(buffer, len, fp->fp); + } + + if (result == 0) { buffer[0] = 0 ; return 0 ; } + + ptr = buffer ; + while (*ptr) + { + if (*ptr == '\\') + { + if (ptr[1] == 'n') ptr[1] = '\n' ; + strcpy (ptr, ptr+1) ; + ptr++ ; + continue ; + } + if (*ptr == '\n') + { + *ptr = 0 ; + break ; + } + ptr++ ; + } + return strlen(buffer) ; +} + +/* Escribe un bloque de datos en el fichero */ + +int file_write (file * fp, void * buffer, int len) +{ + if (fp->type == F_XFILE) + { + XFILE * xf ; + int result ; + + xf = &x_file[fp->n] ; + + if (len + xf->pos > xf->offset + xf->size) + { + xf->eof = 1 ; + len = xf->size + xf->offset - xf->pos ; + } + fseek (xf->fp, xf->pos, SEEK_SET) ; + result = fwrite (buffer, 1, len, xf->fp) ; + xf->pos = ftell (xf->fp) ; + return result ; + } + if (fp->type == F_GZFILE) + { + int result = gzwrite (fp->gz, buffer, len) ; + if ((fp->error = result < 0) != 0) + result = 0 ; + return result < len ? 0 : 1 ; + } + + + return fwrite (buffer, 1, len, fp->fp) ; +} + +/* Devuelve el tamaño de un fichero */ + +int file_size (file * fp) +{ + long pos, size ; + + if (fp->type == F_XFILE) + return x_file[fp->n].size ; + if (fp->type == F_GZFILE) + { + fprintf (stderr, "file_size: inválida en ficheros comprimidos\n") ; + return 0 ; + } + + pos = ftell(fp->fp) ; + fseek (fp->fp, 0, SEEK_END) ; + size = ftell(fp->fp) ; + fseek (fp->fp, pos, SEEK_SET) ; + return size ; +} + +/* Devuelve la posición actual de un fichero */ + +int file_pos (file * fp) +{ + if (fp->type == F_XFILE) + return x_file[fp->n].pos - x_file[fp->n].offset ; + if (fp->type == F_GZFILE) + return gztell(fp->gz) ; + + return ftell (fp->fp) ; +} + +/* Posiciona el puntero de lectura/escritura dentro de un fichero */ + +int file_seek (file * fp, int pos, int where) +{ + assert(fp); + if (fp->type == F_XFILE) + { + if (where == SEEK_END) + pos = x_file[fp->n].size - pos + 1 ; + else if (where == SEEK_CUR) + pos += x_file[fp->n].pos - x_file[fp->n].offset ; + + if (x_file[fp->n].size < pos) + pos = x_file[fp->n].size ; + if (pos < 0) pos = 0 ; + + x_file[fp->n].pos = pos + x_file[fp->n].offset ; + return x_file[fp->n].pos - x_file[fp->n].offset ; + } + if (fp->type == F_GZFILE) + { + assert(fp->gz); + return gzseek (fp->gz, pos, where) ; + } + + assert(fp->fp); + return fseek (fp->fp, pos, where) ; +} + +/* Abre un fichero */ + +static int open_raw (file * f, const char * filename, const char * mode) +{ + if (!strchr(mode,'0')) + { + f->type = F_GZFILE ; + f->gz = gzopen (filename, mode) ; + if (f->gz) return 1 ; + } + f->type = F_FILE ; + f->fp = fopen (filename, mode) ; + if (f->fp) return 1 ; + return 0 ; +} + +file * file_open (const char * filename, char * mode) +{ + char name [256] ; + char path [256] ; + char here [256] ; + + const char * c, * n ; + int i ; +#ifdef TARGET_linux + int j ; +#endif + + file * f ; + + f = (file *) malloc(sizeof(file)) ; + assert (f) ; + memset (f, 0, sizeof(f)) ; + + c = filename ; + for (n = c+strlen(c) ; n >= c ; n--) + { + if (*n == '/' || *n == '\\') + { + c = n+1 ; + break ; + } + } + strcpy (name, c) ; + strcpy (path, filename) ; + path[c-filename] = 0 ; +#ifdef TARGET_linux + for (j = 0 ; path[j] ; j++) + if (path[j] == '\\') path[j] = '/' ; +#endif + + if (strchr(mode,'r') && strchr(mode,'b')) + for (i = 0 ; i < x_files_count ; i++) + { + if (strcmp(name, x_file[i].name) == 0) + { + x_file[i].pos = x_file[i].offset ; + f->type = F_XFILE ; + f->n = i ; + return f ; + } + } + + strcpy (here, path) ; + strcat (here, name) ; + if (open_raw (f, here, mode)) return f ; + + /* Busca por el directorio de la extensión (directorio FPG para FPG) */ + if (strchr(name,'.')) + { + strcpy (here, strchr(name,'.') + 1) ; +#ifdef TARGET_linux + strcat (here, "/") ; +#else + strcat (here, "\\") ; +#endif + strcat (here, path) ; + strcat (here, name) ; + if (open_raw (f, here, mode)) return f ; + } + + for (i = 0 ; possible_paths[i] ; i++) + { + strcpy (here, possible_paths[i]) ; + strcat (here, name) ; +#ifdef TARGET_linux + for (j = 0 ; here[j] ; j++) + if (here[j] == '\\') here[j] = '/' ; +#endif + if (open_raw (f, here, mode)) return f ; + } + + free (f) ; + return 0 ; +} + +/* Cierra un fichero */ + +void file_close (file * fp) +{ + if (fp->type == F_XFILE) + x_file[fp->n].pos = x_file[fp->n].offset ; + if (fp->type == F_FILE) + fclose(fp->fp) ; + if (fp->type == F_GZFILE) + gzclose(fp->gz) ; + free(fp) ; +} + +/* Añade un nuevo directorio al PATH */ + +void file_addp (const char * path) +{ + char truepath[256]; + int n ; + + strcpy (truepath, path) ; + for (n = 0 ; truepath[n] ; n++) + if (truepath[n] == '/') + truepath[n] = '\\' ; + if (truepath[strlen(truepath)-1] != '\\') + strcat (truepath, "\\") ; + + for (n = 0 ; n < 31 && possible_paths[n] ; n++) ; + + //possible_paths[n] = strdup (truepath) ; + possible_paths[n+1] = 0 ; +} + +/* Devuelve cierto si existe el fichero */ + +int file_exists (char * filename) +{ + file * fp ; + + fp = file_open (filename, "rb") ; + if (fp) + { + file_close (fp) ; + return 1 ; + } + return 0 ; +} + +/* Devuelve cierto si se leyó más allá del fin del fichero */ + +int file_eof (file * fp) +{ + if (fp->type == F_XFILE) + { + XFILE * f = &x_file[fp->n] ; + return f->eof ; + } + if (fp->type == F_GZFILE) + { + if (fp->error) return 1 ; + return gzeof(fp->gz) ; + } + + return feof(fp->fp) ; +} + +/* Devuelve el FILE * correspondiente al fichero */ + +FILE * file_fp (file * f) +{ + if (f->type == F_XFILE) + { + XFILE * xf = &x_file[f->n] ; + fseek (xf->fp, xf->pos, SEEK_SET) ; + return xf->fp ; + } + return f->fp ; +} diff --git a/ediv/src/dlls/graphics/files.h b/ediv/src/dlls/graphics/files.h new file mode 100644 index 0000000..870bf52 --- /dev/null +++ b/ediv/src/dlls/graphics/files.h @@ -0,0 +1,60 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 + */ + +#ifndef __FILES_H +#define __FILES_H + +/* Funciones de acceso a ficheros */ +/* ------------------------------ */ + + /* Ahora mismo son casi wrappers de stdio.h, pero en el futuro + * el tipo "file" puede ser una estructura y las funciones, + * ofrecer soporte transparente para ficheros PAK, etc. */ + +#define F_XFILE 1 +#define F_FILE 2 +#define F_GZFILE 3 + +#include + +typedef struct +{ + int type ; + FILE * fp ; + gzFile gz ; + int n ; + int error ; +} +file ; + +extern file * file_open (const char * filename, char * mode) ; +extern int file_read (file * fp, void * buffer, int len) ; +extern int file_write (file * fp, void * buffer, int len) ; +extern int file_gets (file * fp, char * buffer, int len) ; +extern int file_puts (file * fp, const char * buffer) ; +extern int file_size (file * fp) ; +extern int file_pos (file * fp) ; +extern int file_seek (file * fp, int pos, int where) ; +extern void file_addp (const char * path) ; +extern void file_close (file * fp) ; +extern int file_exists (char * filename) ; +extern void file_add_xfile (file * fp, long offset, char * name, int size) ; +extern int file_eof (file * fp) ; +extern FILE * file_fp (file * fp) ; + +#endif diff --git a/ediv/src/dlls/graphics/flic.h b/ediv/src/dlls/graphics/flic.h new file mode 100644 index 0000000..404c3c5 --- /dev/null +++ b/ediv/src/dlls/graphics/flic.h @@ -0,0 +1,138 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 + */ + +#ifndef __FLIC_H +#define __FLIC_H + +#include + +#ifndef __GNUC__ +#define __PACKED +#define inline __inline +#else +#define __PACKED __attribute__ ((packed)) +#endif +/* Reproducción de FLI */ +/* ------------------- */ + +typedef struct { + Uint32 size; /* Size of FLIC including this header */ + Uint16 type; /* File type 0xAF11, 0xAF12, 0xAF30, 0xAF44, ... */ + Uint16 frames; /* Number of frames in first segment */ + Uint16 width; /* FLIC width in pixels */ + Uint16 height; /* FLIC height in pixels */ + Uint16 depth; /* Bits per pixel (usually 8) */ + Uint16 flags; /* Set to zero or to three */ + Uint32 speed; /* Delay between frames */ + Uint16 reserved1; /* Set to zero */ + Uint32 created; /* Date of FLIC creation (FLC only) */ + Uint32 creator; /* Serial number or compiler id (FLC only) */ + Uint32 updated; /* Date of FLIC update (FLC only) */ + Uint32 updater; /* Serial number (FLC only), see creator */ + Uint16 aspect_dx; /* Width of square rectangle (FLC only) */ + Uint16 aspect_dy; /* Height of square rectangle (FLC only) */ + Uint16 ext_flags; /* EGI: flags for specific EGI extensions */ + Uint16 keyframes; /* EGI: key-image frequency */ + Uint16 totalframes; /* EGI: total number of frames (segments) */ + Uint32 req_memory; /* EGI: maximum chunk size (uncompressed) */ + Uint16 max_regions; /* EGI: max. number of regions in a CHK_REGION chunk */ + Uint16 transp_num; /* EGI: number of transparent levels */ + Uint8 reserved2[24]; /* Set to zero */ + Uint32 oframe1; /* Offset to frame 1 (FLC only) */ + Uint32 oframe2; /* Offset to frame 2 (FLC only) */ + Uint8 reserved3[40]; /* Set to zero */ +} +__PACKED +FLIC_HEADER; + +typedef union +{ + struct { + Uint32 size; /* Size of the chunk */ + Uint16 type; /* Chunk type */ + } + header ; + + struct { + Uint32 size; /* Size of the chunk */ + Uint16 type; /* Chunk type: 12 */ + Uint16 first_line; /* First line */ + Uint16 line_count; /* Number of lines in the chunk */ + Uint8 data[0]; + } + delta_fli ; + + struct { + Uint32 size; /* Size of the chunk */ + Uint16 type; /* Chunk type: 15, 12, etc. */ + Uint8 data[0]; + } + raw ; +} +FLIC_CHUNK ; + +typedef struct +{ + Uint32 size; /* Size of the frame, including subchunks */ + Uint16 type; /* Chunk type: 0xF1FA */ + Uint16 chunks; /* Number of subchunks */ + Uint8 expand[8]; +} +FLIC_FRAME ; + +typedef struct +{ + FLIC_HEADER header ; + FLIC_CHUNK * chunk ; + FLIC_FRAME * frame ; + Uint32 frame_reserved ; + + GRAPH * bitmap ; + + file * fp ; + + int current_frame ; + int speed_ms ; + int last_frame_ms ; + int finished ; +} +FLIC ; + +/* Tipos de chunk */ + +#define CHUNK_COLOR_256 4 +#define CHUNK_COLOR_64 11 +#define CHUNK_DELTA_FLI 12 +#define CHUNK_DELTA_FLC 7 +#define CHUNK_BLACK 13 +#define CHUNK_BYTE_RUN 15 +#define CHUNK_FLI_COPY 16 +#define CHUNK_STAMP 18 +#define CHUNK_PREFIX 0xF100 +#define CHUNK_FRAME 0xF1FA + +extern FLIC * flic_open (const char * filename) ; +extern void flic_destroy (FLIC * flic) ; +extern FLIC * flic_do_frame (FLIC * flic) ; +extern void flic_reset (FLIC * flic) ; + +extern FLIC * current_fli ; +extern int current_fli_x ; +extern int current_fli_y ; + +#endif diff --git a/ediv/src/dlls/graphics/fmath.h b/ediv/src/dlls/graphics/fmath.h new file mode 100644 index 0000000..1f064c2 --- /dev/null +++ b/ediv/src/dlls/graphics/fmath.h @@ -0,0 +1,84 @@ + +/* Rutinas matemáticas de punto fijo, basadas en Allegro */ + +typedef long int fixed ; + +extern fixed cos_table[90001] ; +extern int cos_table_initialized ; +extern void init_cos_tables() ; + + +#ifndef __GNUC__ + +#define inline __inline + +#endif + + +#ifdef DEBUG +# define __INLINE static +#else +# define __INLINE static inline +#endif + +#define FIXED_PREC 12 + +__INLINE fixed ftofix(double x) +{ + if (x > (1 << (31-FIXED_PREC))) { + return 0x7FFFFFFF; + } + + if (x < -(1 << (31-FIXED_PREC))) { + return -(int)0x7FFFFFFF; + } + + return (long)(x * (1 << FIXED_PREC) + (x < 0 ? -0.5 : 0.5)); +} + +__INLINE float fixtof (fixed x) +{ + return (float)x / (1 << FIXED_PREC) ; +} + +__INLINE fixed itofix(int x) +{ + return x << FIXED_PREC ; +} + +__INLINE int fixtoi(fixed x) +{ + return (x >> FIXED_PREC) ; +} + +__INLINE fixed fcos(int x) +{ + if (x < 0) x = -x ; + if (x > 360000) x %= 360000 ; + + if (x > 270000) return cos_table[360000 - x] ; + if (x > 180000) return -cos_table[x - 180000] ; + if (x > 90000) return -cos_table[180000 - x] ; + return cos_table[x] ; +} + +__INLINE fixed fsin(int x) +{ + if (x < 0) return -fsin(-x) ; + if (x > 360000) x %= 360000 ; + if (x > 270000) return -cos_table[x - 270000] ; + if (x > 180000) return -cos_table[270000 - x] ; + if (x > 90000) return cos_table[x - 90000 ] ; + return cos_table[90000 - x] ; +} + + +__INLINE fixed fmul(int x, int y) +{ + return ftofix (fixtof(x) * fixtof(y)) ; +} + +__INLINE fixed fdiv(int x, int y) +{ + return ftofix (fixtof(x) / fixtof(y)) ; +} \ No newline at end of file diff --git a/ediv/src/dlls/graphics/fxi.h b/ediv/src/dlls/graphics/fxi.h new file mode 100644 index 0000000..e8582b0 --- /dev/null +++ b/ediv/src/dlls/graphics/fxi.h @@ -0,0 +1,35 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 + */ + +/* Variables globales de propósito general */ + +#include + +#include "files.h" +#include "xctype.h" +#include +/* Constantes */ + +#ifndef M_PI +# define M_PI 3.14159265358979323846 /* pi */ +#endif +int fpgs_cargados; + +#include "grlib.h" +#include "flic.h" + diff --git a/ediv/src/dlls/graphics/graphics.def b/ediv/src/dlls/graphics/graphics.def new file mode 100644 index 0000000..544fd3d --- /dev/null +++ b/ediv/src/dlls/graphics/graphics.def @@ -0,0 +1,3 @@ +LIBRARY graphics +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/graphics/graphics.dsp b/ediv/src/dlls/graphics/graphics.dsp new file mode 100644 index 0000000..aec4c9d --- /dev/null +++ b/ediv/src/dlls/graphics/graphics.dsp @@ -0,0 +1,184 @@ +# Microsoft Developer Studio Project File - Name="graphics" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=graphics - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "graphics.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "graphics.mak" CFG="graphics - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "graphics - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "graphics - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "graphics - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 1 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\dll\graphics.dll" + +!ELSEIF "$(CFG)" == "graphics - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 1 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 zlib.lib libpng.lib sdlmain.lib sdl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBCMTD.lib" /out:"..\..\..\bin\dll\graphics.dll" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "graphics - Win32 Release" +# Name "graphics - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\files.c +# End Source File +# Begin Source File + +SOURCE=.\g_blit.c +# End Source File +# Begin Source File + +SOURCE=.\g_draw.c +# End Source File +# Begin Source File + +SOURCE=.\g_flic.c +# End Source File +# Begin Source File + +SOURCE=.\g_main.c +# End Source File +# Begin Source File + +SOURCE=.\g_maps.c +# End Source File +# Begin Source File + +SOURCE=.\g_pal.c +# End Source File +# Begin Source File + +SOURCE=.\graphics.def +# End Source File +# Begin Source File + +SOURCE=.\img_pcx.c +# End Source File +# Begin Source File + +SOURCE=.\img_png.c +# End Source File +# Begin Source File + +SOURCE=.\main.c +# End Source File +# Begin Source File + +SOURCE=.\xctype.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\export.h +# End Source File +# Begin Source File + +SOURCE=.\files.h +# End Source File +# Begin Source File + +SOURCE=.\flic.h +# End Source File +# Begin Source File + +SOURCE=.\fmath.h +# End Source File +# Begin Source File + +SOURCE=.\fxi.h +# End Source File +# Begin Source File + +SOURCE=.\graphics.h +# End Source File +# Begin Source File + +SOURCE=.\grlib.h +# End Source File +# Begin Source File + +SOURCE=.\xctype.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ediv/src/dlls/graphics/graphics.h b/ediv/src/dlls/graphics/graphics.h new file mode 100644 index 0000000..46741be --- /dev/null +++ b/ediv/src/dlls/graphics/graphics.h @@ -0,0 +1,51 @@ +// GRAPHICS.H + +#define PIOVER180 0.017453292519943295769236907684886 + +SDL_Surface *screen; +SDL_Surface *prueba; + + + +/* + + +int eDIV_XPUT(FUNCTION_PARAMS); +int eDIV_MAP_PUT(FUNCTION_PARAMS); + +int eDIV_SETPOS(FUNCTION_PARAMS); +int eDIV_fade(FUNCTION_PARAMS); +int eDIV_LOAD_MAP(FUNCTION_PARAMS); +int eDIV_SET_MODE(FUNCTION_PARAMS); +int eDIV_LOAD_FPG(FUNCTION_PARAMS); +int eDIV_UNLOAD_FPG(FUNCTION_PARAMS); +int eDIV_UNLOAD_MAP(FUNCTION_PARAMS); +*/ +int eDIV_LOAD_BMP(FUNCTION_PARAMS); +int eDIV_COLLISION(FUNCTION_PARAMS); +int eDIV_SET_TRASPARENT_COLOR(FUNCTION_PARAMS); +int eDIV_GET_TRASPARENT_COLOR(FUNCTION_PARAMS); +int eDIV_RGB(FUNCTION_PARAMS); +int eDIV_ADVANCE(FUNCTION_PARAMS); +int eDIV_XADVANCE(FUNCTION_PARAMS) ; +int eDIV_MAP_BLOCK_COPY(FUNCION_PARMAS) ; +int eDIV_MAP_GET_PIXEL(FUNCION_PARMAS) ; +int eDIV_MAP_PUT(FUNCION_PARMAS) ; +int eDIV_MAP_PUT_PIXEL(FUNCTION_PARAMS); +int eDIV_PUT(FUNCTION_PARAMS); +int eDIV_PUT_PIXEL(FUNCTION_PARAMS); +int eDIV_PUT_SCREEN(FUNCION_PARAMS); +int eDIV_CLEAR_SCREEN(FUNCTION_PARAMS); +int eDIV_GET_PIXEL(FUNCTION_PARAMS); +int eDIV_NEW_MAP(FUNCTION_PARAMS) ; +int eDIV_SCREEN_COPY(FUNCTION_PARAMS) ; +int eDIV_OUT_REGION(FUNCTION_PARAMS) ; +int eDIV_DRAW(FUNCTION_PARAMS) ; +int eDIV_MOVE_DRAW(FUNCTION_PARAMS) ; +int eDIV_DELETE_DRAW(FUNCTION_PARAMS) ; +int eDIV_LOAD_FPG(FUNCTION_PARAMS) ; +int eDIV_GET_POINT(FUNCTION_PARAMS) ; +int eDIV_GET_REAL_POINT(FUNCTION_PARAMS) ; +int eDIV_GRAPHIC_INFO(FUNCTION_PARAMS) ; +int eDIV_FADE(FUNCTION_PARAMS) ; + diff --git a/ediv/src/dlls/graphics/graphics.plg b/ediv/src/dlls/graphics/graphics.plg new file mode 100644 index 0000000..7988ebd --- /dev/null +++ b/ediv/src/dlls/graphics/graphics.plg @@ -0,0 +1,16 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: graphics - Win32 Debug-------------------- +

    +

    Command Lines

    + + + +

    Results

    +graphics.dll - 0 error(s), 0 warning(s) +
    + + diff --git a/ediv/src/dlls/graphics/graphics.sln b/ediv/src/dlls/graphics/graphics.sln new file mode 100644 index 0000000..41d9859 --- /dev/null +++ b/ediv/src/dlls/graphics/graphics.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "graphics.vcproj", "{595A2626-DD40-44EC-A2B8-FB513D15D8C9}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Debug.ActiveCfg = Debug|Win32 + {595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Debug.Build.0 = Debug|Win32 + {595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Release.ActiveCfg = Release|Win32 + {595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/graphics/graphics.suo b/ediv/src/dlls/graphics/graphics.suo new file mode 100644 index 0000000..d71b24f Binary files /dev/null and b/ediv/src/dlls/graphics/graphics.suo differ diff --git a/ediv/src/dlls/graphics/graphics.vcproj b/ediv/src/dlls/graphics/graphics.vcproj new file mode 100644 index 0000000..df552d5 --- /dev/null +++ b/ediv/src/dlls/graphics/graphics.vcproj @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/dlls/graphics/graphics.vcproj.vspscc b/ediv/src/dlls/graphics/graphics.vcproj.vspscc new file mode 100644 index 0000000..4542cab --- /dev/null +++ b/ediv/src/dlls/graphics/graphics.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:dlls\\graphics" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/ediv/src/dlls/graphics/grlib.h b/ediv/src/dlls/graphics/grlib.h new file mode 100644 index 0000000..c8871fc --- /dev/null +++ b/ediv/src/dlls/graphics/grlib.h @@ -0,0 +1,207 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 + */ + +#ifndef __GRLIB_H +#define __GRLIB_H + +/* -------------------------------------------------------------------- */ +/* Librería gráfica */ +/* -------------------------------------------------------------------- */ + +/* Tipos y datos globales */ + +typedef struct _cpoint +{ + short int x ; + short int y ; +} +CPOINT ; + +typedef struct _animation +{ + int frames ; + int length ; + int pos ; + int speed ; + int remaining ; + int last_frame ; + Sint16 * order ; +} +ANIMATION ; + +typedef struct _bitmap +{ + int width ; + int pitch ; + int height ; + int code ; + int depth ; + char name[32] ; + void * data ; + CPOINT * cpoints ; + int flags ; + Uint32 offset ; + + ANIMATION * animation ; + Sint16 * blend_table ; + + int modified ; + int info_flags ; + + //Hasta q no esten los entrypoints + int x; + int y; + int z; +} +GRAPH ; + +#define F_NCPOINTS 0x0FFF +#define F_ANIMATION 0x1000 + +#define GI_NOCOLORKEY 1 + +typedef struct _font +{ + GRAPH * chars[256] ; + int voffset[256] ; + int width [256] ; +} +FONT ; + +typedef struct _grlib +{ + GRAPH * * maps ; + int map_count ; + int map_reserved ; +} +GRLIB ; + +typedef struct _clipregion +{ + int x ; + int y ; + int x2 ; /* Inclusive */ + int y2 ; +} +REGION ; + +extern int scr_initialized ; +extern REGION regions[32] ; +extern GRAPH * background ; +extern GRAPH * scrbitmap ; +extern GRLIB * syslib ; +extern int keytable[] ; +extern int last_frame_ms ; +extern int joy_x[], joy_y[], joy_b[] ; + +#define region_get(n) ( ((n)>=0 && (n)<=31) ? ®ions[n] : ®ions[0] ) + +/* Inicialización y control de tiempo */ +/* ---------------------------------- */ + +extern void gr_init (int w, int h) ; +extern void gr_set_fps (int fps, int max_jump) ; +extern void gr_wait_frame () ; +extern void gr_advance_timers () ; +extern void gr_draw_frame () ; + +/* Paleta de colores */ +/* ----------------- */ + +extern SDL_Color vpalette[256] ; +extern SDL_Color palette[256] ; + +extern Uint16 colorequiv[256] ; /* Equivalencia paleta -> pantalla */ +extern Uint16 colorghost[65536] ; /* Deja un color a 50% de intensidad */ + +extern GRAPH * background_8bits ; +extern int background_8bits_used ; +extern int background_is_black ; + +extern Uint8 trans_table[256][256] ; /* Tabla de transparencias 8 bits */ +extern int trans_table_updated ; /* 1 = La tabla es utilizable */ + +extern void gr_make_trans_table() ; + +extern int palette_loaded ; /* ¿Se ha cargado ya la paleta inicial ? */ +extern int palette_changed ; /* Poner a 1 cuando se cambien colores */ +extern int fade_on ; /* ¿Hay un fade activo? */ +extern int fade_step ; /* Si lo hay, posición (0=off) */ + +extern int gr_read_pal (file * file) ; +extern void gr_refresh_palette () ; +extern void gr_fade_init (int r, int g, int b, int speed, int dir) ; +extern void gr_fade_step () ; +extern void gr_roll_palette (int color0, int num, int inc) ; +extern int gr_find_nearest_color (int r, int g, int b) ; +extern void gr_set_rgb (int c, int r, int g, int b) ; +extern int gr_rgb (int r, int g, int b) ; +extern void gr_get_rgb (int color, int *r, int *g, int *b) ; +extern void gr_set_colors (int color, int num, Uint8 * pal) ; + +/* Gestión de bitmaps y librerías de gráficos */ +/* ------------------------------------------ */ + +extern int gr_load_map (const char * filename) ; +extern int gr_load_png (const char * filename) ; +extern int gr_load_pcx (const char * filename) ; +extern int gr_load_fpg (const char * filename) ; +extern int gr_load_pal (const char * filename) ; + +extern int grlib_new () ; +extern GRLIB * grlib_get (int libid) ; +extern void grlib_destroy (int libid) ; +extern int grlib_add_map (GRLIB * lib, GRAPH * map) ; +extern int grlib_unload_map (GRLIB * lib, int mapcode) ; + +extern GRAPH * bitmap_new (int code, int w, int h, int depth) ; +extern GRAPH * bitmap_clone (GRAPH * this) ; +extern GRAPH * bitmap_new_syslib (int w, int h, int depth) ; +extern GRAPH * bitmap_get (int libid, int mapcode) ; +extern void bitmap_destroy (GRAPH * map) ; +extern void bitmap_add_cpoint (GRAPH *map, int x, int y) ; +extern void bitmap_analize (GRAPH * bitmap) ; +extern void bitmap_animate (GRAPH * bitmap) ; +extern void bitmap_animate_to (GRAPH * bitmap, int pos, int speed) ; + + +/* Bajo nivel */ +/* ---------- */ + +/* Flags para gr_blit */ +#define B_HMIRROR 0x01 +#define B_VMIRROR 0x02 +#define B_TRANSLUCENT 0x04 +#define B_NOCOLORKEY 0x80 + +/* Las funciones gráficas admiten dest=0 para referirse a la pantalla. + * Para poder usar esta funcionalidad, debe estar bloqueada antes */ + +extern int gr_lock_screen () ; +extern void gr_unlock_screen () ; + +/* Primitivas gráficas */ + +extern void gr_clear (GRAPH * dest) ; +extern void gr_clear_as (GRAPH * dest, int color) ; +extern void gr_put_pixel (GRAPH * dest, int x, int y, int color) ; +extern int gr_get_pixel (GRAPH * dest, int x, int y) ; + +extern void gr_setcolor (int c) ; +extern void gr_vline (GRAPH * dest, REGION * clip, int x, int y, int h) ; +#endif diff --git a/ediv/src/dlls/graphics/img_pcx.c b/ediv/src/dlls/graphics/img_pcx.c new file mode 100644 index 0000000..afc2671 --- /dev/null +++ b/ediv/src/dlls/graphics/img_pcx.c @@ -0,0 +1,106 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 "fxi.h" + +extern SDL_Surface * screen ; + +typedef struct { + Uint8 Manufacturer; + Uint8 Version; + Uint8 Encoding; + Uint8 BitsPerPixel; + Sint16 Xmin, Ymin, Xmax, Ymax; + Sint16 HDpi, VDpi; + Uint8 Colormap[48]; + Uint8 Reserved; + Uint8 NPlanes; + Sint16 BytesPerLine; + Sint16 PaletteInfo; + Sint16 HscreenSize; + Sint16 VscreenSize; + Uint8 Filler[54]; +} +PCXheader ; + + +/* --------------------------------- */ +/* Rutina de lectura de gráficos PCX */ +/* --------------------------------- */ + +GRAPH * gr_read_pcx (const char * filename) +{ + PCXheader header ; + file * file ; + int width, height, x, y, p, count ; + GRAPH * bitmap ; + Uint8 * ptr, ch ; + + file = file_open (filename, "rb") ; + + // COMPLETAR ESTO (Daijo) + if (!file); + // Aki añadir el codigo + + file_read (file, &header, sizeof(header)) ; + width = header.Xmax - header.Xmin + 1 ; + height = header.Ymax - header.Ymin + 1 ; + bitmap = bitmap_new (0, width, height, header.BitsPerPixel == 8 ? 8:16) ; +// if (!bitmap) gr_error ("%s: sin memoria\n", filename) ; + + assert (width <= header.BytesPerLine) ; + + if (header.BitsPerPixel == 8) + { + for (y = 0 ; y < height ; y++) + for (p = 0 ; p < header.NPlanes ; p++) + { + ptr = (Uint8 *)bitmap->data + bitmap->width * y ; + for (x = 0 ; x < header.BytesPerLine ; ) + { +// if (file_read (file, &ch, 1) < 1) +// gr_error ("%s: fichero truncado", filename) ; + if ((ch & 0xC0) == 0xC0) + { + count = (ch & 0x3F) ; + file_read (file, &ch, 1) ; + } + else count = 1 ; + + while (count--) + { + *ptr = ch ; + x++ ; + ptr += header.NPlanes ; + } + } + } + } +// else +// gr_error ("%s: profundidad de color no soportada\n", filename) ; + + bitmap->modified = 1 ; + return bitmap ; +} + diff --git a/ediv/src/dlls/graphics/img_png.c b/ediv/src/dlls/graphics/img_png.c new file mode 100644 index 0000000..012c779 --- /dev/null +++ b/ediv/src/dlls/graphics/img_png.c @@ -0,0 +1,159 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 + +#include "fxi.h" + +extern SDL_Surface * screen ; + +/* --------------------------------- */ +/* Rutina de lectura de gráficos PNG */ +/* --------------------------------- */ + +static file * png ; + +static void user_read_data (png_structp png_ptr, + png_bytep data, png_size_t length) +{ + file_read (png, data, length) ; +} + +GRAPH * gr_read_png (const char * filename) +{ + GRAPH * bitmap ; + unsigned int n, x ; + Uint16 * ptr ; + Uint32 * orig ; + Uint32 row[2048] ; + Uint32 Rshift, Gshift, Bshift ; + Uint32 Rmask, Gmask, Bmask ; + + png_bytep rowpointers[2048] ; + + png_structp png_ptr ; + png_infop info_ptr, end_info ; + png_uint_32 width, height, rowbytes; + int depth, color ; + + /* Abre el fichero y se asegura de que screen está inicializada */ + + png = file_open (filename, "rb") ; +// if (!png) gr_error ("No existe %s\n", filename) ; + + /* Prepara las estructuras internas */ + + png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0) ; + info_ptr = png_create_info_struct (png_ptr) ; + end_info = png_create_info_struct (png_ptr) ; +// if (!info_ptr || !end_info) gr_error ("Error al cargar PNG") ; + + /* Rutina de error */ + + if (setjmp (png_ptr->jmpbuf)) + { + png_destroy_read_struct (&png_ptr, &info_ptr, &end_info) ; + file_close (png) ; + return 0 ; + } + + /* Recupera información sobre el PNG */ + + png_set_read_fn (png_ptr, 0, user_read_data) ; + png_read_info (png_ptr, info_ptr) ; + png_get_IHDR (png_ptr, info_ptr, &width, &height, &depth, &color, 0, 0 , 0) ; + +// if (color == PNG_COLOR_TYPE_GRAY || color == PNG_COLOR_TYPE_GRAY_ALPHA) +// gr_error ("No se soportan PNG en escala de grises") ; +// if (height > 2048 || width > 2048) +// gr_error ("PNG demasiado grande") ; + + /* Configura los distintos modos disponibles */ + + if (depth < 8) + png_set_expand(png_ptr) ; + if (depth == 16) + png_set_strip_16(png_ptr) ; + if (color == PNG_COLOR_TYPE_RGB) + png_set_filler (png_ptr, 0xFF, PNG_FILLER_AFTER) ; + png_set_bgr(png_ptr) ; + + /* Recupera el fichero, convirtiendo a 16 bits si es preciso */ + + rowbytes = png_get_rowbytes (png_ptr, info_ptr) ; + bitmap = bitmap_new (0, width, height, color == PNG_COLOR_TYPE_PALETTE ? 8 : 16) ; +// if (!bitmap) gr_error ("Error al cargar PNG") ; + if (color == PNG_COLOR_TYPE_PALETTE) + { + for (n = 0 ; n < height ; n++) + rowpointers[n] = ((Uint8*)bitmap->data) + n*bitmap->width ; + png_read_image (png_ptr, rowpointers) ; + } + else + { + ptr = (Uint16*) bitmap->data ; + Bshift = 16-screen->format->Rshift ; + Gshift = 8-screen->format->Gshift ; + Rshift = 0-screen->format->Bshift ; + + Bmask = 0xFF0000 ; + Gmask = 0x00FF00 ; + Rmask = 0x0000FF ; + + for (n = 0 ; n < screen->format->Rloss ; n++) Rshift++, Rmask <<= 1 ; + for (n = 0 ; n < screen->format->Gloss ; n++) Gshift++, Gmask <<= 1 ; + for (n = 0 ; n < screen->format->Bloss ; n++) Bshift++, Bmask <<= 1 ; + + Bmask &= 0xFF0000 ; + Gmask &= 0x00FF00 ; + Rmask &= 0x0000FF ; + + for (n = 0 ; n < height ; n++) + { + rowpointers[0] = (void *)row ; + png_read_rows (png_ptr, rowpointers, 0, 1) ; + + orig = row ; + for (x = 0 ; x < width ; x++) + { + if ((*orig) & 0x80000000) + { + *ptr = ((*orig & Rmask) >> Rshift)| + ((*orig & Gmask) >> Gshift)| + ((*orig & Bmask) >> Bshift) ; + if (!*ptr) (*ptr)++ ; + } + else *ptr = 0 ; + ptr++, orig++ ; + } + } + } + + /* Fin */ + + png_read_end (png_ptr, 0) ; + file_close (png) ; + bitmap->modified = 1 ; + return bitmap ; +} + diff --git a/ediv/src/dlls/graphics/main.c b/ediv/src/dlls/graphics/main.c new file mode 100644 index 0000000..9aa9e8d --- /dev/null +++ b/ediv/src/dlls/graphics/main.c @@ -0,0 +1,1522 @@ +#include +#include +#include +#include +#include +#ifndef WIN32 +#include +#endif +//#include +#include +#include "export.h" +#include +#include "graphics.h" +#include "varindex.h" + + +#define FUNCTION_PARAMS2 struct _fun_params *fp + +struct { + int x,y,z,flags,angle,size,region,file,id; + int status; +}PROCESS[1]; + +#define OK 1 +#define ERROR2 -1 + +#define ESPEJO 0x01 +#define ESPEJO_A 0x02 +#define TRANS 0x04 +#define NOCOLORKEY 0x80 + +//GRAPH *fondo; + +struct _files files[ 0xFF ] ; + +SDL_Surface *Mapa[0xFFF] ; +SDL_Surface *fondo ; +struct _file file0[0xFFF] ; +int last_map[0xFF] ; +int color_trasparente ; +int define_region ; + +typedef struct { + unsigned char r,g,b; + } pal_t; + +typedef struct _FPGHEADER8{ + char header[8]; + pal_t palette[256]; + //char palette[768]; + char colorbars[576]; +}FPGHEADER8; + +typedef struct _FPGHEADER{ + char header[8]; + //pal_t palette[256]; + //char palette[768]; + //char colorbars[576]; +}FPGHEADER; + +typedef struct _FPGMAPINFO{ + int code; + int lenght; + char description[32]; + char filename[12]; + int wide; + int height; + int number_of_points; +}FPGMAPINFO; + + +char *graphic; // wide*height + + +struct{ + int existe ; + int region ; + int x , y ; + int t , c ; // requerido para move_draw() + SDL_Surface *Surface ; +} draws[1024] ; + +int last_draw ; + +struct{ + SDL_Surface *src ; + SDL_Rect srcrect ; + SDL_Surface *dst ; + SDL_Rect dstrect ; + int z ; + int trans ; +} blits[0xFFFF] , *orden[0xFFFF]; + +int last_blit ; + +int gamma[3] ; + + +int RES_X,RES_Y; +int total_maps= 0; +int framex(); +int wait(); +int eDIV_PRINTF(FUNCTION_PARAMS); + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ + + CONST("m320x200",320200); + CONST("m320x240",320240); + CONST("m320x400",320400); + CONST("m360x240",360240); + CONST("m360x360",360360); + CONST("m376x282",376282); + CONST("m400x300",400300); + CONST("m512x384",512384); + CONST("m640x400",640400); + CONST("m640x480",640480); + CONST("m800x600",800600); + CONST("m960x720",960720); + CONST("m1024x768",1024768); + CONST("m1152x864",1152864); + CONST("m1280x960",1280960); + CONST("m1280x1024",12801024); + CONST("m1600x1200",16001200); + CONST("m1900x1600",19001600); + + CONST("partial_dump",0); + CONST("complete_dump",1); + + CONST("no_restore",-1); + CONST("partial_restore",0); + CONST("complete_restore",1); + + CONST("g_wide",0); + CONST("g_height",1); + CONST("g_x_center",2); + CONST("g_y_center",3); + + + + GLOBAL_STRUCT("video_modes",31); + _INT("wide",0); + _INT("height",0); + _INT("mode",0); + END_STRUCT; + + GLOBAL("dump_type",1); + GLOBAL("restore_type",1); + GLOBAL("fading",0); + GLOBAL("fps",0); + GLOBAL("num_video_modes",0); + GLOBAL("vsync",0); + GLOBAL("draw_z",-255); + + + +// printf("\nSion Entertianment 2000-2002 (c)\nGraphics.Dll 0.1 rc-1"); +/* + FUNCTION("wait",0,wait); + FUNCTION("load_map",1,eDIV_LOAD_MAP); + FUNCTION("setpos",5,eDIV_SETPOS); + FUNCTION("map_xput",8,eDIV_XPUT); + FUNCTION("fade",4,eDIV_fade); + FUNCTION("xput",6,eDIV_XPUT); + FUNCTION("load_fpg",1,eDIV_LOAD_FPG); + FUNCTION("set_mode",1,eDIV_SET_MODE); + FUNCTION("unload_fpg",1,eDIV_UNLOAD_FPG); + FUNCTION("unload_map",1,eDIV_UNLOAD_MAP); + FUNCTION("framex",1,framex); + FUNCTION("printf",1,eDIV_PRINTF); +*/ + FUNCTION("load_bmp",1,eDIV_LOAD_BMP) ; + FUNCTION("collision",1,eDIV_COLLISION) ; + FUNCTION("set_trasparent_color",1,eDIV_SET_TRASPARENT_COLOR) ; + FUNCTION("get_trasparent_color",0,eDIV_GET_TRASPARENT_COLOR) ; + FUNCTION("rgb",3,eDIV_RGB) ; + FUNCTION("advance",1,eDIV_ADVANCE) ; + FUNCTION("xadvance",2,eDIV_XADVANCE) ; + FUNCTION("map_block_copy",9,eDIV_MAP_BLOCK_COPY) ; + FUNCTION("map_get_pixel",4,eDIV_MAP_GET_PIXEL) ; + FUNCTION("map_put",5,eDIV_MAP_PUT); + FUNCTION("map_put_pixel",5,eDIV_MAP_PUT_PIXEL); + FUNCTION("put",4,eDIV_PUT); + FUNCTION("put_pixel",3,eDIV_PUT_PIXEL); + FUNCTION("put_screen",2,eDIV_PUT_SCREEN); + FUNCTION("clear_screen",0,eDIV_CLEAR_SCREEN); + FUNCTION("get_pixel",2,eDIV_GET_PIXEL); + FUNCTION("new_map",5,eDIV_NEW_MAP) ; + FUNCTION("screen_copy",7,eDIV_SCREEN_COPY) ; + FUNCTION("out_region",2,eDIV_OUT_REGION) ; + FUNCTION("draw",8,eDIV_DRAW) ; + FUNCTION("move_draw",7,eDIV_MOVE_DRAW) ; + FUNCTION("delete_draw",1,eDIV_DELETE_DRAW) ; + FUNCTION("load_fpg",1,eDIV_LOAD_FPG) ; + FUNCTION("get_point",5,eDIV_GET_POINT) ; + FUNCTION("get_real_point",3,eDIV_GET_REAL_POINT) ; + FUNCTION("graphic_info",3,eDIV_GRAPHIC_INFO) ; + FUNCTION("fade",4,eDIV_FADE) ; + + ENTRYPOINT( frame ) ; + ENTRYPOINT( first_load ) ; + + + + return TRUE; +} + +/* A continuación las funciones que queremos exportar. Para una mayor + * sencillez las hemos puesto en este mismo archivo, aunque puede ser + * aconsejable ponerlas en archivos aparte. + */ + + +//************************************ FUNCIONES GRAFICAS ******************************************// +/* +int eDIV_PRINTF(FUNCTION_PARAMS) +{ +char *texto=(char *)getparm(); + +printf("%s",texto); +}*/ + +/*int wait(FUNCTION_PARAMS) +{ +MessageBox(NULL,"Pulse aceptar para continuar","eDIV To0lKit <>",MB_OK); +return 0; +}*/ + + + + +/*int eDIV_fade(FUNCTION_PARAMS) +{ + + int veloc=getparm(); + int b=getparm(); + int g=getparm(); + int r=getparm(); + //int dir=getparm(); + gr_fade_init (r, g, b, veloc, 1); + + return 0; +}*/ + +/*int eDIV_PUT_SCREEN(FUNCTION_PARAMS) +{ + + GRAPH *tmp; + int id=getparm(); + int file=getparm(); + + tmp = bitmap_get (file,id); //Guarda el mapa en Tmp. + tmp->x=(RES_X/2); + tmp->y=(RES_Y/2); + + // gr_blit (background_8bits,®ions[0],tmp->x,tmp->y,tmp->flags,tmp); + return OK; +}*/ + + + + + + +// Funcion que coloca un mapa con caracterisitcas especiales +/*int eDIV_XPUT(FUNCTION_PARAMS) +{ + GRAPH *tmp; + + int file=getparm(); + int id=getparm(); + int x=getparm(); + int y=getparm(); + int angle=getparm(); + int scale=getparm(); + int flags=getparm(); + int region=getparm(); + + region=1; + +tmp = bitmap_get (file, id); //Guarda el mapa en Tmp. +printf("\nxput(%i,%i,%i,%i,%i,%i,%i,%i)",file,id,x,y,angle,scale,flags,region); +gr_rotated_blit (background_8bits, ®ions[region], x, y, flags, angle, scale, tmp); + + return OK; +}*/ + +//Funcion que pone un mapa en pantalla +/*int eDIV_PUT(FUNCTION_PARAMS) +{ + GRAPH *tmp; + + + int y=getparm(); + int x=getparm(); + int id=getparm(); + int file=getparm(); + tmp = bitmap_get (file, id); //Guarda el mapa en Tmp. + gr_blit (background_8bits,®ions[0],tmp->x,tmp->y,tmp->flags,tmp); + + + return OK; +}*/ + +//Funcion que pone un pixel en pantalla +/*int eDIV_PUT_PIXEL(FUNCTION_PARAMS) +{ + int color=getparm(); + int y=getparm(); + int x=getparm(); + gr_put_pixel (background_8bits, x, y, color); + return OK; +}*/ + + +//********************************* FUNCIONES DE INICIALIZACION ***************************************// + +// Funcion que carga un grafico (BMP,JPG,GIF,PCX,PNG,MAP) + +/*int eDIV_LOAD_MAP(FUNCTION_PARAMS) +{ + int id; //El ID del mapa + int type=1; + GRAPH * tmp; + const char *filename=(char*)getstrparm(); // Fichero a cargar + FILE *f=fopen("graph.log","a"); + + //--------------------- Si el grafico es un DIV_MAP ----------------------------// + + if (strstr(filename, ".map") || strstr(filename, ".MAP")) + { + fprintf(f,"Se esta cargar el map:%s\n",filename); + id=gr_load_map(filename); + fprintf(f,"\nDEBUG: Grafico numero %i",id); + } + + + + //----------------------------- Si el grafico es un BMP -------------------------// + + if (strstr(filename, ".pcx") || strstr(filename, ".PCX")) + + { + id=gr_load_pcx (filename); + } + + if (strstr(filename, ".png") || strstr(filename, ".PNG")) + + { + id=gr_load_png (filename); + } + + tmp = bitmap_get (1, id); //Guarda el mapa en Tmp y lo blitea. + tmp->x=0; + tmp->y=0; + tmp->flags=0; + +// gr_blit (background_8bits,®ions[0],tmp->x,tmp->y,tmp->flags,tmp); + + total_maps++; + return id; +}*/ + + +/*int eDIV_SET_MODE(FUNCTION_PARAMS) +{ + + int modo=getparm(); + if (modo < 320200 || modo > 16001400) + return ERROR2; + + RES_X=modo/1000; + RES_Y=modo%1000; + fondo=bitmap_get (0,0); + + gr_init(RES_X,RES_Y); + + return OK; +}*/ + + +// Carga de FPG'S + +/*int eDIV_UNLOAD_FPG(FUNCTION_PARAMS) + +{ + + int libid=getparm(); + + grlib_destroy (libid); + return OK; +}*/ + +/*int eDIV_LOAD_FPG(FUNCTION_PARAMS) +{ + const char * libname=(const)(char*)getparm(); + int id; + +id=gr_load_fpg (libname); + + return id; +}*/ + + +/*int eDIV_UNLOAD_MAP(FUNCTION_PARAMS) +{ + + int id=getparm(); + grlib_unload_map (1,id); + + return 0; +}*/ + + + + + +int eDIV_COLLISION(FUNCTION_PARAMS) +{ + int g1 , g2 ; + int f1 , f2 ; + int id1, id2 ; + int a, i ; + SDL_Rect r1 , r2 ; + a = getparm() ; + // Si se le pasa un ID + if ( a < 4000000 ) + { + id1 = fp->procs_s[ fp->proc_orden[ *fp->proceso_actual ] ].id ; + g1 = fp->mem[ id1 + fp->varindex[_loc_graph] ] ; + f1 = fp->mem[ id1 + fp->varindex[_loc_file] ] ; + if ( files[f1].existe == 0 || files[f1].mapa[g1].existe == 0 ) + return -1 ; + r1.x = fp->mem[ id1 + fp->varindex[_loc_x] ] ; + r1.y = fp->mem[ id1 + fp->varindex[_loc_y] ] ; + r1.w = files[f1].mapa[g1].Surface->w ; + r1.h = files[f1].mapa[g1].Surface->h ; + id2 = a ; + g2 = fp->mem[ id2 + fp->varindex[_loc_graph] ] ; + if ( files[f2].existe == 0 || files[f2].mapa[g2].existe == 0 ) + return -1 ; + f2 = fp->mem[ id2 + fp->varindex[_loc_file] ] ; + r2.x = fp->mem[ id2 + fp->varindex[_loc_x] ] ; + r2.y = fp->mem[ id2 + fp->varindex[_loc_y] ] ; + r2.w = files[f2].mapa[g2].Surface->w ; + r2.h = files[f2].mapa[g1].Surface->h ; + //Colision barata :P + if (!( (r2.x > r1.x && r2.x > r1.x + r1.w) || (r2.x+r2.w < r1.x && r2.x+r2.w r1.y && r2.y > r1.y + r1.h) || (r2.y+r2.h < r1.y && r2.y+r2.hnum_procs ; i++ ) + { + id1 = fp->procs_s[ fp->proc_orden[ i ] ].id ; + //Si el proceso se corresponde con el type + if ( fp->mem[ id1 + fp->varindex[ _res_process_type ] ] == a ) + { + g1 = fp->mem[ id1 + fp->varindex[_loc_graph] ] ; + f1 = fp->mem[ id1 + fp->varindex[_loc_file] ] ; + if ( files[f1].existe == 0 || files[f1].mapa[g1].existe == 0 ) + return -1 ; + r1.x = fp->mem[ id1 + fp->varindex[_loc_x] ] ; + r1.y = fp->mem[ id1 + fp->varindex[_loc_y] ] ; + r1.w = files[f1].mapa[g1].Surface->w ; + r1.h = files[f1].mapa[g1].Surface->h ; + id2 = a ; + g2 = fp->mem[ id2 + fp->varindex[_loc_graph] ] ; + if ( files[f2].existe == 0 || files[f2].mapa[g2].existe == 0 ) + return -1 ; + f2 = fp->mem[ id2 + fp->varindex[_loc_file] ] ; + r2.x = fp->mem[ id2 + fp->varindex[_loc_x] ] ; + r2.y = fp->mem[ id2 + fp->varindex[_loc_y] ] ; + r2.w = files[f2].mapa[g2].Surface->w ; + r2.h = files[f2].mapa[g1].Surface->h ; + //Colision barata :P + if (!( (r2.x > r1.x && r2.x > r1.x + r1.w) || (r2.x+r2.w < r1.x && r2.x+r2.w r1.y && r2.y > r1.y + r1.h) || (r2.y+r2.h < r1.y && r2.y+r2.hw / 2 ; + files[0].mapa[i].cpoint[1].y = (int)files[0].mapa[i].Surface->h / 2 ; + SDL_SetColorKey( files[0].mapa[i].Surface , SDL_SRCCOLORKEY | SDL_RLEACCEL , color_trasparente ) ; + if ( i > last_map[0] ) + last_map[0] = i ; + return i ; + } + } + + return -1 ; +} + +int eDIV_SET_TRASPARENT_COLOR(FUNCTION_PARAMS) +{ + int b , i; + int a = getparm() ; + b = color_trasparente ; + color_trasparente = a ; + for ( i = 1 ; i <= last_map[0] ; i++ ) + { + if ( files[0].mapa[i].existe ) + SDL_SetColorKey( files[0].mapa[i].Surface , SDL_SRCCOLORKEY | SDL_RLEACCEL , color_trasparente ) ; + } + return b ; +} + +int eDIV_GET_TRASPARENT_COLOR(FUNCTION_PARAMS) +{ + return color_trasparente ; +} + +int eDIV_RGB(FUNCTION_PARAMS) +{ + int r,g,b ; + b = getparm() ; + g = getparm() ; + r = getparm() ; + + return ( b + g*256 + r*65536 ) ; +} + +int eDIV_ADVANCE(FUNCTION_PARAMS) +{ + int a , id1 , x , y , angulo ; + a = getparm() ; + id1 = fp->procs_s[ fp->proc_orden[ *fp->proceso_actual ] ].id ; + angulo = fp->mem[ id1 + fp->varindex[ _loc_angle ] ] ; + x = (int) ((double)a * cos( (angulo/1000) * PIOVER180 )) ; + y = (int) ((double)a * sin( (angulo/1000) * PIOVER180 )) ; + fp->mem[ id1 + fp->varindex[ _loc_x ] ] += x; + fp->mem[ id1 + fp->varindex[ _loc_y ] ] += y ; + return 1 ; +} + + +int eDIV_XADVANCE(FUNCTION_PARAMS) +{ + int a , b , id1 , x , y , angulo ; + b = getparm() ; + a = getparm() ; + id1 = fp->procs_s[ fp->proc_orden[ *fp->proceso_actual ] ].id ; + angulo = a ; + x = (int) ((double)b * cos( (angulo/1000) * PIOVER180 )) ; + y = (int) ((double)b * sin( (angulo/1000) * PIOVER180 )) ; + fp->mem[ id1 + fp->varindex[ _loc_x ] ] += x ; + fp->mem[ id1 + fp->varindex[ _loc_y ] ] += y ; + return 1 ; +} + +int eDIV_MAP_BLOCK_COPY(FUNCTION_PARAMS) +{ + int f , g2 , x2 , y2 , g1 , x1 , y1 , w , h ; + SDL_Rect srcrect , dstrect ; + h = getparm() ; + w = getparm() ; + y1 = getparm() ; + x1 = getparm() ; + g1 = getparm() ; + y2 = getparm() ; + x2 = getparm() ; + g2 = getparm() ; + f = getparm() ; + + srcrect.x = x1 ; + srcrect.y = y1 ; + srcrect.w = w ; + srcrect.h = h ; + + dstrect.x = x2 ; + dstrect.y = y2 ; + dstrect.w = srcrect.w ; + dstrect.h = srcrect.h ; + + if ( !files[f].existe || !files[f].mapa[g1].existe || !files[f].mapa[g2].existe ) + return -1 ; + + SDL_BlitSurface( files[f].mapa[g1].Surface , &srcrect , files[f].mapa[g2].Surface , &dstrect ) ; + return 1 ; + +} + +int eDIV_MAP_GET_PIXEL(FUNCTION_PARAMS) +{ + int f , g , x , y , bpp ; + Uint8 *p ; + y = getparm() ; + x = getparm() ; + g = getparm() ; + f = getparm() ; + + if ( !files[f].existe || !files[f].mapa[g].existe ) + return -1 ; + + if ( x > files[f].mapa[g].Surface->w || y > files[f].mapa[g].Surface->h || x < 0 || y < 0 ) + return -2 ; + + bpp = files[f].mapa[g].Surface->format->BytesPerPixel; + p = (Uint8 *)files[f].mapa[g].Surface->pixels + y * files[f].mapa[g].Surface->pitch + x * bpp; + + switch(bpp) { + case 1: + return *p; + case 2: + return *(Uint16 *)p; + case 3: + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) + { + return p[0] << 16 | p[1] << 8 | p[2]; + }else + { + return p[0] | p[1] << 8 | p[2] << 16; + } + case 4: + return *(Uint32 *)p; + } + + return 0; +} + +int eDIV_MAP_PUT(FUNCTION_PARAMS) +{ + int f , g2 , g1 , x , y ; + SDL_Rect dstrect ; + y = getparm() ; + x = getparm() ; + g1 = getparm() ; + g2 = getparm() ; + f = getparm() ; + + if ( !files[f].existe || !files[f].mapa[g1].existe || !files[f].mapa[g2].existe ) + return -1 ; + + dstrect.x = x ; + dstrect.y = y ; + dstrect.w = 0 ; // Se ignora + dstrect.h = 0 ; // Se ignora + + SDL_BlitSurface( files[f].mapa[g1].Surface , NULL , files[f].mapa[g2].Surface , &dstrect ) ; + return 1 ; + +} + +int eDIV_MAP_PUT_PIXEL(FUNCTION_PARAMS) +{ + int f , g , x , y , c , bpp ; + Uint8 *p ; + + + c = getparm() ; + y = getparm() ; + x = getparm() ; + g = getparm() ; + f = getparm() ; + + if ( !files[f].existe || !files[0].mapa[g].existe ) + return -1 ; + + if ( x > files[f].mapa[g].Surface->w || y > files[f].mapa[g].Surface->h || x < 0 || y < 0 ) + return -2 ; + + if ( SDL_MUSTLOCK( files[f].mapa[g].Surface ) ) { + if ( SDL_LockSurface( files[f].mapa[g].Surface ) < 0 ) { + return -3; + } + } + + + bpp = files[f].mapa[g].Surface->format->BytesPerPixel ; + p = (Uint8 *)files[f].mapa[g].Surface->pixels + y * files[f].mapa[g].Surface->pitch + x * bpp ; + + switch(bpp) { + + case 1: + *p = c; + break; + + case 2: + *(Uint16 *)p = c; + break; + + case 3: + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) { + p[0] = (c >> 16) & 0xff; + p[1] = (c >> 8) & 0xff; + p[2] = c & 0xff; + } else { + p[0] = c & 0xff; + p[1] = (c >> 8) & 0xff; + p[2] = (c >> 16) & 0xff; + } + break; + + case 4: + *(Uint32 *)p = c; + break; + } + + if ( SDL_MUSTLOCK( files[f].mapa[g].Surface ) ) { + SDL_UnlockSurface( files[f].mapa[g].Surface ); + } + + + return 1 ; +} + + +int eDIV_PUT(FUNCTION_PARAMS) +{ + int f , g , x , y ; + SDL_Rect dstrect ; + + y = getparm() ; + x = getparm() ; + g = getparm() ; + f = getparm() ; + + if ( !files[f].existe || !files[f].mapa[g].existe ) + return -1 ; + + dstrect.x = x - files[f].mapa[g].cpoint[0].x ; + dstrect.y = y - files[f].mapa[g].cpoint[0].y ; + dstrect.w = 0 ; // Se ignora + dstrect.h = 0 ; // Se ignora + + SDL_BlitSurface( files[f].mapa[g].Surface , NULL , fondo , &dstrect ) ; + + return 1 ; + +} + +int eDIV_PUT_SCREEN(FUNCTION_PARAMS) +{ + int f , g ; + + g = getparm() ; + f = getparm() ; + + if ( !files[f].existe || !files[f].mapa[g].existe ) + return -1 ; + + SDL_BlitSurface( files[f].mapa[g].Surface , NULL , fondo , NULL ) ; + + return 1 ; + +} + +int eDIV_PUT_PIXEL(FUNCTION_PARAMS) +{ + int x , y , c , bpp ; + Uint8 *p ; + + + c = getparm() ; + y = getparm() ; + x = getparm() ; + + if ( x > fondo->w || y > fondo->h || x < 0 || y < 0 ) + return -1 ; + + if ( SDL_MUSTLOCK(fondo) ) { + if ( SDL_LockSurface(fondo) < 0 ) { + return -2; + } + } + + + bpp = fondo->format->BytesPerPixel ; + p = (Uint8 *)fondo->pixels + y * fondo->pitch + x * bpp ; + + switch(bpp) { + + case 1: + *p = c; + break; + + case 2: + *(Uint16 *)p = c; + break; + + case 3: + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) { + p[0] = (c >> 16) & 0xff; + p[1] = (c >> 8) & 0xff; + p[2] = c & 0xff; + } else { + p[0] = c & 0xff; + p[1] = (c >> 8) & 0xff; + p[2] = (c >> 16) & 0xff; + } + break; + + case 4: + *(Uint32 *)p = c; + break; + } + + if ( SDL_MUSTLOCK(fondo) ) { + SDL_UnlockSurface(fondo); + } + + + return 1 ; +} + + + +int eDIV_CLEAR_SCREEN(FUNCTION_PARAMS) +{ + SDL_FillRect( fondo , NULL , 0 ) ; + + return 1; +} + + +int eDIV_GET_PIXEL(FUNCTION_PARAMS) +{ + int x , y , bpp; + Uint8 *p ; + y = getparm() ; + x = getparm() ; + + if ( x > fondo->w || y > fondo->h || x < 0 || y < 0 ) + return -1 ; + + bpp = fondo->format->BytesPerPixel; + p = (Uint8 *)fondo->pixels + y * fondo->pitch + x * bpp; + + switch(bpp) { + case 1: + return *p; + case 2: + return *(Uint16 *)p; + case 3: + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) + { + return p[0] << 16 | p[1] << 8 | p[2]; + }else + { + return p[0] | p[1] << 8 | p[2] << 16; + } + case 4: + return *(Uint32 *)p; + } + + return 0; +} + + +int eDIV_NEW_MAP(FUNCTION_PARAMS) +{ + int i ; + int w , h , cx , cy , c ; + c = getparm() ; + cy = getparm() ; + cx = getparm() ; + h = getparm() ; + w = getparm() ; + + for ( i = 1000 ; i < files[0].num ; i++ ) + { + if ( !files[0].mapa[i].existe ) + { + files[0].mapa[i].Surface = SDL_CreateRGBSurface( SDL_HWSURFACE , w , h , screen->format->BitsPerPixel , 0xFF0000 , 0x00FF00 , 0x0000FF , 0x000000 ) ; + files[0].mapa[i].existe = 1 ; + files[0].mapa[i].cpoint[0].x = cx ; + files[0].mapa[i].cpoint[0].y = cy ; + SDL_FillRect( files[0].mapa[i].Surface , NULL , c ) ; + SDL_SetColorKey( files[0].mapa[i].Surface , SDL_SRCCOLORKEY | SDL_RLEACCEL , color_trasparente ) ; + if ( i > last_map[0] ) + last_map[0] = i ; + return i ; + } + } + return -1 ; +} + + +int eDIV_SCREEN_COPY(FUNCTION_PARAMS) +{ + SDL_Rect srcrect , dstrect ; + int r, f, g , x, y , w , h ; + h = getparm() ; + w = getparm() ; + y = getparm() ; + x = getparm() ; + g = getparm() ; + f = getparm() ; + r = getparm() ; + + if ( !files[f].existe || !files[f].mapa[g].existe ) + return -1 ; + + srcrect.x = 0 ; + srcrect.y = 0 ; + srcrect.w = w ; + srcrect.h = h ; + + dstrect.x = x ; + dstrect.y = y ; + dstrect.w = 0 ; + dstrect.h = 0 ; + + SDL_BlitSurface( screen, &srcrect , files[f].mapa[g].Surface , &dstrect ) ; + return 1 ; +} + +int eDIV_OUT_REGION(FUNCTION_PARAMS2) +{ + int id , r ; + int f, g , x , y ; + r = getparm() ; + id = getparm() ; + + f = fp->mem[ id + fp->varindex[_loc_file] ] ; + g = fp->mem[ id + fp->varindex[_loc_graph] ] ; + + if ( !files[f].existe || !files[f].mapa[g].existe ) + return -1 ; + + x = fp->mem[ id + fp->varindex[_loc_x] ] ; + y = fp->mem[ id + fp->varindex[_loc_y] ] ; + + if ( x < fp->regions[r].x + fp->regions[r].w && x + files[f].mapa[g].Surface->w > fp->regions[r].x && + y < fp->regions[r].y + fp->regions[r].h && y + files[f].mapa[g].Surface->h > fp->regions[r].y ) + return 0 ; + else + return 1 ; +} + +int eDIV_DRAW(FUNCTION_PARAMS2) +{ + int i ; + int t , c , o , r , x0, y0 , x1 , y1 ; + SDL_Rect dstrect ; + y1 = getparm() ; + x1 = getparm() ; + y0 = getparm() ; + x0 = getparm() ; + r = getparm() ; + o = getparm() ; + c = getparm() ; + t = getparm() ; + + for ( i = 0 ; i < 1024 ; i++ ) + { + if ( draws[i].existe == 0 ) + { + draws[i].Surface = SDL_CreateRGBSurface( SDL_HWSURFACE , x1 - x0 , y1 - y0 , screen->format->BitsPerPixel , 0xFF0000 , 0x00FF00 , 0x0000FF , 0x000000 ) ; + switch ( t ) + { + case 3: + dstrect.x = 0 ; + dstrect.y = 0 ; + dstrect.w = x1 - x0 ; + dstrect.h = y1 - y0 ; + SDL_FillRect( draws[i].Surface , &dstrect , c ) ; + break ; + } + draws[i].region = r ; + draws[i].x = x0 ; + draws[i].y = y0 ; + draws[i].t = t ; + draws[i].c = c ; + if ( o < 15 && o > -1 ) + SDL_SetAlpha( draws[i].Surface , SDL_SRCALPHA | SDL_RLEACCEL , 17 * (o) ) ; + draws[i].existe = 1 ; + if ( i > last_draw ) + last_draw = i ; + return i ; + } + } + return -1 ; +} + +int eDIV_MOVE_DRAW(FUNCTION_PARAMS2) +{ + SDL_Rect dstrect ; + int id , c , o , x0 , y0 , x1 , y1 ; + y1 = getparm() ; + x1 = getparm() ; + y0 = getparm() ; + x0 = getparm() ; + o = getparm() ; + c = getparm() ; + id = getparm() ; + + if ( !draws[id].existe ) + return -1 ; + + if ( x1 - x0 != draws[id].Surface->w || y1 - y0 != draws[id].Surface->h || c != draws[id].c ) + { + if ( x1 - x0 != draws[id].Surface->w || y1 - y0 != draws[id].Surface->h ) + { + SDL_FreeSurface( draws[id].Surface ) ; + draws[id].Surface = SDL_CreateRGBSurface( SDL_HWSURFACE , x1 - x0 , y1 - y0 , screen->format->BitsPerPixel , 0xFF0000 , 0x00FF00 , 0x0000FF , 0x000000 ) ; + } + switch ( draws[id].t ) + { + case 3: + dstrect.x = 0 ; + dstrect.y = 0 ; + dstrect.w = x1 - x0 ; + dstrect.h = y1 - y0 ; + SDL_FillRect( draws[id].Surface , &dstrect , c ) ; + break ; + } + } + + draws[id].x = x0 ; + draws[id].y = y0 ; + draws[id].c = c ; + if ( o < 15 && o > -1 ) + SDL_SetAlpha( draws[id].Surface , SDL_SRCALPHA | SDL_RLEACCEL , 17 * (o) ) ; + else + if ( o == 15 ) + SDL_SetAlpha( draws[id].Surface , NULL , 255 ) ; + + return 1 ; +} + +int eDIV_DELETE_DRAW(FUNCTION_PARAMS2) +{ + int n ; + n = getparm() ; + if ( !draws[n].existe ) + return -1 ; + + SDL_FreeSurface( draws[n].Surface ) ; + draws[n].existe = 0 ; + + for ( ; last_draw > 0 ; last_draw-- ) + { + if ( draws[last_draw].existe ) + break ; + } + return 1 ; + + + +} + + +int eDIV_LOAD_FPG(FUNCTION_PARAMS2) +{ + char * archivo ; + FILE *f; + FPGHEADER8 cabecera8; + FPGHEADER cabecera; + FPGMAPINFO infomapa; + int tamano; + int cont=0,num,i; + int bpp; + //SDL_Surface *surface_temporal ; + + //Uint8 r,g,b; + SDL_Color p[256]; + + archivo = getstrparm() ; + printf("LOAD_FPG %s\n",archivo); + + f=fopen(archivo,"rb"); + if(f==NULL) { + printf("Error al abrir archivo %s\n",archivo); + exit(1); + } + + fseek(f,0,SEEK_END); + tamano=ftell(f); + fseek(f,0,SEEK_SET); + + printf("Leyendo cabecera\n"); + + fread(&cabecera,1,sizeof(FPGHEADER),f); + + if(strcmp(cabecera.header,"fpg\x1A\x0D\x0A")) { + if(strcmp(cabecera.header,"f16\x1A\x0D\x0A")) { + if(strcmp(cabecera.header,"f24\x1A\x0D\x0A")) { + if(strcmp(cabecera.header,"f32\x1A\x0D\x0A")) { + printf("El archivo no es un FPG\n"); + exit(1); + } + else { + bpp=32; + } + } + else { + bpp=24; + } + } + else { + bpp=16; + } + } + else { + bpp=8; + fseek(f,0,SEEK_SET); + fread(&cabecera8,1,sizeof(FPGHEADER8),f); + for(i=0;i<256;i++) { + printf("paleta[%d].r = %d\n",i,cabecera8.palette[i].r); + printf("paleta[%d].g = %d\n",i,cabecera8.palette[i].g); + printf("paleta[%d].b = %d\n",i,cabecera8.palette[i].b); + } + + for(i=0;i<256;i++) { + p[i].r=cabecera8.palette[i].r*4; + p[i].g=cabecera8.palette[i].g*4; + p[i].b=cabecera8.palette[i].b*4; + } + printf("Aplicando paleta global..\n"); + SDL_SetPalette(screen,SDL_LOGPAL|SDL_PHYSPAL,p,0,256); + } + + + + while(ftell(f)999 || num<0) { + printf("Código incorrecto de mapa: %d\n",num); + exit(1); + } + if ( files[0].mapa[num].existe == 1 ) + return -1 ; + files[0].mapa[num].existe = 1 ; + + printf("Leyendo mapa de código %d\n",num); + if(infomapa.number_of_points==0) { + files[0].mapa[num].cpoint[0].x = (int) infomapa.wide/2 ; + files[0].mapa[num].cpoint[0].y = (int) infomapa.height/2 ; + } else { + //fpgmaps[num].mapa.points=(short*)malloc(2*infomapa.number_of_points); + printf("Puntos de control: %d\n",infomapa.number_of_points); + //fread(fpgmaps[num].mapa.points,2,2*infomapa.number_of_points,f); + fread(files[0].mapa[num].cpoint,2,2*infomapa.number_of_points,f) ; + } + printf("Ancho: %d\n",infomapa.wide); + printf("Alto: %d\n",infomapa.height); + //fpgmaps[num].mapa.graphic=(char*)malloc(infomapa.wide*infomapa.height*bpp/8); + //fread(fpgmaps[num].mapa.graphic,1,infomapa.wide*infomapa.height*bpp/8,f); + //fpgmaps[num].surface=SDL_CreateRGBSurfaceFrom(fpgmaps[num].mapa.graphic,infomapa.wide,infomapa.height,bpp,infomapa.wide*bpp/8,0,0,0,0); + graphic = (char*)malloc(infomapa.wide*infomapa.height*bpp/8); + fread(graphic,1,infomapa.wide*infomapa.height*bpp/8,f); + //files[0].mapa[num].Surface = SDL_CreateRGBSurfaceFrom(graphic,infomapa.wide,infomapa.height,bpp,infomapa.wide*bpp/8,screen->format->Rmask,screen->format->Gmask,screen->format->Bmask,screen->format->Amask) ; + printf("r: %i , g: %i , b: %i , a: %i \n" , screen->format->Rmask,screen->format->Gmask,screen->format->Bmask,screen->format->Amask ) ; + //if ( bpp == screen->format->BitsPerPixel ) + files[0].mapa[num].Surface = SDL_CreateRGBSurfaceFrom(graphic,infomapa.wide,infomapa.height,bpp,infomapa.wide*bpp/8,0,0,0,0) ; + //else + //{ + // files[0].mapa[num].Surface = SDL_CreateRGBSurfaceFrom(graphic,infomapa.wide,infomapa.height,screen->format->BitsPerPixel,infomapa.wide*screen->format->BytesPerPixel,screen->format->Rmask,screen->format->Gmask,screen->format->Bmask,screen->format->Amask) ; + + //surface_temporal = SDL_CreateRGBSurfaceFrom(graphic,infomapa.wide,infomapa.height,screen->format->BitsPerPixel,infomapa.wide*screen->format->BytesPerPixel,0,0,0,0) ; + //files[0].mapa[num].Surface = SDL_DisplayFormat(surface_temporal) ; + //SDL_FreeSurface( surface_temporal ) ; +// } + + +// fpgmaps[num].surface=SDL_LoadBMP("/root/Console/background.bmp"); + cont++; + if(bpp==8) { + printf("Aplicando paleta a la surface..\n"); + //set_map_color(num,i,cabecera.palette[i].r,cabecera.palette[i].g,cabecera.palette[i].b); + SDL_SetPalette(files[0].mapa[num].Surface,SDL_LOGPAL|SDL_PHYSPAL,p,0,256); + } + SDL_SetColorKey(files[0].mapa[num].Surface,SDL_SRCCOLORKEY|SDL_RLEACCEL,0); + } + //set_pal(&cabecera.palette[0]); +/* r=fopen("colores","w"); + for(i=0;i<256;i++) { + fprintf(r,"Color %d: R %d, G %d, B %d\n",i,(char)cabecera.palette[i*3],(char)cabecera.palette[i*3+1],(char)cabecera.palette[i*3+2]); + } + fclose(r);*/ + fclose(f); +} + +int eDIV_GET_POINT(FUNCTION_PARAMS2) +{ + int f , g , n , dx , dy ; + dy = getparm() ; + dx = getparm() ; + n = getparm() ; + g = getparm() ; + f = getparm() ; + + if ( !files[f].existe || !files[f].mapa[g].existe ) + return -1 ; + + fp->mem[ dx ] = files[f].mapa[g].cpoint[n].x ; + fp->mem[ dy ] = files[f].mapa[g].cpoint[n].y ; + + return 0 ; +} + +int eDIV_GET_REAL_POINT(FUNCTION_PARAMS2) +{ + int f , g , n , dx , dy , x , y , id; + dy = getparm() ; + dx = getparm() ; + n = getparm() ; + f = fp->mem[ fp->procs_s[ fp->proc_orden[ *fp->proceso_actual ] ].id + fp->varindex[_loc_file] ] ; + g = fp->mem[ fp->procs_s[ fp->proc_orden[ *fp->proceso_actual ] ].id + fp->varindex[_loc_graph] ] ; + x = fp->mem[ fp->procs_s[ fp->proc_orden[ *fp->proceso_actual ] ].id + fp->varindex[_loc_x] ] ; + y = fp->mem[ fp->procs_s[ fp->proc_orden[ *fp->proceso_actual ] ].id + fp->varindex[_loc_y] ] ; + + if ( !files[f].existe || !files[f].mapa[g].existe ) + return -1 ; + + fp->mem[ dx ] = files[f].mapa[g].cpoint[n].x - files[f].mapa[g].cpoint[0].x + x ; + fp->mem[ dy ] = files[f].mapa[g].cpoint[n].y - files[f].mapa[g].cpoint[0].y + y ; + + return 0 ; +} + +int eDIV_GRAPHIC_INFO(FUNCTION_PARAMS2) +{ + int f , g , i ; + i = getparm() ; + g = getparm() ; + f = getparm() ; + + if ( !files[f].existe || !files[f].mapa[g].existe ) + return -1 ; + + switch (i) + { + case 0: + return files[f].mapa[g].Surface->w ; + case 1: + return files[f].mapa[g].Surface->h ; + case 2: + return files[f].mapa[g].cpoint[0].x ; + case 3: + return files[f].mapa[g].cpoint[0].y ; + } +} + + +int eDIV_FADE(FUNCTION_PARAMS2) +{ + int r , g , b , v ; + v = getparm() ; + b = getparm() ; + g = getparm() ; + r = getparm() ; + + return SDL_SetGamma( 1.0f , 1.0f , 1.0f ) ; + return 1 ; +} + + +//*********************************** Entry Points **********************************************// + +FILE * fichero ; +FILE * memo ; + +void frame(FUNCTION_PARAMS2 ) +{ + static int una_vez = 1 ; + int i , temp , id , f , g , r , z , trans; + SDL_Rect dstrect , srcrect ; + + fichero = fopen( "draw.txt" , "w" ) ; + + + if ( define_region == 1) + { + + if ( fp->existe.regions == 1 ) + { + define_region = 0 ; + fp->regions[0].x = 0 ; + fp->regions[0].y = 0 ; + fp->regions[0].w = 320 ; + fp->regions[0].h = 200 ; + } + } + + //SDL_FillRect( screen , NULL , 0 ) ; + SDL_BlitSurface( fondo , NULL , screen , NULL ) ; + +// Draws + z = fp->mem[ fp->varindex[_glo_draw_z] ] ; + for ( i = 0 ; i <= last_draw ; i++ ) + { + if ( draws[i].existe ) + { + if ( draws[i].x + draws[i].Surface->w >= fp->regions[0].x && draws[i].x < fp->regions[0].x + fp->regions[0].w && + draws[i].y + draws[i].Surface->h >= fp->regions[0].y && draws[i].y < fp->regions[0].y + fp->regions[0].h ) + { + if ( draws[i].x >= fp->regions[0].x && draws[i].x + draws[i].Surface->w < fp->regions[0].x + fp->regions[0].w && + draws[i].y >= fp->regions[0].y && draws[i].y + draws[i].Surface->h < fp->regions[0].y + fp->regions[0].h ) + { + srcrect.x = 0 ; + srcrect.y = 0 ; + srcrect.w = draws[i].Surface->w ; + srcrect.h = draws[i].Surface->h ; + + dstrect.x = draws[i].x ; + dstrect.y = draws[i].y ; + dstrect.w = 0 ; // Se ignora + dstrect.h = 0 ; // Se ignora + Dibuja( files[f].mapa[g].Surface , srcrect , dstrect , z ) ; + } + } + } + } + + for ( i = 0 ; i < *fp->num_procs ; i++ ) + { + id = fp->procs_s[ fp->proc_orden[i] ].id ; + f = fp->mem[ id + fp->varindex[_loc_file] ]; + g = fp->mem[ id + fp->varindex[_loc_graph] ]; + r = fp->mem[ id + fp->varindex[_loc_region] ] ; + z = fp->mem[ id + fp->varindex[_loc_z] ] ; + dstrect.x = fp->mem[ id + fp->varindex[_loc_x] ] ; + dstrect.y = fp->mem[ id + fp->varindex[_loc_y] ] ; + dstrect.w = 0 ; + dstrect.h = 0 ; + if ( files[f].mapa[g].existe ) + { + srcrect.x = 0 ; + srcrect.y = 0 ; + srcrect.w = files[f].mapa[g].Surface->w ; + srcrect.h = files[f].mapa[g].Surface->h ; + dstrect.x -= files[f].mapa[g].cpoint[0].x ; + dstrect.y -= files[f].mapa[g].cpoint[0].y ; + if ( fp->mem[ id + fp->varindex[_loc_flags] ] & 4 ) + //SDL_SetAlpha(files[f].mapa[g].Surface, SDL_SRCALPHA , fp->mem[ id + fp->varindex[_loc_transparency] ] ) ; + if ( fp->mem[ id + fp->varindex[_loc_flags] ] & 8 ) + trans = 255 - fp->mem[ id + fp->varindex[_loc_transparency] ] ; + else + trans = 128 ; + else + //SDL_SetAlpha(files[f].mapa[g].Surface, NULL , SDL_ALPHA_OPAQUE ) ; + trans = SDL_ALPHA_OPAQUE ; + if ( r == 0 ) + Dibuja( files[f].mapa[g].Surface , srcrect , dstrect , z , trans ) ; + else if ( define_region == 0 ) + { + if ( dstrect.x >= fp->regions[r].x && dstrect.x + files[f].mapa[g].Surface->w <= fp->regions[r].x + fp->regions[r].w && + dstrect.y >= fp->regions[r].y && dstrect.y + files[f].mapa[g].Surface->h <= fp->regions[r].y + fp->regions[r].h ) + { + Dibuja( files[f].mapa[g].Surface , srcrect , dstrect , z , trans ) ; + }else + { + if ( dstrect.x < fp->regions[r].x + fp->regions[r].w && dstrect.x + files[f].mapa[g].Surface->w > fp->regions[r].x && + dstrect.y < fp->regions[r].y + fp->regions[r].h && dstrect.y + files[f].mapa[g].Surface->h > fp->regions[r].y ) + { +// SDL_BlitSurface( files[f].mapa[g].Surface , NULL , screen , &dstrect ) ; + srcrect.x = 0 ; + srcrect.y = 0 ; + srcrect.w = files[f].mapa[g].Surface->w ; + srcrect.h = files[f].mapa[g].Surface->h ; + + if ( dstrect.x < fp->regions[r].x ) + { + srcrect.x = fp->regions[r].x - dstrect.x ; + srcrect.w -= fp->regions[r].x - dstrect.x ; + dstrect.x = fp->regions[r].x ; + } + if ( dstrect.y < fp->regions[r].y ) + { + srcrect.y = fp->regions[r].y - dstrect.y ; + srcrect.h -= fp->regions[r].y - dstrect.y ; + dstrect.y = fp->regions[r].y ; + } + if ( dstrect.x + srcrect.w > fp->regions[r].x + fp->regions[r].w ) + { + srcrect.w -= dstrect.x + srcrect.w - fp->regions[r].x - fp->regions[r].w ; + } + if ( dstrect.y + srcrect.h > fp->regions[r].y + fp->regions[r].h ) + { + srcrect.h -= dstrect.y + srcrect.h - fp->regions[r].y - fp->regions[r].h ; + } + + Dibuja( files[f].mapa[g].Surface , srcrect , dstrect , z , trans ) ; + } + } + } + } + } + //if ( last_map >= 2 ) + // Mapa[2]->flags |= SDL_SRCALPHA ; + + // Volcamos la pila de bliteos + for ( i = 0 ; i <= last_blit ; i++ ) + { + SDL_SetAlpha( orden[i]->src, SDL_SRCALPHA , orden[i]->trans ) ; + SDL_BlitSurface( orden[i]->src , &orden[i]->srcrect , screen , &orden[i]->dstrect ) ; + } + last_blit = -1 ; + + SDL_Flip(screen) ; + +} + +void first_load(FUNCTION_PARAMS2) +{ + Uint32 rmask , gmask , bmask , amask ; + int i ; + + fp->Dibuja = Dibuja ; + fp->files = files ; + fp->existe.dibuja = 1 ; + + + + for ( i = 0 ; i < 0xFF ; i++ ) + last_map[i] = 0 ; + color_trasparente = 0 ; + if (SDL_Init(SDL_INIT_VIDEO)) ; + //k_error(K_ERR_SDL_INIT); + + if ( screen == NULL ) ; + //k_error(K_ERR_SDL_SET_VIDEO_MODE); + + + screen = SDL_SetVideoMode(320, 200, 24, SDL_HWSURFACE ); + rmask = 0x00ff0000; + gmask = 0x0000ff00; + bmask = 0x000000ff; + amask = 0x00000000; + fondo = SDL_CreateRGBSurface( SDL_HWSURFACE , 320 , 200 , 24 , rmask , gmask , bmask , amask ) ; + //screen = SDL_SetVideoMode(320, 200, 24, NULL ); + + for ( i = 0 ; i < 0xFF ; i++ ) + { + files[i].existe = 0 ; + } + files[0].existe = 1 ; + files[0].num = 0xFFF ; + files[0].mapa = file0 ; + + for ( i = 0 ; i < 0xFFF ; i++ ) + { + files[0].mapa[i].existe = 0 ; + } + + last_blit = -1 ; + + gamma[0] = 128 ; + gamma[1] = 128 ; + gamma[2] = 128 ; + + define_region = 1 ; + + SDL_WM_SetCaption("eDiv testing", NULL); + + prueba = SDL_LoadBMP("prueba.bmp" ); + + //fclose(fichero ) ; + +} + + + + +//---------------------------- Funciones Internas de la DLL ---------------------------------// + +// ------- Dibuja -------// +// Se encarga de meter un registro en la pila de bliteos, segun su z +// Esta funcion no se encarga de discernir si esta dentro o fuera de la region o pantalla, +// eso se debe calcular antes y pasarle la informacion resultante a Dibuja + +int Dibuja(SDL_Surface *src , SDL_Rect srcrect , SDL_Rect dstrect , int z , int trans ) +{ + register int i , j ; + + last_blit++ ; + blits[last_blit].src = src ; + blits[last_blit].srcrect.x = srcrect.x ; + blits[last_blit].srcrect.y = srcrect.y ; + blits[last_blit].srcrect.w = srcrect.w ; + blits[last_blit].srcrect.h = srcrect.h ; + blits[last_blit].dstrect.x = dstrect.x ; + blits[last_blit].dstrect.y = dstrect.y ; + blits[last_blit].dstrect.w = dstrect.w ; + blits[last_blit].dstrect.h = dstrect.h ; + blits[last_blit].z = z ; + blits[last_blit].trans = trans ; + + + + // Buscamos su posicion + for ( i = 0 ; i < last_blit ; ) + { + if ( orden[i]->z < z ) + { + for ( j = last_blit ; j > i ; j-- ) + { + orden[ j ] = orden[ j-1 ] ; + } + break ; + } + i++ ; + } + orden[i] = &blits[last_blit] ; + + + + return 1 ; +} + + diff --git a/ediv/src/dlls/graphics/offsets.h b/ediv/src/dlls/graphics/offsets.h new file mode 100644 index 0000000..f9d0e90 --- /dev/null +++ b/ediv/src/dlls/graphics/offsets.h @@ -0,0 +1,120 @@ + +/* ------------------------------------------ */ +/* Offsets de los datos globales predefinidos */ +/* ------------------------------------------ */ + +#define MOUSEX 4*0 +#define MOUSEY 4*1 +#define MOUSEGRAPH 4*2 +#define MOUSEFILE 4*3 +#define MOUSEZ 4*4 +#define MOUSEANGLE 4*5 +#define MOUSESIZE 4*6 +#define MOUSEFLAGS 4*7 +#define MOUSEREGION 4*8 +#define MOUSELEFT 4*9 +#define MOUSEMIDDLE 4*10 +#define MOUSERIGHT 4*11 + +#define SCROLLS 4*12 + + /* Siguen 10 estructuras scroll de tamaño 20 */ + +#define JOYLEFT 4*212 +#define JOYRIGHT 4*213 +#define JOYUP 4*214 +#define JOYDOWN 4*215 +#define JOYBUTTON1 4*216 +#define JOYBUTTON2 4*217 +#define JOYBUTTON3 4*218 +#define JOYBUTTON4 4*219 +#define SETUPCARD 4*220 +#define SETUPPORT 4*221 +#define SETUPIRQ 4*222 +#define SETUPDMA 4*223 +#define SETUPDMA2 4*224 +#define SETUPMASTER 4*225 +#define SETUPSOUNDFX 4*226 +#define SETUPCDAUDIO 4*227 +#define TIMER 4*228 + + /* Siguen 9 temporizadores adicionales */ + +#define TEXTZ 4*238 +#define FADING 4*239 +#define SHIFTSTATUS 4*240 +#define ASCII 4*241 +#define SCANCODE 4*242 +#define JOYFILTER 4*243 +#define JOYSTATUS 4*244 +#define RESTORETYPE 4*245 +#define DUMPTYPE 4*246 +#define MAXPROCESSTIME 4*247 + +#define M7STRUCTS 4*248 + + /* Siguen 10 estructuras de tamaño 10 */ + +/* Extras */ + +#define FPS 4*348 +#define TEXT_FLAGS 4*349 +#define PANSEP 4*350 +#define REVERB 4*351 +#define VOLUME 4*352 +#define SOUND_FREQ 4*353 +#define SOUND_MODE 4*354 +#define GRAPH_MODE 4*355 +#define ARGC 4*356 +#define ARGV_TABLE 4*357 /* 32+1 cadenas */ +#define SPEED_GAUGE 4*390 + +/* ----------------------------------------- */ +/* Offsets de los datos locales predefinidos */ +/* ----------------------------------------- */ + +#define PROCESS_ID 4*0 +#define ID_SCAN 4*1 +#define PROCESS_TYPE 4*2 +#define TYPE_SCAN 4*3 +#define STATUS 4*4 +#define PARAM_OFFSET 4*5 +#define PROGRAM_INDEX 4*6 +#define IS_EXECUTED 4*7 +#define IS_PAINTED 4*8 +#define DISTANCE_1 4*9 +#define DISTANCE_2 4*10 +#define FRAME_PERCENT 4*11 +#define BOX_X0 4*12 +#define BOX_Y0 4*13 +#define BOX_X1 4*14 +#define BOX_Y1 4*15 +#define FATHER 4*16 +#define SON 4*17 +#define SMALLBRO 4*18 +#define BIGBRO 4*19 +#define PRIORITY 4*20 +#define CTYPE 4*21 +#define CFLAGS 4*22 +#define COORDX 4*23 +#define COORDY 4*24 +#define COORDZ 4*25 +#define GRAPHID 4*26 +#define FLAGS 4*27 +#define GRAPHSIZE 4*28 +#define ANGLE 4*29 +#define REGIONID 4*30 +#define FILEID 4*31 +#define XGRAPH 4*32 +#define HEIGHT 4*33 +#define CNUMBER 4*34 +#define RESOLUTION 4*35 + +/* Algunas definiciones comunes */ + +#define STATUS_DEAD 0 +#define STATUS_KILLED 1 +#define STATUS_RUNNING 2 +#define STATUS_SLEEPING 3 +#define STATUS_FROZEN 4 + diff --git a/ediv/src/dlls/graphics/todo.txt b/ediv/src/dlls/graphics/todo.txt new file mode 100644 index 0000000..75f83e0 --- /dev/null +++ b/ediv/src/dlls/graphics/todo.txt @@ -0,0 +1,9 @@ + + Graphics.Dll + ============ + +POR HACER: + +- La instruccion MAP_BLOCK_COPY() que no tngo ni zorra idea xDD +- Reacer todo el FRAME ya q es un poco cutre con todo los contadores y timers esos x'D +- Cojer las variables de los procesos del STUB. ya que ahora las variables se cambian mediente lainstruccion SETPOS(): diff --git a/ediv/src/dlls/graphics/xctype.c b/ediv/src/dlls/graphics/xctype.c new file mode 100644 index 0000000..14b53f0 --- /dev/null +++ b/ediv/src/dlls/graphics/xctype.c @@ -0,0 +1,171 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 "xctype.h" + +/* Tabla de conversión de caracteres MS-DOS a Windows */ + +int dos_chars = 0 ; + +unsigned char dos_to_win[256] = { + 0, 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, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, +201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163, 216, 215, 131, +225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187, +166, 166, 166, 166, 166, 193, 194, 192, 169, 166, 166, 43, 43, 162, 165, 43, + 43, 45, 45, 43, 45, 43, 227, 195, 43, 43, 45, 45, 166, 45, 43, 164, +240, 208, 202, 203, 200, 105, 205, 206, 207, 43, 43, 166, 95, 166, 204, 175, +211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180, +173, 177, 61, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 166, 160 +} ; + +/* Tabla de conversión de caracteres Windows a MS-DOS */ + +unsigned char win_to_dos[256] = +{ + 0, 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, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 159, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 255, 173, 189, 156, 207, 190, 254, 245, 249, 184, 166, 174, 170, 240, 169, 238, + 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168, + 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216, + 209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225, + 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139, + 208, 164, 149, 162, 147, 228, 148, 246, 155, 151, 163, 150, 129, 236, 231, 152 +} ; + +/* Tipos de caracter */ + +char c_type[256] ; +unsigned char c_upper[256] ; +unsigned char c_lower[256] ; + +int c_type_initialized = 0 ; + +unsigned char convert (unsigned char c) +{ + return dos_chars ? c:win_to_dos[c] ; +} + +static void set_c_range (int first, int last, int type) +{ + while (first <= last) c_type[first++] |= type ; +} + +static void set_c_from (const unsigned char * chars, int type) +{ + if (dos_chars) + while (*chars) c_type[win_to_dos[*chars++]] |= type ; + else + while (*chars) c_type[*chars++] |= type ; +} + +static void set_c_as (int prev_type, int type) +{ + int n ; + + for (n = 0 ; n < 256 ; n++) + { + if (c_type[n] & prev_type) + c_type[n] |= type ; + } +} + +static void set_c_upper (const unsigned char * from, const unsigned char * to) +{ + if (dos_chars) + while (*from) c_upper[win_to_dos[*from++]] = win_to_dos[*to++] ; + else + while (*from) c_upper[*from++] = *to++ ; +} + +static void set_c_lower (const unsigned char * from, const unsigned char * to) +{ + if (dos_chars) + while (*from) c_lower[win_to_dos[*from++]] = win_to_dos[*to++] ; + else + while (*from) c_lower[*from++] = *to++ ; +} + +void init_c_type () +{ + int c ; + + memset (c_type, 0, sizeof(c_type)) ; + + if (dos_chars) + for (c = 0 ; c < 256 ; c++) + c_lower[c] = c_upper[c] = win_to_dos[c] ; + else + for (c = 0 ; c < 256 ; c++) + c_lower[c] = c_upper[c] = c ; + + set_c_upper ("abcdefghijklmnopqrstuvwxyz", + "ABCDEFGHIJKLMNOPQRSTUVWXYZ") ; + set_c_lower ("ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyz") ; +#ifdef RESPETAR_ACENTOS + set_c_upper ("áéíóúñçàèìòùäëïöüýâêîôûæãåõ", + "ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ") ; + set_c_lower ("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ", + "áéíóúñçàèìòùäëïöüýâêîôûæãåõ") ; +#else + set_c_upper ("áéíóúñÑçÇàèìòùäëïöüýâêîôûæãåõÁÉÍÓÚ", + "AEIOUNNCCAEIOUAEIOUYAEIOUÆAAOAEIOU") ; + set_c_lower ("áéíóúñÑçÇàèìòùäëïöüýâêîôûæãåõÁÉÍÓÚ", + "aeiounnccaeiouaeiouyaeiouÆaaoaeiou") ; +#endif + + set_c_from (" \t\n\r", CTYPE_SPACE) ; + + set_c_range ('0', '9', CTYPE_NUM) ; + + set_c_range ('A', 'Z', CTYPE_ALPHA) ; + set_c_range ('a', 'z', CTYPE_ALPHA) ; + set_c_from ("áéíóúÁÉÍÓÚñÑçÇàèìòùÀÈÌÒÙäëïöüÄËÏÖÜÿýâêîôûÂÊÎÔÛ" + "æÆãåðõªºÃÅÐÕØ", CTYPE_ALPHA) ; + + set_c_as (CTYPE_ALPHA, CTYPE_WORDCHAR) ; + set_c_from ("_", CTYPE_WORDCHAR) ; + set_c_as (CTYPE_WORDCHAR, CTYPE_WORDFIRST) ; + + set_c_range ('0', '9', CTYPE_WORDCHAR) ; + + c_type_initialized = 1 ; +} + + diff --git a/ediv/src/dlls/graphics/xctype.h b/ediv/src/dlls/graphics/xctype.h new file mode 100644 index 0000000..2983b7f --- /dev/null +++ b/ediv/src/dlls/graphics/xctype.h @@ -0,0 +1,43 @@ +/* Fenix - Compilador/intérprete de videojuegos + * Copyright (C) 1999 José Luis Cebrián Pagüe + * + * 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 + */ + +extern int dos_chars ; /* 1 = Código fuente en caracteres MS-DOS */ +extern char c_type[256] ; +extern unsigned char c_upper[256] ; +extern unsigned char c_lower[256] ; + +#define ISALPHA(c) (c_type [(unsigned char)c] & CTYPE_ALPHA) +#define ISSPACE(c) (c_type [(unsigned char)c] & CTYPE_SPACE) +#define ISNUM(c) (c_type [(unsigned char)c] & CTYPE_NUM) +#define ISWORDCHAR(c) (c_type [(unsigned char)c] & CTYPE_WORDCHAR) +#define ISWORDFIRST(c) (c_type [(unsigned char)c] & CTYPE_WORDFIRST) +#define TOUPPER(c) (c_upper[(unsigned char)c]) +#define TOLOWER(c) (c_lower[(unsigned char)c]) + +extern unsigned char convert (unsigned char c) ; +extern void init_c_type () ; + +extern unsigned char dos_to_win[256] ; +extern unsigned char win_to_dos[256] ; + +#define CTYPE_ALPHA 1 +#define CTYPE_NUM 2 +#define CTYPE_WORDCHAR 4 +#define CTYPE_WORDFIRST 8 +#define CTYPE_SPACE 16 + diff --git a/ediv/src/dlls/input/input.c b/ediv/src/dlls/input/input.c new file mode 100644 index 0000000..ba273ec --- /dev/null +++ b/ediv/src/dlls/input/input.c @@ -0,0 +1,551 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* EDIVSTD.DLL + * Esta librería contiene los datos más básicos que puede requerir un programa + * DIV, tal como las opciones de compilación, estructura reserved, etc. + */ +#include +#include +#include + + +#include "main.h" + +//#define _KEY2(a) CONST("a",a) +#define _KEY(a) CONST(#a,a) + + +#define _esc 1 +#define _f1 59 +#define _f2 60 +#define _f3 61 +#define _f4 62 +#define _f5 63 +#define _f6 64 +#define _f7 65 +#define _f8 66 +#define _f9 67 +#define _f10 68 +#define _f11 87 +#define _f12 88 +#define _prn_scr 55 //Impr Pant +#define _scroll_lock 70 //Bloq Despl + +#define _wave 41 // "º" +#define _1 2 +#define _2 3 +#define _3 4 +#define _4 5 +#define _5 6 +#define _6 7 +#define _7 8 +#define _8 9 +#define _9 10 +#define _0 11 +#define _minus 12 //? +#define _plus 13 //¿ + +#define _backspace 14 +#define _tab 15 +#define _q 16 +#define _w 17 +#define _e 18 +#define _r 19 +#define _t 20 +#define _y 21 +#define _u 22 +#define _i 23 +#define _o 24 +#define _p 25 +#define _l_brachet 26 //"`" "^" +#define _r_brachet 27 //"+" "*" +#define _enter 28 + +#define _caps_lock 58 +#define _a 30 +#define _s 31 +#define _d 32 +#define _f 33 +#define _g 34 +#define _h 35 +#define _j 36 +#define _k 37 +#define _l 38 +#define _semicolon 39 //Ñ +#define _apostrophe 40 //{ +#define _backslash 43 //} + +#define _l_shift 42 +#define _z 44 +#define _x 45 +#define _c 46 +#define _v 47 +#define _b 48 +#define _n 49 +#define _m 50 +#define _comma 51 +#define _point 52 +#define _slash 53 //"-" "_" +#define _r_shift 54 + +#define _control 29 +#define _alt 56 +#define _space 57 + +#define _ins 82 +#define _home 71 +#define _pgup 73 +#define _del 83 +#define _end 79 +#define _pgdn 81 + +#define _up 72 +#define _down 80 +#define _left 75 +#define _right 77 + +#define _num_lock 69 +#define _c_backslash 90 +#define _c_asterisk 91 +#define _c_minus 92 +#define _c_home 93 +#define _c_up 94 +#define _c_pgup 95 +#define _c_left 96 +#define _c_center 97 +#define _c_right 98 +#define _c_end 99 +#define _c_down 100 +#define _c_pgdn 101 +#define _c_ins 102 +#define _c_del 103 +#define _c_plus 104 +#define _c_enter 105 + + + +Uint8 *keys ; + +int SDLtoDIV[1024] ; + + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ +/* + CONST("_esc",_esc) ; + CONST("_f1",_f1) ; + CONST("_f2",_f1) ; + CONST("_f3",_f1) ; + CONST("_f4",_f1) ; + CONST("_f5",_f1) ; + CONST("_f6",_f1) ; + CONST("_f7",_f1) ; + CONST("_f8",_f1) ; + CONST("_f9",_f1) ; + CONST("_f10",_f1) ; + CONST("_f11"_f1) ; + CONST("_f12",_f12) ; +*/ + _KEY(_esc) ; + _KEY(_f1) ; + _KEY(_f2) ; + _KEY(_f3) ; + _KEY(_f4) ; + _KEY(_f5) ; + _KEY(_f6) ; + _KEY(_f7) ; + _KEY(_f8) ; + _KEY(_f9) ; + _KEY(_f10) ; + _KEY(_f11) ; + _KEY(_f12) ; + _KEY(_prn_scr ) ; + _KEY(_scroll_lock ) ; + _KEY(_wave) ; + _KEY(_1) ; + _KEY(_2) ; + _KEY(_3) ; + _KEY(_4) ; + _KEY(_5) ; + _KEY(_6) ; + _KEY(_7) ; + _KEY(_8) ; + _KEY(_9) ; + _KEY(_0) ; + _KEY(_minus) ; + _KEY(_plus) ; + _KEY(_backspace) ; + _KEY(_tab) ; + _KEY(_q) ; + _KEY(_w) ; + _KEY(_e) ; + _KEY(_r) ; + _KEY(_t) ; + _KEY(_y) ; + _KEY(_u) ; + _KEY(_i) ; + _KEY(_o) ; + _KEY(_p) ; + _KEY(_l_brachet) ; + _KEY(_r_brachet) ; + _KEY(_enter) ; + _KEY(_caps_lock ) ; + _KEY(_a) ; + _KEY(_s) ; + _KEY(_d) ; + _KEY(_f) ; + _KEY(_g) ; + _KEY(_h) ; + _KEY(_j) ; + _KEY(_k) ; + _KEY(_l) ; + _KEY(_semicolon) ; + _KEY(_apostrophe) ; + _KEY(_backslash) ; + _KEY(_l_shift) ; + _KEY(_z) ; + _KEY(_x) ; + _KEY(_c) ; + _KEY(_v) ; + _KEY(_b) ; + _KEY(_n) ; + _KEY(_m) ; + _KEY(_comma) ; + _KEY(_point) ; + _KEY(_slash) ; + _KEY(_r_shift) ; + _KEY(_control) ; + _KEY(_alt) ; + _KEY(_space) ; + _KEY(_ins) ; + _KEY(_home) ; + _KEY(_pgup) ; + _KEY(_del) ; + _KEY(_end) ; + _KEY(_pgdn) ; + _KEY(_up) ; + _KEY(_down) ; + _KEY(_left) ; + _KEY(_right) ; + _KEY(_num_lock) ; + _KEY(_c_backslash) ; + _KEY(_c_asterisk) ; + _KEY(_c_minus) ; + _KEY(_c_plus) ; + _KEY(_c_enter) ; + _KEY(_c_home) ; + _KEY(_c_pgup) ; + _KEY(_c_end) ; + _KEY(_c_pgdn) ; + _KEY(_c_up) ; + _KEY(_c_down) ; + _KEY(_c_left) ; + _KEY(_c_right) ; + _KEY(_c_center) ; + _KEY(_c_ins) ; + _KEY(_c_del) ; + + FUNCTION("key",1,eDiv_Key) ; + ENTRYPOINT(first_load) ; + ENTRYPOINT(frame) ; + + return TRUE; +} + +int eDiv_Key(FUNCTION_PARAMS) +{ + //FILE *fichero ; + int a ; + + //fichero = fopen("input.txt" , "a+" ) ; + a = getparm() ; + //fprintf( fichero , "key: %i , keys[30]: %i \n" , a , keys[30] ) ; + //fclose( fichero ) ; + + if ( a == _control ) + if ( keys[ SDLK_RCTRL ] ) + return 1 ; + if ( a == _alt ) + if ( keys[ SDLK_RALT ] ) + return 1 ; + + return keys[ SDLtoDIV[a] ] ; +} +//*************************** ENTRYPOINTS ********************************************** + +void first_load() +{ + int i ; + SDL_Init( SDL_INIT_EVENTTHREAD ) ; + + for ( i = 0 ; i < 1024 ; i++ ) + { + SDLtoDIV[ i ] = 0 ; + } +/* + SDLtoDIV[ SDLK_ESCAPE ] = _esc ; + SDLtoDIV[ SDLK_1 ] = _1 ; + SDLtoDIV[ SDLK_2 ] = _2 ; + SDLtoDIV[ SDLK_3 ] = _3 ; + SDLtoDIV[ SDLK_4 ] = _4 ; + SDLtoDIV[ SDLK_5 ] = _5 ; + SDLtoDIV[ SDLK_6 ] = _6 ; + SDLtoDIV[ SDLK_7 ] = _7 ; + SDLtoDIV[ SDLK_8 ] = _8 ; + SDLtoDIV[ SDLK_9 ] = _9 ; + SDLtoDIV[ SDLK_0 ] = _0 ; + SDLtoDIV[ SDLK_MINUS ] = _minus ; + SDLtoDIV[ SDLK_EQUALS ] = _plus ; + SDLtoDIV[ SDLK_BACKSPACE ] = _backspace ; + SDLtoDIV[ SDLK_TAB ] = _tab ; + SDLtoDIV[ SDLK_p ] = _p ; + SDLtoDIV[ SDLK_w ] = _w ; + SDLtoDIV[ SDLK_e ] = _e ; + SDLtoDIV[ SDLK_r ] = _r ; + SDLtoDIV[ SDLK_t ] = _t ; + SDLtoDIV[ SDLK_y ] = _y ; + SDLtoDIV[ SDLK_u ] = _u ; + SDLtoDIV[ SDLK_i ] = _i ; + SDLtoDIV[ SDLK_o ] = _o ; + SDLtoDIV[ SDLK_p ] = _p ; + SDLtoDIV[ SDLK_LEFTBRACKET ] = _l_brachet ; + SDLtoDIV[ SDLK_RIGHTBRACKET ] = _r_brachet ; + SDLtoDIV[ SDLK_RETURN ] = _enter ; + SDLtoDIV[ SDLK_LCTRL ] = _control ; + SDLtoDIV[ SDLK_RCTRL ] = _control ; + SDLtoDIV[ SDLK_a ] = _a ; + SDLtoDIV[ SDLK_s ] = _s ; + SDLtoDIV[ SDLK_d ] = _d ; + SDLtoDIV[ SDLK_f ] = _f ; + SDLtoDIV[ SDLK_g ] = _g ; + SDLtoDIV[ SDLK_h ] = _h ; + SDLtoDIV[ SDLK_j ] = _j ; + SDLtoDIV[ SDLK_k ] = _k ; + SDLtoDIV[ SDLK_l ] = _l ; + SDLtoDIV[ SDLK_SEMICOLON ] = _semicolon ; + SDLtoDIV[ SDLK_QUOTE ] = _apostrophe ; + SDLtoDIV[ SDLK_BACKQUOTE ] = _wave ; + SDLtoDIV[ SDLK_LSHIFT ] = _l_shift ; + SDLtoDIV[ SDLK_BACKSLASH ] = _backslash ; + SDLtoDIV[ SDLK_z ] = _z ; + SDLtoDIV[ SDLK_x ] = _x ; + SDLtoDIV[ SDLK_c ] = _c ; + SDLtoDIV[ SDLK_v ] = _v ; + SDLtoDIV[ SDLK_b ] = _b ; + SDLtoDIV[ SDLK_n ] = _n ; + SDLtoDIV[ SDLK_m ] = _m ; + SDLtoDIV[ SDLK_COMMA ] = _comma ; + SDLtoDIV[ SDLK_PERIOD ] = _point ; + SDLtoDIV[ SDLK_SLASH ] = _slash ; + SDLtoDIV[ SDLK_RSHIFT ] = _r_shift ; + SDLtoDIV[ SDLK_SYSREQ ] = _prn_scr ; + SDLtoDIV[ SDLK_LALT ] = _alt ; + SDLtoDIV[ SDLK_RALT ] = _alt ; + SDLtoDIV[ SDLK_SPACE ] = _space ; + SDLtoDIV[ SDLK_CAPSLOCK ] = _caps_lock ; + SDLtoDIV[ SDLK_F1 ] = _f1 ; + SDLtoDIV[ SDLK_F2 ] = _f2 ; + SDLtoDIV[ SDLK_F3 ] = _f3 ; + SDLtoDIV[ SDLK_F4 ] = _f4 ; + SDLtoDIV[ SDLK_F5 ] = _f5 ; + SDLtoDIV[ SDLK_F6 ] = _f6 ; + SDLtoDIV[ SDLK_F7 ] = _f7 ; + SDLtoDIV[ SDLK_F8 ] = _f8 ; + SDLtoDIV[ SDLK_F9 ] = _f9 ; + SDLtoDIV[ SDLK_F10 ] = _f10 ; + SDLtoDIV[ SDLK_F11 ] = _f11 ; + SDLtoDIV[ SDLK_F12 ] = _f12 ; + SDLtoDIV[ SDLK_NUMLOCK ] = _num_lock ; + SDLtoDIV[ SDLK_SCROLLOCK ] = _scroll_lock ; + SDLtoDIV[ SDLK_HOME ] = _home ; + SDLtoDIV[ SDLK_UP ] = _up ; + SDLtoDIV[ SDLK_PAGEUP ] = _pgup ; + SDLtoDIV[ SDLK_END ] = _end ; + SDLtoDIV[ SDLK_DOWN ] = _down ; + SDLtoDIV[ SDLK_PAGEDOWN ] = _pgdn ; + SDLtoDIV[ SDLK_INSERT ] = _ins ; + SDLtoDIV[ SDLK_KP_PERIOD ] = _c_del ; + SDLtoDIV[ SDLK_KP_DIVIDE ] = _c_backslash ; + SDLtoDIV[ SDLK_KP_MULTIPLY ] = _c_asterisk ; + SDLtoDIV[ SDLK_KP_MINUS ] = _c_minus ; + SDLtoDIV[ SDLK_KP_PLUS ] = _c_plus ; + SDLtoDIV[ SDLK_KP_ENTER ] = _c_enter ; + SDLtoDIV[ SDLK_KP0 ] = _c_ins ; + SDLtoDIV[ SDLK_KP1 ] = _c_end ; + SDLtoDIV[ SDLK_KP2 ] = _c_down ; + SDLtoDIV[ SDLK_KP3 ] = _c_pgdn ; + SDLtoDIV[ SDLK_KP4 ] = _c_left ; + SDLtoDIV[ SDLK_KP5 ] = _c_center ; + SDLtoDIV[ SDLK_KP6 ] = _c_right ; + SDLtoDIV[ SDLK_KP7 ] = _c_home ; + SDLtoDIV[ SDLK_KP8 ] = _c_up ; + SDLtoDIV[ SDLK_KP9 ] = _c_pgup ; +*/ + SDLtoDIV[ _esc ] = SDLK_ESCAPE ; + SDLtoDIV[ _1 ] = SDLK_1 ; + SDLtoDIV[ _2 ] = SDLK_2 ; + SDLtoDIV[ _3 ] = SDLK_3 ; + SDLtoDIV[ _4 ] = SDLK_4 ; + SDLtoDIV[ _5 ] = SDLK_5 ; + SDLtoDIV[ _6 ] = SDLK_6 ; + SDLtoDIV[ _7 ] = SDLK_7 ; + SDLtoDIV[ _8 ] = SDLK_8 ; + SDLtoDIV[ _9 ] = SDLK_9 ; + SDLtoDIV[ _0 ] = SDLK_0 ; + SDLtoDIV[ _minus ] = SDLK_MINUS ; + SDLtoDIV[ _plus ] =SDLK_EQUALS ; + SDLtoDIV[ _backspace ] =SDLK_BACKSPACE ; + SDLtoDIV[ _tab ] =SDLK_TAB ; + SDLtoDIV[ _p ] =SDLK_p ; + SDLtoDIV[ _w ] =SDLK_w ; + SDLtoDIV[ _e ] =SDLK_e ; + SDLtoDIV[ _r ] =SDLK_r ; + SDLtoDIV[ _t ] =SDLK_t ; + SDLtoDIV[ _y ] =SDLK_y ; + SDLtoDIV[ _u ] =SDLK_u ; + SDLtoDIV[ _i ] =SDLK_i ; + SDLtoDIV[ _o ] =SDLK_o ; + SDLtoDIV[ _p ] =SDLK_p ; + SDLtoDIV[ _l_brachet ] =SDLK_LEFTBRACKET ; + SDLtoDIV[ _r_brachet ] =SDLK_RIGHTBRACKET ; + SDLtoDIV[ _enter ] =SDLK_RETURN ; + SDLtoDIV[ _control ] =SDLK_LCTRL ; + //SDLtoDIV[ _control ] =SDLK_RCTRL ; + SDLtoDIV[ _a ] =SDLK_a ; + SDLtoDIV[ _s ] =SDLK_s ; + SDLtoDIV[ _d ] =SDLK_d ; + SDLtoDIV[ _f ] =SDLK_f ; + SDLtoDIV[ _g ] =SDLK_g ; + SDLtoDIV[ _h ] =SDLK_h ; + SDLtoDIV[ _j ] =SDLK_j ; + SDLtoDIV[ _k ] =SDLK_k ; + SDLtoDIV[ _l ] =SDLK_l ; + SDLtoDIV[ _semicolon ] =SDLK_SEMICOLON ; + SDLtoDIV[ _apostrophe ] =SDLK_QUOTE ; + SDLtoDIV[ _wave ] =SDLK_BACKQUOTE ; + SDLtoDIV[ _l_shift ] =SDLK_LSHIFT ; + SDLtoDIV[ _backslash ] =SDLK_BACKSLASH ; + SDLtoDIV[ _z ] =SDLK_z ; + SDLtoDIV[ _x ] =SDLK_x ; + SDLtoDIV[ _c ] =SDLK_c ; + SDLtoDIV[ _v ] =SDLK_v ; + SDLtoDIV[ _b ] =SDLK_b ; + SDLtoDIV[ _n ] =SDLK_n ; + SDLtoDIV[ _m ] =SDLK_m ; + SDLtoDIV[ _comma ] =SDLK_COMMA ; + SDLtoDIV[ _point ] =SDLK_PERIOD ; + SDLtoDIV[ _slash ] =SDLK_SLASH ; + SDLtoDIV[ _r_shift ] =SDLK_RSHIFT ; + SDLtoDIV[ _prn_scr ] =SDLK_SYSREQ ; + SDLtoDIV[ _alt ] =SDLK_LALT ; + //SDLtoDIV[ _alt ] =SDLK_RALT ; + SDLtoDIV[ _space ] =SDLK_SPACE ; + SDLtoDIV[ _caps_lock ] =SDLK_CAPSLOCK ; + SDLtoDIV[ _f1 ] =SDLK_F1 ; + SDLtoDIV[ _f2 ] =SDLK_F2 ; + SDLtoDIV[ _f3 ] =SDLK_F3 ; + SDLtoDIV[ _f4 ] =SDLK_F4 ; + SDLtoDIV[ _f5 ] =SDLK_F5 ; + SDLtoDIV[ _f6 ] =SDLK_F6 ; + SDLtoDIV[ _f7 ] =SDLK_F7 ; + SDLtoDIV[ _f8 ] =SDLK_F8 ; + SDLtoDIV[ _f9 ] =SDLK_F9 ; + SDLtoDIV[ _f10 ] =SDLK_F10 ; + SDLtoDIV[ _f11 ] =SDLK_F11 ; + SDLtoDIV[ _f12 ] =SDLK_F12 ; + SDLtoDIV[ _num_lock ] =SDLK_NUMLOCK ; + SDLtoDIV[ _scroll_lock ] =SDLK_SCROLLOCK ; + SDLtoDIV[ _home ] =SDLK_HOME ; + SDLtoDIV[ _up ] =SDLK_UP ; + SDLtoDIV[ _pgup ] =SDLK_PAGEUP ; + SDLtoDIV[ _end ] =SDLK_END ; + SDLtoDIV[ _down ] =SDLK_DOWN ; + SDLtoDIV[ _left ] =SDLK_LEFT ; + SDLtoDIV[ _right ] =SDLK_RIGHT ; + SDLtoDIV[ _pgdn ] =SDLK_PAGEDOWN ; + SDLtoDIV[ _ins ] =SDLK_INSERT ; + SDLtoDIV[ _c_del ] =SDLK_KP_PERIOD ; + SDLtoDIV[ _c_backslash ] =SDLK_KP_DIVIDE ; + SDLtoDIV[ _c_asterisk ] =SDLK_KP_MULTIPLY ; + SDLtoDIV[ _c_minus ] =SDLK_KP_MINUS ; + SDLtoDIV[ _c_plus ] =SDLK_KP_PLUS ; + SDLtoDIV[ _c_enter ] =SDLK_KP_ENTER ; + SDLtoDIV[ _c_ins ] =SDLK_KP0 ; + SDLtoDIV[ _c_end ] =SDLK_KP1 ; + SDLtoDIV[ _c_down ] =SDLK_KP2 ; + SDLtoDIV[ _c_pgdn ] =SDLK_KP3 ; + SDLtoDIV[ _c_left ] =SDLK_KP4 ; + SDLtoDIV[ _c_center ] =SDLK_KP5 ; + SDLtoDIV[ _c_right ] =SDLK_KP6 ; + SDLtoDIV[ _c_home ] =SDLK_KP7 ; + SDLtoDIV[ _c_up ] =SDLK_KP8 ; + SDLtoDIV[ _c_pgup ] =SDLK_KP9 ; + +} + +void frame(int mem[], int * varindex, struct _procs_s *procs_s) +{ + int numkeys ; + + keys = SDL_GetKeyState(&numkeys ) ; + + //FILE* fichero ; + //fichero = fopen( "input.txt" , "w+" ) ; + //for ( i = 0 ; i < 256 ; i++ ) + // keys[i] = 0 ; +/* + for ( i = 0 ; i < 256 ; i++ ) + { + if ( event[i].type == SDL_KEYDOWN ) + { + keys[ SDLtoDIV[ event[i].key.keysym.sym ] ] = 1 ; + } + if ( event[i].type == SDL_KEYUP ) + { + keys[ SDLtoDIV[ event[i].key.keysym.sym ] ] = 0 ; + } + }*/ + /* + while(SDL_PollEvent(&tecla)) + { + if(tecla.type == SDL_KEYDOWN) + { + if ( + keys[tecla.key.keysym.sym] = 1 ; + //i=(int)tecla.key.keysym.sym; + } + } + */ +/* for ( i = 0 ; i < 256 ; i++ ) + { + fprintf( fichero , "%i " , keys[i] ) ; + } + fprintf( fichero , "\n" ) ; +*/ + //fclose( fichero ) ; + +} + + + +//**************************** FUNCIONES INTERNAS DE LA DLL *************************** + + diff --git a/ediv/src/dlls/input/input.def b/ediv/src/dlls/input/input.def new file mode 100644 index 0000000..8c7cce4 --- /dev/null +++ b/ediv/src/dlls/input/input.def @@ -0,0 +1,3 @@ +LIBRARY edivstd +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/input/input.sln b/ediv/src/dlls/input/input.sln new file mode 100644 index 0000000..b8474e5 --- /dev/null +++ b/ediv/src/dlls/input/input.sln @@ -0,0 +1,29 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "math", "input.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}" +EndProject +Global + GlobalSection(SourceCodeControl) = preSolution + SccNumberOfProjects = 1 + SccProjectUniqueName0 = input.vcproj + SccProjectName0 = \u0022$/dlls\u0022,\u0020YCAAAAAA + SccLocalPath0 = ..\\.. + SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe + SccProjectFilePathRelativizedFromConnection0 = dlls\\input\\ + EndGlobalSection + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/input/input.suo b/ediv/src/dlls/input/input.suo new file mode 100644 index 0000000..8f99c4f Binary files /dev/null and b/ediv/src/dlls/input/input.suo differ diff --git a/ediv/src/dlls/input/input.vcproj b/ediv/src/dlls/input/input.vcproj new file mode 100644 index 0000000..d65857d --- /dev/null +++ b/ediv/src/dlls/input/input.vcproj @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/dlls/input/main.h b/ediv/src/dlls/input/main.h new file mode 100644 index 0000000..e3e234d --- /dev/null +++ b/ediv/src/dlls/input/main.h @@ -0,0 +1,6 @@ + + + +int eDiv_Key(FUNCTION_PARAMS) ; + + diff --git a/ediv/src/dlls/math/Makefile b/ediv/src/dlls/math/Makefile new file mode 100644 index 0000000..a656c59 --- /dev/null +++ b/ediv/src/dlls/math/Makefile @@ -0,0 +1,8 @@ +LDFLAGS = -ggdb +CFLAGS = -Wall +CC = gcc + +TARGET = ../../../bin/so/edivstd.so + +$(TARGET): edivstd.c + $(CC) $(LDFLAGS) $(CFLAGS) -I../ -shared -Wl,-soname,edivstd.so -o $@ $< \ No newline at end of file diff --git a/ediv/src/dlls/math/main.h b/ediv/src/dlls/math/main.h new file mode 100644 index 0000000..0118bae --- /dev/null +++ b/ediv/src/dlls/math/main.h @@ -0,0 +1,29 @@ + +#define PIOVER180 0.017453292519943295769236907684886 + + +int eDiv_Abs(FUNCTION_PARAMS) ; +int eDiv_Pow(FUNCTION_PARAMS) ; +int eDiv_Sqrt(FUNCTION_PARAMS) ; +int eDiv_Rand(FUNCTION_PARAMS) ; +int eDiv_RandSeed(FUNCTION_PARAMS) ; +int eDiv_Sin(FUNCTION_PARAMS) ; +int eDiv_Cos(FUNCTION_PARAMS) ; +int eDiv_Tan(FUNCTION_PARAMS) ; +int eDiv_GetAngle(FUNCTION_PARAMS) ; +int eDiv_GetDist(FUNCTION_PARAMS) ; +int eDiv_GetDistX(FUNCTION_PARAMS) ; +int eDiv_GetDistY(FUNCTION_PARAMS) ; +int eDiv_FgetAngle(FUNCTION_PARAMS) ; +int eDiv_FgetDist(FUNCTION_PARAMS) ; +int eDiv_NearAngle(FUNCTION_PARAMS) ; + +float eDiv_cpysign(float n,float s); +float eDiv_max(float n1,float n2); +float eDiv_min(float n1,float n2); +float eDiv_xmax(float n1,float n2,float n3); +float eDiv_xmin(float n1,float n2,float n3); +float eDiv_xmid(float n1,float n2,float n3); + +int ftomil(float) ; +int prepara_angulo( int ) ; diff --git a/ediv/src/dlls/math/math.c b/ediv/src/dlls/math/math.c new file mode 100644 index 0000000..716565d --- /dev/null +++ b/ediv/src/dlls/math/math.c @@ -0,0 +1,402 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* EDIVSTD.DLL + * Esta librería contiene los datos más básicos que puede requerir un programa + * DIV, tal como las opciones de compilación, estructura reserved, etc. + */ +#include +#include +#include +#include + +#include "main.h" + +int seno[90001] ; + +/*int DllMain() +{ + //printf("Cargada DLL: SAMPLE\n"); + + // Si se quiere que la DLL se cargue, hay que devolver true + return TRUE; +}*/ + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ + + FUNCTION("abs",1,eDiv_Abs); + FUNCTION("pow",2,eDiv_Pow); + FUNCTION("sqrt",1,eDiv_Sqrt); + FUNCTION("rand",2,eDiv_Rand); + FUNCTION("rand_seed",1,eDiv_RandSeed) ; + FUNCTION("sin",1,eDiv_Sin) ; + FUNCTION("cos",1,eDiv_Cos) ; + FUNCTION("tan",1,eDiv_Tan) ; + FUNCTION("get_angle",1,eDiv_GetAngle) ; + FUNCTION("get_dist",1,eDiv_GetDist) ; + FUNCTION("get_distx",2,eDiv_GetDistX) ; + FUNCTION("get_disty",2,eDiv_GetDistY) ; + FUNCTION("fget_angle",4,eDiv_FgetAngle) ; + FUNCTION("fget_dist",4,eDiv_FgetDist) ; + FUNCTION("near_angle",3,eDiv_NearAngle) ; + FUNCTION("cpysign",2,eDiv_cpysign) ; + FUNCTION("max",2,eDiv_max) ; + FUNCTION("min",2,eDiv_min) ; + FUNCTION("xmax",3,eDiv_xmax) ; + FUNCTION("xmin",3,eDiv_xmin) ; + FUNCTION("xmid",3,eDiv_xmid) ; + ENTRYPOINT(first_load) ; + + return TRUE; +} + + + + +int eDiv_Abs(FUNCTION_PARAMS) +{ + int a = getparm() ; + if ( a < 0 ) a = -a ; + return a ; +} + +int eDiv_Pow(FUNCTION_PARAMS) +{ + int a,b,c,n,i ; + b = getparm() ; + a = getparm() ; + n = 1 ; + c = b ; + if ( c < 0 ) c = -c ; + for ( i = 1 ; i < c ; i++ ) + { + n *= a ; + } + if ( b < 0 ) + n = 1 / n ; + return n ; +} + +int eDiv_Sqrt(FUNCTION_PARAMS) +{ + int a ; + a = getparm() ; + return sqrt( a ) ; +} + +int eDiv_Rand(FUNCTION_PARAMS) +{ + int a,b,n,i ; + b = getparm() ; + a = getparm() ; + n = (int)(rand()%(b-a+1))+a ; + return n ; +} + +int eDiv_RandSeed(FUNCTION_PARAMS) +{ + int a ; + a = getparm() ; + if ( a == 0 ) + srand(time(NULL)) ; + else + srand(a) ; + return 1 ; +} + +int eDiv_Sin(FUNCTION_PARAMS) +{ + int a ; + a = getparm() ; + a = prepara_angulo(a) ; + if ( a <= 90000 ) + return seno[a]; + if ( a <= 180000 ) + return seno[180000-a] ; + if ( a <= 270000 ) + return -seno[a-180000] ; + return -seno[360000-a] ; +} + +int eDiv_Cos(FUNCTION_PARAMS) +{ + int a ; + a = getparm() ; + a = prepara_angulo(a) ; + if ( a <= 90000 ) + return seno[90000-a]; + if ( a <= 180000 ) + return -seno[a-90000] ; + if ( a <= 270000 ) + return -seno[270000-a] ; + return seno[a-270000] ; +} + +int eDiv_Tan(FUNCTION_PARAMS) +{ + int a , b , c; + a = getparm() ; + a = prepara_angulo(a) ; + if ( a <= 90000 ) + b = seno[a]; + else + if ( a <= 180000 ) + b = seno[180000-a] ; + else + if ( a <= 270000 ) + b = -seno[a-180000] ; + else + b = -seno[360000-a] ; + if ( a <= 90000 ) + c = seno[90000-a]; + else + if ( a <= 180000 ) + c = -seno[a-90000] ; + else + if ( a <= 270000 ) + c = -seno[270000-a] ; + else + c = seno[a-270000] ; + + if ( c == 0 ) + return 0x7FFFFFFF ; + else + return ( (int)(b/c) ) ; + return 0 ; +} + + + +int eDiv_GetAngle(FUNCTION_PARAMS) +{ + int id1 , id2 ; + int x1 , x2 , y1, y2 ; + int a = getparm() ; + id1 = fp->procs_s[ fp->proc_orden[ *fp->proceso_actual ] ].id ; + id2 = a ; + x1 = fp->mem[ id1 + fp->varindex[ _loc_x ] ] ; + y1 = fp->mem[ id1 + fp->varindex[ _loc_y ] ] ; + x2 = fp->mem[ id2 + fp->varindex[ _loc_x ] ] ; + y2 = fp->mem[ id2 + fp->varindex[ _loc_y ] ] ; + if ( (x2-x1) != 0 ) + { + a = atan( (double)((y2-y1) / (x2-x1)) ) / PIOVER180 ; + if ( x2 < x1 ) + a+= 180 ; + }else + if ( y2 > y1 ) + a = 90 ; + else + a = 270 ; + a *= 1000 ; + a = prepara_angulo(a) ; + return a ; +} + +int eDiv_GetDist(FUNCTION_PARAMS) +{ + int id1 , id2 ; + int x1 , x2 , y1, y2 ; + int a = getparm() ; + id1 = fp->procs_s[ fp->proc_orden[*fp->proceso_actual] ].id ; + id2 = a ; + x1 = fp->mem[ id1 + fp->varindex[ _loc_x ] ] ; + y1 = fp->mem[ id1 + fp->varindex[ _loc_y ] ] ; + x2 = fp->mem[ id2 + fp->varindex[ _loc_x ] ] ; + y2 = fp->mem[ id2 + fp->varindex[ _loc_y ] ] ; + a = sqrt( pow( x2-x1 , 2 ) + pow( y2-y1 , 2 ) ) ; + return a ; +} + +int eDiv_GetDistX(FUNCTION_PARAMS) +{ + int a , b ; + b = getparm() ; //distancia + a = getparm() ; //angulo + a = (int) b* cos( (a/1000)*PIOVER180 ) ; + return a ; +} + +int eDiv_GetDistY(FUNCTION_PARAMS) +{ + int a , b ; + b = getparm() ; //distancia + a = getparm() ; //angulo + a = (int) b* sin( (a/1000)*PIOVER180 ) ; + return a ; +} + +int eDiv_FgetAngle(FUNCTION_PARAMS) +{ + int x1 , y1 , x2 , y2 , a ; + y2 = getparm() ; + x2 = getparm() ; + y1 = getparm() ; + x1 = getparm() ; + if ( (x2-x1) != 0 ) + { + a = atan( (double)((y2-y1) / (x2-x1)) ) / PIOVER180 ; + if ( x2 < x1 ) + a+= 180 ; + }else + if ( y2 > y1 ) + a = 90 ; + else + a = 270 ; + a *= 1000 ; + a = prepara_angulo(a) ; + return a ; +} + +int eDiv_FgetDist(FUNCTION_PARAMS) +{ + int x1 , y1 , x2 , y2 , a; + y2 = getparm() ; + x2 = getparm() ; + y1 = getparm() ; + x1 = getparm() ; + a = sqrt( pow( x2-x1 , 2 ) + pow( y2-y1 , 2 ) ) ; + return a ; +} + +int eDiv_NearAngle(FUNCTION_PARAMS) +{ + int a , b , c ; + c = getparm() ; + b = getparm() ; + a = getparm() ; + a = prepara_angulo(a) ; + b = prepara_angulo(b) ; + c = prepara_angulo(c) ; + if ( abs(a - b) <= c ) + return b ; + if ( a < b ) + { + if ( abs( b-a ) < 180000 ) + { + a = prepara_angulo( a+c ) ; + }else + { + a = prepara_angulo( a-c ) ; + } + return a ; + }else + { + if ( abs( b-a ) < 180000 ) + { + a = prepara_angulo( a-c ) ; + }else + { + a = prepara_angulo( a+c ) ; + } + return a ; + } + return 0 ; +} + +int eDiv_cpysign(FUNCTION_PARAMS) +{ + int s = getparm() ; + int n = getparm() ; + return ((s<0)?((n<0)?(n):(-n)):((n>=0)?(n):(-n))); +} + +int eDiv_max(FUNCTION_PARAMS) +{ + int n2 = getparm() ; + int n1 = getparm() ; + return ((n1>n2)?(n1):(n2)); +} + +int eDiv_min(FUNCTION_PARAMS) +{ + int n2 = getparm() ; + int n1 = getparm() ; + return ((n1m) m=n2; + if(n3>m) m=n3; + return m; +} + +int eDiv_xmin(FUNCTION_PARAMS) +{ + int n3 = getparm() ; + int n2 = getparm() ; + int n1 = getparm() ; + + int m=n1; + if(n2n2 && n1>n3 && n2>=n3) || + (n1>n2 && n1==n3 && n2n3) || + (n1>n2 && n1>n3 && n2n3 && n2>n3)) + return n3; + return n1; +} + + +//------------------------------ ENTRYPOINTS ------------------------------------------- + +void first_load() +{ + int i ; + //calculamos los senos del 0 al 90000 + for ( i = 0 ; i < 90000 ; i++ ) + { + seno[i] = ftomil( sin( (i / 1000)*PIOVER180 ) ); + } + seno[90000] = 0x7FFFFFFF ; +} + + +//**************************** FUNCIONES INTERNAS DE LA DLL *************************** + +int ftomil( float n ) +{ + + return ((int)(n*1000)) ; + +} + +int prepara_angulo( int n ) +{ + n = n % 360000 ; + if ( n < 0 ) n = n + 360000 ; + return n ; +} + diff --git a/ediv/src/dlls/math/math.def b/ediv/src/dlls/math/math.def new file mode 100644 index 0000000..1244a84 --- /dev/null +++ b/ediv/src/dlls/math/math.def @@ -0,0 +1,3 @@ +LIBRARY math +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/math/math.sln b/ediv/src/dlls/math/math.sln new file mode 100644 index 0000000..6259e45 --- /dev/null +++ b/ediv/src/dlls/math/math.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "math", "math.vcproj", "{5F3C5CEB-002A-4132-BCA3-65CE524A23E9}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {5F3C5CEB-002A-4132-BCA3-65CE524A23E9}.Debug.ActiveCfg = Debug|Win32 + {5F3C5CEB-002A-4132-BCA3-65CE524A23E9}.Debug.Build.0 = Debug|Win32 + {5F3C5CEB-002A-4132-BCA3-65CE524A23E9}.Release.ActiveCfg = Release|Win32 + {5F3C5CEB-002A-4132-BCA3-65CE524A23E9}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/math/math.suo b/ediv/src/dlls/math/math.suo new file mode 100644 index 0000000..eeb44e8 Binary files /dev/null and b/ediv/src/dlls/math/math.suo differ diff --git a/ediv/src/dlls/math/math.vcproj b/ediv/src/dlls/math/math.vcproj new file mode 100644 index 0000000..713499b --- /dev/null +++ b/ediv/src/dlls/math/math.vcproj @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/dlls/scroll/scroll.c b/ediv/src/dlls/scroll/scroll.c new file mode 100644 index 0000000..bc53dc2 --- /dev/null +++ b/ediv/src/dlls/scroll/scroll.c @@ -0,0 +1,112 @@ + + +#include +#include +#include "../../shared/varindex.h" +#include "scroll.h" + + +struct +{ + int existe ; + int file, graph ; + int x0 , y0 , x1 , y1 ; + int z ; + int camera ; + int ratio ; + int speed ; + int region1 , region2 ; +}scrolls[10] ; + + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ + + GLOBAL_STRUCT("scroll",9); + _INT("x0",0); + _INT("y0",0); + _INT("x1",0); + _INT("y1",0); + _INT("z",0); + _INT("camera",0); + _INT("ratio",0); + _INT("speed",0); + _INT("region1",0); + _INT("region2",0); + END_STRUCT; + + FUNCTION("start_scroll",6,eDiv_StartScroll) ; + + ENTRYPOINT( frame ) ; + + return TRUE ; +} + +FILE * fichero ; + +int eDiv_StartScroll(FUNCTION_PARAMS) +{ + int num , f , g1 , g2 , r , b ; + b = getparm() ; + r = getparm() ; + g2 = getparm() ; + g1 = getparm() ; + f = getparm() ; + num = getparm() ; + + if ( scrolls[num].existe ) + return -1 ; + + scrolls[num].existe = 1 ; +/* + fichero = fopen("scroll.txt" , "w+" ) ; + fprintf(fichero , "glo_scroll: %d" , varindex[_glo_scroll] ) ; + fclose(fichero) ;*/ + /* + fp->mem[ varindex[_glo_scroll] + 0 ] = 0 ; + fp->mem[ varindex[_glo_scroll] + 1 ] = 0 ; + fp->mem[ varindex[_glo_scroll] + 2 ] = 0 ; + fp->mem[ varindex[_glo_scroll] + 3 ] = 0 ; + fp->mem[ varindex[_glo_scroll] + 4 ] = 512 ; + fp->mem[ varindex[_glo_scroll] + 0 ] = 0 ; + fp->mem[ varindex[_glo_scroll] + 0 ] = b ; + fp->mem[ varindex[_glo_scroll] + 0 ] = 0 ; + fp->mem[ varindex[_glo_scroll] + 0 ] = r ; + fp->mem[ varindex[_glo_scroll] + 0 ] = r ; +*/ + return 1 ; +} + + + +//============== Entrypoints ===================================================== + +void frame(FUNCTION_PARAMS) +{ + SDL_Rect srcrect, dstrect ; + + // de momento solo hay esta demostracion de que fp->Dibuja funciona xDD + // falta hacer los scrolls :P +/* + if ( fp->existe.dibuja ) + { + if ( fp->files[0].existe ) + { + if ( fp->files[0].mapa[1000].existe ) + { + srcrect.x = 0 ; + srcrect.y = 0 ; + srcrect.w = fp->files[0].mapa[1000].Surface->w ; + srcrect.h = fp->files[0].mapa[1000].Surface->h ; + fp->Dibuja( fp->files[0].mapa[1000].Surface , srcrect , srcrect , 0 , 128 ) ; + } + } + } + +*/ + +} + + + + diff --git a/ediv/src/dlls/scroll/scroll.def b/ediv/src/dlls/scroll/scroll.def new file mode 100644 index 0000000..7c30987 --- /dev/null +++ b/ediv/src/dlls/scroll/scroll.def @@ -0,0 +1,3 @@ +LIBRARY scroll +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/scroll/scroll.h b/ediv/src/dlls/scroll/scroll.h new file mode 100644 index 0000000..8a22986 --- /dev/null +++ b/ediv/src/dlls/scroll/scroll.h @@ -0,0 +1,3 @@ + + +int eDiv_StartScroll(FUNCTION_PARAMS) ; \ No newline at end of file diff --git a/ediv/src/dlls/scroll/scroll.sln b/ediv/src/dlls/scroll/scroll.sln new file mode 100644 index 0000000..10009a3 --- /dev/null +++ b/ediv/src/dlls/scroll/scroll.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scroll", "scroll.vcproj", "{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.ActiveCfg = Debug|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.Build.0 = Debug|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.ActiveCfg = Release|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/scroll/scroll.suo b/ediv/src/dlls/scroll/scroll.suo new file mode 100644 index 0000000..2d54f6d Binary files /dev/null and b/ediv/src/dlls/scroll/scroll.suo differ diff --git a/ediv/src/dlls/scroll/scroll.vcproj b/ediv/src/dlls/scroll/scroll.vcproj new file mode 100644 index 0000000..891dca4 --- /dev/null +++ b/ediv/src/dlls/scroll/scroll.vcproj @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/dlls/strings/conv.c b/ediv/src/dlls/strings/conv.c new file mode 100644 index 0000000..881fc09 --- /dev/null +++ b/ediv/src/dlls/strings/conv.c @@ -0,0 +1,95 @@ +#include + +#include "conv.h" + +/* Tabla de conversión de caracteres MS-DOS a Windows */ + +int dos_chars=0; + +byte dos_to_win[256] = { + 0, 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, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, +201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163, 216, 215, 131, +225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187, +166, 166, 166, 166, 166, 193, 194, 192, 169, 166, 166, 43, 43, 162, 165, 43, + 43, 45, 45, 43, 45, 43, 227, 195, 43, 43, 45, 45, 166, 45, 43, 164, +240, 208, 202, 203, 200, 105, 205, 206, 207, 43, 43, 166, 95, 166, 204, 175, +211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180, +173, 177, 61, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 166, 160 +}; + +/* Tabla de conversión de caracteres Windows a MS-DOS */ + +byte win_to_dos[256] = +{ + 0, 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, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 159, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 255, 173, 189, 156, 207, 190, 254, 245, 249, 184, 166, 174, 170, 240, 169, 238, + 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168, + 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216, + 209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225, + 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139, + 208, 164, 149, 162, 147, 228, 148, 246, 155, 151, 163, 150, 129, 236, 231, 152 +}; + +byte lower[256]; +byte upper[256]; + +byte c_convert (byte c) +{ + return dos_chars ? c : win_to_dos[c]; +} + + +void set_c_lower (const byte * from, const byte * to) +{ + if (dos_chars) + while (*from) lower[win_to_dos[*from++]] = win_to_dos[*to++] ; + else + while (*from) lower[*from++] = *to++ ; +} + +void set_c_upper (const byte * from, const byte * to) +{ + if (dos_chars) + while (*from) upper[win_to_dos[*from++]] = win_to_dos[*to++] ; + else + while (*from) upper[*from++] = *to++ ; +} + +void inicializa_lower() +{ + memset (lower, 0, 256); // es necesario + + set_c_lower ("ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz"); + set_c_lower ("abcdefghijklmnopqrstuvwxyz","abcdefghijklmnopqrstuvwxyz"); + set_c_lower ("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ","áéíóúñçàèìòùäëïöüýâêîôûæãåõ"); + set_c_lower("áéíóúñçàèìòùäëïöüýâêîôûæãåõ","áéíóúñçàèìòùäëïöüýâêîôûæãåõ"); + set_c_lower("1234567890#$_ºª","1234567890#$_ºª"); +} + +void inicializa_upper() +{ + memset (upper, 0, 256); // es necesario + + set_c_upper ("abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + set_c_upper ("ABCDEFGHIJKLMNOPQRSTUVWXYZ","ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + set_c_upper ("áéíóúñçàèìòùäëïöüýâêîôûæãåõ","ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ"); + set_c_upper("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ","ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ"); + set_c_upper("1234567890#$_ºª","1234567890#$_ºª"); +} \ No newline at end of file diff --git a/ediv/src/dlls/strings/conv.h b/ediv/src/dlls/strings/conv.h new file mode 100644 index 0000000..3c9ea9f --- /dev/null +++ b/ediv/src/dlls/strings/conv.h @@ -0,0 +1,15 @@ +#define byte unsigned char + +byte dos_to_win[256]; +byte win_to_dos[256]; + +byte lower[256]; +byte upper[256]; + +byte c_convert(byte c); + +void set_c_lower (const byte *from, const byte *to); +void inicializa_lower(); + +void set_c_upper (const byte *from, const byte *to); +void inicializa_upper(); \ No newline at end of file diff --git a/ediv/src/dlls/strings/stings.def b/ediv/src/dlls/strings/stings.def new file mode 100644 index 0000000..798f54a --- /dev/null +++ b/ediv/src/dlls/strings/stings.def @@ -0,0 +1,3 @@ +LIBRARY strings +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/strings/strings.c b/ediv/src/dlls/strings/strings.c new file mode 100644 index 0000000..ce29426 --- /dev/null +++ b/ediv/src/dlls/strings/strings.c @@ -0,0 +1,243 @@ +#include +#include + +#include // eDiv ToolKit ;) + +#include "conv.h" // Conversiones + +/************************/ +/* char() * */ +/* lower() * HECHA */ +/* strcat() * HECHA */ +/* strchr() * HECHA */ +/* strcmp() * HECHA */ +/* strcpy() * HECHA */ +/* strdel() * */ +/* strlen() * HECHA */ +/* strset() * HECHA */ +/* strstr() * HECHA */ +/* upper() * HECHA */ +/* calculate() * HECHA */ +/* fcalculate() * HECHA */ +/* itoa() * */ +/* asc() * */ // [ text=ASC(65); // test="A";] (Una peticion suya :). +/* ftoa() * */ // Para los nuevos FLOAT :) +/************************/ + +// Rutinas eDiv! :) +char *DIV_strcpy(FUNCTION_PARAMS); +size_t DIV_strlen(FUNCTION_PARAMS); +int DIV_strcmp(FUNCTION_PARAMS); +char *DIV_strchr(FUNCTION_PARAMS); +char *DIV_strcat(FUNCTION_PARAMS); +char *DIV_strstr(FUNCTION_PARAMS); +int DIV_atoi(FUNCTION_PARAMS); +float DIV_atof(FUNCTION_PARAMS); +char *DIV_lower(FUNCTION_PARAMS); +char *DIV_upper(FUNCTION_PARAMS); +char *DIV_strset(FUNCTION_PARAMS); +char *DIV_itoa(FUNCTION_PARAMS); + +// Rutinas internas +static int hexval(char c); + +// Variables +byte i_lower=0; // lower ya esta inicializado? +byte i_upper=0; // upper ya esta inicializado? + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ + + FUNCTION("strcpy",2,DIV_strcpy); + FUNCTION("strlen",1,DIV_strlen); + FUNCTION("strcmp",2,DIV_strcmp); + FUNCTION("strchr",2,DIV_strchr); + FUNCTION("strcat",2,DIV_strcat); + FUNCTION("strstr",2,DIV_strstr); + FUNCTION("strset",2,DIV_strset); + + // Estas dos son iguales, lo sengundo es por una standarizacion :) + FUNCTION("calculate",1,DIV_atoi); + FUNCTION("atoi",1,DIV_atoi); + // Idem a lo anterior, pero para los datos float :) + FUNCTION("fcalculate",1,DIV_atof); + FUNCTION("atof",1,DIV_atof); + + FUNCTION("lower",1,DIV_lower); + FUNCTION("upper",1,DIV_upper); + + return TRUE; +} + +char *DIV_strcpy(FUNCTION_PARAMS) +{ + char *src=(char *)getparm(); + char *dest=(char *)getparm(); + + char *tmp = dest; + + while ((*dest++ = *src++) != '\0'); + return tmp; +} + +size_t DIV_strlen(FUNCTION_PARAMS) +{ + char *s = (char *)getparm(); + const char *sc; + + for(sc = s; *sc != '\0'; ++sc); + return sc - s; +} + +char *DIV_strset(FUNCTION_PARAMS) +{ + int valor=getparm(); + char *cadena=(char *)getparm(); + + char *inicio=cadena; + + while (*cadena) + *cadena++ = (char)valor; + + return inicio; +} + +int DIV_strcmp(FUNCTION_PARAMS) +{ + const char *ct = (const char *)getparm(); + const char *cs = (const char *)getparm(); + + signed char __res; + + while (1) { + if ((__res = *cs - *ct++) != 0 || !*cs++) + break; + } + + return __res; +} + +char *DIV_strchr(FUNCTION_PARAMS) +{ + int c = getparm(); + const char *s = (const char *)getparm(); + + for(; *s != (char) c; ++s) + if (*s == '\0') + return NULL; + return (char *) s; +} + +char *DIV_strcat(FUNCTION_PARAMS) +{ + const char *src = (const char *)getparm(); + char *dest = (char *)getparm(); + + char *tmp = dest; + + while(*dest) + dest++; + while((*dest++ = *src++) != '\0') + ; + return tmp; +} + +char *DIV_strstr(FUNCTION_PARAMS) +{ + const char *s2 = (const char*)getparm(); + const char *s1 = (const char*)getparm(); + + int l1, l2; + + l2 = strlen(s2); + if (!l2) + return (char *)s1; + l1 = strlen(s1); + while(l1 >= l2) { + l1--; + if (!memcmp(s1,s2,l2)) + return (char *)s1; + s1++; + } + return NULL; +} + +int DIV_atoi(FUNCTION_PARAMS) +{ + const char *num = (const char*)getparm(); + int value = 0; + if (num[0] == '0' && num[1] == 'x') { + // hexadecimal + num += 2; + while (*num && isxdigit(*num)) + value = value * 16 + hexval(*num++); + } else { + // decimal + while (*num && isdigit(*num)) + value = value * 10 + *num++ - '0'; + } + + return value; +} + +float DIV_atof(FUNCTION_PARAMS) +{ + const char *num = (const char*)getparm(); + float value = 0; + if (num[0] == '0' && num[1] == 'x') { + // hexadecimal + num += 2; + while (*num && isxdigit(*num)) + value = value * 16 + hexval(*num++); + } else { + // decimal + while (*num && isdigit(*num)) + value = value * 10 + *num++ - '0'; + } + + return value; +} + +char *DIV_lower(FUNCTION_PARAMS) +{ + int i; + char *str=(char*)getparm(); + + if (!i_lower) + inicializa_lower(); + + for (i=0;str[i]!=0;i++) { + if (lower[str[i]]!=0) str[i]=lower[str[i]]; + } + + return str; +} + +char *DIV_upper(FUNCTION_PARAMS) +{ + int i; + char *str=(char*)getparm(); + + if (!i_upper) + inicializa_upper(); + + for (i=0;str[i]!=0;i++) { + if (upper[str[i]]!=0) str[i]=upper[str[i]]; + } + + return str; +} + +// Rutinas internas +static int hexval(char c) +{ + if (c >= '0' && c <= '9') + return c - '0'; + else if (c >= 'a' && c <= 'f') + return c - 'a' + 10; + else if (c >= 'A' && c <= 'F') + return c - 'A' + 10; + + return 0; +} + diff --git a/ediv/src/dlls/strings/strings.dsp b/ediv/src/dlls/strings/strings.dsp new file mode 100644 index 0000000..fa04ce0 --- /dev/null +++ b/ediv/src/dlls/strings/strings.dsp @@ -0,0 +1,119 @@ +# Microsoft Developer Studio Project File - Name="strings" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=strings - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "strings.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "strings.mak" CFG="strings - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "strings - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "strings - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "strings - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 1 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\dll\strings.dll" + +!ELSEIF "$(CFG)" == "strings - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 1 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\dll\strings.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "strings - Win32 Release" +# Name "strings - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\conv.c +# End Source File +# Begin Source File + +SOURCE=.\stings.def +# End Source File +# Begin Source File + +SOURCE=.\strings.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\conv.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ediv/src/dlls/strings/strings.plg b/ediv/src/dlls/strings/strings.plg new file mode 100644 index 0000000..e974872 --- /dev/null +++ b/ediv/src/dlls/strings/strings.plg @@ -0,0 +1,89 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: edivstd - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP49.tmp" with contents +[ +/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /Fp"Debug/edivstd.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\ediv\src\dlls\edivstd\edivstd.c" +] +Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP49.tmp" +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4A.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/edivstd.pdb" /debug /machine:I386 /def:".\edivstd.def" /out:"..\..\..\bin\dll\edivstd.dll" /implib:"Debug/edivstd.lib" /pdbtype:sept +.\Debug\edivstd.obj +] +Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4A.tmp" +

    Output Window

    +Compiling... +edivstd.c +d:\ediv\src\dlls\edivstd\edivstd.c(73) : warning C4146: unary minus operator applied to unsigned type, result still unsigned +Linking... + Creating library Debug/edivstd.lib and object Debug/edivstd.exp + + + +

    Results

    +edivstd.dll - 0 error(s), 1 warning(s) +

    +--------------------Configuration: sample - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4E.tmp" with contents +[ +/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SAMPLE_EXPORTS" /Fp"Debug/sample.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\ediv\src\dlls\sample\sample.c" +] +Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4E.tmp" +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4F.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/sample.pdb" /debug /machine:I386 /def:".\sample.def" /out:"..\..\..\bin\dll\sample.dll" /implib:"Debug/sample.lib" /pdbtype:sept +.\Debug\sample.obj +] +Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4F.tmp" +

    Output Window

    +Compiling... +sample.c +Linking... + Creating library Debug/sample.lib and object Debug/sample.exp + + + +

    Results

    +sample.dll - 0 error(s), 0 warning(s) +

    +--------------------Configuration: strings - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP53.tmp" with contents +[ +/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /Fp"Debug/strings.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\ediv\src\dlls\strings\conv.c" +"D:\ediv\src\dlls\strings\strings.c" +] +Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP53.tmp" +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP54.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/strings.pdb" /debug /machine:I386 /def:".\stings.def" /out:"..\..\..\bin\dll\strings.dll" /implib:"Debug/strings.lib" /pdbtype:sept +.\Debug\conv.obj +.\Debug\strings.obj +] +Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP54.tmp" +

    Output Window

    +Compiling... +conv.c +strings.c +Linking... + Creating library Debug/strings.lib and object Debug/strings.exp + + + +

    Results

    +strings.dll - 0 error(s), 0 warning(s) +
    + + diff --git a/ediv/src/dlls/strings/strings.vcproj b/ediv/src/dlls/strings/strings.vcproj new file mode 100644 index 0000000..3bf1f3d --- /dev/null +++ b/ediv/src/dlls/strings/strings.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/dlls/strings/strings.vcproj.vspscc b/ediv/src/dlls/strings/strings.vcproj.vspscc new file mode 100644 index 0000000..c423084 --- /dev/null +++ b/ediv/src/dlls/strings/strings.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:dlls\\strings" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/ediv/src/dlls/text/text.c b/ediv/src/dlls/text/text.c new file mode 100644 index 0000000..edd9499 --- /dev/null +++ b/ediv/src/dlls/text/text.c @@ -0,0 +1,392 @@ + + +#include +#include +#include "../../shared/varindex.h" +#include "../../shared/edivfont.h" +#include "text.h" + + +struct _fuente_control_s fuente_control_s[0xFF]; +int existe[0xFF] ; + +struct +{ + int existe ; + int numerica ; // 0: texto , 1: numerica (write_int) + int offset_var ; // solo para numerica = 1 + int centrado ; // solo para numerica = 1 + int fuente ; // solo para numerica = 1 + int x , y ; + int cx , cy ; + SDL_Surface *imagen ; +}textos[0xFFF] ; + + +int ExportaFuncs(EXPORTAFUNCS_PARAMS) +{ + + FUNCTION("load_fnt",1,eDiv_LoadFnt) ; + FUNCTION("write",5,eDiv_Write) ; + FUNCTION("write_int",5,eDiv_WriteInt) ; + FUNCTION("move_text",3,eDiv_MoveText) ; + FUNCTION("delete_text",1,eDiv_DeleteText) ; + ENTRYPOINT( frame ) ; + ENTRYPOINT(first_load) ; + + return TRUE ; +} + +FILE *fichero ; + +int eDiv_LoadFnt(FUNCTION_PARAMS) +{ + FILE *fuente ; + char *pool ; + int i ; + fpos_t pos ; + const char *filename=getstrparm(); // Fichero a cargar + + for ( i = 1 ; i < 256 ; i++ ) + { + if ( existe[i] == 0 ) + break ; + } + if ( i == 256 ) + return -1 ; + + fichero = fopen("text.txt" , "w+" ) ; + fuente = fopen(filename, "rb" ) ; + fprintf( fichero , "Leidos %d bytes\n" , (int)fread( &fuente_control_s[i] , 1 , sizeof(fuente_control_s[i]) , fuente ) ) ; + if (!(pool = malloc(fuente_control_s[i].size_imagen + 1 ) ) ) + fprintf(fichero , "Error: Memoria insuficiente" ) ; + pos = fuente_control_s[i].offset_imagen ; + fsetpos(fuente , &pos ) ; + fprintf(fichero , "Size of image: %d bytes\n" , fuente_control_s[i].size_imagen ) ; + fprintf(fichero , "Leidos %d bytes\n" , (int)fread( pool , 1 , fuente_control_s[i].size_imagen , fuente ) ) ; + fuente_control_s[i].imagen = SDL_CreateRGBSurfaceFrom( pool , fuente_control_s[i].w , fuente_control_s[i].h , fuente_control_s[i].bytespp * 8 , fuente_control_s[i].w * fuente_control_s[i].bytespp , 0 , 0 , 0, 0 ) ; + + fclose(fuente) ; + fclose(fichero) ; + + existe[i] = 1 ; + return i ; +} + + +int eDiv_Write(FUNCTION_PARAMS) +{ + int i , j ; + int ax ; + SDL_Rect dstrect ; + int fuente , x , y , centrado ; + int w , h ; + char *texto ; + texto = getstrparm() ; + centrado = getparm() ; + y = getparm() ; + x = getparm() ; + fuente = getparm() ; + + for ( i = 1 ; i < 0xFFF ; i++ ) + { + if ( textos[i].existe == 0 ) + break ; + } + if ( i == 0xFFF ) + return -1 ; + + + textos[i].x = x ; + textos[i].y = y ; + textos[i].numerica = 0 ; + textos[i].offset_var = 0 ; + textos[i].centrado = 0 ; + textos[i].fuente = 0 ; + + + // Calculamos el ancho del fichero + w = 0 ; + for ( j = 0 ; j < strlen(texto) ; j++ ) + w += fuente_control_s[fuente].rect[ texto[j] ].w +1; + h = fuente_control_s[fuente].imagen->h ; + + textos[i].imagen = SDL_CreateRGBSurface(SDL_HWSURFACE, w , h , fuente_control_s[fuente].bytespp * 8 , 0 , 0 , 0 , 0 ) ; + SDL_SetColorKey( textos[i].imagen , SDL_SRCCOLORKEY | SDL_RLEACCEL , 0 ) ; + + + // Escribimos + ax = 0 ; // Valor de x acumulativo mientras se va escribiendo + for ( j = 0 ; j < strlen(texto) ; j++ ) + { + dstrect.x = ax ; + dstrect.y = fuente_control_s[fuente].rect[ texto[j] ].y ; + dstrect.w = fuente_control_s[fuente].rect[ texto[j] ].w ; + dstrect.h = fuente_control_s[fuente].rect[ texto[j] ].h ; + SDL_BlitSurface( fuente_control_s[fuente].imagen , &fuente_control_s[fuente].rect[ texto[j] ] , textos[i].imagen , &dstrect ) ; + ax += fuente_control_s[fuente].rect[ texto[j] ].w +1 ; + } + + // Centrado + if ( centrado == 0 || centrado == 3 || centrado == 6 ) + textos[i].cx = 0 ; + if ( centrado == 1 || centrado == 4 || centrado == 7 ) + textos[i].cx = (int) textos[i].imagen->w / 2 ; + if ( centrado == 2 || centrado == 5 || centrado == 8 ) + textos[i].cx = textos[i].imagen->w -1 ; + if ( centrado > -1 && centrado < 3 ) + textos[i].cy = 0 ; + if ( centrado > 2 && centrado < 6 ) + textos[i].cy = (int) textos[i].imagen->h / 2 ; + if ( centrado > 5 && centrado < 9 ) + textos[i].cy = textos[i].imagen->h -1 ; + + + textos[i].existe = 1 ; + + return i ; +} + +int eDiv_WriteInt(FUNCTION_PARAMS) +{ + int i , j ; + int w , h , ax ; + SDL_Rect dstrect ; + int fuente , x , y , centrado , offset_var ; + char *texto ; + char texto2[30] ; + char *texp ; + int temp ; + offset_var = getparm() ; + centrado = getparm() ; + y = getparm() ; + x = getparm() ; + fuente = getparm() ; + + for ( i = 1 ; i < 0xFFF ; i++ ) + { + if ( textos[i].existe == 0 ) + break ; + } + if ( i == 1024 ) + return -1 ; + + + textos[i].x = x ; + textos[i].y = y ; + textos[i].numerica = 1 ; + textos[i].offset_var = offset_var ; + textos[i].centrado = centrado ; + textos[i].fuente = fuente ; + + + fichero = fopen("wrin.txt" , "w+") ; + fprintf( fichero , "valor: %i\n" , fp->varindex[_glo_fps] ) ; + fclose(fichero) ; + + _itoa( fp->mem[ textos[i].offset_var ] , texto2 , 10 ) ; +/* + temp = fp->mem[ textos[i].offset_var ] ; + texp = texto ; + while( temp > 0 ) + { + *texp = temp % 10 ; + texp++ ; +*/ + texto = texto2 ; + + + // Calculamos el ancho del fichero + w = 0 ; + for ( j = 0 ; j < strlen(texto) ; j++ ) + w += fuente_control_s[fuente].rect[ texto[j] ].w +1; + h = fuente_control_s[fuente].imagen->h ; + + textos[i].imagen = SDL_CreateRGBSurface(SDL_HWSURFACE, w , h , fuente_control_s[fuente].bytespp * 8 , 0 , 0 , 0 , 0 ) ; + SDL_SetColorKey( textos[i].imagen , SDL_SRCCOLORKEY | SDL_RLEACCEL , 0 ) ; + + // Escribimos + ax = 0 ; // Valor de x acumulativo mientras se va escribiendo + for ( j = 0 ; j < strlen(texto) ; j++ ) + { + dstrect.x = ax ; + dstrect.y = fuente_control_s[fuente].rect[ texto[j] ].y ; + dstrect.w = fuente_control_s[fuente].rect[ texto[j] ].w ; + dstrect.h = fuente_control_s[fuente].rect[ texto[j] ].h ; + SDL_BlitSurface( fuente_control_s[fuente].imagen , &fuente_control_s[fuente].rect[ texto[j] ] , textos[i].imagen , &dstrect ) ; + ax += fuente_control_s[fuente].rect[ texto[j] ].w +1 ; + } + + // Centrado + if ( centrado == 0 || centrado == 3 || centrado == 6 ) + textos[i].cx = 0 ; + if ( centrado == 1 || centrado == 4 || centrado == 7 ) + textos[i].cx = (int) textos[i].imagen->w / 2 ; + if ( centrado == 2 || centrado == 5 || centrado == 8 ) + textos[i].cx = textos[i].imagen->w -1 ; + if ( centrado > -1 && centrado < 3 ) + textos[i].cy = 0 ; + if ( centrado > 2 && centrado < 6 ) + textos[i].cy = (int) textos[i].imagen->h / 2 ; + if ( centrado > 5 && centrado < 9 ) + textos[i].cy = textos[i].imagen->h -1 ; + + + + textos[i].existe = 1 ; + + return i ; +} + +int eDiv_MoveText(FUNCTION_PARAMS) +{ + int i , x , y ; + y = getparm() ; + x = getparm() ; + i = getparm() ; + + textos[i].x = x ; + textos[i].y = y ; + + return 1 ; +} + +int eDiv_DeleteText(FUNCTION_PARAMS) +{ + int i ; + i = getparm() ; + + if ( !textos[i].existe ) + return -1 ; + + textos[i].existe = 0 ; + //SDL_FreeSurface(textos[i].imagen) ; + + return 1 ; +} + +//============== Entrypoints ===================================================== + +void frame(FUNCTION_PARAMS) +{ + SDL_Rect srcrect, dstrect ; + char *texto ; + char texto2[30] ; + int i , j ; + int w , h , ax ; + + for ( i = 0 ; i < 0xFFF ; i++ ) + if ( textos[i].existe ) + { + if ( textos[i].numerica ) + { + SDL_FreeSurface( textos[i].imagen ) ; + + _itoa( fp->mem[ textos[i].offset_var ] , texto2 , 10 ) ; + texto = texto2 ; + + // Calculamos el ancho del fichero + w = 0 ; + for ( j = 0 ; j < strlen(texto) ; j++ ) + w += fuente_control_s[textos[i].fuente].rect[ texto[j] ].w +1; + h = fuente_control_s[textos[i].fuente].imagen->h ; + + textos[i].imagen = SDL_CreateRGBSurface(SDL_HWSURFACE, w , h , fuente_control_s[textos[i].fuente].bytespp * 8 , 0 , 0 , 0 , 0 ) ; + SDL_SetColorKey( textos[i].imagen , SDL_SRCCOLORKEY | SDL_RLEACCEL , 0 ) ; + + // Escribimos + ax = 0 ; // Valor de x acumulativo mientras se va escribiendo + for ( j = 0 ; j < strlen(texto) ; j++ ) + { + dstrect.x = ax ; + dstrect.y = fuente_control_s[textos[i].fuente].rect[ texto[j] ].y ; + dstrect.w = fuente_control_s[textos[i].fuente].rect[ texto[j] ].w ; + dstrect.h = fuente_control_s[textos[i].fuente].rect[ texto[j] ].h ; + SDL_BlitSurface( fuente_control_s[textos[i].fuente].imagen , &fuente_control_s[textos[i].fuente].rect[ texto[j] ] , textos[i].imagen , &dstrect ) ; + ax += fuente_control_s[textos[i].fuente].rect[ texto[j] ].w +1 ; + } + + // Centrado + if ( textos[i].centrado == 0 || textos[i].centrado == 3 || textos[i].centrado == 6 ) + textos[i].cx = 0 ; + if ( textos[i].centrado == 1 || textos[i].centrado == 4 || textos[i].centrado == 7 ) + textos[i].cx = (int) textos[i].imagen->w / 2 ; + if ( textos[i].centrado == 2 || textos[i].centrado == 5 || textos[i].centrado == 8 ) + textos[i].cx = textos[i].imagen->w -1 ; + if ( textos[i].centrado > -1 && textos[i].centrado < 3 ) + textos[i].cy = 0 ; + if ( textos[i].centrado > 2 && textos[i].centrado < 6 ) + textos[i].cy = (int) textos[i].imagen->h / 2 ; + if ( textos[i].centrado > 5 && textos[i].centrado < 9 ) + textos[i].cy = textos[i].imagen->h -1 ; + } + + + srcrect.x = 0 ; + srcrect.y = 0 ; + srcrect.w = textos[i].imagen->w ; + srcrect.h = textos[i].imagen->h ; + + dstrect.x = textos[i].x - textos[i].cx ; + dstrect.y = textos[i].y - textos[i].cy ; + dstrect.w = srcrect.w ; + dstrect.h = srcrect.h ; + + fp->Dibuja( textos[i].imagen , srcrect, dstrect , 0 , 255 ) ; + } + + + + + /* + if ( existe[1] ) + { + if ( fp->existe.dibuja ) + { + srcrect.x = 0 ; + srcrect.y = 0 ; + srcrect.w = fuente_control_s[1].w ; + srcrect.h = fuente_control_s[1].h ; + fp->Dibuja( fuente_control_s[1].imagen , srcrect , srcrect , 0 , 255 ) ; + } + }*/ + + + /* + // de momento solo hay esta demostracion de que fp->Dibuja funciona xDD + // falta hacer los scrolls :P + + if ( fp->existe.dibuja ) + { + if ( fp->files[0].existe ) + { + if ( fp->files[0].mapa[1000].existe ) + { + srcrect.x = 0 ; + srcrect.y = 0 ; + srcrect.w = fp->files[0].mapa[1000].Surface->w ; + srcrect.h = fp->files[0].mapa[1000].Surface->h ; + fp->Dibuja( fp->files[0].mapa[1000].Surface , srcrect , srcrect , 0 , 128 ) ; + } + } + } +*/ + + +} + + + +void first_load(FUNCTION_PARAMS) +{ + int i ; + for ( i = 0 ; i < 256 ; i++ ) + existe[i] = 0 ; + + for ( i = 0 ; i < 1024 ; i++ ) + textos[i].existe = 0 ; + +} + + + diff --git a/ediv/src/dlls/text/text.def b/ediv/src/dlls/text/text.def new file mode 100644 index 0000000..f27fd0a --- /dev/null +++ b/ediv/src/dlls/text/text.def @@ -0,0 +1,3 @@ +LIBRARY text +EXPORTS + ExportaFuncs diff --git a/ediv/src/dlls/text/text.h b/ediv/src/dlls/text/text.h new file mode 100644 index 0000000..5921c30 --- /dev/null +++ b/ediv/src/dlls/text/text.h @@ -0,0 +1,7 @@ + + +int eDiv_LoadFnt(FUNCTION_PARMAS); +int eDiv_Write(FUNCTION_PARAMS); +int eDiv_WriteInt(FUNCTION_PARAMS); +int eDiv_MoveText(FUNCTION_PARAMS); +int eDiv_DeleteText(FUNCTION_PARAMS); diff --git a/ediv/src/dlls/text/text.sln b/ediv/src/dlls/text/text.sln new file mode 100644 index 0000000..5baf558 --- /dev/null +++ b/ediv/src/dlls/text/text.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text", "text.vcproj", "{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.ActiveCfg = Debug|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.Build.0 = Debug|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.ActiveCfg = Release|Win32 + {11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/dlls/text/text.suo b/ediv/src/dlls/text/text.suo new file mode 100644 index 0000000..6c71dc9 Binary files /dev/null and b/ediv/src/dlls/text/text.suo differ diff --git a/ediv/src/dlls/text/text.vcproj b/ediv/src/dlls/text/text.vcproj new file mode 100644 index 0000000..2da528e --- /dev/null +++ b/ediv/src/dlls/text/text.vcproj @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/doku/doku.c b/ediv/src/doku/doku.c new file mode 100644 index 0000000..b27b069 --- /dev/null +++ b/ediv/src/doku/doku.c @@ -0,0 +1,554 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + +// esta es la tabla donde se almacenan los nombres de las directivas y los textos +// por los que deben ser sustituidas, definidos en template.txt +struct _sust { + char de[20]; + char a[1024]; +} sust[20]; + +// esta funcion recibe un nombre de fichero (actual) y, consultando el index.dok, +// devuelve el documento anterior, el siguiente y el superior. Evidentemente esto +// se usa para generar los enlaces de navegacion. +void situame(char* actual, char* ant, char* sig, char* sup); + +// esta funcion abre el fichero indicado en fixero1 y busca en el el texto +// encerrado entre las directivas <%title%> y <%/title%>, y lo devuelve en +// el puntero "titulo" +void lee_titulo(char* fixero1, char* titulo); + +// esta es llamada cuando nos encontramos con la directiva <%index%>. Parsea +// el arbolito ese con los signos '+' y genera una unordered list mu potita. +void procesa_indice(); + +// esta es llamada cuando encontramos <%subindex%>. Se le indica el fichero +// actual y busca la entrada correspondiente en el index.dok. Entonces parsea +// la porcion de arbol que engloba y genera un subíndice como los de SGML. +void procesa_subindice(char* actual); + + +FILE *f; +int i,tamano; +char* buffer; + +int main(int argc, char* argv[]) +{ + int c,num=-1,j,sw; + char nomfich[256]; + char tag[20]; + int flag=0; + + if(argc!=2) { + printf("Modo de uso: %s \n",argv[0]); + exit(1); + } + + for(i=0;i') i+=2; + c=0; + if(!strcmp(sust[num].de,"index") || !strcmp(sust[num].de,"/index") || + !strcmp(sust[num].de,"subindex")) { + printf("Error en template.txt: \"%s\" es una directiva reservada\n",sust[num].de); + exit(10); + } + } + if(buffer[i]=='"') { + i++; + while(1) { + if(buffer[i]=='"' && buffer[i-1]!='\\') break; + if(buffer[i]=='\\' && buffer[i+1]=='n') + buffer[++i]='\n'; + else if(buffer[i]=='\\' && buffer[i+1]=='"') + buffer[++i]='"'; + sust[num].a[c++]=buffer[i++]; + } + } + } + + free(buffer); + + strcpy(nomfich,argv[1]); + strcat(nomfich,".dok"); + + if((f=fopen(nomfich,"r"))==NULL) { + printf("Error abriendo fichero %s\n",nomfich); + exit(4); + } + + fseek(f,0,SEEK_END); + tamano=ftell(f); + fseek(f,0,SEEK_SET); + + if((buffer=(char*)malloc(tamano+1))==NULL) { + printf("Error: memoria insuficiente\n"); + exit(5); + } + + tamano=fread(buffer,1,tamano,f); + fclose(f); + + buffer[tamano]=0; + + strcpy(nomfich,argv[1]); + strcat(nomfich,".html"); + + if((f=fopen(nomfich,"w"))==NULL) { + printf("Error creando fichero %s\n",nomfich); + exit(7); + } + + printf("Procesando...\n"); + + fprintf(f,"\n"); + for(i=0;i') i+=2; + else { + fclose(f); + printf("Error en tag %s, byte %d\n",tag,i); + exit(8); + } + flag=i; + sw=0; + for(j=0;j<=num;j++) + if(!strcmp(sust[j].de,tag)) { + sw=1; + fwrite(sust[j].a,1,strlen(sust[j].a),f); + break; + } + if(!sw) { + if(!strcmp(tag,"index")) { + procesa_indice(); + flag=i; + } + else if(!strcmp(tag,"subindex")) { + procesa_subindice(argv[1]); + } + else { + fclose(f); + printf("Error: tag no reconocido %s en byte %d\n",tag,i); + exit(9); + } + } + if(!strcmp(tag,"/title") && strcmp(argv[1],"index")) { + char ant[256], sig[256], sup[256]; + char tant[512], tsig[512], tsup[512], tidx[512]; + situame(argv[1],ant,sig,sup); + lee_titulo(ant,tant); + lee_titulo(sig,tsig); + lee_titulo(sup,tsup); + lee_titulo("index",tidx); + fprintf(f,"\n\n\n\n\n
    "); + if(*ant!=0) fprintf(f,"Anterior
    %s",ant,tant); + else fprintf(f,"Anterior
     "); + fprintf(f,"
    "); + if(*sup!=0) fprintf(f,"Subir
    %s",sup,tsup); + else fprintf(f,"Subir
    %s",tidx); + fprintf(f,"
    Contenido" + "
    %s
    ",tidx); + if(*sig!=0) fprintf(f,"Siguiente
    %s",sig,tsig); + else fprintf(f,"Siguiente
     "); + fprintf(f,"

    \n"); + } + } + } + + fwrite(&buffer[flag],1,strlen(&buffer[flag]),f); + + fclose(f); + + printf("Guardado %s\n",nomfich); + + return 0; +} + +void situame(char* actual, char* ant, char* sig, char* sup) +{ + FILE* fi; + char* buf,tag[20],fixero[256]; + int tam,p,c; + + int nivel=0,ni; + char anterior[256],superior[20][256]; + const char fin[]="<%/index%>"; + int j,sw=0,pillasig=0; + + *ant=0; *sig=0; *sup=0; + + if((fi=fopen("index.dok","r"))==NULL) { + printf("Error: no puedo abrir index.dok\n"); + exit(13); + } + + fseek(fi,0,SEEK_END); + tam=ftell(fi); + fseek(fi,0,SEEK_SET); + + if((buf=(char*)malloc(tam+1))==NULL) { + printf("Error: memoria insuficiente\n"); + exit(14); + } + + tam=fread(buf,1,tam,fi); + fclose(fi); + + buf[tam]=0; + + for(p=0;p') p+=2; + else { + printf("Error en fichero index.dok, tag %s, byte %d\n",tag,p); + exit(15); + } + if(!strcmp(tag,"index")) { + sw=1; + break; + } + } + } + + if(!sw) { + printf("Error: no se encuentra directiva <%index%> en index.dok\n"); + exit(16); + } + + memset(fixero,0,256); + memset(anterior,0,256); + memset(superior,0,256*20); + + for(;pnivel) { + if(ni==20) { + printf("Error: el indice no puede tener mas de 20 niveles\n"); + exit(17); + } + + if(!pillasig) { nivel=ni; strcpy(superior[nivel],fixero); } + } + if(ni31 && buf[p]!='<') + fixero[c++]=buf[p++]; + fixero[c]=0; + if(buf[p]=='<') p--; + if(pillasig) { + strcpy(ant,anterior); + strcpy(sig,fixero); + strcpy(sup,superior[nivel]); + fclose(fi); + free(buf); + return; + } + if(!strcmp(actual,fixero)) pillasig=1; + else strcpy(anterior,fixero); + } + if(pillasig) { + strcpy(ant,anterior); + strcpy(sup,superior[nivel]); + fclose(fi); + free(buf); + return; + } + printf("Error: el documento no esta listado en el indice\n"); + exit(18); +} + +void lee_titulo(char* fixero1, char* titulo) +{ + FILE* fi; + char* buf,tag[20],fixero[256]; + int tam,p,c; + + strcpy(fixero,fixero1); + strcat(fixero,".dok"); + + if((fi=fopen(fixero,"rb"))==NULL) { + sprintf(titulo,"[Error al abrir \"%s\"]",fixero); + return; + } + + fseek(fi,0,SEEK_END); + tam=ftell(fi); + fseek(fi,0,SEEK_SET); + + if((buf=(char*)malloc(tam+1))==NULL) { + printf("Error: memoria insuficiente\n"); + exit(11); + } + + tam=fread(buf,1,tam,fi); + fclose(fi); + + buf[tam]=0; + + for(p=0;p') p+=2; + else { + printf("Error en fichero %s, tag %s, byte %d\n",fixero,tag,p); + exit(13); + } + if(!strcmp(tag,"title")) { + c=0; + while(p"); + fprintf(f,"\n"); + i+=10; + return; + } + while(buffer[i]=='+') { ni++; i++; } + if(ni>nivel) { + if(ni==20) { + printf("Error: el indice no puede tener mas de 20 niveles\n"); + exit(25); + } + for(j=nivel;j"); + fprintf(f,"\n"); + nivel=ni; + } + if(ni"); + fprintf(f,"\n"); + nivel=ni; + } + c=0; + while(buffer[i]>31 && buffer[i]!='<') + fixero[c++]=buffer[i++]; + fixero[c]=0; + if(buffer[i]=='<') i--; + lee_titulo(fixero,titulo); + if(nivel==0) + fprintf(f,"

    %s

    \n",fixero,titulo); + else + fprintf(f,"
  • %s
  • \n",fixero,titulo); + } +} + +void procesa_subindice(char* actual) +{ + FILE* fi; + char* buf,tag[20],fixero[256],titulo[512]; + int tam,p,c; + + int nivel=0,ni,iniv; + const char fin[]="<%/index%>"; + int j,sw=0,pilla=0; + + if((fi=fopen("index.dok","r"))==NULL) { + printf("Error: no puedo abrir index.dok\n"); + exit(19); + } + + fseek(fi,0,SEEK_END); + tam=ftell(fi); + fseek(fi,0,SEEK_SET); + + if((buf=(char*)malloc(tam+1))==NULL) { + printf("Error: memoria insuficiente\n"); + exit(20); + } + + tam=fread(buf,1,tam,fi); + fclose(fi); + + buf[tam]=0; + + for(p=0;p') p+=2; + else { + printf("Error en fichero index.dok, tag %s, byte %d\n",tag,p); + exit(21); + } + if(!strcmp(tag,"index")) { + sw=1; + break; + } + } + } + + if(!sw) { + printf("Error: no se encuentra directiva <%index%> en index.dok\n"); + exit(22); + } + + for(;pnivel) { + if(ni==20) { + printf("Error: el indice no puede tener mas de 20 niveles\n"); + exit(23); + } + if(pilla && ni==iniv+1) { + //for(j=nivel;j"); + fprintf(f,"\n"); + } + nivel=ni; + } + if(ni"); + // fprintf(f,"\n"); + //} + nivel=ni; + if(pilla && nivel<=iniv) break; + } + c=0; + while(buf[p]>31 && buf[p]!='<') + fixero[c++]=buf[p++]; + fixero[c]=0; + if(buf[p]=='<') p--; + if(!strcmp(actual,fixero)) { + pilla=1; + fprintf(f,"
      "); + iniv=nivel; + } + if(pilla && nivel<=iniv+1) { + lee_titulo(fixero,titulo); + fprintf(f,"
    • %s
    • \n",fixero,titulo); + } + } + if(pilla) { + //for(j=iniv;j<=nivel;j++) + fprintf(f,"
    "); + /*if(nivel"); + fprintf(f,"\n"); + return; + } + printf("Error: el documento no esta listado en el indice\n"); + exit(24); +} \ No newline at end of file diff --git a/ediv/src/doku/template.txt b/ediv/src/doku/template.txt new file mode 100644 index 0000000..d03d2cd --- /dev/null +++ b/ediv/src/doku/template.txt @@ -0,0 +1,11 @@ +<%title%> "\n\neDIV docs - " +<%/title%> "\n" + "\n\n\n" + "" +<%end%> "

    Esta documentación ha sido escrita por el equipo de\n" + "Sion Entertainment y forma parte del proyecto eDIV. Las actualizaciones de esta\n" + "documentación pueden obtenerse en www.edivcentral.com.\nSi ve algún error o anomalía " + "en cualquiera de los documentos que\nse incluyen en este proyecto, por favor " + "comuníquenoslo a bugs@edivcentral.com.\n" + "Gracias.
    \n© Copyleft Sion Entertainment, 2001

    \n\n\n" diff --git a/ediv/src/ediv/Makefile b/ediv/src/ediv/Makefile new file mode 100644 index 0000000..f810fae --- /dev/null +++ b/ediv/src/ediv/Makefile @@ -0,0 +1,90 @@ +# eDIV Compiler +# Copyright (C) 2001 Sion Entertainment +# http://www.sion-e.com +# +# 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 +# + +# makefile chorizado descaradamente del fenix + +debug = true +target = linux + +CFLAGS += -Wall + +# Usar debug=true para activar versión de depurado + +ifeq ($(debug), true) +CFLAGS += -DDEBUG -D_DEBUG -g +else +CFLAGS += -O2 +endif + +# Usar efence=true para activar la librería Electric Fence + +ifeq ($(efence), true) +LIBS += -lefence +endif + +# Usar target=win32 para compilar el .EXE de Windows + +ifeq ($(target), win32) +TARGET = ../../bin/ediv.exe +else +TARGET = ../../bin/ediv +endif + +# Cabeceras comunes + +#HEADERS = ../include/fxc.h ../include/files.h ../include/xctype.h \ +# ../include/pslang.h ../include/offsets.h + +CFLAGS += -DTARGET_$(target) +#CFLAGS += -I/usr/include/SDL + +# Target + +$(TARGET): _ml.o compiler.o ediv.o ediv_export.o encrypt.o lower.o \ + ltlex.o parser.o expresion.o modulos.o listados.o + $(CC) -o $@ $^ -rdynamic -ldl -lz + +_ml.o: _ml.c $(HEADERS) + +compiler.o: compiler.c $(HEADERS) + +ediv.o: ediv.c $(HEADERS) + +ediv_export.o: ediv_export.c $(HEADERS) + +encrypt.o: encrypt.c $(HEADERS) + +lower.o: lower.c $(HEADERS) + +ltlex.o: ltlex.c $(HEADERS) + +parser.o: parser.c $(HEADERS) + +expresion.o: expresion.c $(HEADERS) + +modulos.o: modulos.c $(HEADERS) + +listados.o: listados.c $(HEADERS) + + +# Limpieza/empaquetado/etc. + +clean: + rm -f *.o core + diff --git a/ediv/src/ediv/compiler.c b/ediv/src/ediv/compiler.c new file mode 100644 index 0000000..65e8af3 --- /dev/null +++ b/ediv/src/ediv/compiler.c @@ -0,0 +1,1126 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 +//#ifdef __linux__ +//# include +//#endif + +#include + +#include "main.h" +#include "compiler.h" +#include "parser.h" +#include "lower.h" +#include "expresion.h" +#include "extern.h" +#include "modulos.h" +#include "encrypt.h" +#include "listados.h" + +#include "shared.h" +#include "varindex.h" +#include "language.h" + +void analiza_ltlex(void); // en ltlex.c + + +void prepara_compilacion() +{ + int n; + + vnom=NULL; + + mem_ory=NULL; + frm=NULL; + mem=NULL; + loc=NULL; + + itbreak=0; itcont=0; itelseif=0; + coment=0; cero=0; error_25=25; + + memset(vhash,0,256*sizeof(byte*)); + + inicializa_lower(); + + // Inicializamos la tabla de objetos + memset(obj,0,sizeof(obj[0])*max_obj); + iobj=obj; + num_obj=0; + + // Inicializamos la tabla de símbolos + memset(lex_simb,0,sizeof(lex_simb)); + ilex_simb=lex_simb; + num_nodos=0; + + + // Inicializamos los caracteres básicos en lex_case + for (n=0;n<256;n++) + if (lower[n]) { + if (n>='0' && n<='9') + lex_case[n]=(struct lex_ele *)l_num; + else + lex_case[n]=(struct lex_ele *)l_id; + } + else + lex_case[n]=(struct lex_ele *)l_err; + + + // Inicializamos el vector de nombres + vnom=(byte *) e_malloc(max_obj*long_med_id+1024); + ivnom.b=vnom; + + + // Leemos los símbolos y palabras reservadas de ltlex.def + analiza_ltlex(); + + + // Terminamos de inicializar lex_case + lex_case[' ']=(struct lex_ele *)l_spc; + lex_case[tab]=(struct lex_ele *)l_spc; + lex_case[cr]=(struct lex_ele *)l_cr; + lex_case[lf]=(struct lex_ele *)l_cr; + lex_case[0]=(struct lex_ele *)l_eof; + + // Buffer para el bytecode + imem_max=default_buffer; imem=0; + mem_ory=mem=(int*)e_malloc(imem_max*sizeof(int)); + memset(mem,0,imem_max*sizeof(int)); + + // Buffer para variables locales y privadas + iloc_max=default_buffer/2; iloc=0; iloc_len=0; + loc=(int*)e_malloc(iloc_max*sizeof(int)); + memset(loc,0,iloc_max*sizeof(int)); + + // No se lo que es + ifrm_max=default_buffer/2; + frm=(int*)e_malloc(ifrm_max*sizeof(int)); + memset(frm,0,ifrm_max*sizeof(int)); + + imem=long_header; + + *(prog+progsize)=0; + + _source=NULL; +} + +void compila() +{ + struct objeto * i; + FILE *f; + int n,l; + unsigned long m; + byte * q, * p; + int start_lin, start_dbg; + int* varptr, nvars; // variables indexadas + + ultima_linea=prog; + acceso_remoto=0; parametros=0; linea=1; + linf=NULL; + + printf(translate(27)); + + itxt=inicio_textos=imem; + psintactico(); // Para obtener "longitud_textos" + imem+=longitud_textos; + #ifdef _DEBUG + printf("dbg: longitud_textos: %d\n",longitud_textos); + #endif + + test_buffer(&mem,&imem_max,imem); + + if(n_errors>0) return; + + num_obj_predefinidos=num_obj; + + ultima_linea=source; //fwrite(&cero,1,1,lprg); + acceso_remoto=0; parametros=0; linea=1; + + sintactico(); + + i=obj; + while (iusado) { + linea=i->linea; + ierror=i->ierror; + error(0,34,i->name); // nombre desconocido + } + i++; + } + + if(n_errors>0) return; + + // Borra todo y comienza de nuevo :P + + printf(translate(28)); + + if (frm!=NULL) { free(frm); frm=NULL; } + if (loc!=NULL) { free(loc); loc=NULL; } + if (mem!=NULL) { free(mem); mem=mem_ory=NULL; } + if (vnom!=NULL) { free(vnom); vnom=NULL; } + + prepara_compilacion(); + source=prog; + + inicializa_index(); // ahora toca construir el indice de variables + dll_func2(); // recarga sólo las dlls necesarias + + if(debug) { + if((linf=tmpfile())==NULL) { + printf(translate(29)); + exit(1); + } + } + + itxt=inicio_textos=imem; + imem+=longitud_textos; + test_buffer(&mem,&imem_max,imem); + num_obj_predefinidos=num_obj; + acceso_remoto=0; parametros=0; linea=1; + + sintactico(); + + // Ahora que estamos en el final del bytecode, añadiremos la rutina que carga + // las DLLs. Lo primero es guardar las cadenas con los nombres: + for(n=0;n=P_SIEMPRE) { + dlls[n].mem_nombre=imem; + l=strlen(dlls[n].nombre); + memcpy(&mem[imem],dlls[n].nombre,l+1); + imem+=(l+4)/4; + test_buffer(&mem,&imem_max,imem); + } + + // Si estamos compilando en modo debug, añadimos tambien la debug.dll + if(debug) { + dlls[numdlls].mem_nombre=imem; + memcpy(&mem[imem],"debug",6); + imem+=2; + test_buffer(&mem,&imem_max,imem); + } + + // Ahora estamos en la posición donde comienza la rutina, por lo que tenemos + // que guardar la posición actual en el offset que guardamos en salto_import + mem[salto_import]=imem; + + // Escribimos la rutina de carga de DLLs + for(n=0;n=P_SIEMPRE) + g2(limp,dlls[n].mem_nombre); + + if(debug) + g2(limp,dlls[numdlls].mem_nombre); + + g2(ljmp,salto_import+1); + + // Ya está !! :) + + // Preparamos la cabecera del bytecode + mem[2]=imem; + mem[3]=max_process; // Antes long_header, ahora no se utiliza + mem[4]=0; // Antes mem[1]-mem[3] (long datos globales), ahora no se utiliza + mem[5]=iloc_len-iloc; + mem[6]=iloc; + mem[7]=0; // Antes imem+iloc (inicio textos), ahora no se utiliza + mem[8]=imem+iloc; // Número de elementos ocupados en mem[] + + // mem[0] se usa para almacenar flags para el ejecutable. En el caso de DIV 2, + // éstas eran: + // +1 = El programa es un setup de sonido (setup_program) + // +128 = El programa invoca al trazador nada más ejecutarse (compilado con F12) + // +512 = Se ignoran los errores de ejecución (ignore_errors) + // +1024= Modo DEMO (mensaje en el centro de la pantalla parpadeando diciendo + // "VERSIÓN DE DEMOSTRACIÓN") + + // nosotros usaremos las siguientes: + // +16 = El exe lleva incluidas las DLL's + // A ver como lo hacemos en Linux.. 1) con temporales o 2) hurgando en el codigo + // de dlopen y demas y haciendonos una pekeña lib (esto es mas aconsejable) + // +32 = El exe lleva incluido el PAK + // +64 = Compilado en modo debug + // +512 = ignore_errors, igual que en DIV2 + + mem[0]=0; + if (debug) mem[0]+=64; + if (ignore_errors) mem[0]+=512; + + // Generamos los listados + // (debe hacerse ahora porque en el listado de objetos guardamos los valores de mem[1..8]) + if(listados) { + printf(translate(30)); + if(listados & 1) listado_ensamblador(); + if(listados & 2) listado_objetos(); + } + + if(noexe) return; + + printf(translate(31)); + + // descomprime la edivrun.lib y guarda una copia con el nombre temp.dj! + _encriptar(0,edivrun_lib,la_clave); + _comprimir(0,"temp.dj!"); + + // si el archivo de salida ya existe, lo borra + if((f = fopen(outfilename, "rb"))!=NULL) { + fclose(f); + remove(outfilename); + } + + // renombra temp.dj! al nombre del exe + rename("temp.dj!",outfilename); + + if ((f=fopen(outfilename,"ab"))!=NULL) { + p=(byte*)e_malloc((imem+iloc)*4); + m=(imem+iloc)*4+1024; + q=(byte*)e_malloc(m); + if (p!=NULL && q!=NULL) { + fwrite(mem,4,9,f); // mem[0..8] + memcpy(p,&mem[9],(imem-9)*4); + memcpy(p+(imem-9)*4,loc,iloc*4); + n=(imem-9+iloc)*4; + if (!compress(q,&m,p,n)) { + fwrite(&n,1,4,f); // mem[0]..mem[8],longitud_datos_descomp,longitud_datos_comp,datos comp... + fwrite(&m,1,sizeof(unsigned long),f); + fwrite(q,1,m,f); + free(q); free(p); + get_varptr(&varptr,&nvars); // indice de variables + m=nvars*8; + q=(byte*)e_malloc(m); + if(!compress(q,&m,(byte*)varptr,nvars*4)) { // nºvariables,longitud_datos_comp,datos_comp... + fwrite(&nvars,1,4,f); + fwrite(&m,1,sizeof(unsigned long),f); + fwrite(q,1,m,f); + free(q); + if(debug) { // formato de ejecutable de debug + printf(translate(32)); + start_lin=ftell(f); + escribe_lin(f); + start_dbg=ftell(f); + escribe_dbg(f); + fwrite(&start_lin,1,4,f); + fwrite(&start_dbg,1,4,f); + } + fwrite(&stub_size,1,4,f); // Ultimos 4 bytes siempre son el tamaño del stub + fclose(f); + } else { + free(q); + fclose(f); + errormem(); + } + } else { + free(q); free(p); + fclose(f); + errormem(); + } + } else { + if (p!=NULL) free(p); + if (q!=NULL) free(q); + fclose(f); + errormem(); + } + } + else { + printf(translate(33)); + exit(1); + } + + #ifdef __linux__ + chmod(outfilename,493); // -rwxr-xr-x + #endif + + printf(translate(34)); +} + + +//----------------------------------------------------------------------------- +// Comprueba los límites de un buffer de generación de código +//----------------------------------------------------------------------------- + +void test_buffer(int * * buffer,int * maximo,int n) +{ + int max; + + if (n+buffer_grow>2*1000*1000) errormem(); + + if (n>*maximo-security_distance) { + max=*maximo; + *maximo=n+buffer_grow; + max=*maximo-max; + if (*buffer==mem) { + if ((*buffer=mem_ory=(int *)realloc(*buffer,*maximo*sizeof(int)))==NULL) + errormem(); + } else { + if ((*buffer=(int *)realloc(*buffer,*maximo*sizeof(int)))==NULL) + errormem(); + } + memset((byte*)*buffer+(*maximo-max)*sizeof(int),0,max*sizeof(int)); + } +} + + +//----------------------------------------------------------------------------- +// Analisis de un bloque de sentencias +//----------------------------------------------------------------------------- + +void sentencia() { + + int im1,im2,im3,im4; + int dir,from,to,step; + + while (pieza>=p_return) { + test_buffer(&mem,&imem_max,imem); + switch (pieza) { + case p_return: + inicio_sentencia(); + lexico(); if (pieza==p_abrir) { + lexico(); if (pieza!=p_cerrar) { + expresion(); if (pieza!=p_cerrar) error(3,18); // esperando ')' + g1(lrtf); + } else { + g1(lret); + } lexico(); + } else { + g1(lret); + } + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + final_sentencia(); grabar_sentencia(); break; + case p_if: + telseif[itelseif++]=0; + inicio_sentencia(); + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + g2(ljpf,0); im1=imem-1; + final_sentencia(); grabar_sentencia(); + if1: + sentencia(); + if (pieza==p_else) { + inicio_sentencia(); + lexico(); + g2(ljmp,0); mem[im1]=imem; im1=imem-1; + final_sentencia(); grabar_sentencia(); + sentencia(); + }else if (pieza==p_elseif) { + if (itelseif==0) error(0,73); // elseif fuera de bloque if + inicio_sentencia(); + g2(ljmp,0); telseif[itelseif++]=imem-1; + mem[im1]=imem; + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + g2(ljpf,0); im1=imem-1; + final_sentencia(); grabar_sentencia(); + goto if1; + } + mem[im1]=imem; if (pieza!=p_end) error(0,57); lexico(); // esperando END + while (telseif[--itelseif]!=0) mem[telseif[itelseif]]=imem; + break; + case p_loop: + tbreak[itbreak++]=0; tcont[itcont++]=0; + lexico(); + im1=imem; sentencia(); + if (pieza!=p_end) error(0,57); // esperando END + inicio_sentencia(); lexico(); + g2(ljmp,im1); + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im1; + final_sentencia(); grabar_sentencia(); + break; + case p_while: + inicio_sentencia(); + tbreak[itbreak++]=0; tcont[itcont++]=0; im1=imem; + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + g2(ljpf,0); im2=imem-1; + final_sentencia(); grabar_sentencia(); + sentencia(); + if (pieza!=p_end) error(0,57); inicio_sentencia(); // esperando END + lexico(); + g2(ljmp,im1); mem[im2]=imem; + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im1; + final_sentencia(); grabar_sentencia(); + break; + case p_repeat: + tbreak[itbreak++]=0; tcont[itcont++]=0; + lexico(); + im1=imem; sentencia(); + if (pieza!=p_until) error(0,58); // esperando UNTIL + inicio_sentencia(); + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + g2(ljpf,im1); + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im1; + final_sentencia(); grabar_sentencia(); + break; + case p_from: + inicio_sentencia(); + tbreak[itbreak++]=0; tcont[itcont++]=0; + lexico(); + if (pieza!=p_id) error(0,59); // esperando una variable + + if ((*o).tipo==tvglo) { + dir=(*o).vglo.offset; g2(lcar,dir); + } else if ((*o).tipo==tvloc && (!(*o).bloque || (*o).bloque==bloque_actual)) { + dir=-(*o).vloc.offset; + g2(lcar,-dir); g1(laid); + } else error(0,59); // esperando una variable + + lexico(); + if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + from=constante(); + if (pieza!=p_to) error(1,60); lexico(); // esperando TO + to=constante(); + if (from==to) error(4,61); // sentencia FROM incorrecta + if (pieza==p_step) { + lexico(); + step=constante(); + if (fromto && step>=0) error(4,62); + } else { + if (from=0) { // Comparación de la condición de permanencia + g2(lcar,dir); + } else { + g2(lcar,-dir); g1(laid); + } + g1(lptr); g2(lcar,to); + if (step>0) g1(lmei); else g1(lmai); + g2(ljpf,0); im2=imem-1; + + final_sentencia(); grabar_sentencia(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + + sentencia(); + if (pieza!=p_end) error(0,57); inicio_sentencia(); // esperando END + lexico(); + + im3=imem; // Posición del continue + + if (dir>=0) { // Incremento y vuelta al inicio del bucle + g2(lcar,dir); + } else { + g2(lcar,-dir); g1(laid); + } + g2(lcar,step); + g1(lada); g1(lasp); + g2(ljmp,im1); mem[im2]=imem; + + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im3; + final_sentencia(); grabar_sentencia(); + + break; + + case p_for: + inicio_sentencia(); + tbreak[itbreak++]=0; tcont[itcont++]=0; + lexico(); + if (pieza!=p_abrir) error(3,22); lexico(); // esperando '(' + if (pieza!=p_ptocoma) { + expresion(); g1(lasp); + while (pieza==p_coma) { lexico(); expresion(); g1(lasp); } + } im1=imem; + if (pieza!=p_ptocoma) error(3,9); lexico(); // esperando ';' + if (pieza==p_ptocoma) { + g2(lcar,1); + } else expresion(); + g2(ljpf,0); im2=imem-1; + while (pieza==p_coma) { lexico(); expresion(); + g2(ljpf,im2); im2=imem-1; } + g2(ljmp,0); im3=imem-1; + if (pieza!=p_ptocoma) error(3,9); lexico(); // esperando ';' + if (pieza!=p_cerrar) { + expresion(); g1(lasp); + while (pieza==p_coma) { lexico(); expresion(); g1(lasp); } + } + g2(ljmp,im1); + if (pieza!=p_cerrar) error(3,18); lexico(); // esperando ')' + final_sentencia(); grabar_sentencia(); + mem[im3++]=imem; sentencia(); + if (pieza!=p_end) error(0,57); // esperando END + inicio_sentencia(); lexico(); + g2(ljmp,im3); + do { im1=mem[im2]; mem[im2]=imem; im2=im1; } while(im2); + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im3; + final_sentencia(); grabar_sentencia(); + break; + case p_switch: + inicio_sentencia(); + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + while (pieza==p_ptocoma) { + lexico(); + } + final_sentencia(); grabar_sentencia(); + im1=0; im2=0; + while (pieza!=p_end) { + inicio_sentencia(); + if (pieza==p_case) { + im3=0; do { + + lexico(); + if (im1) mem[im1]=imem; + expresion(); if (pieza!=p_rango) { + g2(lcse,0); im1=imem-1; + } else { + lexico(); expresion(); + g2(lcsr,0); im1=imem-1; + } + + if (pieza==p_coma) { + g2(ljmp,im3); im3=imem-1; + } + + } while (pieza==p_coma); + + while(im3) { im4=mem[im3]; mem[im3]=imem; im3=im4; } + + } else if (pieza==p_default) { + lexico(); + if (im1) mem[im1]=imem; im1=0; + } else error(0,63); // esperando case, default o end + if (!free_sintax) if (pieza!=p_ptocoma) error(3,64); // esperando ':' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + g1(lasp); + final_sentencia(); grabar_sentencia(); + sentencia(); + if (pieza!=p_end) error(0,57); // esperando END + inicio_sentencia(); + g2(ljmp,im2); im2=imem-1; + pasa_ptocoma(); + final_sentencia(); grabar_sentencia(); + } inicio_sentencia(); + if (im1) mem[im1]=imem; g1(lasp); + while(im2) { im1=mem[im2]; mem[im2]=imem; im2=im1; } + lexico(); + final_sentencia(); grabar_sentencia(); break; + case p_frame: + inicio_sentencia(); + lexico(); if (pieza==p_abrir) { + lexico(); if (pieza!=p_cerrar) { + expresion(); if (pieza!=p_cerrar) error(3,18); // esperando ')' + g1(lfrf); + } else { + g1(lfrm); + } lexico(); + } else { + g1(lfrm); + } + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + final_sentencia(); grabar_sentencia(); break; + case p_debug: + inicio_sentencia(); + g1(ldbg); lexico(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + final_sentencia(); grabar_sentencia(); + break; + case p_break: + inicio_sentencia(); + if (itbreak==0) error(0,65); lexico(); // break fuera de un bucle + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + g2(ljmp,0); tbreak[itbreak++]=imem-1; + final_sentencia(); grabar_sentencia(); break; + case p_continue: + inicio_sentencia(); + if (itcont==0) error(0,66); lexico(); // continue fuera de un bucle + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + g2(ljmp,0); tcont[itcont++]=imem-1; + final_sentencia(); grabar_sentencia(); break; + case p_clone: + inicio_sentencia(); + lexico(); g2(lclo,0); im1=imem-1; + final_sentencia(); grabar_sentencia(); + sentencia(); + if (pieza!=p_end) error(0,57); lexico(); // esperando END + mem[im1]=imem; break; + case p_ptocoma: + lexico(); break; + default: + inicio_sentencia(); + error_25=67; + expresion(); + do { + _exp--; + } while ((*_exp).tipo==eoper && (*_exp).token==p_string); + error_25=25; + switch((*_exp).tipo) { + case ecall: break; + //case efunc: break; + case efext: break; + case eoper: + switch((*_exp).token) { + case p_asig: case p_inc: case p_suma: case p_dec: case p_resta: + case p_add_asig: case p_sub_asig: case p_mul_asig: + case p_div_asig: case p_mod_asig: case p_and_asig: + case p_or_asig: case p_xor_asig: case p_shr_asig: case p_shl_asig: + + case p_asigword: case p_incword: case p_sumaword: case p_decword: case p_restaword: + case p_add_asigword: case p_sub_asigword: case p_mul_asigword: + case p_div_asigword: case p_mod_asigword: case p_and_asigword: + case p_or_asigword: case p_xor_asigword: case p_shr_asigword: case p_shl_asigword: + + case p_asigchar: case p_incchar: case p_sumachar: case p_decchar: case p_restachar: + case p_add_asigchar: case p_sub_asigchar: case p_mul_asigchar: + case p_div_asigchar: case p_mod_asigchar: case p_and_asigchar: + case p_or_asigchar: case p_xor_asigchar: case p_shr_asigchar: case p_shl_asigchar: + + case p_strcpy: case p_strcat: case p_strsub: break; + default: error(4,68); break; // expresion sin sentido + } break; + default: error(4,68); // expresion sin sentido + } + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + g1(lasp); + final_sentencia(); grabar_sentencia(); + break; + } + } +} + + +//----------------------------------------------------------------------------- +// Funciones de generación de código +//----------------------------------------------------------------------------- + +// void g1(int op) { mem[imem++]=op; } +// void g2(int op, int pa) { mem[imem++]=op; mem[imem++]=pa; } + +//----------------------------------------------------------------------------- +// Optimización peephole de código intermedio EML +//----------------------------------------------------------------------------- + +// *** OJO!!! *** quizá se pueda quitar "dir" y esa comprobación absurda ... + +//struct { // Peephole, "mirilla" de optimizacion +// int dir; // Dirección +// int param; // Indica el número de parametros de la instruccion +// int op; // Opcode +//} code[16]; // En code[15] debe quedar siempre la última instrucción generada + +void gen(int param, int op, int pa); +void remove_code(int i); +void delete_code(void); +void add_code(int dir, int param, int op); + +void g1(int op) { + if (optimizar) gen(0,op,0); else mem[imem++]=op; +} + +void g2(int op, int pa) { + if (optimizar) gen(1,op,pa); else { mem[imem++]=op; mem[imem++]=pa; } +} + +int optimizado; + +void gen(int param, int op, int pa) { +// int n; + + optimizado=0; + + switch(op) { + case lcar: + if (code[15].op==lcar) { + code[15].op=mem[imem-2]=lcar2; + code[15].param=2; + mem[imem++]=pa; optimizado=1; + } else if (code[15].op==lcar2) { + code[15].op=mem[imem-3]=lcar3; + code[15].param=3; + mem[imem++]=pa; optimizado=1; + } else if (code[15].op==lcar3) { + code[15].op=mem[imem-4]=lcar4; + code[15].param=4; + mem[imem++]=pa; optimizado=1; + } break; + case lasp: + if (code[15].op==lasi) { + if (code[14].op==lcar) { + remove_code(1); + code[15].op=mem[imem-2]=lcarasiasp; + } else { + code[15].op=mem[imem-1]=lasiasp; + optimizado=1; + } + } else if (code[15].op==lfun) { + code[15].op=mem[imem-2]=lfunasp; + optimizado=1; + } break; + case laid: + if (code[15].op==lcar) { + code[15].op=mem[imem-2]=lcaraid; + optimizado=1; + } break; + case lptr: + if (code[15].op==lcar) { + code[15].op=mem[imem-2]=lcarptr; + optimizado=1; + } else if (code[15].op==lcaradd) { + code[15].op=mem[imem-2]=lcaraddptr; + optimizado=1; + } else if (code[15].op==laid) { + code[15].op=mem[imem-1]=laidptr; + optimizado=1; + } else if (code[15].op==ladd) { + code[15].op=mem[imem-1]=laddptr; + optimizado=1; + } else if (code[15].op==lcaraid) { + code[15].op=mem[imem-2]=lcaraidptr; + optimizado=1; + } break; + case lcpa: + if (code[15].op==lcaraid) { + code[15].op=mem[imem-2]=lcaraidcpa; + optimizado=1; + } break; + case ladd: + if (code[15].op==lcar2){ + code[15].op=mem[imem-3]=lcar; + code[15].param=1; + mem[imem-2]+=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar3){ + code[15].op=mem[imem-4]=lcar2; + code[15].param=2; + mem[imem-2]+=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar4){ + code[15].op=mem[imem-5]=lcar3; + code[15].param=3; + mem[imem-2]+=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar){ + if (mem[imem-1]==0) remove_code(1); else { + code[15].op=mem[imem-2]=lcaradd; + optimizado=1; + } + } else if (code[15].op==lcarmul){ + code[15].op=mem[imem-2]=lcarmuladd; + optimizado=1; + } break; + case lmul: + if (code[15].op==lcar2){ + code[15].op=mem[imem-3]=lcar; + code[15].param=1; + mem[imem-2]*=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar3){ + code[15].op=mem[imem-4]=lcar2; + code[15].param=2; + mem[imem-2]*=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar4){ + code[15].op=mem[imem-5]=lcar3; + code[15].param=3; + mem[imem-2]*=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar){ + if (mem[imem-1]==1) remove_code(1); else { + code[15].op=mem[imem-2]=lcarmul; + optimizado=1; + } + } break; + case lsub: + if (code[15].op==lcar2){ + code[15].op=mem[imem-3]=lcar; + code[15].param=1; + mem[imem-2]-=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar3){ + code[15].op=mem[imem-4]=lcar2; + code[15].param=2; + mem[imem-2]-=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar4){ + code[15].op=mem[imem-5]=lcar3; + code[15].param=3; + mem[imem-2]-=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar){ + if (mem[imem-1]==0) remove_code(1); else { + code[15].op=mem[imem-2]=lcarsub; + optimizado=1; + } + } break; + case ldiv: + if (code[15].op==lcar2){ + if (mem[imem-1]!=0) { + code[15].op=mem[imem-3]=lcar; + code[15].param=1; + mem[imem-2]/=mem[imem-1]; + imem--; optimizado=1; + } + } else if (code[15].op==lcar3){ + if (mem[imem-1]!=0) { + code[15].op=mem[imem-4]=lcar2; + code[15].param=2; + mem[imem-2]/=mem[imem-1]; + imem--; optimizado=1; + } + } else if (code[15].op==lcar4){ + if (mem[imem-1]!=0) { + code[15].op=mem[imem-5]=lcar3; + code[15].param=3; + mem[imem-2]/=mem[imem-1]; + imem--; optimizado=1; + } + } else if (code[15].op==lcar){ + if (mem[imem-1]==1) remove_code(1); + else if (mem[imem-1]!=0) { + code[15].op=mem[imem-2]=lcardiv; // Un cardiv nunca será "cardiv 0" + optimizado=1; + } + } break; + case lneg: + if (code[15].op==lcar || code[15].op==lcar2 || code[15].op==lcar3 || code[15].op==lcar4) { + mem[imem-1]=-mem[imem-1]; optimizado=1; + } + break; + case lnot: + if (code[15].op==lcar || code[15].op==lcar2 || code[15].op==lcar3 || code[15].op==lcar4) { + mem[imem-1]=mem[imem-1]^-1; optimizado=1; + } + break; + } + + if (!optimizado) { + if (imem-code[15].dir>2) delete_code(); + add_code(imem,param,op); + if (param) { mem[imem++]=op; mem[imem++]=pa; } else mem[imem++]=op; + } + +} + +void remove_code(int i) { + int n; + optimizado=1; + while (i--) { + imem-=code[15].param+1; + for (n=15;n>0;n--) { + code[n].dir=code[n-1].dir; + code[n].param=code[n-1].param; + code[n].op=code[n-1].op; + } code[0].dir=0; code[0].param=0; code[0].op=0; + } +} + +void delete_code(void) { + int n; + for (n=0;n<16;n++) { + code[n].dir=0; code[n].param=0; code[n].op=0; + } +} + +void add_code(int dir, int param, int op) { + int n; + for (n=0;n<15;n++) { + code[n].dir=code[n+1].dir; + code[n].param=code[n+1].param; + code[n].op=code[n+1].op; + } code[15].dir=dir; code[15].param=param; code[15].op=op; +} + + +//----------------------------------------------------------------------------- +// Con el primer token leido guarda el inicio de una sentencia +//----------------------------------------------------------------------------- + +void inicio_sentencia(void) +{ + byte * p=ierror-1; + inicio=imem; + linea1=linea; + columna1=0; + while (*p!=cr && *p!=lf && p>_source) { + columna1++; p--; + } +} + +//----------------------------------------------------------------------------- +// Con el primer token que no es de la sentecia guarda el fin de una sentencia +//----------------------------------------------------------------------------- + +void final_sentencia(void) +{ + byte * p=old_ierror_end-1; + final=imem-1; + linea2=old_linea; + columna2=0; + while (*p!=cr && *p!=lf && p>=_source) { + columna2++; p--; + } +} + +//----------------------------------------------------------------------------- +// Guarda un registro (inicio,final,linea1,...) en el temporal (linf) +//----------------------------------------------------------------------------- + +void grabar_sentencia(void) +{ + if(debug && linf!=NULL) { + fwrite(&inicio,4,1,linf); + fwrite(&final,4,1,linf); + fwrite(&linea1,4,1,linf); + fwrite(&columna1,4,1,linf); + fwrite(&linea2,4,1,linf); + fwrite(&columna2,4,1,linf); + } +} + +//----------------------------------------------------------------------------- +// Agrega información de depurado al ejecutable +//----------------------------------------------------------------------------- + +void escribe_lin(FILE* f) +{ + int b=0; + int l; + byte* progcomp; + + /*#ifdef WIN32 + // Resuelve la ruta del PRG + char resolved_path[_MAX_PATH]; + _fullpath(resolved_path,fichero_prg,_MAX_PATH); + #else + // Lo mismo pero en Linux + char resolved_path[PATH_MAX]; + realpath(fichero_prg,resolved_path); + #endif + + // Escribe la ruta resuelta + fputs(resolved_path,f); + fputc(0,f);*/ + + // comprimimos el codigo fuente + while(prog[b]!=0) b++; + progcomp=e_malloc(b*2); + l=b*2; + if(compress(progcomp,&l,prog,b)) { + fclose(linf); + fclose(f); + errormem(); + } + // escribe el tamaño del codigo descomprimido + fwrite(&b,1,4,f); + // escribe el tamaño del codigo comprimido + fwrite(&l,1,4,f); + // escribe el codigo comprimido + fwrite(progcomp,1,l,f); + free(progcomp); + + // Escribe el tamaño del LIN + b=ftell(linf); + #ifdef _DEBUG + printf("dbg: TAMANO LIN: %d\n",b); + #endif + fwrite(&b,1,4,f); + + // Escribe la información LIN (offset de cada sentencia en el prg y en el bytecode) + fseek(linf,0,SEEK_SET); + while((b=fgetc(linf))!=EOF) + fputc(b,f); + + fclose(linf); +} + + +// Escribe información sobre los objetos + +void escribe_dbg(FILE* f) +{ + int n; + + // Datos comunes de cada objeto + struct { + int tipo; + int nombre; + int bloque; + int miembro; + int v0,v1,v2,v3,v4,v5; + } ob; + + // Cabecera de sección DBG + fwrite(&num_obj,4,1,f); + fwrite(&num_obj_predefinidos,4,1,f); + n=(int)&obj[0]; + fwrite(&n,4,1,f); + n=sizeof(struct objeto); + fwrite(&n,4,1,f); + + // Escribe los datos de cada objeto + for (n=0;n add rng ptr + +//vloc &vloc aid ptr +//tloc[_exp] &tloc <_exp> add rng aid ptr + +//proc.vloc &proc ptr &vloc add ptr +//proc.tloc[_exp] &proc ptr &tloc <_exp> add rng add ptr + + +FILE * fin, * fout; +byte * _source; +byte * source, * ierror, * ierror_end; + +int longitud_textos; +int inicio_textos; +int max_process; +int ignore_errors; +int free_sintax; +int extended_conditions; +int simple_conditions; +int comprueba_rango; +int comprueba_id; +int comprueba_null; +int hacer_strfix; +int optimizar; +int case_sensitive; + + +//----------------------------------------------------------------------------- +// MNEMÓNICOS BYTECODE EML +//----------------------------------------------------------------------------- + +//Mnemónico-Códg.-Operandos (Generación de código EML, "*" = "aún no usado") + +#define lnop 0 // * No operación +#define lcar 1 // valor Carga una constante en pila +#define lasi 2 // Saca valor, offset y mete el valor en [offset] +#define lori 3 // Or lógico +#define lxor 4 // Xor, or exclusivo +#define land 5 // And lógico, operador sobre condiciones +#define ligu 6 // Igual, operador logico de comparación +#define ldis 7 // Distinto, true si los 2 valores son diferentes +#define lmay 8 // Mayor, comparación con signo +#define lmen 9 // Menor, idem +#define lmei 10 // Menor o igual +#define lmai 11 // Mayor o igual +#define ladd 12 // Suma dos constantes +#define lsub 13 // Resta, operación binaria +#define lmul 14 // Multiplicación +#define ldiv 15 // División de enteros +#define lmod 16 // Módulo, resto de la división +#define lneg 17 // Negación, cambia de signo una constante +#define lptr 18 // Pointer, saca offset y mete [offset] +#define lnot 19 // Negación binaria, bit a bit +#define laid 20 // Suma id a la constante de la pila +#define lcid 21 // Carga id en la pila +#define lrng 22 // rango Realiza una comparación de rango +#define ljmp 23 // offset Salta a una dirección de mem[] +#define ljpf 24 // offset Salta si un valor es falso a una dirección +#define lfun 25 // código Llamada a un proceso interno, ej. signal() +#define lcal 26 // offset Crea un nuevo proceso en el programa +#define lret 27 // Auto-eliminación del proceso +#define lasp 28 // Desecha un valor apilado +#define lfrm 29 // Detiene por este frame la ejecución del proceso +#define lcbp 30 // num_par Inicializa el puntero a los parámetros locales +#define lcpa 31 // Saca offset, lee parámetro [offset] y bp++ +#define ltyp 32 // bloque Define el tipo de proceso actual (colisiones) +#define lpri 33 // offset Salta a la dirección, y carga var. privadas +#define lcse 34 // offset Si switch <> expresión, salta al offset +#define lcsr 35 // offset Si switch no esta en el rango, salta al offset +#define lshr 36 // Rotacion a la derecha (modo C, >>) +#define lshl 37 // Rotacion a la izquierda (modo C, <<) +#define lipt 38 // Incremento y pointer +#define lpti 39 // Pointer e incremento +#define ldpt 40 // Decremento y pointer +#define lptd 41 // Pointer y decremento +#define lada 42 // Add-asignación +#define lsua 43 // Sub-asignación +#define lmua 44 // Mul-asignación +#define ldia 45 // Div-asignación +#define lmoa 46 // Mod-asignación +#define lana 47 // And-asignación +#define lora 48 // Or-asignación +#define lxoa 49 // Xor-asignación +#define lsra 50 // Shr-asignación +#define lsla 51 // Shl-asignación +#define lpar 52 // num_par_pri Define el número de parámetros privados +#define lrtf 53 // Auto-eliminación del proceso, devuelve un valor +#define lclo 54 // offset Crea un clon del proceso actual +#define lfrf 55 // Pseudo-Frame (frame a un porcentaje, frame(100)==frame) +#define limp 56 // offset text Importa una DLL externa +#define lext 57 // código Llama a una función externa +#define lchk 58 // Comprueba la validez de un identificador +#define ldbg 59 // Invoca al debugger + +// Instrucciones añadidas para la optimización (DIV 2.0) + +#define lcar2 60 +#define lcar3 61 +#define lcar4 62 +#define lasiasp 63 +#define lcaraid 64 +#define lcarptr 65 +#define laidptr 66 +#define lcaraidptr 67 +#define lcaraidcpa 68 +#define laddptr 69 +#define lfunasp 70 +#define lcaradd 71 +#define lcaraddptr 72 +#define lcarmul 73 +#define lcarmuladd 74 +#define lcarasiasp 75 +#define lcarsub 76 +#define lcardiv 77 + +// Instrucciones añadidas para el manejo de caracteres + +#define lptrchr 78 // Pointer, saca (index, offset) y mete [offset+byte index] +#define lasichr 79 // Saca (valor, index, offset) y mete el valor en [offset+byte index] +#define liptchr 80 // Incremento y pointer +#define lptichr 81 // Pointer e incremento +#define ldptchr 82 // Decremento y pointer +#define lptdchr 83 // Pointer y decremento +#define ladachr 84 // Add-asignación +#define lsuachr 85 // Sub-asignación +#define lmuachr 86 // Mul-asignación +#define ldiachr 87 // Div-asignación +#define lmoachr 88 // Mod-asignación +#define lanachr 89 // And-asignación +#define lorachr 90 // Or-asignación +#define lxoachr 91 // Xor-asignación +#define lsrachr 92 // Shr-asignación +#define lslachr 93 // Shl-asignación +#define lcpachr 94 // Saca offset, lee parámetro [offset] y bp++ + +// Instrucciones añadidas para el manejo de cadenas + +#define lstrcpy 95 // Saca si, di, y hace strcpy(mem[di],[si]) (deja di en pila) +#define lstrfix 96 // Amplia una cadena antes de meter un char en ella +#define lstrcat 97 // Concatena dos cadenas (opera como strcpy) +#define lstradd 98 // Suma dos strings "en el aire" y deja en pila el puntero al aire +#define lstrdec 99 // Añade o quita caracteres a una cadena +#define lstrsub 100 // Quita caracteres a una cadena (-=) +#define lstrlen 101 // Sustituye una cadena por su longitud +#define lstrigu 102 // Comparacion de igualdad de dos cadenas +#define lstrdis 103 // Cadenas distintas +#define lstrmay 104 // Cadena mayor +#define lstrmen 105 // Cadena menor +#define lstrmei 106 // Cadena mayor o igual +#define lstrmai 107 // Cadena menor o igual +#define lcpastr 108 // Carga un parámetro en una cadena + +// Instrucciones añadidas para el manejo de Words + +#define lptrwor 109 // Pointer, saca (index, offset) y mete [offset+byte index] +#define lasiwor 110 // Saca (valor, index, offset) y mete el valor en [offset+byte index] +#define liptwor 111 // Incremento y pointer +#define lptiwor 112 // Pointer e incremento +#define ldptwor 113 // Decremento y pointer +#define lptdwor 114 // Pointer y decremento +#define ladawor 115 // Add-asignación +#define lsuawor 116 // Sub-asignación +#define lmuawor 117 // Mul-asignación +#define ldiawor 118 // Div-asignación +#define lmoawor 119 // Mod-asignación +#define lanawor 120 // And-asignación +#define lorawor 121 // Or-asignación +#define lxoawor 122 // Xor-asignación +#define lsrawor 123 // Shr-asignación +#define lslawor 124 // Shl-asignación +#define lcpawor 125 // Saca offset, lee parámetro [offset] y bp++ + +// Miscelánea + +#define lnul 126 // Comprueba que un puntero no sea NULL + +//----------------------------------------------------------------------------- + +struct { // Peephole, "mirilla" para el optimizador + int dir; // Dirección + int param; // Indica si ese opcode tiene parámetro + int op; // Opcode +} code[16]; // En code[15] debe quedar siempre la última instrucción generada + +//----------------------------------------------------------------------------- + +// Informacion para temporal de debug (posicion en mem y fuente de cada sentencia) + +FILE * linf; // En este temporal guardamos la info y luego lo agregamos al exe + +int inicio,final; // Direcciones inicial y final de mem[] de la sentencia +int linea1,columna1; // Posicion en la que comienza la sentencia en el fuente +int linea2,columna2; // Posicion en la que acaba la sentencia en el fuente + +void inicio_sentencia(void); // Fija inicio, linea1, columna1 +void final_sentencia(void); // Fija final, linea2, columna2 +void grabar_sentencia(void); // Guarda las seis variables en el fichero + +void escribe_lin(FILE* f); +void escribe_dbg(FILE* f); + +//----------------------------------------------------------------------------- + +int salto_import; // offset donde guardaremos el offset del ljmp que salta + // a la rutina de carga de DLLs + +//----------------------------------------------------------------------------- + +#define max_break 512 +int tbreak[max_break]; +int itbreak; + +#define max_cont 256 +int tcont[max_cont]; +int itcont; + +#define max_elseif 256 +int telseif[max_elseif]; +int itelseif; + + +//----------------------------------------------------------------------------- +// PROTOTIPOS +//----------------------------------------------------------------------------- + +void prepara_compilacion(); +void compila(); +void test_buffer(int * * ,int * ,int); +void sentencia(); + +void g1(int op); +void g2(int op, int pa); + +#endif // __COMPILER_H \ No newline at end of file diff --git a/ediv/src/ediv/config.c b/ediv/src/ediv/config.c new file mode 100644 index 0000000..4bae404 --- /dev/null +++ b/ediv/src/ediv/config.c @@ -0,0 +1,161 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 "main.h" +//#include "config.h" +#include "compiler.h" +#include "lower.h" +#include "language.h" + +FILE *f; +int i,tamano; +char* buffer; +int linea; +char cfg[256]; + +void cfg_error(int error) +{ + printf(translate(41),cfg,linea,translate_cfg_error(error)); + printf(translate(42)); + exit(1); +} + +void salta_spc() { + while(lower[buffer[i]]==0 && i'9') cfg_error(2); // se esperaba un dato numerico + c=0; + while(buffer[i]>='0' && buffer[i]<='9' && i +#include + +#include "dll_load.h" +byte g_bIsWinNT; + +#pragma pack(push,1) + +typedef struct { + DWORD dwPageRVA; + DWORD dwBlockSize; +} IMAGE_FIXUP_BLOCK, *PIMAGE_FIXUP_BLOCK; + +typedef struct { + WORD offset:12; + WORD type:4; +} IMAGE_FIXUP_ENTRY, *PIMAGE_FIXUP_ENTRY; + +typedef struct __imageparameters { + void *pImageBase; + char svName[MAX_PATH]; + DWORD dwFlags; + int nLockCount; + struct __imageparameters *next; +} IMAGE_PARAMETERS; + +typedef BOOL (WINAPI *DLLMAIN_T)(HMODULE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); + +#pragma pack(pop) + + +// Process-global variables + +IMAGE_PARAMETERS *g_pImageParamHead; +CRITICAL_SECTION g_DLLCrit; + +// Function implementations + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Detecta la version de windows // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Si es WinNT devuelve g_bIsWinNT=1 +// Si es Win'9x/Me devuelve g_bIsWinNT=0; +void CheckWindowsVersion(void) +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize=sizeof(OSVERSIONINFO); + + GetVersionEx(&osvi); + + if (osvi.dwPlatformId==VER_PLATFORM_WIN32_NT) + g_bIsWinNT=1; + else + g_bIsWinNT=0; + +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Initialization Routines // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void InitializeDLLLoad(void) +{ + InitializeCriticalSection(&g_DLLCrit); + g_pImageParamHead=NULL; +} + +void KillDLLLoad(void) +{ + IMAGE_PARAMETERS *cur,*next; + cur=g_pImageParamHead; + while(cur!=NULL) { + next=cur->next; + free(cur); + cur=next; + } + + DeleteCriticalSection(&g_DLLCrit); +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Internal DLL list management // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// returns 0 if just ref count increment, 1 if this is a new addition, -1 on error +static int AddDLLReference(void *pImageBase, char *svName, DWORD dwFlags) +{ + IMAGE_PARAMETERS *cur; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==pImageBase) break; + } + + if(cur!=NULL) { + // increment dll count + cur->nLockCount++; + LeaveCriticalSection(&g_DLLCrit); + return 0; + } + + // Add new dll to list + cur=(IMAGE_PARAMETERS *)malloc(sizeof(IMAGE_PARAMETERS)); + if(cur==NULL) { + LeaveCriticalSection(&g_DLLCrit); + return -1; + } + + cur->pImageBase=pImageBase; + if(svName!=NULL) { + lstrcpyn(cur->svName,svName, MAX_PATH); + } else cur->svName[0]='\0'; + cur->nLockCount=1; + cur->dwFlags=dwFlags; + cur->next=g_pImageParamHead; + g_pImageParamHead=cur; + + LeaveCriticalSection(&g_DLLCrit); + return 1; +} + +// returns 0 if just a reference count dec, 1 if fully removed from list, -1 on error +static int RemoveDLLReference(void *pImageBase, char *svName, DWORD *pdwFlags) +{ + IMAGE_PARAMETERS *cur,*prev; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + prev=NULL; + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==pImageBase) break; + prev=cur; + } + if(cur==NULL) { + LeaveCriticalSection(&g_DLLCrit); + return -1; + } + + // decrement dll count + cur->nLockCount--; + // look up dll information + *pdwFlags=cur->dwFlags; + lstrcpyn(svName,cur->svName,MAX_PATH); + + // Remove if time to go + if(cur->nLockCount==0) { + if(prev==NULL) { + g_pImageParamHead=g_pImageParamHead->next; + free(cur); + } else { + prev->next=cur->next; + free(cur); + } + + LeaveCriticalSection(&g_DLLCrit); + return 1; + } + + LeaveCriticalSection(&g_DLLCrit); + return 0; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLHandle() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +// Like GetModuleHandle(), returns null if the module is not loaded, returns a base address otherwise +HMODULE GetDLLHandle(char *svName) +{ + IMAGE_PARAMETERS *cur; + + if(svName==NULL) return NULL; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(lstrcmpi(cur->svName,svName)==0) break; + } + + if(cur!=NULL) { + LeaveCriticalSection(&g_DLLCrit); + return (HMODULE) cur->pImageBase; + } + + LeaveCriticalSection(&g_DLLCrit); + return NULL; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLFileName() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +// Like GetModuleFileName(), returns 0 on failure +DWORD GetDLLFileName(HMODULE hModule, LPTSTR lpFileName, DWORD nSize) +{ + DWORD dwRet; + IMAGE_PARAMETERS *cur; + + if(hModule==NULL || lpFileName==NULL || nSize==0) return 0; + + if((dwRet=GetModuleFileName(hModule,lpFileName,nSize))!=0) return dwRet; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==hModule) break; + } + + if(cur!=NULL) { + LeaveCriticalSection(&g_DLLCrit); + lstrcpyn(lpFileName,cur->svName,nSize); + return lstrlen(lpFileName); + } + + LeaveCriticalSection(&g_DLLCrit); + return 0; +} + + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +// Like GetProcAddress(), returns null if the procedure/ordinal is not there, otherwise returns function addr. +FARPROC GetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName) +{ + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_EXPORT_DIRECTORY ped; + int nOrdinal; + int nDirCount; + DWORD *pAddrTable; + DWORD dwRVA; + DWORD dwAddr; + + if(hModule==NULL) return NULL; + + // Get header + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (hModule); + + // Get number of image directories in list + + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Sift through export table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size==0) return NULL; + + // Good, we have an export table. Lets get it. + + ped=(IMAGE_EXPORT_DIRECTORY *)RVATOVA(hModule,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress); + + // Get ordinal of desired function + + if(HIWORD((DWORD)lpProcName)==0) { + nOrdinal=(LOWORD((DWORD)lpProcName)) - ped->Base; + } else { + + // Go through name table and find appropriate ordinal + + int i,count; + DWORD *pdwNamePtr; + WORD *pwOrdinalPtr; + + count=ped->NumberOfNames; + pdwNamePtr=(DWORD *)RVATOVA(hModule,ped->AddressOfNames); + pwOrdinalPtr=(WORD *)RVATOVA(hModule,ped->AddressOfNameOrdinals); + + for(i=0;iAddressOfFunctions); + + dwRVA=pAddrTable[nOrdinal]; + + + // Check if it's a forwarder, or a local addr + // XXX Should probably do this someday. Just don't define forwarders. You're + // XXX not loading kernel32.dll with this shit anyway. + + dwAddr=(DWORD) RVATOVA(hModule,dwRVA); + + return (FARPROC) dwAddr; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Modifies an image. Must be loaded with RWX_PERMISSIONS, or have the export +// table writable +FARPROC SetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName, FARPROC fpAddr) +{ + PIMAGE_OPTIONAL_HEADER poh; + int nDirCount; + PIMAGE_EXPORT_DIRECTORY ped; + int nOrdinal; + DWORD *pAddrTable; + DWORD dwOldAddr; + + if(hModule==NULL) return FALSE; + + // Get header + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (hModule); + + // Get number of image directories in list + + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Sift through export table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size==0) return FALSE; + + // Good, we have an export table. Lets get it. + + ped=(IMAGE_EXPORT_DIRECTORY *)RVATOVA(hModule,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress); + + // Get ordinal of desired function + + if(HIWORD((DWORD)lpProcName)==0) { + nOrdinal=(LOWORD((DWORD)lpProcName)) - ped->Base; + } else { + + // Go through name table and find appropriate ordinal + + int i,count; + DWORD *pdwNamePtr; + WORD *pwOrdinalPtr; + + count=ped->NumberOfNames; + pdwNamePtr=(DWORD *)RVATOVA(hModule,ped->AddressOfNames); + pwOrdinalPtr=(WORD *)RVATOVA(hModule,ped->AddressOfNameOrdinals); + + for(i=0;iAddressOfFunctions); + + dwOldAddr=(DWORD) RVATOVA(hModule,(pAddrTable[nOrdinal])); + pAddrTable[nOrdinal]=(DWORD) VATORVA(hModule,((DWORD)fpAddr)); + + return (FARPROC) dwOldAddr; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ResetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +BOOL ResetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName) +{ + char svName[MAX_PATH+1]; + DWORD dwAddr; + DWORD dwNewAddr; + + if(GetDLLFileName(hModule,svName,MAX_PATH+1)) { + // Load another copy of the DLL + HMODULE hNewMod=LoadDLLEx(svName,NULL,FORCE_LOAD_NEW_IMAGE); + if(hNewMod==NULL) return FALSE; + dwAddr=(DWORD)GetDLLProcAddress(hNewMod,lpProcName); + if(dwAddr==(DWORD)NULL) { + FreeDLL(hNewMod); + return FALSE; + } + + dwNewAddr=(DWORD)RVATOVA(hModule,VATORVA(hNewMod,dwAddr)); + + FreeDLL(hNewMod); + + SetDLLProcAddress(hModule,lpProcName,(FARPROC)dwNewAddr); + + return TRUE; + } + + return FALSE; +} + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Internal DLL Loader code // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +static BOOL RunDLLMain(void *pImageBase, DWORD dwImageSize, BOOL bDetach) +{ + // Get entry point from header + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_FILE_HEADER pfh; + DLLMAIN_T pDllMain; + BOOL bRet; + + pfh = (PIMAGE_FILE_HEADER)PEFHDROFFSET(pImageBase); + if((pfh->Characteristics & IMAGE_FILE_DLL)==0) return TRUE; + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (pImageBase); + pDllMain=(DLLMAIN_T) RVATOVA(pImageBase, poh->AddressOfEntryPoint); + + // Call dllmain the right way + + if(bDetach) { + bRet=pDllMain((HMODULE) pImageBase, DLL_PROCESS_DETACH, NULL); + } else { + bRet=pDllMain((HMODULE) pImageBase, DLL_PROCESS_ATTACH, NULL); + } + + return bRet; +} + +BOOL PrepareDLLImage(void *pMemoryImage, DWORD dwImageSize, BOOL bResolve, BOOL bRebind) +{ + // Get headers + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_SECTION_HEADER psh; + int nDirCount; + DWORD delta; + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (pMemoryImage); + psh = (PIMAGE_SECTION_HEADER)SECHDROFFSET (pMemoryImage); + + // Get number of image directories in list + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Process import table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].Size!=0) { + PIMAGE_IMPORT_DESCRIPTOR pid; + pid=(IMAGE_IMPORT_DESCRIPTOR *)RVATOVA(pMemoryImage,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress); + + // For all imported DLLs + while(pid->OriginalFirstThunk!=0) { + char *svDllName; + HMODULE hDll; + + svDllName=(char *) RVATOVA(pMemoryImage,pid->Name); + + // Map library into address space (could also use LoadDLL()) + hDll=GetModuleHandle(svDllName); + if(hDll==NULL) hDll=LoadLibrary(svDllName); + + if(hDll==NULL) return FALSE; + + // Bind if not bound already + if(pid->TimeDateStamp==0 || bRebind) { + PIMAGE_THUNK_DATA ptd_in,ptd_out; + + // Store DLL infoz + + pid->ForwarderChain=(DWORD)hDll; + pid->TimeDateStamp=0xCDC31337; // This is bullshit cuz I don't want to call libc. + + // Fill in Import Address Table + + ptd_in=(PIMAGE_THUNK_DATA) RVATOVA(pMemoryImage, pid->OriginalFirstThunk); + ptd_out=(PIMAGE_THUNK_DATA) RVATOVA(pMemoryImage, pid->FirstThunk); + + while(ptd_in->u1.Function!=NULL) { + FARPROC func; + + // Determine if ordinal or name pointer + if(ptd_in->u1.Ordinal & 0x80000000) { + // Ordinal + func=GetProcAddress(hDll,MAKEINTRESOURCE(ptd_in->u1.Ordinal)); + } else { + // Function name + PIMAGE_IMPORT_BY_NAME pibn; + pibn=(PIMAGE_IMPORT_BY_NAME) RVATOVA(pMemoryImage,ptd_in->u1.AddressOfData); + func=GetProcAddress(hDll,(char *)pibn->Name); + } + + if(func==NULL) return FALSE; + + // Write address to appropriate location + ptd_out->u1.Function = (PDWORD) func; + + ptd_in++; + ptd_out++; + } + } + + pid++; + } + } + + // - Process relocation tables if necessary ---------------------------------- + + // Calculate fixup delta + delta=(DWORD)pMemoryImage - (DWORD)poh->ImageBase; + + if((delta!=0) && (poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size!=0)) { + PIMAGE_FIXUP_BLOCK pfb; + pfb=(PIMAGE_FIXUP_BLOCK)RVATOVA(pMemoryImage,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress); + + + // For each fixup block + while(pfb->dwPageRVA!=0) { + PIMAGE_FIXUP_ENTRY pfe; + int i,count; + + count=(pfb->dwBlockSize-sizeof(IMAGE_FIXUP_BLOCK))/sizeof(IMAGE_FIXUP_ENTRY); + pfe=(PIMAGE_FIXUP_ENTRY)((char *)pfb + sizeof(IMAGE_FIXUP_BLOCK)); + + // For each fixup entry + for(i=0;idwPageRVA + pfe->offset); + switch(pfe->type) { + case IMAGE_REL_BASED_ABSOLUTE: + break; + case IMAGE_REL_BASED_HIGH: + *((WORD *)fixaddr) += HIWORD(delta); + break; + case IMAGE_REL_BASED_LOW: + *((WORD *)fixaddr) += LOWORD(delta); + break; + case IMAGE_REL_BASED_HIGHLOW: + *((DWORD *)fixaddr) += delta; + break; + case IMAGE_REL_BASED_HIGHADJ: // This one's really fucked up. + adjust=((*((WORD *)fixaddr)) << 16) | (*(WORD *)(pfe+1)); + adjust += delta; + adjust += 0x00008000; + *((WORD *)fixaddr) = HIWORD(adjust); + pfe++; + break; + default: + return FALSE; + } + + pfe++; + } + + pfb=(PIMAGE_FIXUP_BLOCK)((char *)pfb + pfb->dwBlockSize); + } + } + + + + return TRUE; +} + +static BOOL ProtectDLLImage(void *pMemoryImage, BOOL bRWX) +{ + // Get Number of Sections + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + PIMAGE_OPTIONAL_HEADER poh; + DWORD hdrlen; + int i; + PIMAGE_SECTION_HEADER psh; + + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pMemoryImage); + nSectionCount=pfh->NumberOfSections; + + // Get PE Header Length + Section Header Length + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pMemoryImage); + hdrlen=poh->SizeOfHeaders; + + // Protect sections one by one + psh=(PIMAGE_SECTION_HEADER) SECHDROFFSET(pMemoryImage); + for(i=0;iVirtualAddress); + secLen = psh->SizeOfRawData; + + // Parse Characteristics and protect memory appropriately + bWrite = (psh->Characteristics & IMAGE_SCN_MEM_WRITE)?TRUE:FALSE; + bRead = (psh->Characteristics & IMAGE_SCN_MEM_READ)?TRUE:FALSE; + bExec = (psh->Characteristics & IMAGE_SCN_MEM_EXECUTE)?TRUE:FALSE; + bShared = (psh->Characteristics & IMAGE_SCN_MEM_SHARED)?TRUE:FALSE; + + if(bWrite && bRead && bExec && bShared) newProtect=PAGE_EXECUTE_READWRITE; + else if(bWrite && bRead && bExec) newProtect=PAGE_EXECUTE_WRITECOPY; + else if(bRead && bExec) newProtect=PAGE_EXECUTE_READ; + else if(bExec) newProtect=PAGE_EXECUTE; + else if(bWrite && bRead && bShared) newProtect=PAGE_READWRITE; + else if(bWrite && bRead) newProtect=PAGE_WRITECOPY; + else if(bRead) newProtect=PAGE_READONLY; + + if(bRWX) newProtect=PAGE_WRITECOPY; + + if(psh->Characteristics & IMAGE_SCN_MEM_NOT_CACHED) newProtect |= PAGE_NOCACHE; + + if(newProtect==0) return FALSE; + + VirtualProtect(secMemAddr,secLen,newProtect,&oldProtect); + + psh++; + } + + return TRUE; +} + + +BOOL MapDLLFromImage(void *pDLLFileImage, void *pMemoryImage) +{ + // Get Number of Sections + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + PIMAGE_OPTIONAL_HEADER poh; + DWORD hdrlen; + int i; + PIMAGE_SECTION_HEADER psh; + + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pDLLFileImage); + nSectionCount=pfh->NumberOfSections; + + // Get PE Header Length + Section Header Length + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pDLLFileImage); + hdrlen=poh->SizeOfHeaders; + + // Copy PE Header + Section Headers + memcpy(pMemoryImage,pDLLFileImage,hdrlen); + + // Copy Sections one by one + psh=(PIMAGE_SECTION_HEADER) SECHDROFFSET(pDLLFileImage); + for(i=0;iVirtualAddress; + secFileAddr = (char *)pDLLFileImage + psh->PointerToRawData; + secLen = psh->SizeOfRawData; + + memcpy(secMemAddr,secFileAddr,secLen); + + psh++; + } + + + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLLFromImage() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HMODULE LoadDLLFromImage(void *pDLLFileImage, char *svMappingName, DWORD dwFlags) +{ + // Examine DOS Header + PIMAGE_DOS_HEADER doshead; + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + void *pPreferredImageBase; + DWORD dwImageSize; + void *pImageBase; + HANDLE hmapping; + PIMAGE_OPTIONAL_HEADER poh; + int dllaction; + + doshead=(PIMAGE_DOS_HEADER) pDLLFileImage; + if(doshead->e_magic!=IMAGE_DOS_SIGNATURE) return NULL; + + // Ensure our input is of good length + if(svMappingName!=NULL) { + if(lstrlen(svMappingName) >= MAX_PATH) return NULL; + } + + // Determine File Format + if(*(DWORD *)NTSIGNATURE(pDLLFileImage) != IMAGE_NT_SIGNATURE) return NULL; + + + // Get PE Header + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pDLLFileImage); + + + // Ensure proper machine type + //if(pfh->Machine!=IMAGE_FILE_MACHINE_I386) return NULL; + // XXX Verify Characteristics + // XXX I don't bother to do this yet. + + + // Get Section Count + nSectionCount=pfh->NumberOfSections; + + + // Get PE Optional Header + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pDLLFileImage); + + + // Ensure we are an executable image, not a rom image + if(poh->Magic!=0x010B) return NULL; + + + // Get preferred image base and image length + pPreferredImageBase=(void *)poh->ImageBase; + dwImageSize=poh->SizeOfImage; + + // Get base address of virtual image + hmapping=NULL; + + pImageBase=GetDLLHandle(svMappingName); + if(pImageBase==NULL) { + BOOL bCreated=FALSE; + BOOL bRebased=FALSE; + // If not mapped into this process, then we should map it now + +// Esto es para windows nt, de momento se quita + + if(g_bIsWinNT) { + // === Windows NT DLL Loading (supports shared sections) === + if(svMappingName!=NULL) { + hmapping=OpenFileMapping(FILE_MAP_WRITE,TRUE,svMappingName); + bCreated=FALSE; + } + if(hmapping==NULL) { + hmapping=CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE,0,dwImageSize+SIZE_OF_PARAMETER_BLOCK,svMappingName); + if(hmapping==NULL) return NULL; + bCreated=TRUE; + } + + // Try to load file mapping view at preferred image base (not gonna happen in Win9x..sigh) + + pImageBase=MapViewOfFileEx(hmapping,FILE_MAP_WRITE,0,0,0,pPreferredImageBase); + if(pImageBase==NULL) { + pImageBase=MapViewOfFileEx(hmapping,FILE_MAP_WRITE,0,0,0,NULL); + } + CloseHandle(hmapping); + if(pImageBase==NULL) return NULL; + } else { + // === Windows 9x DLL Loading (does not support shared sections) === + pImageBase=VirtualAlloc(pPreferredImageBase,dwImageSize,MEM_COMMIT|MEM_RESERVE,PAGE_READWRITE); + if(pImageBase==NULL) { + pImageBase=VirtualAlloc(NULL,dwImageSize,MEM_COMMIT|MEM_RESERVE,PAGE_READWRITE); + if(pImageBase==NULL) return NULL; + } + + bCreated=TRUE; + } + + // Now map DLL from file image into appropriate memory image (if just created) + // Also remap if DLL is being rebased as well (gotta fix relocations) + + if(bCreated || (pImageBase!=pPreferredImageBase)) { + if(!MapDLLFromImage(pDLLFileImage,pImageBase)) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + + // Prepare DLL image (handle relocations/import/export/etc) + + if(!(dwFlags & LOAD_LIBRARY_AS_DATAFILE)) { + if(!PrepareDLLImage(pImageBase, dwImageSize, (dwFlags & DONT_RESOLVE_DLL_REFERENCES)?FALSE:TRUE,(dwFlags & REBIND_IMAGE_IMPORTS)?TRUE:FALSE)) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + + // Resolve DLL references + + if(!(dwFlags & DONT_RESOLVE_DLL_REFERENCES)) { + BOOL bRet; + bRet=RunDLLMain(pImageBase,dwImageSize,DLL_ATTACH); + if(!bRet) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + + + // Apply appropriate protections + + if(!ProtectDLLImage(pImageBase, (dwFlags & RWX_PERMISSIONS)?TRUE:FALSE) ){ + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + } + + + // Add to DLL table/increase reference count + + dllaction=AddDLLReference(pImageBase,svMappingName,dwFlags); + if(dllaction==-1) { + if(hmapping!=NULL) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + } + return NULL; + } + + return (HMODULE) pImageBase; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLLEx() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HMODULE LoadDLLEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags) +{ + char svPath[MAX_PATH+1]; + char *svFilePart; + int nPathLen; + HANDLE hfile; + HANDLE hmapping; + void *baseaddr; + HMODULE ret; + + // Find DLL File + if(dwFlags & LOAD_WITH_ALTERED_SEARCH_PATH) { + return NULL; + } else { + nPathLen=SearchPath(NULL,lpLibFileName,".dll",MAX_PATH,svPath,&svFilePart); + if(nPathLen==0) return NULL; + } + + // Open File + hfile=CreateFile(svPath,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,0,NULL); + if(hfile==INVALID_HANDLE_VALUE) return NULL; + + // Create a file mapping + hmapping=CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL); + + // Close file handle since we don't need it anymore + CloseHandle(hfile); + + // Map file mapping object to memory image + baseaddr=MapViewOfFile(hmapping,FILE_MAP_READ,0,0,0); + if(baseaddr==NULL) { + CloseHandle(hmapping); + return NULL; + } + + // Now pass off to LoadDLLFromImage + if(dwFlags & FORCE_LOAD_NEW_IMAGE) { + ret=LoadDLLFromImage(baseaddr, NULL, dwFlags & ~LOAD_WITH_ALTERED_SEARCH_PATH); + } else { + ret=LoadDLLFromImage(baseaddr, svFilePart, dwFlags & ~LOAD_WITH_ALTERED_SEARCH_PATH); + } + + + // Close file mapping + UnmapViewOfFile(baseaddr); + CloseHandle(hmapping); + + // Return base address as an instance handle + return (HMODULE) ret; +} + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLL() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +HMODULE LoadDLL(LPCTSTR lpLibFileName) +{ + return LoadDLLEx(lpLibFileName,NULL,0); +} + + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// FreeDLL() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +BOOL FreeDLL(HMODULE hLibModule) +{ + PIMAGE_DOS_HEADER doshead; + PIMAGE_OPTIONAL_HEADER poh; + DWORD dwImageSize; + DWORD dwFlags; + char svName[MAX_PATH]; + int dllaction; + BOOL bRet; + + if(hLibModule==NULL) return FALSE; + + // Examine DOS Header + doshead=(PIMAGE_DOS_HEADER) hLibModule; + if(doshead->e_magic!=IMAGE_DOS_SIGNATURE) return FALSE; + + // Determine File Format + if(*(DWORD *)NTSIGNATURE(hLibModule) != IMAGE_NT_SIGNATURE) return FALSE; + + // Get PE Optional Header + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(hLibModule); + + // Ensure we are an executable image, not a rom image + if(poh->Magic!=0x010B) return FALSE; + + // Get image length + dwImageSize=poh->SizeOfImage; + + // Get from DLL table/decrease reference count + dllaction=RemoveDLLReference(hLibModule,svName,&dwFlags); + if(dllaction==-1) return (BOOL) NULL; + + // Call DllMain if necessary + bRet=TRUE; + + if(!(dwFlags & (LOAD_LIBRARY_AS_DATAFILE | DONT_RESOLVE_DLL_REFERENCES))) { + if(dllaction) { + RunDLLMain(hLibModule,dwImageSize,DLL_DETACH); + if(g_bIsWinNT) bRet=UnmapViewOfFile(hLibModule); + else bRet=VirtualFree(hLibModule,0,MEM_RELEASE); + } + } + + return bRet; +} diff --git a/ediv/src/ediv/dll_load.h b/ediv/src/ediv/dll_load.h new file mode 100644 index 0000000..b2e7b52 --- /dev/null +++ b/ediv/src/ediv/dll_load.h @@ -0,0 +1,61 @@ +/* Back Orifice 2000 - Remote Administration Suite + Copyright (C) 1999, Cult Of The Dead Cow + + 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 + + The author of this program may be contacted at dildog@l0pht.com. */ + +#include + +#define NTSIGNATURE(ptr) ((LPVOID)((BYTE *)(ptr) + ((PIMAGE_DOS_HEADER)(ptr))->e_lfanew)) +#define SIZE_OF_NT_SIGNATURE (sizeof(DWORD)) +#define PEFHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE)) +#define OPTHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE+sizeof(IMAGE_FILE_HEADER))) +#define SECHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE+sizeof(IMAGE_FILE_HEADER)+sizeof(IMAGE_OPTIONAL_HEADER))) +#define RVATOVA(base,offset) ((LPVOID)((DWORD)(base)+(DWORD)(offset))) +#define VATORVA(base,offset) ((LPVOID)((DWORD)(offset)-(DWORD)(base))) + +#define SIZE_OF_PARAMETER_BLOCK 4096 +#define IMAGE_PARAMETER_MAGIC 0xCDC31337 +#define MAX_DLL_PROCESSES 256 +#define DLL_ATTACH 0 +#define DLL_DETACH 1 + +// NEW FLAGS +#define REBIND_IMAGE_IMPORTS 0x00000100 +#define RWX_PERMISSIONS 0x00000200 +#define FORCE_LOAD_NEW_IMAGE 0x00000400 + +// Internal functions +BOOL MapDLLFromImage(void *pDLLFileImage, void *pMemoryImage); +BOOL PrepareDLLImage(void *pMemoryImage, DWORD dwImageSize, BOOL bResolve, BOOL bRebind); + +// Primary functions +void InitializeDLLLoad(void); +void KillDLLLoad(void); +HMODULE GetDLLHandle(char *svName); +DWORD GetDLLFileName(HMODULE hModule, LPTSTR lpFileName, DWORD nSize); +FARPROC GetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName); +FARPROC SetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName, FARPROC fpAddr); +BOOL ResetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName); +HMODULE LoadDLLFromImage(void *pDLLFileImage, char *svMappingName, DWORD dwFlags); +HMODULE LoadDLLEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags); +HMODULE LoadDLL(LPCTSTR lpLibFileName); +BOOL FreeDLL(HMODULE hLibModule); +void CheckWindowsVersion(void); + + + +//#endif \ No newline at end of file diff --git a/ediv/src/ediv/ediv.c b/ediv/src/ediv/ediv.c new file mode 100644 index 0000000..d35dea8 --- /dev/null +++ b/ediv/src/ediv/ediv.c @@ -0,0 +1,598 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifdef _WIN32 +# include +# include "dll_load.h" + +struct in_addr iahost; +//struct sockaddr_in sin; +struct hostent *htent; +struct servent *svent; +int status; +char buffer[1024]; +SOCKET sock; + +#define sock_error(s) fprintf(stderr,"\nerror: %d\n", WSAGetLastError()) + +void muestra_motd(); +void conecta(char *servidor, char *archivo); + +#else +# include // ¿será igual en BeOS? +# include +//# include +#endif + +#include +#include +#include +#include +#include + +#include "main.h" +#include "compiler.h" +#include "parser.h" +#include "extern.h" +#include "modulos.h" +#include "shared.h" +#include "language.h" +#include "edivcfg/iniparser.h" + +int main(int argc, char *argv[]) +{ + FILE *fp; // stream del PRG + char *p; + char libmagic[14]; // cabecera "magic" de EDIVRUN.LIB + + int i,j; + byte hayprog=0; + + char sistema[20]; + + n_errors=0; + n_warnings=0; + debug=0; + listados=0; + noexe=0; + + // Sistemas + + #ifdef _WIN32 + strcpy(sistema,"win32"); + #endif + + #ifdef __linux__ + strcpy(sistema,"linux"); + #endif + + ini=iniparser_load("ediv.cfg"); + + idioma=detecta_idioma(); + + // mensaje de cabecera + printf(translate(0)); + printf(translate(1)); + printf("\n"); + + if(argc<2) goto ayuda; + + if(strcmp(argv[1],"--version")==0 || strcmp(argv[1],"-v")==0) + exit(0); + + if(strcmp(argv[1],"--help")==0 || strcmp(argv[1],"-h")==0) { + ayuda: + // pantalla de ayuda + printf(translate(2)); + printf(translate(3),argv[0]); + printf(translate(4)); + printf(translate(5)); + printf(translate(6)); + printf(translate(7)); + printf(translate(8)); + printf(translate(9)); + printf(translate(10),sistema); + printf(translate(48)); + printf(translate(11)); + exit(0); + } + + for(i=1;i=prog) { + if (*p==lf || (*p==cr && *(p+1)==lf)) break; + columna++; + } + if (p20) + printf("Demasiados errores. Compilación interrumpida.\n"); + + if(num==1 || num==2 || num==6 || n_errors>20) { + printf("edivc: Finalizado - %d advertencias, %d errores\n",n_warnings,n_errors); +#else + printf(translate(21),n_warnings); +#endif + printf(translate(23)); + exit(2); +#ifdef MULTI_ERROR + } +#endif + + //lexico(); +} + +void warning(int num, ...) +{ + va_list opparam; + + va_start(opparam,num); + printf(translate(26), fichero_prg, linea); + vprintf(translate_warning(num),opparam); + printf("\n"); + n_warnings++; +} + +//#define DEBUG_HTTP +#ifdef _WIN32 +void muestra_motd() +{ + char* motdserver=NULL; + char* motdpath=NULL; + + if(ini) { + motdserver=iniparser_getstr(ini,"general:motd_host"); + motdpath=iniparser_getstr(ini,"general:motd_path"); + if(!motdserver) { + printf(translate(49)); // el servidor de motd debe estar en ediv.cfg + exit(1); + } + if(!motdpath) motdpath="/ediv/actual/motd.txt"; + conecta(motdserver,motdpath); + exit(0); + } else { + printf(translate(49)); // el servidor de motd debe estar en ediv.cfg + exit(1); + } +} + +void conecta(char *servidor, char *archivo) +{ + struct sockaddr_in sin; + + char *size, *content,*ras; + int tam,inc; + WSADATA wsaData; + WSAStartup(MAKEWORD(2,2),&wsaData); + + iahost.s_addr=inet_addr(servidor); + + if (iahost.s_addr==INADDR_NONE) + htent=gethostbyname(servidor); + else + htent=gethostbyaddr((const char *)&iahost,sizeof(struct in_addr),AF_INET); + + if (htent==NULL) { + sock_error("gethostbyname()"); + return; + } + + sock=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); + + if (sock==INVALID_SOCKET) { + sock_error("socket()"); + return; + } + + svent=getservbyname("http", "tcp"); + if (svent==NULL) + sin.sin_port=htons((u_short)80); + else + sin.sin_port=svent->s_port; + + sin.sin_family=AF_INET; + sin.sin_addr=*(struct in_addr *)*htent->h_addr_list; + + status=connect(sock,(struct sockaddr *)&sin,sizeof(sin)); + if (status==SOCKET_ERROR) { + sock_error("connect()"); + closesocket(sock); + return; + } + + //sprintf(buffer,"GET /%s\n",archivo); + sprintf(buffer,"GET %s HTTP/1.1\n" + "User-Agent: Mozilla/4.76 (Windows 2000; U) Opera 5.12 [es]\n" + "Host: %s\n" + "Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*\n" + "Accept-Language: es\nAccept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\n" + "Connection: Keep-Alive\n" + "\n" + ,archivo,servidor); + +#ifdef DEBUG_HTTP + printf("GET %s HTTP/1.1\n" + "User-Agent: Mozilla/4.76 (Windows 2000; U) Opera 5.12 [es]\n" + "Host: %s\n" + "Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*\n" + "Accept-Language: es\nAccept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\n" + "Connection: Keep-Alive\n" + "\n" + ,archivo,servidor); +#endif + + status=send(sock,buffer,strlen(buffer),0); + if (status==SOCKET_ERROR) { + sock_error("send()"); + closesocket(sock); + return; + } + + status=recv(sock,buffer,sizeof(buffer),0); + if (status == SOCKET_ERROR) { + sock_error("recv()"); + } + + closesocket(sock); + + if(*(buffer+9)!='2' || *(buffer+10)!='0' || *(buffer+10)!='0') { + *strchr(buffer,0x0d)=0; + printf("%s\n",buffer); + exit(1); + } + size=strstr(buffer,"Content-Type: "); + if(!size) { + printf(translate(50)); + exit(1); + } + size+=14; + *(ras=strchr(size,0x0d))=0; + if(strcmp(size,"text/plain")) { + printf(translate(50)); + exit(1); + } + *ras=0x0d; + + size=strstr(buffer,"Content-Length: "); + if(!size) { + printf(translate(50)); + exit(1); + } + size+=16; + ras=strchr(size,0x0d)-1; + content=strstr(size,"\x0d\x0a\x0d\x0a")+4; + tam=0; inc=1; + for(;ras>=size;ras--) { + if (*ras>='0' && *ras<='9') + tam+=(*ras-'0')*inc; + else + break; + inc*=10; + } + if(tam>1024) tam=1024; + + fwrite(content, tam, 1, stdout); +} +#endif \ No newline at end of file diff --git a/ediv/src/ediv/ediv_export.c b/ediv/src/ediv/ediv_export.c new file mode 100644 index 0000000..bba7332 --- /dev/null +++ b/ediv/src/ediv/ediv_export.c @@ -0,0 +1,649 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 "main.h" +#include "extern.h" +#include "parser.h" +#include "compiler.h" +#include "varindex.h" + +#include "language.h" + +//int len,ret,cod; +int len; +struct objeto * ob; +struct objeto * ob2; + +int creaobj; + +byte decl_struct=0; // 1 si se está declarando un struct +byte struct_reserved=0; // 1 si se está declarando la estructura reserved + + +// Errores específicos en la ejecución de una DLL + +void dll_error(int error, ...) +{ + va_list opparam; + + va_start(opparam,error); + printf(translate(35), fichdll); + vprintf(translate_dll_error(error-1),opparam); + printf("\n"); + n_errors++; +} + + + +int EDIV_Export(char* cadena, int nparam, void* hfuncion) +{ + if(decl_struct) { + dll_error(6,cadena); + return 0; + } + + creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_function:\t-- ID FUNCION: %d\n" + "export_function:\tCadena exportada: %s\n" + "export_function:\tN. parametros: %d\n" + "export_function:\tOffset de la funcion: 0x%X\n",n_externs,cadena,nparam,(unsigned int)hfuncion); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob=o; + + if ((*ob).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + (*ob).tipo=tfext; + (*ob).fext.codigo=n_externs; + (*ob).fext.num_par=nparam; + +/* for(i=0;i0xFFFFF) { + dll_error(8,cadena); + return 0; + } + + mem[imem]=0xDAD00000|(*ob2).cglo.totalen; + len+=1+((*ob2).cglo.totalen+5)/4; + mem[imem+1]=0; + imem+=1+((*ob2).cglo.totalen+5)/4; + (*ob).sglo.len_item+=1+((*ob2).cglo.totalen+5)/4; + + return (*ob2).cglo.offset; + } + else { // string miembro de struct local + + (*ob2).tipo=tcloc; + (*ob2).cloc.offset=len+1; + + if (((*ob2).cloc.totalen=tamano)<0) { + dll_error(8,cadena); + return 0; + } + if ((*ob2).cloc.totalen>0xFFFFF) { + dll_error(8,cadena); + return 0; + } + + loc[iloc]=0xDAD00000|(*ob2).cloc.totalen; + len+=1+((*ob2).cloc.totalen+5)/4; + loc[iloc+1]=0; + iloc+=1+((*ob2).cloc.totalen+5)/4; + (*ob).sloc.len_item+=1+((*ob2).cloc.totalen+5)/4; + + return (*ob2).cloc.offset; + } +} + + +int EDIV_Export_Member_Tab(char* cadena, int numregs) +{ + if(!decl_struct) { + dll_error(7,cadena); + return 0; + } + + creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_member_tab:\t-- ID OBJETO: %d\n" + "export_member_tab:\tCadena exportada: %s\n" + "export_member_tab:\tN.regs: %d\n" + "export_member_tab:\tOffset del objeto: 0x%X\n",num_obj-1,cadena,numregs,(unsigned int)o); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob2=o; + + if ((*ob2).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + if((*ob).tipo==tsglo) { // array miembro de struct global + (*ob2).tipo=ttglo; + (*ob2).tglo.offset=len; + (*ob2).tglo.len1=numregs; + (*ob2).tglo.len2=-1; + (*ob2).tglo.len3=-1; + (*ob2).tglo.totalen=numregs+1; + len+=numregs+1; + memset(&mem[imem],0,(numregs+1)*4); + imem+=numregs+1; + (*ob).sglo.len_item+=numregs+1; + + return (*ob2).tglo.offset; + } + else { // array miembro de struct local + if(struct_reserved) + indexa_variable(reserved,cadena,iloc); + (*ob2).tipo=ttloc; + (*ob2).tloc.offset=len; + (*ob2).tloc.len1=numregs; + (*ob2).tloc.len2=-1; + (*ob2).tloc.len3=-1; + (*ob2).tloc.totalen=numregs+1; + len+=numregs+1; + memset(&loc[iloc],0,(numregs+1)*4); + iloc+=numregs+1; + (*ob).sloc.len_item+=numregs+1; + + return (*ob2).tloc.offset; + } +} + + +int EDIV_Export_EndStruct() +{ + if(!decl_struct) { + dll_error(9); + return 0; + } + + #ifdef DEBUG_DLL + printf("export_endstruct:\t--- estructura cerrada\n"); + #endif + + member=NULL; + + if((*ob).tipo==tsglo) { // cierra estructura global + if ((*ob).sglo.len_item==0) { + dll_error(10); + return 0; + } + if ((*ob).sglo.totalitems>1) { + len=((*ob).sglo.totalitems-1)*(*ob).sglo.len_item-1; + do { + mem[imem]=mem[imem-(*ob).sglo.len_item]; + imem++; + } while (len--); + } + } + else { // cierra estructura local + if ((*ob).sloc.len_item==0) { + dll_error(10); + return 0; + } + if ((*ob).sloc.totalitems>1) { + len=((*ob).sloc.totalitems-1)*(*ob).sloc.len_item-1; + do { + loc[iloc]=loc[iloc-(*ob).sloc.len_item]; + iloc++; + } while (len--); + } +// iloc+=(*ob).sloc.totalitems*(*ob).sloc.len_item; + } + + decl_struct=0; + struct_reserved=0; + + return 1; +} + + +int EDIV_Export_Local(char* cadena, int valor) +{ + if(decl_struct) { + dll_error(6,cadena); + return 0; + } + + creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_local:\t-- ID OBJETO: %d\n" + "export_local:\tCadena exportada: %s\n" + "export_local:\tValor: %d\n" + "export_local:\tOffset del objeto: 0x%X\n",num_obj-1,cadena,valor,(unsigned int)o); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob=o; + + if ((*ob).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + indexa_variable(local,cadena,iloc); + + (*ob).tipo=tvloc; + (*ob).vloc.offset=iloc; + loc[iloc]=valor; + + return iloc++; +} + + +int EDIV_Export_Local_Tab(char* cadena, int numregs) +{ + if(decl_struct) { + dll_error(6,cadena); + return 0; + } + + creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_local_tab:\t-- ID OBJETO: %d\n" + "export_local_tab:\tCadena exportada: %s\n" + "export_local_tab:\tN.regs: %d\n" + "export_local_tab:\tOffset del objeto: 0x%X\n",num_obj-1,cadena,numregs,(unsigned int)o); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob=o; + + if ((*ob).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + indexa_variable(local,cadena,iloc); + + (*ob).tipo=ttloc; + (*ob).tloc.offset=iloc; + (*ob).tloc.len1=len=numregs; + (*ob).tloc.len2=-1; + (*ob).tloc.len3=-1; + (*ob).tloc.totalen=len+1; + + // Inicializamos la tabla a 0 + do { + loc[iloc++]=0; + } while (len--); + + return (*ob).tloc.offset; +} + + +int EDIV_Export_Local_Struct(char* cadena, int numregs) +{ + if(decl_struct) { + dll_error(6,cadena); + return 0; + } + + creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_local_struct:\t-- ID OBJETO: %d\n" + "export_local_struct:\tCadena exportada: %s\n" + "export_local_struct:\tN.regs: %d\n" + "export_local_struct:\tOffset del objeto: 0x%X\n",num_obj-1,cadena,numregs,(unsigned int)o); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob=o; + + if ((*ob).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + decl_struct=1; + if(!strcmp(cadena,"reserved")) + struct_reserved=1; + + (*ob).tipo=tsloc; + (*ob).sloc.offset=iloc; + (*ob).sloc.items1=numregs; + (*ob).sloc.items2=(*ob).sloc.items3=-1; + (*ob).sloc.totalitems=numregs+1; + (*ob).sloc.len_item=0; + member=ob; + len=0; + + return iloc; +} diff --git a/ediv/src/ediv/edivcfg/dictionary.c b/ediv/src/ediv/edivcfg/dictionary.c new file mode 100644 index 0000000..74fb898 --- /dev/null +++ b/ediv/src/ediv/edivcfg/dictionary.c @@ -0,0 +1,365 @@ +/*--------------------------------------------------------------------------- + Includes + ---------------------------------------------------------------------------*/ + +#include "dictionary.h" + +#include +#include +#include + +#ifndef _WIN32 +#include +#endif + + +/* The following defines a maximum value size for integers and doubles. */ +#define MAXVALSZ 1024 + +/*--------------------------------------------------------------------------- + Private functions + ---------------------------------------------------------------------------*/ + +/* Doubles the allocated size associated to a pointer */ +/* 'size' is the current allocated size. */ +static void * mem_double(void * ptr, int size) +{ + void * newptr ; + + newptr = calloc(2*size, 1); + memcpy(newptr, ptr, size); + free(ptr); + return newptr ; +} + + +/*--------------------------------------------------------------------------- + Function codes + ---------------------------------------------------------------------------*/ + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_hash + @memo Compute the hash key for a string. + @param key Character string to use for key. + @return 1 unsigned int on at least 32 bits. + @doc + + This hash function has been taken from an Article in Dr Dobbs Journal. + This is normally a collision-free function, distributing keys evenly. + The key is stored anyway in the struct so that collision can be avoided + by comparing the key itself in last resort. + */ +/*--------------------------------------------------------------------------*/ + +unsigned dictionary_hash(char * key) +{ + int len ; + unsigned hash ; + int i ; + + len = strlen(key); + for (hash=0, i=0 ; i>6) ; + } + hash += (hash <<3); + hash ^= (hash >>11); + hash += (hash <<15); + return hash ; +} + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_new + @memo Create a new dictionary object. + @param size Optional initial size of the dictionary. + @return 1 newly allocated dictionary objet. + @doc + + This function allocates a new dictionary object of given size and returns + it. If you do not know in advance (roughly) the number of entries in the + dictionary, give size=0. + */ +/*--------------------------------------------------------------------------*/ + +dictionary * dictionary_new(int size) +{ + dictionary * d ; + + /* If no size was specified, allocate space for one variable */ + if (size<1) size=1 ; + + d = malloc(sizeof(dictionary)); + d->n = 0 ; + d->size = size ; + d->val = malloc(size * sizeof(char*)); + d->key = malloc(size * sizeof(char*)); + d->hash = malloc(size * sizeof(unsigned)); + return d ; +} + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_del + @memo Delete a dictionary object + @param d dictionary object to deallocate. + @return void + @doc + + Deallocate a dictionary object and all memory associated to it. + */ +/*--------------------------------------------------------------------------*/ + +void dictionary_del(dictionary * d) +{ + int i ; + + if (d==NULL) return ; + for (i=0 ; in ; i++) { + if (d->val[i]!=NULL) + free(d->val[i]); + if (d->key[i]!=NULL) + free(d->key[i]); + } + free(d->val); + free(d->key); + free(d->hash); + free(d); + return ; +} + + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_get + @memo Get a value from a dictionary. + @param d dictionary object to search. + @param key Key to look for in the dictionary. + @return 1 pointer to internally allocated character string. + @doc + + This function locates a key in a dictionary and returns a pointer to its + value, or NULL if no such key can be found in dictionary. The returned + character pointer points to data internal to the dictionary object, you + should not try to free it or modify it. + */ +/*--------------------------------------------------------------------------*/ +char * dictionary_get(dictionary * d, char * key) +{ + unsigned hash ; + int i ; + + hash = dictionary_hash(key); + for (i=0 ; in ; i++) { + if (hash==d->hash[i]) { + if (key[0] == d->key[i][0]) { + return d->val[i] ; + } + } + } + return NULL ; +} + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_set + @memo Set a value in a dictionary. + @param d dictionary object to modify. + @param key Key to modify or add. + @param val Value to add. + @return void + @doc + + If the given key is found in the dictionary, the associated value is + replaced by the provided one. If the key cannot be found in the + dictionary, it is added to it. + + It is Ok to provide a NULL value for val, but NULL values for the dictionary + or the key are considered as errors: the function will return immediately + in such a case. + + Notice that if you dictionary_set a variable to NULL, a call to + dictionary_get will return a NULL value: the variable will be found, and + its value (NULL) is returned. In other words, setting the variable + content to NULL is equivalent to deleting the variable from the + dictionary. It is not possible (in this implementation) to have a key in + the dictionary without value. + */ +/*--------------------------------------------------------------------------*/ + +void dictionary_set(dictionary * d, char * key, char * val) +{ + int i ; + unsigned hash ; + + if (d==NULL || key==NULL) return ; + + /* Compute hash for this key */ + hash = dictionary_hash(key) ; + /* Find if value is already in blackboard */ + if (d->n>0) { + for (i=0 ; in ; i++) { + if (hash==d->hash[i]) { /* Same hash value */ + if (key[0]==d->key[i][0]) { /* Same key */ + /* Found a value: modify and return */ + if (d->val[i]!=NULL) + free(d->val[i]); + if (val!=NULL) { + d->val[i] = strdup(val); + } else { + d->val[i] = NULL ; + } + return ; + } + } + } + } + + /* Add a new value */ + /* See if dictionary needs allocation */ + if (d->n==d->size) { + + /* Reached maximum size: reallocate blackboard */ + d->val = mem_double(d->val, d->size * sizeof(char*)) ; + d->key = mem_double(d->key, d->size * sizeof(char*)) ; + d->hash = mem_double(d->hash, d->size * sizeof(unsigned)) ; + + /* Double size */ + d->size *= 2 ; + } + + /* Copy key */ + + d->key[d->n] = strdup(key); + if (val!=NULL) { + d->val[d->n] = strdup(val); + } else { + d->val[d->n] = NULL ; + } + d->hash[d->n] = hash; + d->n ++ ; + return ; +} + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_setint + @memo Set a key in a dictionary, providing an int. + @param d Dictionary to update. + @param key Key to modify or add + @param val Integer value to store (will be stored as a string). + @return void + @doc + + This helper function calls dictionary_set() with the provided integer + converted to a string using %d. + */ +/*--------------------------------------------------------------------------*/ + + +void dictionary_setint(dictionary * d, char * key, int val) +{ + char sval[MAXVALSZ]; + sprintf(sval, "%d", val); + dictionary_set(d, key, sval); +} + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_setdouble + @memo Set a key in a dictionary, providing a double. + @param d Dictionary to update. + @param key Key to modify or add + @param val Double value to store (will be stored as a string). + @return void + @doc + + This helper function calls dictionary_set() with the provided double + converted to a string using %g. + */ +/*--------------------------------------------------------------------------*/ + + +void dictionary_setdouble(dictionary * d, char * key, double val) +{ + char sval[MAXVALSZ]; + sprintf(sval, "%g", val); + dictionary_set(d, key, sval); +} + + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_dump + @memo Dump a dictionary to an opened file pointer. + @param d Dictionary to dump + @param f Opened file pointer. + @return void + @doc + + Dumps a dictionary onto an opened file pointer. Key pairs are printed out + as [Key]=[Value], one per line. It is Ok to provide stdout or stderr as + output file pointers. + */ +/*--------------------------------------------------------------------------*/ + +void dictionary_dump(dictionary * d, FILE * out) +{ + int i ; + + if (d==NULL || out==NULL) return ; + if (d->n<1) { + fprintf(out, "empty dictionary\n"); + return ; + } + for (i=0 ; in ; i++) { + fprintf(out, "%20s\t[%s]\n", + d->key[i], + d->val[i]); + } + return ; +} + + +#ifdef TEST +#define NVALS 20000 +int main(int argc, char *argv[]) +{ + dictionary * d ; + char * val ; + int i ; + char cval[90] ; + + /* allocate blackboard */ + printf("allocating...\n"); + d = dictionary_new(0); + + /* Set values in blackboard */ + printf("setting %d values...\n", NVALS); + for (i=0 ; i +#include +#include + +#ifndef _WIN32 +#include +#endif + + +/*--------------------------------------------------------------------------- + New types + ---------------------------------------------------------------------------*/ + +typedef struct _dictionary_ { + int n ; + int size ; + char ** val ; + char ** key ; + unsigned * hash ; +} dictionary ; + + +/*--------------------------------------------------------------------------- + Function prototypes + ---------------------------------------------------------------------------*/ + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_hash + @memo Compute the hash key for a string. + @param key Character string to use for key. + @return 1 unsigned int on at least 32 bits. + @doc + + This hash function has been taken from an Article in Dr Dobbs Journal. + This is normally a collision-free function, distributing keys evenly. + The key is stored anyway in the struct so that collision can be avoided + by comparing the key itself in last resort. + */ +/*--------------------------------------------------------------------------*/ + +unsigned dictionary_hash(char * key); + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_new + @memo Create a new dictionary object. + @param size Optional initial size of the dictionary. + @return 1 newly allocated dictionary objet. + @doc + + This function allocates a new dictionary object of given size and returns + it. If you do not know in advance (roughly) the number of entries in the + dictionary, give size=0. + */ +/*--------------------------------------------------------------------------*/ + +dictionary * dictionary_new(int size); + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_del + @memo Delete a dictionary object + @param vd dictionary object to deallocate. + @return void + @doc + + Deallocate a dictionary object and all memory associated to it. + */ +/*--------------------------------------------------------------------------*/ + +void dictionary_del(dictionary * vd); + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_get + @memo Get a value from a dictionary. + @param vd dictionary object to search. + @param key Key to look for in the dictionary. + @return 1 pointer to internally allocated character string. + @doc + + This function locates a key in a dictionary and returns a pointer to its + value, or NULL if no such key can be found in dictionary. The returned + character pointer points to data internal to the dictionary object, you + should not try to free it or modify it. + */ +/*--------------------------------------------------------------------------*/ +char * dictionary_get(dictionary * vd, char * key); + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_set + @memo Set a value in a dictionary. + @param vd dictionary object to modify. + @param key Key to modify or add. + @param val Value to add. + @return void + @doc + + If the given key is found in the dictionary, the associated value is + replaced by the provided one. If the key cannot be found in the + dictionary, it is added to it. + + It is Ok to provide a NULL value for val, but NULL values for the dictionary + or the key are considered as errors: the function will return immediately + in such a case. + */ +/*--------------------------------------------------------------------------*/ + +void dictionary_set(dictionary * vd, char * key, char * val); + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_setint + @memo Set a key in a dictionary, providing an int. + @param d Dictionary to update. + @param key Key to modify or add + @param val Integer value to store (will be stored as a string). + @return void + @doc + + This helper function calls dictionary_set() with the provided integer + converted to a string using %d. + */ +/*--------------------------------------------------------------------------*/ + + +void dictionary_setint(dictionary * d, char * key, int val); + + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_setdouble + @memo Set a key in a dictionary, providing a double. + @param d Dictionary to update. + @param key Key to modify or add + @param val Double value to store (will be stored as a string). + @return void + @doc + + This helper function calls dictionary_set() with the provided double + converted to a string using %g. + */ +/*--------------------------------------------------------------------------*/ + + +void dictionary_setdouble(dictionary * d, char * key, double val); + + + +/*-------------------------------------------------------------------------*/ +/** + @name dictionary_dump + @memo Dump a dictionary to an opened file pointer. + @param d Dictionary to dump + @param f Opened file pointer. + @return void + @doc + + Dumps a dictionary onto an opened file pointer. Key pairs are printed out + as [Key]=[Value], one per line. It is Ok to provide stdout or stderr as + output file pointers. + */ +/*--------------------------------------------------------------------------*/ + +void dictionary_dump(dictionary * d, FILE * out); + +#endif diff --git a/ediv/src/ediv/edivcfg/e_error.c b/ediv/src/ediv/edivcfg/e_error.c new file mode 100644 index 0000000..3a0613a --- /dev/null +++ b/ediv/src/ediv/edivcfg/e_error.c @@ -0,0 +1,31 @@ +#include "e_error.h" + +void e_warning(char *fmt, ...) +{ + va_list ap ; + fprintf(stderr, "warning: "); + va_start(ap, fmt) ; + vfprintf(stderr, fmt, ap) ; + fprintf(stderr, "\n"); + va_end(ap); +} + +void e_error(char *fmt, ...) +{ + va_list ap ; + fprintf(stderr, "*** error: "); + va_start(ap, fmt) ; + vfprintf(stderr, fmt, ap) ; + fprintf(stderr, "\n"); + va_end(ap); +} + +void e_comment(int level, char *fmt, ...) +{ + va_list ap ; + va_start(ap, fmt) ; + vfprintf(stderr, fmt, ap) ; + fprintf(stderr, "\n"); + va_end(ap); +} + diff --git a/ediv/src/ediv/edivcfg/e_error.h b/ediv/src/ediv/edivcfg/e_error.h new file mode 100644 index 0000000..e5cd0c0 --- /dev/null +++ b/ediv/src/ediv/edivcfg/e_error.h @@ -0,0 +1,82 @@ + +/* + * Simple stubs to simulate eclipse's error/warning/comment functions + */ + +#ifndef _E_ERROR_H_ +#define _E_ERROR_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#ifndef _WIN32 +#include +#endif + +#include + + +/*-------------------------------------------------------------------------*/ +/** + @name e_warning + @memo sends out a warning to the appropriate channels + @param fmt formatted input, strictly similar to printf + @return void + @doc + + This function should be used for any warning output. It might print + a message on the stderr console, send a copy to a log file, to an + error log system, etc. + */ +/*--------------------------------------------------------------------------*/ + +void e_warning(char *fmt, ...); + + +/*-------------------------------------------------------------------------*/ +/** + @name e_error + @memo sends out an error to the appropriate channels + @param fmt formatted input, strictly similar to printf + @return void + @doc + + This function should be used for any error output. It might print + a message on the stderr console, send a copy to a log file, to an + error log system, etc. + */ +/*--------------------------------------------------------------------------*/ + + +void e_error(char *fmt, ...); + + +/*-------------------------------------------------------------------------*/ +/** + @name e_comment + @memo sends out a comment to the appropriate channels + @param level comment level (unused) + @param fmt formatted input, strictly similar to printf + @return void + @doc + + This function should be used for any comment output. It might print + a message on the stderr console, send a copy to a log file, to an + error log system, etc. + */ +/*--------------------------------------------------------------------------*/ + + + + +void e_comment(int level, char *fmt, ...); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/ediv/src/ediv/edivcfg/edivcfg.c b/ediv/src/ediv/edivcfg/edivcfg.c new file mode 100644 index 0000000..cec3077 --- /dev/null +++ b/ediv/src/ediv/edivcfg/edivcfg.c @@ -0,0 +1,98 @@ +#include +#include +#include + +#ifndef _WIN32 +#include +#endif + +#include "e_error.h" +#include "iniparser.h" + +struct cfg { + // seccion [general] + char *lang; + char *motdhost; + + // seccion [default_compiler_options] + int max_process; + unsigned char free_sintax; + unsigned char extended_conditions; + unsigned char case_sensitive; + unsigned char ignore_errors; + unsigned char no_strfix; + unsigned char no_optimization; + unsigned char no_range_check; + unsigned char no_id_check; + unsigned char no_null_check; + unsigned char no_check; + + // seccion dll + char *dllpath; +} config; + + +int parse_ini_file(char * ini_name) +{ + struct cfg conf; + dictionary *ini ; + + ini=iniparser_load(ini_name); + if (ini==NULL) { + e_error("No se pudo leer el archivo correctamente [%s]", ini_name); + return -1 ; + } + + // Parsea la seccion [general] + conf.lang=iniparser_getstr(ini,"general:lang"); + conf.motdhost=iniparser_getstr(ini,"general:motdhost"); + + // Parsea la seccion [default_compiler_options] + conf.max_process=iniparser_getint(ini,"default_compiler_options:max_process",-1); + conf.free_sintax=iniparser_getboolean(ini,"default_compiler_options:free_sintax",-1); + conf.extended_conditions=iniparser_getboolean(ini,"default_compiler_options:extended_conditions",-1); + conf.case_sensitive=iniparser_getboolean(ini,"default_compiler_options:case_sensitive",-1); + conf.ignore_errors=iniparser_getboolean(ini,"default_compiler_options:ignore_errors",-1); + conf.no_strfix=iniparser_getboolean(ini,"default_compiler_options:no_strfix",-1); + conf.no_optimization=iniparser_getboolean(ini,"default_compiler_options:no_optimization",-1); + conf.no_range_check=iniparser_getboolean(ini,"default_compiler_options:no_range_check",-1); + conf.no_id_check=iniparser_getboolean(ini,"default_compiler_options:no_id_check",-1); + conf.no_null_check=iniparser_getboolean(ini,"default_compiler_options:no_null_check",-1); + conf.no_check=iniparser_getboolean(ini,"default_compiler_options:no_check",-1); + + + + + // Y ahora vamos con la seccion [dll] +#ifdef _WIN32 + conf.dllpath=iniparser_getstr(ini,"dll:windll"); +#else + conf.dllpath=iniparser_getstr(ini,"dll:nixdll"); +#endif + + // Si estamos en modo debug volcamos todo a pantalla +#ifdef _DEBUG + printf("\nidioma: %s",conf.lang); + printf("\nhost del motd: %s",conf.motdhost); + printf("\n---"); + printf("\nNumero maximo de procesos activos: %d",conf.max_process); + printf("\nSintaxis libre: %d",conf.free_sintax); + printf("\nCondiciones extendidas: %d",conf.extended_conditions); + printf("\nCase Sensitive: %d",conf.case_sensitive); + printf("\nIgnorar errores: %d",conf.ignore_errors); + printf("\nNo strfix: %d",conf.no_strfix); + printf("\nOptimizar codigo: %d",conf.no_optimization); + printf("\nComprobar rango: %d",conf.no_range_check); + printf("\nComprobar id: %d",conf.no_id_check); + printf("\nComprobar nulos: %d",conf.no_null_check); + printf("\nHacer comprobaciones: %d",conf.no_check); + + printf("\n---"); + printf("\nRuta a los archivos .dll: %s",conf.dllpath); +#endif + + iniparser_freedict(ini); + return 0 ; +} + + diff --git a/ediv/src/ediv/edivcfg/iniparser.h b/ediv/src/ediv/edivcfg/iniparser.h new file mode 100644 index 0000000..d916c90 --- /dev/null +++ b/ediv/src/ediv/edivcfg/iniparser.h @@ -0,0 +1,258 @@ + +/*--------------------------------------------------------------------------- + + File name : iniparser.h + Author : N. Devillard + Created on : March 2000 + Language : ANSI C + Description : Parser for ini files + + *--------------------------------------------------------------------------*/ + +/* + + $Id$ + $Author$ + $Date$ + $Revision$ + +*/ + +#ifndef _INIPARSER_H_ +#define _INIPARSER_H_ + +/*--------------------------------------------------------------------------- + Includes + ---------------------------------------------------------------------------*/ + +#include +#include +#include + +#ifndef _WIN32 +#include +#endif + +#include "dictionary.h" + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_dump + @memo Dump a dictionary to an opened file pointer. + @param d Dictionary to dump. + @param f Opened file pointer to dump to. + @return void + @doc + + This function prints out the contents of a dictionary, one element by + line, onto the provided file pointer. It is OK to specify stderr or + stdout as output files. This function is meant for debugging purposes + mostly. + */ +/*--------------------------------------------------------------------------*/ +void iniparser_dump(dictionary * d, FILE * f); + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_dump_lua + @memo Dump a dictionary to an opened file pointer. + @param d Dictionary to dump. + @param f Opened file pointer to dump to. + @return void + @doc + + This function prints out the contents of a dictionary, one element by + line, onto the provided file pointer. It is OK to specify stderr or + stdout as output files. + + The output syntax is fully compatible with lua tables. + */ +/*--------------------------------------------------------------------------*/ +void iniparser_dump_lua(dictionary * d, FILE * f); + + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_getstr + @memo Get the string associated to a key + @param d Dictionary to search + @param key Key string to look for + @return pointer to statically allocated character string + @doc + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, a + NULL value is returned. The returned char pointer is pointing to a + statically allocated string in this module. + */ +/*--------------------------------------------------------------------------*/ + +char * iniparser_getstr(dictionary * d, char * key); + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_getint + @memo Get the string associated to a key, convert to an int + @param d Dictionary to search + @param key Key string to look for + @param notFound Value to return in case of error + @return integer + @doc + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, + the notFound value is returned. + */ +/*--------------------------------------------------------------------------*/ + +int iniparser_getint(dictionary * d, char * key, int notfound); + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_getdouble + @memo Get the string associated to a key, convert to a double + @param d Dictionary to search + @param key Key string to look for + @param notFound Value to return in case of error + @return double + @doc + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, + the notFound value is returned. + */ +/*--------------------------------------------------------------------------*/ + +double iniparser_getdouble(dictionary * d, char * key, double notfound); + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_getboolean + @memo Get the string associated to a key, convert to a boolean + @param d Dictionary to search + @param key Key string to look for + @param notFound Value to return in case of error + @return integer + @doc + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, + the notFound value is returned. + + A true boolean is found if one of the following is matched: + \begin{itemize} + \item A string starting with 'y' + \item A string starting with 'Y' + \item A string starting with 't' + \item A string starting with 'T' + \item A string starting with '1' + \end{itemize} + + A false boolean is found if one of the following is matched: + \begin{itemize} + \item A string starting with 'n' + \item A string starting with 'N' + \item A string starting with 'f' + \item A string starting with 'F' + \item A string starting with '0' + \end{itemize} + + The notFound value returned if no boolean is identified, does not + necessarily have to be 0 or 1. + + */ +/*--------------------------------------------------------------------------*/ + +int iniparser_getboolean(dictionary * d, char * key, int notfound); + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_setstr + @memo Set an entry in a dictionary. + @param ini Dictionary to modify. + @param entry Entry to modify (entry name) + @param val New value to associate to the entry. + @return int 0 if Ok, -1 otherwise. + @doc + + If the given entry can be found in the dictionary, it is modified to + contain the provided value. If it cannot be found, -1 is returned. + */ +/*--------------------------------------------------------------------------*/ + +int iniparser_setstr( + dictionary * ini, + char * entry, + char * val +) ; + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_find_entry + @memo Finds out if a given entry exists in a dictionary + @param ini Dictionary to search + @param entry Name of the entry to look for + @return integer 1 if entry exists, 0 otherwise + @doc + + Finds out if a given entry exists in the dictionary. Since sections + are stored as keys with NULL associated values, this is the only way + of querying for the presence of sections in a dictionary. + */ +/*--------------------------------------------------------------------------*/ + +int iniparser_find_entry( + dictionary * ini, + char * entry +) ; + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_load + @memo Parse an ini file and return an allocated dictionary object + @param ininame Name of the ini file to read. + @return Pointer to newly allocated dictionary + @doc + + This is the parser for ini files. This function is called, providing + the name of the file to be read. It returns a dictionary object that + should not be accessed directly, but through accessor functions + instead. + + The returned dictionary must be freed using iniparser_freedict(). + */ +/*--------------------------------------------------------------------------*/ + + +dictionary * iniparser_load(char * ininame); + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_freedict + @memo Free all memory associated to an ini dictionary + @param d Dictionary to free + @return void + @doc + + Free all memory associated to an ini dictionary. + It is mandatory to call this function before the dictionary object + gets out of the current context. + */ +/*--------------------------------------------------------------------------*/ + +void iniparser_freedict(dictionary * d); + +int parse_ini_file(char * ini_name); + +dictionary *ini; // ediv.cfg + +#endif diff --git a/ediv/src/ediv/edivcfg/mainparse.c b/ediv/src/ediv/edivcfg/mainparse.c new file mode 100644 index 0000000..e0d6bca --- /dev/null +++ b/ediv/src/ediv/edivcfg/mainparse.c @@ -0,0 +1,431 @@ + +/*--------------------------------------------------------------------------- + + File name : iniparser.c + Author : N. Devillard + Created on : March 2000 + Description : Parser for ini files + + *--------------------------------------------------------------------------*/ + +/* + $Id$ + $Author$ + $Date$ + $Revision$ +*/ + +/*--------------------------------------------------------------------------- + Includes + ---------------------------------------------------------------------------*/ + +#include "iniparser.h" +#include "strlib.h" + +#ifdef IN_ECLIPSE +#include "static_sz.h" +#include "comm.h" +#include "memory.h" +#else +#include "e_error.h" +#define strdup2 strdup +#define ASCIILINESZ 1024 +#endif + + +/*--------------------------------------------------------------------------- + Private to this module + ---------------------------------------------------------------------------*/ + +static char * +iniparser_version = "2.2"; + + +/* Private: add an entry to the dictionary */ +static void iniparser_add_entry( + dictionary * d, + char * sec, + char * key, + char * val) +{ + char longkey[2*ASCIILINESZ+1]; + + /* Make a key as section:keyword */ + if (key!=NULL) { + sprintf(longkey, "%s:%s", sec, key); + } else { + strcpy(longkey, sec); + } + + /* Add (key,val) to dictionary */ + dictionary_set(d, longkey, val); + return ; +} + + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_dump + @memo Dump a dictionary to an opened file pointer. + @param d Dictionary to dump. + @param f Opened file pointer to dump to. + @return void + @doc + + This function prints out the contents of a dictionary, one element by + line, onto the provided file pointer. It is OK to specify stderr or + stdout as output files. This function is meant for debugging purposes + mostly. + */ +/*--------------------------------------------------------------------------*/ +void iniparser_dump(dictionary * d, FILE * f) +{ + int i ; + + if (d==NULL || f==NULL) return ; + for (i=0 ; in ; i++) { + if (d->val[i]!=NULL) { + fprintf(f, "[%s]=[%s]\n", d->key[i], d->val[i]); + } else { + fprintf(f, "[%s]=UNDEF\n", d->key[i]); + } + } + return ; +} + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_dump_lua + @memo Dump a dictionary to an opened file pointer. + @param d Dictionary to dump. + @param f Opened file pointer to dump to. + @return void + @doc + + This function prints out the contents of a dictionary, one element by + line, onto the provided file pointer. It is OK to specify stderr or + stdout as output files. + + The output syntax is fully compatible with lua tables. + */ +/*--------------------------------------------------------------------------*/ +void iniparser_dump_lua(dictionary * d, FILE * f) +{ + int i ; + char lua_s[ASCIILINESZ+1]; + int j ; + + if (d==NULL || f==NULL) return ; + fprintf(f, "ini={}\n"); + for (i=0 ; in ; i++) { + memset(lua_s, 0, ASCIILINESZ+1); + strcpy(lua_s, d->key[i]); + j=0 ; + while (lua_s[j]) { + if (lua_s[j]==':' || lua_s[j]=='/') + lua_s[j] = '.' ; + j++ ; + } + if (d->val[i]!=NULL) { + fprintf(f, "ini.%s='%s'\n", lua_s, d->val[i]); + } else { + fprintf(f, "ini.%s={}\n", lua_s); + } + } + return ; +} + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_getstr + @memo Get the string associated to a key + @param d Dictionary to search + @param key Key string to look for + @return pointer to statically allocated character string + @doc + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, a + NULL value is returned. The returned char pointer is pointing to a + statically allocated string in this module. + */ +/*--------------------------------------------------------------------------*/ + + +char * iniparser_getstr(dictionary * d, char * key) +{ + return dictionary_get(d, key); +} + + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_getint + @memo Get the string associated to a key, convert to an int + @param d Dictionary to search + @param key Key string to look for + @param notFound Value to return in case of error + @return integer + @doc + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, + the notFound value is returned. + */ +/*--------------------------------------------------------------------------*/ + + +int iniparser_getint(dictionary * d, char * key, int notfound) +{ + char * str ; + + str = iniparser_getstr(d, key); + if (str==NULL) return notfound ; + return atoi(str); +} + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_getdouble + @memo Get the string associated to a key, convert to a double + @param d Dictionary to search + @param key Key string to look for + @param notFound Value to return in case of error + @return double + @doc + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, + the notFound value is returned. + */ +/*--------------------------------------------------------------------------*/ + + +double iniparser_getdouble(dictionary * d, char * key, double notfound) +{ + char * str ; + + str = iniparser_getstr(d, key); + if (str==NULL) return notfound ; + return atof(str); +} + + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_getboolean + @memo Get the string associated to a key, convert to a boolean + @param d Dictionary to search + @param key Key string to look for + @param notFound Value to return in case of error + @return integer + @doc + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, + the notFound value is returned. + + A true boolean is found if one of the following is matched: + \begin{itemize} + \item A string starting with 'y' + \item A string starting with 'Y' + \item A string starting with 't' + \item A string starting with 'T' + \item A string starting with '1' + \end{itemize} + + A false boolean is found if one of the following is matched: + \begin{itemize} + \item A string starting with 'n' + \item A string starting with 'N' + \item A string starting with 'f' + \item A string starting with 'F' + \item A string starting with '0' + \end{itemize} + + The notFound value returned if no boolean is identified, does not + necessarily have to be 0 or 1. + + */ +/*--------------------------------------------------------------------------*/ + + +int iniparser_getboolean(dictionary * d, char * key, int notfound) +{ + char * c ; + int ret ; + + c = iniparser_getstr(d, key); + if (c==NULL) return notfound ; + if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') { + ret = 1 ; + } else if (c[0]=='n' || c[0]=='N' || c[0]=='0' || c[0]=='f' || c[0]=='F') { + ret = 0 ; + } else { + ret = notfound ; + } + return ret; +} + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_find_entry + @memo Finds out if a given entry exists in a dictionary + @param ini Dictionary to search + @param entry Name of the entry to look for + @return integer 1 if entry exists, 0 otherwise + @doc + + Finds out if a given entry exists in the dictionary. Since sections + are stored as keys with NULL associated values, this is the only way + of querying for the presence of sections in a dictionary. + */ +/*--------------------------------------------------------------------------*/ + +int iniparser_find_entry( + dictionary * ini, + char * entry +) +{ + int i ; + int hash ; + int found ; + + found = 0 ; + hash = dictionary_hash(entry); + for (i=0 ; in ; i++) { + if (hash==ini->hash[i]) { + if (!strcmp(entry, ini->key[i])) { + found = 1 ; + break ; + } + } + } + return found ; +} + + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_setstr + @memo Set an entry in a dictionary. + @param ini Dictionary to modify. + @param entry Entry to modify (entry name) + @param val New value to associate to the entry. + @return int 0 if Ok, -1 otherwise. + @doc + + If the given entry can be found in the dictionary, it is modified to + contain the provided value. If it cannot be found, -1 is returned. + It is Ok to set val to NULL. + */ +/*--------------------------------------------------------------------------*/ + +int iniparser_setstr( + dictionary * ini, + char * entry, + char * val +) +{ + dictionary_set(ini, entry, val); + return 0 ; +} + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_load + @memo Parse an ini file and return an allocated dictionary object + @param ininame Name of the ini file to read. + @return Pointer to newly allocated dictionary + @doc + + This is the parser for ini files. This function is called, providing + the name of the file to be read. It returns a dictionary object that + should not be accessed directly, but through accessor functions + instead. + + The returned dictionary must be freed using iniparser_freedict(). + */ +/*--------------------------------------------------------------------------*/ + +dictionary * iniparser_load(char * ininame) +{ + dictionary * d ; + char lin[ASCIILINESZ+1]; + char sec[ASCIILINESZ+1]; + char key[ASCIILINESZ+1]; + char val[ASCIILINESZ+1]; + char * where ; + FILE * ini ; + int lineno ; + + if ((ini=fopen(ininame, "r"))==NULL) { + //e_error("cannot open file %s\n", ininame); + return NULL ; + } + + /* + * Initialize a new dictionary entry + */ + d = dictionary_new(0); + lineno = 0 ; + while (fgets(lin, ASCIILINESZ, ini)!=NULL) { + lineno++ ; + where = strskp(lin); /* Skip leading spaces */ + if (*where==';' || *where=='#' || *where==0) + continue ; /* Comment lines */ + else { + if (sscanf(where, "[%[^]]", sec)==1) { + /* Valid section name */ + strcpy(sec, strlwc(sec)); + iniparser_add_entry(d, sec, NULL, NULL); + } else if (sscanf (where, "%[^=] = \"%[^\"]\"", key, val) == 2 + || sscanf (where, "%[^=] = '%[^\']'", key, val) == 2 + || sscanf (where, "%[^=] = %[^;#]", key, val) == 2) { + strcpy(key, strlwc(strcrop(key))); + /* + * sscanf cannot handle "" or '' as empty value, + * this is done here + */ + if (!strcmp(val, "\"\"") || !strcmp(val, "''")) { + val[0] = (char)0; + } else { + strcpy(val, strcrop(val)); + } + iniparser_add_entry(d, sec, key, val); + } + } + } + fclose(ini); + return d ; +} + + + +/*-------------------------------------------------------------------------*/ +/** + @name iniparser_freedict + @memo Free all memory associated to an ini dictionary + @param d Dictionary to free + @return void + @doc + + Free all memory associated to an ini dictionary. + It is mandatory to call this function before the dictionary object + gets out of the current context. + */ +/*--------------------------------------------------------------------------*/ + +void iniparser_freedict(dictionary * d) +{ + dictionary_del(d); +} diff --git a/ediv/src/ediv/edivcfg/strlib.c b/ediv/src/ediv/edivcfg/strlib.c new file mode 100644 index 0000000..d2a7176 --- /dev/null +++ b/ediv/src/ediv/edivcfg/strlib.c @@ -0,0 +1,146 @@ +/*--------------------------------------------------------------------------- + Includes + ---------------------------------------------------------------------------*/ + +#include "strlib.h" + +#ifdef IN_ECLIPSE +#include "static_sz.h" +#else +#define ASCIILINESZ 1024 +#endif + +#include +#include + +/*--------------------------------------------------------------------------- + Codigo + ---------------------------------------------------------------------------*/ + + +/*-------------------------------------------------------------------------*/ +/** + @name strlwc + @memo Convert a string to lowercase. + @param s String to convert. + @return ptr to statically allocated string. + @doc + + This function returns a pointer to a statically allocated string + containing a lowercased version of the input string. Do not free + or modify the returned string! Since the returned string is statically + allocated, it will be modified at each function call (not re-entrant). + */ +/*--------------------------------------------------------------------------*/ + +char * strlwc(char * s) +{ + static char l[ASCIILINESZ+1]; + int i ; + + if (s==NULL) return NULL ; + memset(l, 0, ASCIILINESZ+1); + i=0 ; + while (s[i] && i l) { + if (!isspace(*(last-1))) + break ; + last -- ; + } + *last = (char)0; + return l ; +} + + diff --git a/ediv/src/ediv/edivcfg/strlib.h b/ediv/src/ediv/edivcfg/strlib.h new file mode 100644 index 0000000..2ac3b81 --- /dev/null +++ b/ediv/src/ediv/edivcfg/strlib.h @@ -0,0 +1,108 @@ + +/*--------------------------------------------------------------------------- + + File name : strlib.h + Author : N. Devillard + Created on : January 2001 + Description : Various string handling routines. + + *--------------------------------------------------------------------------*/ + +/* + $Id$ + $Author$ + $Date$ + $Revision$ +*/ + +#ifndef _STRLIB_H_ +#define _STRLIB_H_ + +/*--------------------------------------------------------------------------- + Includes + ---------------------------------------------------------------------------*/ + +#include +#include + +/*--------------------------------------------------------------------------- + Function codes + ---------------------------------------------------------------------------*/ + + +/*-------------------------------------------------------------------------*/ +/** + @name strlwc + @memo Convert a string to lowercase. + @param s String to convert. + @return ptr to statically allocated string. + @doc + + This function returns a pointer to a statically allocated string + containing a lowercased version of the input string. Do not free + or modify the returned string! Since the returned string is statically + allocated, it will be modified at each function call (not re-entrant). + */ +/*--------------------------------------------------------------------------*/ + +char * strlwc(char * s); + + + +/*-------------------------------------------------------------------------*/ +/** + @name strupc + @memo Convert a string to uppercase. + @param s String to convert. + @return ptr to statically allocated string. + @doc + + This function returns a pointer to a statically allocated string + containing an uppercased version of the input string. Do not free + or modify the returned string! Since the returned string is statically + allocated, it will be modified at each function call (not re-entrant). + */ +/*--------------------------------------------------------------------------*/ + +char * strupc(char * s); + + + +/*-------------------------------------------------------------------------*/ +/** + @name strskp + @memo Skip blanks until the first non-blank character. + @param s String to parse. + @return Pointer to char inside given string. + @doc + + This function returns a pointer to the first non-blank character in the + given string. + + */ +/*--------------------------------------------------------------------------*/ + +char * strskp(char * s); + + +/*-------------------------------------------------------------------------*/ +/** + @name strcrop + @memo Remove blanks at the end of a string. + @param s String to parse. + @return ptr to statically allocated string. + @doc + + This function returns a pointer to a statically allocated string, + which is identical to the input string, except that all blank + characters at the end of the string have been removed. + Do not free or modify the returned string! Since the returned string + is statically allocated, it will be modified at each function call + (not re-entrant). + */ +/*--------------------------------------------------------------------------*/ + +char * strcrop(char * s); + + +#endif diff --git a/ediv/src/ediv/edivcfg/vssver.scc b/ediv/src/ediv/edivcfg/vssver.scc new file mode 100644 index 0000000..6c7e171 Binary files /dev/null and b/ediv/src/ediv/edivcfg/vssver.scc differ diff --git a/ediv/src/ediv/encrypt.c b/ediv/src/ediv/encrypt.c new file mode 100644 index 0000000..15db515 --- /dev/null +++ b/ediv/src/ediv/encrypt.c @@ -0,0 +1,289 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* OJITO: _encriptar conserva el fichero original y crea temp.dj! desencriptado + * _comprimir descomprime (y reemplaza) el archivo indicado (temp.dj!) + */ + + +#include +#include +#include +#include +#include "encrypt.h" + +#include "shared.h" // Contiene la clave de cifrado + +union { + byte b[128]; + int d[32]; +} seed_coder; // Seed aleatorio (127 bytes + PTR) + +byte rndb(void) +{ + byte ptr; + ptr=seed_coder.b[127]; + + if ((seed_coder.b[127]=(ptr+seed_coder.b[ptr])&127)==127) + seed_coder.b[127]=0; + + return(seed_coder.b[seed_coder.b[127]]+=++ptr); +} + +int rnd_coder(void) +{ + return((((rndb()&127)*256+rndb())*256+rndb())*256+rndb()); +} + +int rnd2(int min,int max) +{ + if (max=size-12) { + free(ptr_dest); + free(ptr); + return; + } + } else { + if (strcmp(ptr,"zx!\x1a\x0d\x0a\xff")) + return; + + size2=*(int*)(ptr+8); + + if ((ptr_dest=(byte *)malloc(size2))==NULL) { + free(ptr); + return; + } + + if (uncompress(ptr_dest, &size2, ptr+12, size-12)) { + free(ptr_dest); + free(ptr); + return; + } + + size2=*(int*)(ptr+8); + } + + free(ptr); + + if (rename(fichero,"temp.ZX!")) { + free(ptr_dest); + return; + } + + if ((f=fopen(fichero,"wb"))==NULL) { + rename("temp.ZX!",fichero); + free(ptr_dest); + return; + } + + + if (encode) { + if(fwrite("zx!\x1a\x0d\x0a\xff",1,8,f)!=8) { + fclose(f); + remove(fichero); + rename("temp.ZX!",fichero); + free(ptr_dest); + return; + } + + if(fwrite(&size,1,4,f)!=4) { + fclose(f); + remove(fichero); + rename("temp.ZX!",fichero); + free(ptr_dest); + return; + } + } + + if(fwrite(ptr_dest,1,size2,f)!=size2) { + fclose(f); + remove(fichero); + rename("temp.ZX!",fichero); + free(ptr_dest); + return; + } + + // Si todo ha ido bien ... + + fclose(f); + free(ptr_dest); + remove("temp.ZX!"); +} diff --git a/ediv/src/ediv/encrypt.h b/ediv/src/ediv/encrypt.h new file mode 100644 index 0000000..a865d4c --- /dev/null +++ b/ediv/src/ediv/encrypt.h @@ -0,0 +1,27 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __ENCRYPT_H +#define __ENCRYPT_H + +void _encriptar(int encode, char * fichero, char * clave); +void _comprimir(int encode, char *fichero); + +#endif \ No newline at end of file diff --git a/ediv/src/ediv/expresion.c b/ediv/src/ediv/expresion.c new file mode 100644 index 0000000..80ea6df --- /dev/null +++ b/ediv/src/ediv/expresion.c @@ -0,0 +1,1707 @@ +#include + +#include "main.h" +#include "compiler.h" +#include "parser.h" +#include "expresion.h" + +void con00(int tipo_exp); +void con0(); +void con1(); +void con2(); + +void exp00(int tipo_exp); +void exp0(); +void exp1(); +void exp2(); +void exp3(); +void exp4(); +void exp5(); +void unario(); +void exp6(); + +void factor(void); +void factor_struct(void); + + +int tipo_expresion=0; // 0 - int, 1 - char o byte, 2 - string +int tipo_factor=0; // idem + + +//----------------------------------------------------------------------------- +// Analisis de una condición (genera código para calcularla) +//----------------------------------------------------------------------------- + +void condicion(void) { + byte * __ierror, * _ierror; + int _linea; + + if (extended_conditions) { expresion(); return; } // Como en DIV 1 + + _exp=tabexp; + save_error(0); + _linea=linea; _ierror=ierror; con00(0); + swap(linea,_linea); __ierror=ierror; ierror=_ierror; + generar_expresion(); + linea=_linea; ierror=__ierror; +} + +void con00(int tipo_exp) { + int te=tipo_expresion; + tipo_expresion=tipo_exp; + con0(); + tipo_expresion=te; +} + +void con0() { // Operadores con asociatividad de derecha a izquierda <- + int p; + + con1(); + if ((p=pieza)==p_asig || (p>=p_add_asig && p<=p_shl_asig)) { + error(0,69); // asignación dentro de una condición + } +} + +void con1() { // Operadores con asociatividad de izquierda a derecha -> + int p; + con2(); + while ((p=pieza)>=p_or && p<=p_andofs) { + if (p>=p_xorptr) p-=p_xorptr-p_xor; // Convierte xorptr,andofs en xor,and + lexico(); con2(); + (*_exp).tipo=eoper; (*_exp++).token=p; + tipo_factor=0; + } +} + +void con2() { + int p,tf; + exp3(); + if (simple_conditions) { + p=pieza; + while ((p>=p_igu && p<=p_mai)||p==p_asig) { + tf=tipo_factor; + if (p==p_asig) p=p_igu; + lexico(); exp3(); + if (tf==2 || tipo_factor==2) { + p+=p_strigu-p_igu; + (*_exp).tipo=eoper; (*_exp++).token=p; + } else { + (*_exp).tipo=eoper; (*_exp++).token=p; + } tipo_factor=0; p=pieza; + } + } else { + while ((p=pieza)>=p_igu && p<=p_mai) { + tf=tipo_factor; + lexico(); exp3(); + if (tf==2 || tipo_factor==2) { + p+=p_strigu-p_igu; + (*_exp).tipo=eoper; (*_exp++).token=p; + } else { + (*_exp).tipo=eoper; (*_exp++).token=p; + } tipo_factor=0; + } + } +} + + +//----------------------------------------------------------------------------- +// Analisis de una expresión (genera código para calcularla) +//----------------------------------------------------------------------------- + +void expresion(void) { + byte * __ierror, * _ierror; + int _linea; + + _exp=tabexp; + save_error(0); + _linea=linea; _ierror=ierror; exp00(0); + swap(linea,_linea); __ierror=ierror; ierror=_ierror; + generar_expresion(); + linea=_linea; ierror=__ierror; +} + + +// expresiones de parámetros +void expresion_cpa(void) { + byte * __ierror, * _ierror; + int _linea; + + _exp=tabexp; + save_error(0); + _linea=linea; _ierror=ierror; exp00(0); + swap(linea,_linea); __ierror=ierror; ierror=_ierror; + if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointer) { + _exp--; generar_expresion(); g1(lcpa); + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerchar) { + _exp--; generar_expresion(); + if (hacer_strfix) { g2(lcar,0); g1(lstrfix); g1(lasp); } + g1(lcpachr); + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerbyte) { + _exp--; generar_expresion(); + g1(lcpachr); + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerword) { + _exp--; generar_expresion(); + g1(lcpawor); + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_string) { + _exp--; generar_expresion(); g1(lcpastr); + } else error(4,72); // parámetro no válido + linea=_linea; ierror=__ierror; +} + + +void generar_expresion(void) { + struct exp_ele * e=tabexp; + struct objeto * ob; + + do { + switch ((*e).tipo) { + case econs: + g2(lcar,(*e).valor); break; + case estring: + g2(lcar,(*e).valor); break; + case erango: + g2(lrng,(*e).valor); break; + case ewhoami: + g1(lcid); break; + case ecall: + ob=(*e).objeto; g2(lcal,(*ob).proc.offset); + if ((*ob).usado) (*ob).proc.offset=imem-1; break; +// case efunc: +// ob=(*e).objeto; g2(lfun,(*ob).func.codigo); break; + case efext: + ob=(*e).objeto; g2(lext,(*ob).fext.codigo); break; + case echeck: + g1(lchk); break; + case enull: + g1(lnul); break; + case eoper: switch((*e).token) { + case p_asig: g1(lasi); break; + case p_or: g1(lori); break; + case p_xor: g1(lxor); break; + case p_and: g1(land); break; + case p_igu: g1(ligu); break; + case p_dis: g1(ldis); break; + case p_may: g1(lmay); break; + case p_men: g1(lmen); break; + case p_mei: g1(lmei); break; + case p_mai: g1(lmai); break; + case p_add: g1(ladd); break; + case p_sub: g1(lsub); break; + case p_mul: g1(lmul); break; + case p_div: g1(ldiv); break; + case p_mod: g1(lmod); break; + case p_neg: g1(lneg); break; + case p_pointer: g1(lptr); break; + case p_not: g1(lnot); break; + case p_punto: g1(laid); break; + case p_shr: g1(lshr); break; + case p_shl: g1(lshl); break; + case p_inc: g1(lipt); break; + case p_suma: g1(lpti); break; + case p_dec: g1(ldpt); break; + case p_resta: g1(lptd); break; + case p_add_asig: g1(lada); break; + case p_sub_asig: g1(lsua); break; + case p_mul_asig: g1(lmua); break; + case p_div_asig: g1(ldia); break; + case p_mod_asig: g1(lmoa); break; + case p_and_asig: g1(lana); break; + case p_or_asig: g1(lora); break; + case p_xor_asig: g1(lxoa); break; + case p_shr_asig: g1(lsra); break; + case p_shl_asig: g1(lsla); break; + + case p_pointerword: g1(lptrwor); break; + case p_sumaword: g1(lptiwor); break; + case p_restaword: g1(lptdwor); break; + case p_incword: g1(liptwor); break; + case p_decword: g1(ldptwor); break; + case p_asigword: g1(lasiwor); break; + case p_add_asigword: g1(ladawor); break; + case p_sub_asigword: g1(lsuawor); break; + case p_mul_asigword: g1(lmuawor); break; + case p_div_asigword: g1(ldiawor); break; + case p_mod_asigword: g1(lmoawor); break; + case p_and_asigword: g1(lanawor); break; + case p_or_asigword: g1(lorawor); break; + case p_xor_asigword: g1(lxoawor); break; + case p_shr_asigword: g1(lsrawor); break; + case p_shl_asigword: g1(lslawor); break; + + case p_pointerchar: g1(lptrchr); break; + case p_sumachar: g1(lptichr); break; + case p_restachar: g1(lptdchr); break; + case p_incchar: g1(liptchr); break; + case p_decchar: g1(ldptchr); break; + case p_asigchar: g1(lasichr); break; + case p_add_asigchar: g1(ladachr); break; + case p_sub_asigchar: g1(lsuachr); break; + case p_mul_asigchar: g1(lmuachr); break; + case p_div_asigchar: g1(ldiachr); break; + case p_mod_asigchar: g1(lmoachr); break; + case p_and_asigchar: g1(lanachr); break; + case p_or_asigchar: g1(lorachr); break; + case p_xor_asigchar: g1(lxoachr); break; + case p_shr_asigchar: g1(lsrachr); break; + case p_shl_asigchar: g1(lslachr); break; + + case p_strcpy: g1(lstrcpy); break; + case p_strfix: g1(lstrfix); break; + case p_strcat: g1(lstrcat); break; + case p_stradd: g1(lstradd); break; + case p_strdec: g1(lstrdec); break; + case p_strsub: g1(lstrsub); break; + case p_strlen: g1(lstrlen); break; + case p_strigu: g1(lstrigu); break; + case p_strdis: g1(lstrdis); break; + case p_strmay: g1(lstrmay); break; + case p_strmen: g1(lstrmen); break; + case p_strmei: g1(lstrmei); break; + case p_strmai: g1(lstrmai); break; + + case p_pointerbyte: g1(lptrchr); break; + case p_string: break; // Es como un p_pointer nulo, que no se hace + + default: error(4,11); // expresión incorrecta + } break; + default: error(4,11); + } + } while (++e!=_exp); +} + + +//----------------------------------------------------------------------------- +// Analisis de una expresión constante +// No se procesan valores locales ni llamadas a otros procesos +//----------------------------------------------------------------------------- + +int constante (void) { + + byte * __ierror, * _ierror; + struct exp_ele * e=_exp=tabexp; + int _linea, i=0; + + save_error(0); + + _linea=linea; _ierror=ierror; exp00(0); + swap(linea,_linea); __ierror=ierror; ierror=_ierror; + + do switch ((*e).tipo) { + case econs: + pila[++i]=(*e).valor; break; + case estring: + pila[++i]=(*e).valor; break; + +// case erango: +// if (pila[i]<0||pila[i]>(*e).valor) c_error(4,31); break; + + case eoper: switch((*e).token) { + case p_or: pila[i-1]|=pila[i]; i--; break; + case p_xor: pila[i-1]^=pila[i]; i--; break; + case p_and: pila[i-1]&=pila[i]; i--; break; + case p_igu: pila[i-1]=pila[i-1]==pila[i]; i--; break; + case p_dis: pila[i-1]=pila[i-1]!=pila[i]; i--; break; + case p_may: pila[i-1]=pila[i-1]>pila[i]; i--; break; + case p_men: pila[i-1]=pila[i-1]=pila[i]; i--; break; + case p_add: pila[i-1]+=pila[i]; i--; break; + case p_sub: pila[i-1]-=pila[i]; i--; break; + case p_mul: pila[i-1]*=pila[i]; i--; break; + case p_div: if (pila[i]==0) error(4,10); pila[i-1]/=pila[i]; i--; break; + case p_mod: if (pila[i]==0) error(4,10); pila[i-1]%=pila[i]; i--; break; + case p_neg: pila[i]=-pila[i]; break; + +// Creo que se quitó los pointer (y los rangos, por consiguiente) por los FROM, +// ya que provocaba confusion el tomar como constante una variable ... + +// case p_pointer: pila[i]=mem[pila[i]]; break; + + case p_not: pila[i]^=-1; break; + case p_shr: pila[i-1]>>=pila[i]; i--; break; + case p_shl: pila[i-1]<<=pila[i]; i--; break; + default: error(4,54); // se esperaba una expresión constante + } break; + default: error(4,54); + }while (++e!=_exp); + + linea=_linea; ierror=__ierror; return(pila[i]); +} + +//----------------------------------------------------------------------------- +// Análisis de una expresión a *tabexp +//----------------------------------------------------------------------------- + +void exp00(int tipo_exp) { + int te=tipo_expresion; + tipo_expresion=tipo_exp; + exp0(); + tipo_expresion=te; +} + +void exp0() { // Operadores con asociatividad de derecha a izquierda <- + int p; + + exp1(); + if ((p=pieza)==p_asig || (p>=p_add_asig && p<=p_shl_asig)) { + if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointer) { + _exp--; lexico(); + exp00(0); + (*_exp).tipo=eoper; (*_exp++).token=p; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerchar) { + if (p==p_asig) p=p_asigchar; else p+=p_add_asigchar-p_add_asig; + _exp--; lexico(); + exp00(1); // cadena[1]="A"; + if (hacer_strfix) { (*_exp).tipo=eoper; (*_exp++).token=p_strfix; } + (*_exp).tipo=eoper; (*_exp++).token=p; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerbyte) { + if (p==p_asig) p=p_asigchar; else p+=p_add_asigchar-p_add_asig; + _exp--; lexico(); + exp00(1); // mis_bytes[1]="A"; + (*_exp).tipo=eoper; (*_exp++).token=p; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerword) { + if (p==p_asig) p=p_asigword; else p+=p_add_asigword-p_add_asig; + _exp--; lexico(); + exp00(0); + (*_exp).tipo=eoper; (*_exp++).token=p; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_string) { + if (p==p_asig) { // cadena="..."; // Hacer el strcpy + _exp--; lexico(); + exp00(2); + (*_exp).tipo=eoper; (*_exp++).token=p_strcpy; + (*_exp).tipo=eoper; (*_exp++).token=p_string; //Sigue habiendo una cadena en la pila + } else if (p==p_add_asig) { // cadena+="..."; // Hacer el strcat + _exp--; lexico(); + exp00(2); + (*_exp).tipo=eoper; (*_exp++).token=p_strcat; + (*_exp).tipo=eoper; (*_exp++).token=p_string; //Sigue habiendo una cadena en la pila + } else if (p==p_sub_asig) { // cadena-=n; // Quita caracteres + _exp--; lexico(); + exp00(-1); + (*_exp).tipo=eoper; (*_exp++).token=p_strsub; + (*_exp).tipo=eoper; (*_exp++).token=p_string; //Sigue habiendo una cadena en la pila + } else error(0,12); // asignación a cadena incorrecta + } else error(0,13); // asignación incorrecta + } tipo_factor=0; +} + +void exp1() { // Operadores con asociatividad de izquierda a derecha -> + int p; + exp2(); + while ((p=pieza)>=p_or && p<=p_andofs) { + if (p>=p_xorptr) p-=p_xorptr-p_xor; // Convierte xorptr,andofs en xor,and + lexico(); exp2(); + (*_exp).tipo=eoper; (*_exp++).token=p; + tipo_factor=0; + } +} + +void exp2() { + int p,tf; + exp3(); + while ((p=pieza)>=p_igu && p<=p_mai) { + tf=tipo_factor; + lexico(); exp3(); + if (tf==2 || tipo_factor==2) { + // OJO, p==q no se hará el strcmp() si son dos punteros a cadenas + p+=p_strigu-p_igu; + (*_exp).tipo=eoper; (*_exp++).token=p; + tipo_factor=0; + } else { + (*_exp).tipo=eoper; (*_exp++).token=p; + } tipo_factor=0; + } +} + +void exp3() { + int p; + exp4(); + while ((p=pieza)>=p_shr && p<=p_shl) { + lexico(); exp4(); + (*_exp).tipo=eoper; (*_exp++).token=p; + tipo_factor=0; + } +} + +void exp4() { + int p,tf; + exp5(); + while ((p=pieza)>=p_suma && p<=p_sub && (p<=p_resta || p>=p_add) ) { + tf=tipo_factor; + if (p<=p_resta) p+=p_add-p_suma; // Convierte suma,resta en add,sub + lexico(); exp5(); + if (p==p_add && (tf==2 || tipo_factor==2 || tipo_expresion==2)) { + (*_exp).tipo=eoper; (*_exp++).token=p_stradd; + (*_exp).tipo=eoper; (*_exp++).token=p_string; // Hay una cadena en la pila + tipo_factor=2; + } else if (p==p_sub && tf==2) { + if (tipo_factor==2) { (*_exp).tipo=eoper; (*_exp++).token=p_strlen; } + (*_exp).tipo=eoper; (*_exp++).token=p_strdec; + (*_exp).tipo=eoper; (*_exp++).token=p_string; // Hay una cadena en la pila + tipo_factor=2; + } else { + (*_exp).tipo=eoper; (*_exp++).token=p; + tipo_factor=0; + } + } +} + +void exp5() { + int p; + unario(); + while ((p=pieza)>=p_mul && p<=p_multi) { + if (p==p_multi) p=p_mul; // Convierte multi en mul + lexico(); unario(); + (*_exp).tipo=eoper; (*_exp++).token=p; + tipo_factor=0; + } +} + +void unario() { + int p; + + while ((p=pieza)==p_add) { lexico(); } + if ((p>=p_xorptr && p<=p_mul) || (p==p_inc || p==p_dec)) { + + if (parametros>0 && p==p_pointer) { factor(); return; } + + if (p>=p_sub && p<=p_mul) p-=p_sub-p_neg; // Conv. sub,mul en neg,pointer + else if (p>=p_xorptr && p<=p_andofs) p+=p_pointer-p_xorptr; //xorptr,andofs pointer,offset + + lexico(); unario(); // p = ( neg, pointer, offset, not ) + + if (p==p_offset) { + if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointer) _exp--; + else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerchar) { + error(4,14); // &cadena[] ??? + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerbyte) { + if ((*(_exp-2)).tipo==econs && (*(_exp-2)).valor==0) _exp-=2; + else error(4,14); // &bytes[] ??? + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerword) { + if ((*(_exp-2)).tipo==econs && (*(_exp-2)).valor==0) _exp-=2; + else error(4,14); // &words[] ??? + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_string) { + // &cadena ð cadena + } else error(4,15); // no se puede calcular el offset + } else if (p==p_inc || p==p_dec) { + if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointer) { + _exp--; + (*_exp).tipo=eoper; (*_exp++).token=p; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerchar) { + _exp--; + (*_exp).tipo=eoper; (*_exp++).token=p+p_incchar-p_inc; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerbyte) { + _exp--; + (*_exp).tipo=eoper; (*_exp++).token=p+p_incchar-p_inc; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerword) { + _exp--; + (*_exp).tipo=eoper; (*_exp++).token=p+p_incword-p_inc; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_string) { + _exp--; + (*_exp).tipo=econs; + if (p==p_inc) (*_exp++).valor=-1; else (*_exp++).valor=1; + (*_exp).tipo=eoper; (*_exp++).token=p_strsub; + (*_exp).tipo=eoper; (*_exp++).token=p_string; + } else error(4,16); // no se puede realizar el incremento + } else if (p==p_pointer) { + if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerchar) { + // *cadena[0] ð cadena[0] + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerbyte) { + // *cadena[0] ð cadena[0] + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerword) { + // *cadena[0] ð cadena[0] + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_string) { + // *cadena == cadena + } else { + (*_exp).tipo=eoper; (*_exp++).token=p; + } + } else { + (*_exp).tipo=eoper; (*_exp++).token=p; + } + + } else exp6(); + +} + +void exp6() { // Operador de acceso a variables o tablas locales ajenas + struct exp_ele * e; + + factor(); + while (pieza==p_punto) { + if (comprueba_id) (*_exp++).tipo=echeck; + e=_exp+1; + acceso_remoto=1; lexico(); factor(); acceso_remoto=0; + + // OJO, el DEBE SER LO SEGUNDO que el + // introduzca en la , no quedan más cojones. + // (bueno, si, hacer aquí una búsqueda del p_punto entre e-1 y _exp ...) + + if ((*e).tipo==eoper && (*e).token==p_punto) + (*e).token=p_add; else error(4,17); // local no se puede acceder + + } +} + +int struct_pointer; // p_pointer / p_pointerchar / p_string / p_pointerbyte / p_pointerword + +void factor(void) { + struct objeto * ob; + struct objeto * obs; + int p,offset,_imem; + struct exp_ele * e; + + tipo_factor=0; + + switch (pieza) { // analisis de un factor + + case p_abrir: + lexico(); exp00(tipo_expresion); + if (pieza!=p_cerrar) error(3,18); lexico(); break; // esperando ')' + + case p_corab: + lexico(); + exp00(0); + if (pieza!=p_corce) error(3,19); // esperando ']' + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; lexico(); break; + + case p_whoami: + (*_exp++).tipo=ewhoami; lexico(); break; + + case p_num: + (*_exp).tipo=econs; (*_exp++).valor=pieza_num; lexico(); break; + + case p_lit: + tipo_factor=2; + if (tipo_expresion==1) { + (*_exp).tipo=econs; (*_exp++).valor=(byte)mem[pieza_num]; + } else { + (*_exp).tipo=estring; (*_exp++).valor=pieza_num; + if (tipo_expresion==-1) { (*_exp).tipo=eoper; (*_exp++).token=p_strlen; } + } lexico(); break; + + case p_type: + lexico(); if (pieza!=p_id) error(0,21); // esperando el nombre de un proceso + switch((*o).tipo) { + case tnone: + (*o).linea=linea; (*o).ierror=ierror; + (*_exp).tipo=econs; (*_exp++).valor=(int)o; (*o).usado=1; break; + case tproc: + (*_exp).tipo=econs; (*_exp++).valor=(int)o; break; + case tsglo: + // POR HACER: esto hay que cambiarlo, que compruebe que el nombre es "mouse" + if ((*o).sglo.offset==long_header) { // type mouse ð 0 + (*_exp).tipo=econs; (*_exp++).valor=0; break; + } + default: error(0,20); // no es un tipo de proceso + } lexico(); break; + + case p_sizeof: + + lexico(); if (pieza!=p_abrir) error(3,22); // esperando '(' + lexico(); if (pieza!=p_id) error(3,23); // esperando un nombre + (*_exp).tipo=econs; + switch((*o).tipo) { + case tsglo: case tsloc: + (*_exp++).valor=(*o).sglo.len_item*(*o).sglo.totalitems; break; + case tpsgl: case tpslo: + (*_exp++).valor=(*((*o).psgl.ostruct)).sglo.len_item*(*o).sglo.totalitems; break; + case ttglo: case ttloc: + case tbglo: case tbloc: + case twglo: case twloc: + (*_exp++).valor=(*o).tglo.totalen; break; + case tcglo: case tcloc: + (*_exp++).valor=((*o).cglo.totalen+5)/4; break; + case tvglo: case tvloc: + (*_exp++).valor=1; break; + default: error(0,24); // no se puede calcular el tamaño + } lexico(); if (pieza!=p_cerrar) error(3,18); lexico(); // esperando ')' + break; + + case p_struct: // Se comprueba la declaración de un puntero a struct parámetro + if (parametros<=0) { + if (error_25==25) error(1,25); else error(0,error_25); + } else { + lexico(); + if (pieza!=p_pointer) error(0,26); // No se define el pointer así + lexico(); if (pieza!=p_id) error(1,27); obs=o; + if ((*obs).tipo==tnone) error(0,28); // No se define el pointer así + if ((*obs).tipo!=tsglo && (*obs).tipo!=tsloc) error(0,28); + lexico(); ob=o; + analiza_pointer_struct(tpslo,iloc++,obs); + (*ob).linea=linea; (*ob).ierror=ierror; + (*ob).param=1; parametros++; + (*_exp).tipo=econs; (*_exp++).valor=(*ob).pslo.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + } break; + + case p_string: // Se comprueba la declaración de un string parámetro + if (parametros<=0) { + if (error_25==25) error(1,25); else error(0,error_25); + } else { + lexico(); + if (pieza==p_pointer) { // Recibe un puntero a string + lexico(); + ob=analiza_pointer(tpclo,iloc++); + (*ob).linea=linea; (*ob).ierror=ierror; + (*ob).param=1; parametros++; + (*_exp).tipo=econs; (*_exp++).valor=(*ob).pclo.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + break; + } + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); // el nombre no es nuevo + (*ob).linea=linea; (*ob).ierror=ierror; + (*ob).param=1; + (*ob).tipo=tcloc; lexico(); + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + e=_exp; + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + _exp=e; + } + } else (*ob).cloc.totalen=255; + if (parametros>1) g2(lpar,parametros-1); parametros=1; + g2(lpri,0); _imem=imem; + imem+=1+((*ob).cloc.totalen+5)/4; + test_buffer(&mem,&imem_max,imem); + mem[_imem]=0xDAD00000|(*ob).cloc.totalen; + memset(&mem[imem+1],0,(((*ob).cloc.totalen+5)&-5)); + (*ob).cloc.offset=iloc+1; + iloc+=1+((*ob).cloc.totalen+5)/4; + mem[_imem-1]=imem; // pri + (*_exp).tipo=estring; (*_exp++).valor=(*ob).cloc.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=eoper; (*_exp++).token=p_string; + } break; + + case p_byte: // Se comprueba la declaración de un byte parámetro + if (parametros<=0) { + if (error_25==25) error(1,25); else error(0,error_25); + } else { + lexico(); + if (pieza==p_pointer) { + lexico(); + ob=analiza_pointer(tpblo,iloc++); + (*ob).linea=linea; (*ob).ierror=ierror; + (*ob).param=1; parametros++; + (*_exp).tipo=econs; (*_exp++).valor=(*ob).pblo.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + break; + } + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); // el nombre no es nuevo + (*ob).linea=linea; (*ob).ierror=ierror; + (*ob).param=1; + (*ob).tipo=tbloc; lexico(); + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parametro + parametros++; (*ob).bloc.offset=iloc++; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bloc.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=econs; (*_exp++).valor=0; + (*_exp).tipo=eoper; (*_exp++).token=p_pointerbyte; + } break; + + case p_word: // Se comprueba la declaración de un word parámetro + if (parametros<=0) { + if (error_25==25) error(1,25); else error(0,error_25); + } else { + lexico(); + if (pieza==p_pointer) { + lexico(); + ob=analiza_pointer(tpwlo,iloc++); + (*ob).linea=linea; (*ob).ierror=ierror; + (*ob).param=1; parametros++; + (*_exp).tipo=econs; (*_exp++).valor=(*ob).pwlo.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + break; + } + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); // el nombre no es nuevo + (*ob).linea=linea; (*ob).ierror=ierror; + (*ob).param=1; + (*ob).tipo=twloc; lexico(); + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parametro + parametros++; (*ob).wloc.offset=iloc++; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wloc.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=econs; (*_exp++).valor=0; + (*_exp).tipo=eoper; (*_exp++).token=p_pointerword; + } break; + + case p_int: // Se comprueba la declaración de un int parámetro + if (parametros<=0) { + if (error_25==25) error(1,25); else error(0,error_25); + } else { + lexico(); + if (pieza==p_pointer) { + + case p_pointer: // Declaración de un puntero a int parámetro + if (parametros<=0) { + if (error_25==25) error(1,25); else error(0,error_25); + } parametros++; + lexico(); + ob=analiza_pointer(tpilo,iloc++); + (*ob).linea=linea; (*ob).ierror=ierror; + (*ob).param=1; + (*_exp).tipo=econs; (*_exp++).valor=(*ob).pilo.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + break; + } else if (pieza!=p_id) error(1,23); // esperando un nombre + } + + case p_id: switch ((*o).tipo) { + + case tnone: + ob=o; (*ob).linea=linea; (*ob).ierror=ierror; lexico(); + if (pieza!=p_abrir) { + if (parametros>0) { + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parametro + parametros++; + (*ob).tipo=tvloc; (*ob).vloc.offset=iloc++; + (*ob).param=1; + (*_exp).tipo=econs; (*_exp++).valor=(*ob).vloc.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; break; + } else { + error(2,34,(*ob).name); // nombre desconocido + lexico(); + } + } + (*ob).usado=1; (*ob).tipo=tproc; + (*ob).proc.bloque=ob; (*ob).proc.offset=0; (*ob).proc.num_par=0; + lexico(); + while (pieza!=p_cerrar) { + (*ob).proc.num_par++; + exp00(0); + if (pieza!=p_cerrar) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + else { lexico(); if (pieza==p_cerrar) error(3,36); } // se esperaba otro parametro + } + } (*_exp).tipo=ecall; (*_exp++).objeto=ob; lexico(); break; + + case tcons: + if ((*o).cons.literal) { + tipo_factor=2; + if (tipo_expresion==1) { + (*_exp).tipo=econs; (*_exp++).valor=(byte)mem[pieza_num]; + } else if (tipo_expresion==-1) { + (*_exp).tipo=econs; (*_exp++).valor=pieza_num; + (*_exp).tipo=eoper; (*_exp++).token=p_strlen; + } else { + (*_exp).tipo=econs; (*_exp++).valor=(*o).cons.valor; + } + } else { + (*_exp).tipo=econs; (*_exp++).valor=(*o).cons.valor; + } lexico(); break; + + case tvglo: + (*_exp).tipo=econs; (*_exp++).valor=(*o).vglo.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; lexico(); break; + break; + + case ttglo: + case tpigl: + ob=o; offset=(*ob).tglo.offset; + lexico(); + (*_exp).tipo=econs; (*_exp++).valor=offset; + if (pieza==p_corab) { + if ((*ob).tipo==tpigl) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + lexico(); + exp00(0); + if ((*ob).tglo.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tglo.len1; } + if ((*ob).tglo.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma (multidimension) + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tglo.len2; } + if ((*ob).tglo.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tglo.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).tglo.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).tglo.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } (*_exp).tipo=eoper; (*_exp++).token=p_pointer; break; + + case tbglo: + case tpbgl: + case tpcgl: + ob=o; offset=(*ob).bglo.offset; + lexico(); + (*_exp).tipo=econs; (*_exp++).valor=offset; + if ((*ob).tipo==tpbgl || (*ob).tipo==tpcgl) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (pieza!=p_corab) break; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).bglo.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bglo.len1; } + if ((*ob).bglo.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bglo.len2; } + if ((*ob).bglo.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bglo.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bglo.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bglo.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } else { // mi_byte ð mi_byte[0] + (*_exp).tipo=econs; (*_exp++).valor=0; + } (*_exp).tipo=eoper; (*_exp++).token=p_pointerbyte ; break; + + case twglo: + case tpwgl: + ob=o; offset=(*ob).wglo.offset; + lexico(); + (*_exp).tipo=econs; (*_exp++).valor=offset; + if ((*ob).tipo==tpwgl) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (pieza!=p_corab) break; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).wglo.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wglo.len1; } + if ((*ob).wglo.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wglo.len2; } + if ((*ob).wglo.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wglo.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wglo.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wglo.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } else { // mi_byte ð mi_byte[0] + (*_exp).tipo=econs; (*_exp++).valor=0; + } (*_exp).tipo=eoper; (*_exp++).token=p_pointerword; break; + + case tcglo: + ob=o; offset=(*ob).cglo.offset; + lexico(); + (*_exp).tipo=estring; (*_exp++).valor=offset; + if (pieza==p_corab) { + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).cglo.totalen; } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + (*_exp).tipo=eoper; (*_exp++).token=p_pointerchar; + } else { + tipo_factor=2; + if (tipo_expresion==1) { + (*_exp).tipo=econs; (*_exp++).valor=0; + (*_exp).tipo=eoper; (*_exp++).token=p_pointerchar; + } else { + (*_exp).tipo=eoper; (*_exp++).token=p_string; + if (tipo_expresion==-1) { (*_exp).tipo=eoper; (*_exp++).token=p_strlen; } + } + } break; + + case tsglo: + case tpsgl: + ob=o; lexico(); (*_exp).tipo=econs; (*_exp++).valor=(*ob).sglo.offset; + if ((*ob).tipo==tpsgl) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (pieza!=p_corab && pieza!=p_punto) break; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).sglo.items1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sglo.items1; } + if ((*ob).sglo.items2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sglo.items2; } + if ((*ob).sglo.items3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sglo.items3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sglo.items2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sglo.items1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if ((*ob).tipo==tpsgl) { + (*_exp).tipo=econs; (*_exp++).valor=(*((*ob).psgl.ostruct)).sglo.len_item; + } else { + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sglo.len_item; + } + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza==p_punto) { + struct_pointer=p_pointer; + if ((*ob).tipo==tpsgl) member=(*ob).psgl.ostruct; else member=ob; + lexico(); factor_struct(); + (*_exp).tipo=eoper; (*_exp++).token=struct_pointer; + } else { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + } break; + + case tvloc: + if (acceso_remoto && (*o).bloque) error(0,37); // no se puede acceder a PRIVATE externos + (*_exp).tipo=econs; (*_exp++).valor=(*o).vloc.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; lexico(); break; + + case ttloc: + case tpilo: + if (acceso_remoto && (*o).bloque) error(0,37); // no se puede acceder a PRIVATE externos + ob=o; offset=(*ob).tloc.offset; + lexico(); + (*_exp).tipo=econs; (*_exp++).valor=offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + if (pieza==p_corab) { + if ((*ob).tipo==tpilo) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + acceso_remoto=0; + lexico(); + exp00(0); + if ((*ob).tloc.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tloc.len1; } + if ((*ob).tloc.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tloc.len2; } + if ((*ob).tloc.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tloc.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).tloc.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).tloc.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; break; + + case tbloc: + case tpblo: + case tpclo: + if (acceso_remoto && (*o).bloque) error(0,37); // no se puede acceder a PRIVATE externos + ob=o; offset=(*ob).bloc.offset; + lexico(); + (*_exp).tipo=econs; (*_exp++).valor=offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + if ((*ob).tipo==tpblo || (*ob).tipo==tpclo) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (pieza!=p_corab) break; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + acceso_remoto=0; + lexico(); + exp00(0); + if ((*ob).bloc.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bloc.len1; } + if ((*ob).bloc.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bloc.len2; } + if ((*ob).bloc.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bloc.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bloc.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bloc.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } else { // mi_byte ð mi_byte[0] + (*_exp).tipo=econs; (*_exp++).valor=0; + } (*_exp).tipo=eoper; (*_exp++).token=p_pointerbyte ; break; + + case twloc: + case tpwlo: + if (acceso_remoto && (*o).bloque) error(0,37); // no se puede acceder a PRIVATE externos + ob=o; offset=(*ob).wloc.offset; + lexico(); + (*_exp).tipo=econs; (*_exp++).valor=offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + if ((*ob).tipo==tpwlo) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (pieza!=p_corab) break; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + acceso_remoto=0; + lexico(); + exp00(0); + if ((*ob).wloc.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wloc.len1; } + if ((*ob).wloc.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wloc.len2; } + if ((*ob).wloc.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wloc.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wloc.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wloc.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } else { // mi_byte ð mi_byte[0] + (*_exp).tipo=econs; (*_exp++).valor=0; + } (*_exp).tipo=eoper; (*_exp++).token=p_pointerword; break; + + case tcloc: + if (acceso_remoto && (*o).bloque) error(0,37); // // no se puede acceder a PRIVATE externos + ob=o; offset=(*ob).cloc.offset; + lexico(); + (*_exp).tipo=estring; (*_exp++).valor=offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + if (pieza==p_corab) { + acceso_remoto=0; + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).cloc.totalen; } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + (*_exp).tipo=eoper; (*_exp++).token=p_pointerchar; + } else { + tipo_factor=2; + if (tipo_expresion==1) { + (*_exp).tipo=econs; (*_exp++).valor=0; + (*_exp).tipo=eoper; (*_exp++).token=p_pointerchar; + } else { + (*_exp).tipo=eoper; (*_exp++).token=p_string; + if (tipo_expresion==-1) { (*_exp).tipo=eoper; (*_exp++).token=p_strlen; } + } + } break; + + case tsloc: + case tpslo: + if (acceso_remoto && (*o).bloque) error(0,37); // no se puede acceder a PRIVATE externos + ob=o; lexico(); (*_exp).tipo=econs; (*_exp++).valor=(*ob).sloc.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + if ((*ob).tipo==tpslo) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (pieza!=p_corab && pieza!=p_punto) break; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + acceso_remoto=0; + lexico(); + exp00(0); + if ((*ob).sloc.items1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sloc.items1; } + if ((*ob).sloc.items2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sloc.items2; } + if ((*ob).sloc.items3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sloc.items3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sloc.items2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sloc.items1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if ((*ob).tipo==tpslo) { + (*_exp).tipo=econs; (*_exp++).valor=(*((*ob).pslo.ostruct)).sloc.len_item; + } else { + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sloc.len_item; + } + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza==p_punto) { + struct_pointer=p_pointer; + if ((*ob).tipo==tpslo) member=(*ob).psgl.ostruct; else member=ob; + lexico(); factor_struct(); + (*_exp).tipo=eoper; (*_exp++).token=struct_pointer; + } else { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + } break; + + case tproc: + ob=o; lexico(); if (pieza!=p_abrir) error(3,22); lexico(); // esperando '(' + p=0; while (pieza!=p_cerrar) { // pðnum_par + p++; + exp00(0); + if (pieza!=p_cerrar) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + else { lexico(); if (pieza==p_cerrar) error(3,36); } // se esperaba otro parametro + } + } + if (p!=(*ob).proc.num_par) error(1,38); // numero de parametros incorrecto + (*_exp).tipo=ecall; (*_exp++).objeto=ob; lexico(); break; + +/* case tfunc: + ob=o; lexico(); if (pieza!=p_abrir) error(3,22); // esperando '(' + + if ((*ob).func.codigo==122) { // fopen("..." + en_fopen=1; + lexico(); + en_fopen=0; + } else lexico(); + + p=0; while (pieza!=p_cerrar) { // pðnum_par + + if ((*ob).func.par[p]==1) { // Parámetro del tipo 1 (struct,campo) + + // RECIBE: nombre_struct,nombre_campo + // GENERA: offset_struct,len_item,totalen,offset_campo,tipo_campo + + if (pieza!=p_id) c_error(0,152); + if ((*o).member!=NULL) c_error(0,152); + if ((*o).tipo==tsglo) { + (*_exp).tipo=econs; (*_exp++).valor=(*o).sglo.offset; + } else if ((*o).tipo==tsloc) { + (*_exp).tipo=econs; (*_exp++).valor=(*o).sloc.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_punto; + } else c_error(0,152); + (*_exp).tipo=econs; (*_exp++).valor=(*o).sglo.len_item; + (*_exp).tipo=econs; (*_exp++).valor=(*o).sglo.totalitems; + obs=o; lexico(); if (pieza!=p_coma) c_error(0,46); + member=obs; lexico(); member=NULL; + if (pieza!=p_id) c_error(0,153); + if ((*o).member!=obs) c_error(0,153); + (*_exp).tipo=econs; (*_exp++).valor=(*o).vglo.offset; + (*_exp).tipo=econs; + if ((*o).tipo==tcglo || (*o).tipo==tcloc) (*_exp++).valor=1; + else if ((*o).tipo==tpcgl || (*o).tipo==tpclo) (*_exp++).valor=2; + else (*_exp++).valor=0; + lexico(); + } else { // Parámetro del tipo 0 (genérico) + exp00(0); + } p++; + + if (pieza!=p_cerrar) if (pieza!=p_coma) c_error(3,25); + else { lexico(); if (pieza==p_cerrar) c_error(3,45); } + } + if (p!=(*ob).func.num_par) c_error(1,46); + (*_exp).tipo=efunc; (*_exp++).objeto=ob; + if ((*ob).func.ret==1) tipo_factor=2; + lexico(); break;*/ + + // POR HACER: implementar soporte para qsort (ver comentario aquí arriba) + + case tfext: + ob=o; lexico(); if (pieza!=p_abrir) error(3,22); // esperando '(' + lexico(); + p=0; while (pieza!=p_cerrar) { // pðnum_par + p++; + exp00(0); + if (pieza!=p_cerrar) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + else { lexico(); if (pieza==p_cerrar) error(3,36); } // se esperaba otro parametro + } + } if (p!=(*ob).fext.num_par) error(1,38); // numero de parametros incorrecto + (*_exp).tipo=efext; (*_exp++).objeto=ob; lexico(); break; + + default: + if (error_25==25) error(1,25); else error(0,error_25); + break; + + } break; + + default: + if (error_25==25) error(1,25); else error(0,error_25); + break; + } + + if (pieza==p_inc || pieza==p_dec) { + if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointer) { + _exp--; + (*_exp).tipo=eoper; + if (pieza==p_inc) (*_exp++).token=p_suma; + else (*_exp++).token=p_resta; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerchar) { + _exp--; + (*_exp).tipo=eoper; + if (pieza==p_inc) (*_exp++).token=p_sumachar; + else (*_exp++).token=p_restachar; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerbyte) { + _exp--; + (*_exp).tipo=eoper; + if (pieza==p_inc) (*_exp++).token=p_sumachar; + else (*_exp++).token=p_restachar; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_pointerword) { + _exp--; + (*_exp).tipo=eoper; + if (pieza==p_inc) (*_exp++).token=p_sumaword; + else (*_exp++).token=p_restaword; + } else if ((*(_exp-1)).tipo==eoper && (*(_exp-1)).token==p_string) { + _exp--; (*_exp).tipo=econs; + if (pieza==p_inc) (*_exp++).valor=-1; + else (*_exp++).valor=1; + (*_exp).tipo=eoper; + (*_exp++).token=p_strsub; + (*_exp).tipo=eoper; + (*_exp++).token=p_string; + } else error(4,16); // no se puede realizar el incremento + lexico(); + } +} + + +void factor_struct(void) { + struct objeto * ob; + + if (pieza!=p_id) error(3,39); // esperando un elemento de la estructura + switch ((*o).tipo) { + + case tvglo: + (*_exp).tipo=econs; (*_exp++).valor=(*o).vglo.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + break; + + case ttglo: + case tpigl: + (*_exp).tipo=econs; (*_exp++).valor=(*o).tglo.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if (pieza==p_corab) { + if ((*ob).tipo==tpigl) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + lexico(); + exp00(0); + if ((*ob).tglo.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tglo.len1; } + if ((*ob).tglo.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tglo.len2; } + if ((*ob).tglo.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tglo.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).tglo.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).tglo.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } break; + + case tbglo: + case tpbgl: + case tpcgl: + (*_exp).tipo=econs; (*_exp++).valor=(*o).bglo.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if ((*ob).tipo==tpbgl || (*ob).tipo==tpcgl) { + if (pieza!=p_corab) break; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).bglo.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bglo.len1; } + if ((*ob).bglo.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bglo.len2; } + if ((*ob).bglo.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bglo.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bglo.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bglo.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { // mi_byte ð mi_byte[0] + (*_exp).tipo=econs; (*_exp++).valor=0; + } struct_pointer=p_pointerbyte; break; + + case twglo: + case tpwgl: + (*_exp).tipo=econs; (*_exp++).valor=(*o).wglo.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if ((*ob).tipo==tpwgl) { + if (pieza!=p_corab) break; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).wglo.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wglo.len1; } + if ((*ob).wglo.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wglo.len2; } + if ((*ob).wglo.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wglo.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wglo.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wglo.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { // mi_byte ð mi_byte[0] + (*_exp).tipo=econs; (*_exp++).valor=0; + } struct_pointer=p_pointerword; break; + + case tcglo: + (*_exp).tipo=estring; (*_exp++).valor=(*o).cglo.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if (pieza==p_corab) { + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).cglo.totalen; } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + struct_pointer=p_pointerchar; + } else { + tipo_factor=2; + if (tipo_expresion==1) { + (*_exp).tipo=econs; (*_exp++).valor=0; + struct_pointer=p_pointerchar; + } else { + if (tipo_expresion==-1) { (*_exp).tipo=eoper; (*_exp++).token=p_strlen; } + struct_pointer=p_string; + } + } break; + + case tsglo: + case tpsgl: + (*_exp).tipo=econs; (*_exp++).valor=(*o).sglo.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if ((*ob).tipo==tpsgl) { + if (pieza!=p_corab && pieza!=p_punto) break; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).sglo.items1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sglo.items1; } + if ((*ob).sglo.items2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sglo.items2; } + if ((*ob).sglo.items3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sglo.items3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sglo.items2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sglo.items1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if ((*ob).tipo==tpsgl) { + (*_exp).tipo=econs; (*_exp++).valor=(*((*ob).psgl.ostruct)).sglo.len_item; + } else { + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sglo.len_item; + } + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza==p_punto) { + if ((*ob).tipo==tpsgl) member=(*ob).psgl.ostruct; else member=ob; + lexico(); factor_struct(); + } break; + + case tvloc: + (*_exp).tipo=econs; (*_exp++).valor=(*o).vloc.offset; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); break; + + case ttloc: + case tpilo: + (*_exp).tipo=econs; (*_exp++).valor=(*o).tloc.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if (pieza==p_corab) { + if ((*ob).tipo==tpilo) { + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + lexico(); + exp00(0); + if ((*ob).tloc.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tloc.len1; } + if ((*ob).tloc.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tloc.len2; } + if ((*ob).tloc.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).tloc.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).tloc.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).tloc.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } break; + + case tbloc: + case tpblo: + case tpclo: + (*_exp).tipo=econs; (*_exp++).valor=(*o).bloc.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if ((*ob).tipo==tpblo || (*ob).tipo==tpcgl) { + if (pieza!=p_corab) break; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).bloc.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bloc.len1; } + if ((*ob).bloc.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bloc.len2; } + if ((*ob).bloc.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).bloc.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bloc.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).bloc.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { // mi_byte ð mi_byte[0] + (*_exp).tipo=econs; (*_exp++).valor=0; + } struct_pointer=p_pointerbyte; break; + + case twloc: + case tpwlo: + (*_exp).tipo=econs; (*_exp++).valor=(*o).wloc.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if ((*ob).tipo==tpwlo) { + if (pieza!=p_corab) break; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).wloc.len1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wloc.len1; } + if ((*ob).wloc.len2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wloc.len2; } + if ((*ob).wloc.len3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).wloc.len3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wloc.len2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).wloc.len1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { // mi_byte ð mi_byte[0] + (*_exp).tipo=econs; (*_exp++).valor=0; + } struct_pointer=p_pointerword; break; + + case tcloc: + (*_exp).tipo=estring; (*_exp++).valor=(*o).cloc.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if (pieza==p_corab) { + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).cloc.totalen; } + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + struct_pointer=p_pointerchar; + } else { + tipo_factor=2; + if (tipo_expresion==1) { + (*_exp).tipo=econs; (*_exp++).valor=0; + struct_pointer=p_pointerchar; + } else { + if (tipo_expresion==-1) { (*_exp).tipo=eoper; (*_exp++).token=p_strlen; } + struct_pointer=p_string; + } + } break; + + case tsloc: + case tpslo: + (*_exp).tipo=econs; (*_exp++).valor=(*o).sloc.offset; ob=o; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + member=NULL; lexico(); + if ((*ob).tipo==tpslo) { + if (pieza!=p_corab && pieza!=p_punto) break; + (*_exp).tipo=eoper; (*_exp++).token=p_pointer; + if (comprueba_null) (*_exp++).tipo=enull; + } + if (pieza==p_corab) { + lexico(); + exp00(0); + if ((*ob).sloc.items1>-1) if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sloc.items1; } + if ((*ob).sloc.items2>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sloc.items2; } + if ((*ob).sloc.items3>-1) { + if (pieza!=p_coma) error(3,35); // se esperaba una coma + lexico(); + exp00(0); + if (comprueba_rango) { (*_exp).tipo=erango; (*_exp++).valor=(*ob).sloc.items3; } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sloc.items2+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sloc.items1+1; + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if ((*ob).tipo==tpslo) { + (*_exp).tipo=econs; (*_exp++).valor=(*((*ob).pslo.ostruct)).sloc.len_item; + } else { + (*_exp).tipo=econs; (*_exp++).valor=(*ob).sloc.len_item; + } + (*_exp).tipo=eoper; (*_exp++).token=p_mul; + (*_exp).tipo=eoper; (*_exp++).token=p_add; + } + if (pieza==p_punto) { + if ((*ob).tipo==tpslo) member=(*ob).pslo.ostruct; else member=ob; + lexico(); factor_struct(); + } break; + + default: error(3,39); break; // esperando un elemento de la estructura + } +} diff --git a/ediv/src/ediv/expresion.h b/ediv/src/ediv/expresion.h new file mode 100644 index 0000000..8fc8149 --- /dev/null +++ b/ediv/src/ediv/expresion.h @@ -0,0 +1,39 @@ +#ifndef __EXPRESION_H +#define __EXPRESION_H + +#define max_exp 512 //Máximo número de elementos en una expresión +#define long_pila 2048 //Longitud de la pila en ejecución + +int pila[long_pila+max_exp+64]; // cálculo de expresiones (compilación y ejecución) + +// Tabla de elementos en la evaluación de una expresión + +struct exp_ele { + byte tipo; // econs, eoper, erango, ewhoami, ecall + union { + int valor; + int token; + struct objeto * objeto; + }; +} tabexp[max_exp], *_exp; + +#define econs 0 // Constante // Tipos de elementos en tabexp[] +#define eoper 1 // Operador +#define erango 2 // Comprobación de rango +#define ewhoami 3 // Identificador de proceso +#define ecall 4 // Creación de un proceso +//#define efunc 5 // Llamada a una función interna +#define efext 6 // Llamada a una función externa +#define echeck 7 // Comprobació¢n de validez de un identificador +#define estring 8 // Cadena de texto (su offset constante) +#define enull 9 // Comprobaci¢n de NULL pointer + +//----------------------------------------------------------------------------- + +void condicion(void); +void expresion(void); +void expresion_cpa(void); +void generar_expresion(void); +int constante(void); + +#endif \ No newline at end of file diff --git a/ediv/src/ediv/keywords.h b/ediv/src/ediv/keywords.h new file mode 100644 index 0000000..e44c5a9 --- /dev/null +++ b/ediv/src/ediv/keywords.h @@ -0,0 +1,197 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __KEYWORDS_H__ +#define __KEYWORDS_H__ + +// tabla de keywords +extern struct keywords { + char keyword[20]; // Max. 20 caracteres por keyword + char code; // Code del keyword + void* hfuncion; // Puntero a la función correspondiente (para no usar SWITCH) +} table[]; + +extern struct prioridades { + char keyword[20]; + char prioridad; +} prioridad[]; + +// Defines de los keywords con su code + +// CM = TIPO DE COMANDO +#define CM_SEPARATE 0 // Se pone entre linea y linea +#define CM_STATEMENT 1 // Statement +#define CM_CALL 2 // Llamada a una función o un proceso +#define CM_SIGNO 3 // Asignación +#define CM_DATA 4 // Cualquier dato + +// ST = STATEMENTS +#define ST_COMPILER_OPT 1 +#define ST_PROGRAM 2 +#define ST_CONST 3 +#define ST_GLOBAL 4 +#define ST_LOCAL 5 +#define ST_PRIVATE 6 +#define ST_BEGIN 7 +#define ST_END 8 // Este end vale para todos los end +#define ST_PROCESS 9 +#define ST_FUNCTION 10 + +#define ST_BYTE 11 +#define ST_WORD 12 +#define ST_INTEGER 13 +#define ST_STRING 14 +#define ST_POINTER 15 +#define ST_STRUCT 16 +#define ST_FLOAT 17 + +#define ST_IF 18 +#define ST_ELSE 19 +#define ST_ELSEIF 20 +#define ST_SWITCH 21 +#define ST_CASE 22 +#define ST_DEFAULT 23 +#define ST_GOTO 24 + +#define ST_LOOP 25 +#define ST_FROM 26 +#define ST_REPEAT 27 +#define ST_UNTIL 28 +#define ST_WHILE 29 +#define ST_FOR 30 + +#define ST_BREAK 31 +#define ST_CONTINUE 32 +#define ST_RETURN 33 + +#define ST_FRAME 34 +#define ST_CLONE 35 +#define ST_DEBUG 36 + +// DT = DATA TYPES +#define DT_BYTE 0 +#define DT_WORD 1 +#define DT_INTEGER 2 +#define DT_STRING 3 +#define DT_POINTER 4 +#define DT_STRUCT 5 +#define DT_FLOAT 7 // Tipo de dato FLOAT (nuevo) +#define DT_UNDECLARED 8 + +#define DT_GLOBAL 20 // Variable global +#define DT_LOCAL 21 +#define DT_PRIVATE 22 + +// SG = SIGNOS +#define SG_CALL_OPEN 0 +#define SG_COMA 1 +#define SG_PARENTESIS_OPEN 2 +#define SG_PARENTESIS_CLOSE 3 +#define SG_PUNTO 4 +#define SG_NEGACION 5 +#define SG_OFFSET 6 +#define SG_PUNTERO 7 +#define SG_CORCHETE_OPEN 8 +#define SG_CORCHETE_CLOSE 9 + +#define SG_NEGACION_SIGNO 10 +#define SG_INCREMENTO 11 +#define SG_DECREMENTO 12 +#define SG_MULTIPLICACION 13 +#define SG_DIVISION 14 +#define SG_MODULO 15 +#define SG_SUMA 16 +#define SG_RESTA 17 +#define SG_DESP_DERECHA 18 +#define SG_DESP_IZQUIERDA 19 + +#define SG_AND 20 +#define SG_OR 21 +#define SG_XOR 22 +#define SG_IGUALDAD 23 //Comparacion +#define SG_DISTINTO 24 +#define SG_MAYOR 25 +#define SG_MAYOR_IGUAL 26 +#define SG_MENOR 27 +#define SG_MENOR_IGUAL 28 +#define SG_IGUAL 29 //Asignacion + +#define SG_SUMA_IGUAL 30 +#define SG_RESTA_IGUAL 31 +#define SG_MULTIPLICACION_IGUAL 32 +#define SG_DIVISION_IGUAL 33 +#define SG_MODULO_IGUAL 34 +#define SG_AND_IGUAL 35 +#define SG_OR_IGUAL 36 +#define SG_XOR_IGUAL 37 +#define SG_DESP_DERECHA_IGUAL 38 +#define SG_DESP_IZQUIERDA_IGUAL 39 + +//CL = Tipos de call +#define CL_USER 0 +#define CL_DLL 1 + + +/* PROTOTIPOS DE FUNCIONES + */ + +typedef void (TYPEOF_hfuncion)(); + +// h = HANDLERS de los statements +void h_compiler_options(); +void h_program(); +void h_const(); +void h_global(); +void h_local(); +void h_private(); +void h_begin(); +void h_end(); +void h_process(); +void h_function(); + +void h_byte(); +void h_word(); +void h_integer(); +void h_float(); + +void h_if(); +void h_else(); +void h_elseif(); +void h_switch(); +void h_case(); +void h_default(); +void h_goto(); + +void h_loop(); +void h_from(); +void h_repeat(); +void h_until(); +void h_while(); +void h_for(); + +void h_break(); +void h_continue(); +void h_return(); + +void h_frame(); +void h_clone(); +void h_debug(); + +#endif diff --git a/ediv/src/ediv/language.c b/ediv/src/ediv/language.c new file mode 100644 index 0000000..2b9f28d --- /dev/null +++ b/ediv/src/ediv/language.c @@ -0,0 +1,1167 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + + +/**** ¡¡¡ OJO CON LAS COMAS !!! ****/ + + +#ifdef _WIN32 +# include +#else +# include +# include +#endif + +#include "shared.h" +#include "language.h" +#include "edivcfg/iniparser.h" + + +int detecta_idioma_iso(char* lang) +{ + int i; + static char getid[NUM_LANGUAGES][3] = { + "es", // español + "it", // italiano + "pt", // portugués + "en", // inglés + "ca", // catalán + "eu" // euskera + }; + if(lang==NULL) return DEFAULT_LANGUAGE; + if(strlen(lang)>2) lang[2]=0; + strlwr(lang); + for(i=0;i\n", + /* 8 */ " -t, --table Guarda la tabla de objetos como \n", + /* 9 */ " -c, --check No genera un ejecutable (para comprobar sintaxis, etc.)\n", + /* 10 */ " -s, --system Sistema Operativo destino (por defecto %s)\n", + /* 11 */ " -v, --version Muestra versión y sale\n\n", + /* 12 */ "Parámetro --system: debe indicar un sistema destino\nConsulte la documentación para obtener ayuda\n", + /* 13 */ "Parámetro erróneo: %s\nUse la opción -h para ver la ayuda\n", + /* 14 */ "Parámetro -s: debe indicar un sistema destino\nConsulte la documentación para obtener ayuda\n", + /* 15 */ "Parámetro erróneo: -%c\nUse la opción -h para ver la ayuda\n", + /* 16 */ "No se ha especificado un archivo\nUse la opción -h para ver la ayuda\n", + /* 17 */ "edivc: Error al abrir archivo %s.\n", + /* 18 */ "edivc: Compilando: %s\n", + /* 19 */ "edivc: ERROR: No se encuentra %s\n", + /* 20 */ "edivc: ERROR: Formato incorrecto de %s\n", + /* 21 */ "edivc: Interrumpido (%d advertencias)\n", + /* 22 */ "edivc: Finalizado con éxito (%d advertencias)\n", + /* 23 */ "edivc: Salida con errores\n", + /* 24 */ "edivc: ERROR: Memoria insuficiente\n", + /* 25 */ "%s:%d:%d: ERROR %d: ", + /* 26 */ "%s:%d: Advertencia: ", + /* 27 */ "Precompilando...\n", + /* 28 */ "Compilando...\n", + /* 29 */ "Error creando archivo de intercambio\n", + /* 30 */ "Generando listados...\n", + /* 31 */ "Guardando ejecutable...\n", + /* 32 */ "Guardando información de depurado...\n", + /* 33 */ "Error escribiendo ejecutable\n", + /* 34 */ "Compilación finalizada.\n", + /* 35 */ "%s: ERROR: ", + /* 36 */ "Error creando archivo %s\n", + /* 37 */ "Listado de objetos de %s - eDIV versión " VERSION "\n\n", + /* 38 */ "\tbloque(%u), anterior(%u)\n", + /* 39 */ "Código EML de %s - eDIV versión " VERSION "\n", + /* 40 */ "edivc: ERROR: %s\n\n", + /* 41 */ "edivc: %s (linea %d) ERROR: %s\n\n", + /* 42 */ "edivc: Interrumpido - se han encontrado errores\n", + #ifdef _WIN32 + /* 43 */ "No se encuentra ninguna DLL\n", + /* 44 */ "", + #else + /* 43 */ "No se encuentra ninguna librería\n", + /* 44 */ "Directorio %s/ no encontrado\n", + #endif + /* 45 */ "Error al cargar librería %s\n", + #ifdef _WIN32 + /* 46 */ "No puedo cargar %s\n", + /* 47 */ "No se encuentra ExportaFuncs en %s - DLL no valida\n", + #else + /* 46 */ "No puedo cargar %s (%s)\n", + /* 47 */ "No se encuentra ExportaFuncs en %s - Librería no válida (%s)\n", + #endif + /* 48 */ " -n, --news Muestra las últimas noticias de eDivCentral.com y sale\n", + /* 49 */ "Error: no se ha configurado un servidor de noticias en ediv.cfg\n", + /* 50 */ "Error: el fichero recibido no es del tipo esperado\n" + }; + return msg[id_cadena]; + } + + case 1: // italiano + { + static char* msg[] = { + /* 0 */ " **** Compilatore eDIV " VERSION " ****\nCopyleft (c) 2000-2002 Sion, Ltd.\nhttp://www.edivcentral.com\n", + /* 1 */ "ATTENZIONE: Questa versione di eDIV è incompleta.\nPer favore informa su qualunque bug a: bugs@edivcentral.com\n", + /* 2 */ "Guida opzioni di comando:\n\n", + /* 3 */ "%s [opzioni] archivio.prg [eseguibile]\n\n", + /* 4 */ "Lista opzioni:\n", + /* 5 */ " -h, --help Mostra questa guida ed esce\n", + /* 6 */ " -d, --debug Genera informazioni addizionali di depurazione\n", + /* 7 */ " -l, --list Salva il listato EML come \n", + /* 8 */ " -t, --table Salva la tabella oggetti come \n", + /* 9 */ " -c, --check Non genera l'eseguibile (per comprovare sintassi, etc.)\n", + /* 10 */ " -s, --system Sistema Operativo di destinazione (per difetto %s)\n", + /* 11 */ " -v, --version Mostra la versione ed esce\n\n", + /* 12 */ "Parametro --system: deve indicare il sistema di destinazione\nConsulta la documentazione per ottenere aiuto\n", + /* 13 */ "Parametro errato: %s\nUsa l'opzione -h per visualizzare la guida\n", + /* 14 */ "Parametro -s: deve indicare il sistema di destinazione\nConsulta la documentazione per ottenere aiuto\n", + /* 15 */ "Parametro errato: -%c\nUsa l'opzione -h per visualizzare la guida\n", + /* 16 */ "Non è stato specificato l'archivio\nUsa l'opzione -h per visualizzare la guida\n", + /* 17 */ "edivc: Errore aprendo l'archivio %s.\n", + /* 18 */ "edivc: Compilando: %s\n", + /* 19 */ "edivc: ERRORE: Non si incontra %s\n", + /* 20 */ "edivc: ERRORE: Formato incorretto di %s\n", + /* 21 */ "edivc: Interrotto (%d avvertenze)\n", + /* 22 */ "edivc: Completato con successo (%d avvertenze)\n", + /* 23 */ "edivc: Uscita con errori\n", + /* 24 */ "edivc: ERRORE: Memoria insufficiente\n", + /* 25 */ "%s:%d:%d: ERRORE %d: ", + /* 26 */ "%s:%d: Avvertenza: ", + /* 27 */ "Precompilando...\n", + /* 28 */ "Compilando...\n", + /* 29 */ "Errore creando l'archivio d'intercambio\n", + /* 30 */ "Generando listati...\n", + /* 31 */ "Salvando eseguibile...\n", + /* 32 */ "Salvando informazioni di depurazione...\n", + /* 33 */ "Errore scrivendo l'eseguibile\n", + /* 34 */ "Compilazione completata.\n", + /* 35 */ "%s: ERRORE: ", + /* 36 */ "Errore creando l'archivio %s\n", + /* 37 */ "Listato oggetti di %s - eDIV versione " VERSION "\n\n", + /* 38 */ "\tblocco(%u), precedente(%u)\n", + /* 39 */ "Codice EML di %s - eDIV versione " VERSION "\n", + /* 40 */ "edivc: ERRORE: %s\n\n", + /* 41 */ "edivc: %s (linea %d) ERRORE: %s\n\n", + /* 42 */ "edivc: Interrotto - Sono stati trovati errori\n", + #ifdef _WIN32 + /* 43 */ "Non si trova nessuna DLL\n", + /* 44 */ "", + #else + /* 43 */ "Non si trova nenssuna libreria\n", + /* 44 */ "Percorso %s/ non trovato\n", + #endif + /* 45 */ "Errore nel caricare la libreria %s\n", + #ifdef _WIN32 + /* 46 */ "Non posso caricare %s\n", + /* 47 */ "Non si trova ExportaFuncs in %s - DLL non valida\n", + #else + /* 46 */ "Non posso caricare %s (%s)\n", + /* 47 */ "Non si trova ExportaFuncs in %s - Libreria non valida (%s)\n", + #endif + /* 48 */ " -n, --news Mostra le ultime notizie di eDivCentral.com ed esce\n", + /* 49 */ "Errore: non è stato configurato un server di notizie in ediv.cfg\n", + /* 50 */ "Errore: il file ricevuto non è del tipo atteso\n" + }; + return msg[id_cadena]; + } + + case 2: // portugués + { + static char* msg[] = { + /* 0 */ " **** Compilador eDIV " VERSION " ****\nCopyleft (c) 2000-2002 Sion, Ltd.\nhttp://www.edivcentral.com\n", + /* 1 */ "ATENÇÃO: Esta versão de eDIV está inacabada.\nPor favor informe-nos de qualquer bug a: bugs@edivcentral.com\n", + /* 2 */ "Ajuda de opções de comando:\n\n", + /* 3 */ "%s [opções] arquivo.prg [executavel]\n\n", + /* 4 */ "Lista de opções:\n", + /* 5 */ " -h, --help Mostra esta ajuda e sai\n", + /* 6 */ " -d, --debug Gera informação adicional de depuração\n", + /* 7 */ " -l, --list Guarda o listado EML como \n", + /* 8 */ " -t, --table Guarda a tabela de objectos como \n", + /* 9 */ " -c, --check Não gera um executavel (para comprovar sintaxe, etc.)\n", + /* 10 */ " -s, --system Sistema Operativo de destino (por defeito %s)\n", + /* 11 */ " -v, --version Mostra versão e sai\n\n", + /* 12 */ "Parametro --system: deve indicar um sistema de destino\nConsulte a documentação para obter ajuda\n", + /* 13 */ "Parametro erróneo: %s\nUse a opção -h para ver a ajuda\n", + /* 14 */ "Parametro -s: deve indicar um sistema de destino\nConsulte a documentação para obter ajuda\n", + /* 15 */ "Parametro erróneo: -%c\nUse a opção -h para ver a ajuda\n", + /* 16 */ "Não foi especificado um arquivo\nUse a opção -h para ver a ajuda\n", + /* 17 */ "edivc: Erro ao abrir arquivo %s.\n", + /* 18 */ "edivc: Compilando: %s\n", + /* 19 */ "edivc: ERROR: Não se enconntra %s\n", + /* 20 */ "edivc: ERROR: Formato incorrecto de %s\n", + /* 21 */ "edivc: Interrompido (%d advertencias)\n", + /* 22 */ "edivc: Finalizado con exito (%d advertencias)\n", + /* 23 */ "edivc: Saida com erros\n", + /* 24 */ "edivc: ERROR: Memória insuficiente\n", + /* 25 */ "%s:%d:%d: ERROR %d: ", + /* 26 */ "%s:%d: Advertencia: ", + /* 27 */ "Precompilando...\n", + /* 28 */ "Compilando...\n", + /* 29 */ "Erro ao criar arquivo de intercambio\n", + /* 30 */ "Generando listados...\n", + /* 31 */ "Guardando executavel...\n", + /* 32 */ "Guardando informação de depuração...\n", + /* 33 */ "Erro ao escrever executavel\n", + /* 34 */ "Compilação finalizada.\n", + /* 35 */ "%s: ERRO: ", + /* 36 */ "Erro ao criar arquivo %s\n", + /* 37 */ "Listado de objectos de %s - eDIV versão " VERSION "\n\n", + /* 38 */ "\tbloco(%u), anterior(%u)\n", + /* 39 */ "Código EML de %s - eDIV versão " VERSION "\n", + /* 40 */ "edivc: ERRO: %s\n\n", + /* 41 */ "edivc: %s (linha %d) ERRO: %s\n\n", + /* 42 */ "edivc: Interrompido - encontraram-se erros\n", + #ifdef _WIN32 + /* 43 */ "Não se encontra nenhuma DLL\n", + /* 44 */ "", + #else + /* 43 */ "Não se encontra nenhuma biblioteca\n", + /* 44 */ "Directorio %s/ não foi encontrado\n", + #endif + /* 45 */ "Erro ao carregar biblioteca %s\n", + #ifdef _WIN32 + /* 46 */ "Não podo carregar %s\n", + /* 47 */ "Não se encontra ExportaFuncs em %s - DLL invalida\n", + #else + /* 46 */ "Não se pode carregar %s (%s)\n", + /* 47 */ "Não se encontra ExportaFuncs em %s - Biblioteca invalida (%s)\n", + #endif + + // FIXME: revisar/traducir esto + /* 48 */ " -n, --news Mostra a última notícia de eDivCentral.com e sai\n", + /* 49 */ "Error: no se ha configurado un servidor de noticias en ediv.cfg\n", + /* 50 */ "Error: el fichero recibido no es del tipo esperado\n" + }; + return msg[id_cadena]; + } + + case 3: // inglés + { + static char* msg[] = { + /* 0 */ " **** eDIV Compiler " VERSION " ****\nCopyleft (c) 2000-2002Sion, Ltd.\nhttp://www.edivcentral.com\n", + /* 1 */ "WARNING: This version of eDIV is unfinished.\nPlease report any bug to: bugs@edivcentral.com\n", + /* 2 */ "Command line help:\n\n", + /* 3 */ "%s [options] file.prg [executable]\n\n", + /* 4 */ "Options list:\n", + /* 5 */ " -h, --help Shows this help and exits\n", + /* 6 */ " -d, --debug Generates additional debug information\n", + /* 7 */ " -l, --list Saves the EML listing as \n", + /* 8 */ " -t, --table Saves the object table as \n", + /* 9 */ " -c, --check Doesn't create an executable (for syntax checking, etc)\n", + /* 10 */ " -s, --system Target Operating System (by default %s)\n", + /* 11 */ " -v, --version Shows program version and exits\n\n", + /* 12 */ "Parameter --system: you must indicate a target system\nConsult the documentation in order to obtain help\n", + /* 13 */ "Erroneous parameter: %s\nUse -h command-line option to view the help screen\n", + /* 14 */ "Parameter -s: you must indicate a target system\nConsult the documentation in order to obtain help\n", + /* 15 */ "Erroneous parameter: -%c\nUse -h command-line option to view the help screen\n", + /* 16 */ "You didn't specified an input file\nUse -h command-line option to view the help screen\n", + /* 17 */ "edivc: Error opening file %s.\n", + /* 18 */ "edivc: Compiling: %s\n", + /* 19 */ "edivc: ERROR: File %s not found\n", + /* 20 */ "edivc: ERROR: Incorrect file format of %s\n", + /* 21 */ "edivc: Break (%d warnings)\n", + /* 22 */ "edivc: Finished succesfully (%d warnings)\n", + /* 23 */ "edivc: Exit with errors\n", + /* 24 */ "edivc: ERROR: Out of memory\n", + /* 25 */ "%s:%d:%d: ERROR %d: ", + /* 26 */ "%s:%d: Warning: ", + /* 27 */ "Precompiling...\n", + /* 28 */ "Compiling...\n", + /* 29 */ "Error creating swap file\n", + /* 30 */ "Generating listings...\n", + /* 31 */ "Writing executable...\n", + /* 32 */ "Writing debug information...\n", + /* 33 */ "Error writing executable\n", + /* 34 */ "Compilation finished.\n", + /* 35 */ "%s: ERROR: ", + /* 36 */ "Error creating file %s\n", + /* 37 */ "Object listing of %s - eDIV version " VERSION "\n\n", + /* 38 */ "\tblock(%u), previous(%u)\n", + /* 39 */ "EML code of %s - eDIV version " VERSION "\n", + /* 40 */ "edivc: ERROR: %s\n\n", + /* 41 */ "edivc: %s (line %d) ERROR: %s\n\n", + /* 42 */ "edivc: Break - errors found\n", + #ifdef _WIN32 + /* 43 */ "No DLL's found\n", + /* 44 */ "", + #else + /* 43 */ "No libraries found\n", + /* 44 */ "Directoriy %s/ not found\n", + #endif + /* 45 */ "Error loading library %s\n", + #ifdef _WIN32 + /* 46 */ "Can't load %s\n", + /* 47 */ "ExportaFuncs not found in %s - DLL not valid\n", + #else + /* 46 */ "Can't load %s (%s)\n", + /* 47 */ "ExportaFuncs not found in %s - Library not valid (%s)\n", + #endif + /* 48 */ " -n, --news Shows last news from eDivCentral.com and exits\n", + /* 49 */ "Error: news server is not set up in ediv.cfg\n", + /* 50 */ "Error: received file if of an unexpected format\n" + }; + return msg[id_cadena]; + } + + case 4: // catalán + { + static char* msg[] = { + /* 0 */ " **** Compilador eDIV " VERSION " ****\nCopyleft (c) 2000-2002 Sion, Ltd.\nhttp://www.edivcentral.com\n", + /* 1 */ "ATENCIÓ: Aquesta versió d' eDIV està sense acabar.\nSi us plau, informi de qualsevol bug a: bugs@edivcentral.com\n", + /* 2 */ "Ajuda d' opcions de comand:\n\n", + /* 3 */ "%s [opcions] arxiu.prg [executable]\n\n", + /* 4 */ "Llista d' opcions:\n", + /* 5 */ " -h, --help Mostra aquesta ajuda i en sort\n", + /* 6 */ " -d, --debug Genera informació adicional de depurat\n", + /* 7 */ " -l, --list Guarda el llistat EML com a \n", + /* 8 */ " -t, --table Guarda la tabla d' objectes com a \n", + /* 9 */ " -c, --check No genera un executable (per comprovar sintaxi, etc.)\n", + /* 10 */ " -s, --system Sistema Operatiu destí (per defecte %s)\n", + /* 11 */ " -v, --version Mostra versió i en sort\n\n", + /* 12 */ "Paràmetre --system: ha d' indicar un sistema destí\nConsulti la documentació per a obtenir ajuda\n", + /* 13 */ "Paràmetre erroni: %s\nUtilitze la opció -h per a veure l' ajuda\n", + /* 14 */ "Paràmetre -s: ha d' indicar un sistema destí\nConsulti la documentació per a obtenir ajuda\n", + /* 15 */ "Paràmetre erroni: -%c\nUtilitze la opció -h per a veure l' ajuda\n", + /* 16 */ "No s'ha especificat un arxiu\nUtilitze la opció -h per a veure l' ajuda\n", + /* 17 */ "edivc: Error obrint l' arxiu %s.\n", + /* 18 */ "edivc: Compilant: %s\n", + /* 19 */ "edivc: ERROR: No es troba %s\n", + /* 20 */ "edivc: ERROR: Format incorrecte de %s\n", + /* 21 */ "edivc: Interromput (%d advertències)\n", + /* 22 */ "edivc: Finalitzat amb èxit (%d advertències)\n", + /* 23 */ "edivc: Sortida amb errors\n", + /* 24 */ "edivc: ERROR: Memòria insuficient\n", + /* 25 */ "%s:%d:%d: ERROR %d: ", + /* 26 */ "%s:%d: Advertència: ", + /* 27 */ "Precompilant...\n", + /* 28 */ "Compilant...\n", + /* 29 */ "Error creant arxiu d' intercanvi\n", + /* 30 */ "Generant llistats...\n", + /* 31 */ "Guardant executable...\n", + /* 32 */ "Guardant informació de depurat...\n", + /* 33 */ "Error escriguent executable\n", + /* 34 */ "Compilació finalitzada.\n", + /* 35 */ "%s: ERROR: ", + /* 36 */ "Error creant arxiu %s\n", + /* 37 */ "Llistado d' objectes de %s - eDIV versió " VERSION "\n\n", + /* 38 */ "\tbloque(%u), anterior(%u)\n", + /* 39 */ "Codi EML de %s - eDIV versió " VERSION "\n", + /* 40 */ "edivc: ERROR: %s\n\n", + /* 41 */ "edivc: %s (línia %d) ERROR: %s\n\n", + /* 42 */ "edivc: Interromput - s' han trobat errors\n", + #ifdef _WIN32 + /* 43 */ "No es troba cap DLL\n", + /* 44 */ "", + #else + /* 43 */ "No es troba cap llibreria\n", + /* 44 */ "Directori %s/ no trobat\n", + #endif + /* 45 */ "Error cargant llibrería %s\n", + #ifdef _WIN32 + /* 46 */ "No es pot cargar %s\n", + /* 47 */ "No es troba ExportaFuncs en %s - DLL no vàlida\n", + #else + /* 46 */ "No es pot cargar %s (%s)\n", + /* 47 */ "No es troba ExportaFuncs en %s - Llibreria no vàlida (%s)\n", + #endif + /* 48 */ " -n, --news Mostra les últimes notícies d' eDIVCentral i en surt\n", + /* 49 */ "Error: No s' ha configurat un servidor de notícies en ediv.cfg\n", + /* 50 */ "Error: l' arxiu rebut no és del tipus esperat\n" + }; + return msg[id_cadena]; + } + case 5: // euskera + { + static char* msg[] = { + /* 0 */ " **** eDIV konpiladorea " VERSION " ****\nCopyleft (c) 2000-2002 Sion, Ltd.\nhttp://www.edivcentral.com\n", + /* 1 */ "KONTUZ: eDIV bertsio hau ez dago bukaturik.\nMesedez eman berri edozein akatzi buruz helbide honetan: bugs@edivcentral.com\n", + /* 2 */ "Komandoei buruzko laguntza:\n\n", + /* 3 */ "%s [aukerak] archivo.prg [exekutagarria]\n\n", + /* 4 */ "Aukeren zerrenda:\n", + /* 5 */ " -h, --help Laguntza hau erakuste du eta irteten da\n", + /* 6 */ " -d, --debug Depurazioari buruzko gehigarrizko informazioa erakusten du\n", + /* 7 */ " -l, --list EML listatua moduan grabatzen du\n", + /* 8 */ " -t, --table Objektuen taula moduan grabatzen du\n", + /* 9 */ " -c, --check Ez du exekutagarririk egiten (sintaxia zihurtatzeko eta abar.)\n", + /* 10 */ " -s, --system Helburuko sistema eragilea (balio lehentsia %s)\n", + /* 11 */ " -v, --version Bertsioa erakusten du eta irteten da\n\n", + /* 12 */ "--system parametroa: sistema bat adierazi behar duzu\nkontsultatu dokumentazioa laguntza jasotzeko\n", + /* 13 */ "Okerreko parametroa: %s\nerabili -h aukera laguntza jasotzeko\n", + /* 14 */ "-s parametroa: sistema bat adierazi behar duzu\nkontsultatu dokumentazioa laguntza jasotzeko\n", + /* 15 */ "Okerreko parametroa: %s\nerabili -h aukera laguntza jasotzeko\n", + /* 16 */ "Ez duzu fitxategi bat adierazi\nErabili -h aukera laguntza jasotzeko\n", + /* 17 */ "edivc: Akatz bat sortu da %s fitxategia irekitzerakoan.\n", + /* 18 */ "edivc: Konpilatzen: %s\n", + /* 19 */ "edivc: AKATZA: Ezin da %s aurkitu\n", + /* 20 */ "edivc: AKATZA: %s-ko okerreko formatua\n", + /* 21 */ "edivc: Gelditurki (%d abisu)\n", + /* 22 */ "edivc: Ondo bukatuta (%d abisu)\n", + /* 23 */ "edivc: Akaztuneko irteera\n", + /* 24 */ "edivc: AKATZA: Ez dago behar beste memoria\n", + /* 25 */ "%s:%d:%d: AKATZA %d: ", + /* 26 */ "%s:%d: Abisua: ", + /* 27 */ "Prekonpilatzen...\n", + /* 28 */ "Konpilatzen...\n", + /* 29 */ "Akatz bat sortu da memoria virtualeko fitxategia sortzerakoan\n", + /* 30 */ "Listatuak sortzen...\n", + /* 31 */ "Exekutagarria sortzen...\n", + /* 32 */ "Depurazio informazioa grabatzen...\n", + /* 33 */ "Akatz bar sortu da exekutagarria sortzerakoan\n", + /* 34 */ "Konpilazioa bukaturik.\n", + /* 35 */ "%s: AKATZA: ", + /* 36 */ "Akatz bar sortu da %s fitxategia sortzerakoan\n", + /* 37 */ "%s-ren objektu zerrenda - eDIV bertsio " VERSION "\n\n", + /* 38 */ "\tbloque(%u), anterior(%u)\n", + /* 39 */ "%s-ko EML kodea - eDIV bertsio " VERSION "\n", + /* 40 */ "edivc: ERROR: %s\n\n", + /* 41 */ "edivc: %s (%d lerro) AKATZA: %s\n\n", + /* 42 */ "edivc: Gelditurik - akatzak aurkitu izan dira\n", + #ifdef _WIN32 + /* 43 */ "Ezin da DLL-rik aurkitu\n", + /* 44 */ "", + #else + /* 43 */ "Ezin da liburutegirik aurkitu\n", + /* 44 */ "Ezin da %s/ direktorioa aurkitu\n", + #endif + /* 45 */ "Akatz bat sortu da %s liburutegia kargatzerakoan\n", + #ifdef _WIN32 + /* 46 */ "Ezin dut %s kargatu\n", + /* 47 */ "%s-en ez da ExportaFuncs aurkitzen - Okerreko DLL\n", + #else + /* 46 */ "Ezin da %s (%s) kargatu\n", + /* 47 */ "%s-en ez da ExportaFuncs aurkitzen - Okerreko DLL\n", + #endif + /* 48 */ " -n, --news eDivCentral.com-eko asken berriak erakusten du eta irteten da\n", + /* 49 */ "Akatza: ez da berri zerbitzaririk prestatu ediv.cfg fitxategian\n", + /* 50 */ "Akatza: jasotako fitxategia ez da itxarotako motakoa\n" + }; + return msg[id_cadena]; + } + } + return ""; +} diff --git a/ediv/src/ediv/listados.c b/ediv/src/ediv/listados.c new file mode 100644 index 0000000..8633a22 --- /dev/null +++ b/ediv/src/ediv/listados.c @@ -0,0 +1,367 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 "main.h" +#include "parser.h" +#include "compiler.h" + +#include "language.h" + +//----------------------------------------------------------------------------- +// Graba el fichero de la tabla de objetos +//----------------------------------------------------------------------------- + +void listado_objetos (void) +{ + FILE * sta; + char nombretab[256]; + int n,o,l; + + strcpy(nombretab,nombreprog); + strcat(nombretab,".tab"); + + if((sta=fopen(nombretab,"w"))==NULL) { + printf(translate(36),nombretab); + exit(1); + } + + fprintf(sta,translate(37),fichero_prg); + + for (n=1;n<=8;n++) fprintf(sta,"[%u]: %u\n",n,mem[n]); fprintf(sta,"\n"); + + for (n=0;n + +#include "main.h" +#include "lower.h" + +/* Tabla de conversión de caracteres MS-DOS a Windows */ + +int dos_chars=0; + +byte dos_to_win[256] = { + 0, 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, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, +201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163, 216, 215, 131, +225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187, +166, 166, 166, 166, 166, 193, 194, 192, 169, 166, 166, 43, 43, 162, 165, 43, + 43, 45, 45, 43, 45, 43, 227, 195, 43, 43, 45, 45, 166, 45, 43, 164, +240, 208, 202, 203, 200, 105, 205, 206, 207, 43, 43, 166, 95, 166, 204, 175, +211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180, +173, 177, 61, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 166, 160 +}; + +/* Tabla de conversión de caracteres Windows a MS-DOS */ + +byte win_to_dos[256] = +{ + 0, 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, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 159, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 255, 173, 189, 156, 207, 190, 254, 245, 249, 184, 166, 174, 170, 240, 169, 238, + 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168, + 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216, + 209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225, + 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139, + 208, 164, 149, 162, 147, 228, 148, 246, 155, 151, 163, 150, 129, 236, 231, 152 +}; + +byte lower[256]; + +byte c_convert (byte c) +{ + return dos_chars ? c : win_to_dos[c]; +} + + +void set_c_lower (const byte * from, const byte * to) +{ + if (dos_chars) + while (*from) lower[win_to_dos[*from++]] = win_to_dos[*to++] ; + else + while (*from) lower[*from++] = *to++ ; +} + +void inicializa_lower() +{ + + /* ¡Esto hay que revisarlo bastante! + */ + + memset (lower, 0, 256); // es necesario + + set_c_lower ("ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyz"); + set_c_lower ("abcdefghijklmnopqrstuvwxyz", + "abcdefghijklmnopqrstuvwxyz"); + +#ifdef RESPETAR_ACENTOS + set_c_lower ("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ", + "áéíóúñçàèìòùäëïöüýâêîôûæãåõ"); + set_c_lower("áéíóúñçàèìòùäëïöüýâêîôûæãåõ", + "áéíóúñçàèìòùäëïöüýâêîôûæãåõ"); +#else + set_c_lower ("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ", + "aeiouncaeiouaeiouyaeiouæaao"); + set_c_lower ("áéíóúñÑçÇàèìòùäëïöüýâêîôûæãåõÁÉÍÓÚ", + "aeiounnccaeiouaeiouyaeiouÆaaoaeiou"); +#endif + + set_c_lower("1234567890#$_ºª","1234567890#$_ºª"); +} diff --git a/ediv/src/ediv/lower.h b/ediv/src/ediv/lower.h new file mode 100644 index 0000000..d4fe759 --- /dev/null +++ b/ediv/src/ediv/lower.h @@ -0,0 +1,35 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __LOWER_H +#define __LOWER_H + +#include "main.h" + +byte dos_to_win[256]; +byte win_to_dos[256]; + +byte lower[256]; + +byte c_convert(byte c); +void set_c_lower (const byte *from, const byte *to); +void inicializa_lower(); + +#endif // __LOWER_H \ No newline at end of file diff --git a/ediv/src/ediv/ltlex.c b/ediv/src/ediv/ltlex.c new file mode 100644 index 0000000..561cc99 --- /dev/null +++ b/ediv/src/ediv/ltlex.c @@ -0,0 +1,156 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +//----------------------------------------------------------------------------- +// Precarga de las estructuras léxicas, analiza el fichero ltlex.def +//----------------------------------------------------------------------------- + +#include +#include + +#include "main.h" +#include "parser.h" +#include "lower.h" + +#include "language.h" + +void ltlex_error(int error) +{ + if(error==1) + printf(translate(40),translate_ltlex_error(error)); + else + printf(translate(41),"ltlex.def",linea,translate_ltlex_error(error)); + printf(translate(42)); + exit(1); +} + +void analiza_ltlex(void){ + + byte *_buf, * buf; // Buffer del texto y puntero al carácter actual + byte cont=1; // 0 indica final del archivo + int len; // Tamaño del archivo + struct lex_ele * e; // Puntero al lex_case correspondiente + FILE * def; // Stream del fichero + + int t; //token (pieza) + byte h; //hash (para id) + byte * _ivnom; + byte * * ptr; + + // Busca el archivo ltlex.def + if ((def=fopen("system/ltlex.def","rb"))==NULL) + ltlex_error(1); + + // Lo lee + fseek(def,0,SEEK_END); + len=ftell(def); + _buf=buf=(byte *) e_malloc(len+1); + fseek(def,0,SEEK_SET); + len=fread(buf,1,len,def); + + // El carácter ASCII 0 indica final del fichero + *(buf+len)=0;// *(buf+len+1)=cr; + + #ifdef _DEBUG + printf("dbg: tamano ltlex: %d\n",len); + #endif + + linea=1; + + do { +/* printf("- %d\n",linea); + if(linea==45) + printf("heyp\n");*/ + + switch (*buf++) { + + // Fin de fichero + case 0: + cont=0; break; + + // Ignoramos los espacios + case ' ': case tab: + break; + + // Salta de linea + case cr: + if(*buf==lf) buf++; + + case lf: + linea++; + break; + + // Los ; indican línea de comentario + case ';': + while (*buf!=cr && *buf!=lf) buf++; break; + + // El símbolo & indica definición de token + case '&': + *buf=lower[*buf]; + if (*buf>='0' && *buf<='9') + t=(*buf++-'0')<<4; + else + if (*buf>='a' && *buf<='f') + t=(*buf++-'a'+10)<<4; + else + ltlex_error(2); + *buf=lower[*buf]; + if (*buf>='0' && *buf<='9') + t+=(*buf++-'0'); + else + if (*buf>='a' && *buf<='f') + t+=(*buf++-'a'+10); + else + ltlex_error(2); + if (*buf==cr || *buf==lf || *buf==' ' || *buf==tab) break; + else if (lower[*buf]) { //Analiza una palabra reservada + _ivnom=ivnom.b; *ivnom.p++=0; *ivnom.p++=(unsigned char*)t; h=0; + while ((*ivnom.b=lower[*buf++])) h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + ptr=&vhash[h]; while (*ptr) ptr=(unsigned char * *)*ptr; *ptr=_ivnom; + buf--; ivnom.b++; + } else if (t>=0x78 && t<=0x7b) { //Analiza un delimitador de literal + lex_case[*buf]=(struct lex_ele*)l_lit; + } else { //Analiza un nuevo símbolo + if ((e=lex_case[*buf])==0) { + if (num_nodos++==max_nodos) ltlex_error(3); + e=lex_case[*buf]=ilex_simb++; (*e).caracter=*buf++; + } else buf++; + while (*buf!=' ' && *buf!=tab && *buf!=cr) { + if (lower[*buf]) ltlex_error(4); + if ((*e).siguiente==0) + if (num_nodos++==max_nodos) ltlex_error(3); + else e=(*e).siguiente=ilex_simb++; + else { + e=(*e).siguiente; + while ((*e).caracter!=*buf && (*e).alternativa) + e=(*e).alternativa; + if ((*e).caracter!=*buf) { + if (num_nodos++==max_nodos) ltlex_error(3); + else e=(*e).alternativa=ilex_simb++; + } + } (*e).caracter=*buf++; + } (*e).token=t; + } break; + }} while (cont); + + free(_buf); _buf=NULL; + fclose(def); def=NULL; + +} diff --git a/ediv/src/ediv/main.h b/ediv/src/ediv/main.h new file mode 100644 index 0000000..0454de8 --- /dev/null +++ b/ediv/src/ediv/main.h @@ -0,0 +1,69 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __MAIN_H +#define __MAIN_H + +#include +#include "shared.h" +#include "edivcfg/iniparser.h" + +//#define MULTI_ERROR // para activar el sistema multi-error (bugs a mansalva) +#define DEBUG_DLL // para mostrar información al cargar las DLLs + +#define swap(a,b) {(a)^=(b);(b)^=(a);(a)^=(b);} + +unsigned int stub_size; // tamaño del STUB.EXE (está almacenado en edivrun.lib) +//FILE *fout; // stream del seudocodigo + +byte *prog, *tprog; // buffer donde se almacena el PRG +size_t progsize; // tamaño del PRG +char nombreprog[256]; // nombre del PRG sin extensión +char *fichero_prg; // nombre del archivo a compilar +char outfilename[256]; // archivo de salida +char edivrun_lib[256]; // archivo stub (distinto para cada sistema) + +byte listados; // +1 = genera listado EML; +2 = genera tabla de objetos +byte debug; // 1 = Compilar en modo de depurado +byte noexe; // 1 = no crea un ejecutable + +int n_errors; +int n_warnings; +int linea; + +// Información sobre los errores + +/*int numero_error=-1; +int linea_error; +int columna_error;*/ + +word error_25; // Para emitir "se esperaba una sentencia" + + +// Prototipos + +void * e_malloc(size_t size); // un malloc con mensaje de error +void errormem(); // mensaje "memoria insuficiente" +void save_error(word tipo); // guarda una posición de error +void error(word tipo,word num, ...);// error de compilación +void warning(int num, ...); // warning en el proceso +//void c_error(int num); + +#endif // __MAIN_H \ No newline at end of file diff --git a/ediv/src/ediv/modulos.c b/ediv/src/ediv/modulos.c new file mode 100644 index 0000000..e41bafc --- /dev/null +++ b/ediv/src/ediv/modulos.c @@ -0,0 +1,378 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifdef _WIN32 + #include "dll_load.h" + #include +#else + #include + #include + #include +#endif + +#include +#include +#include "modulos.h" +#include "extern.h" +#include "edivcfg/iniparser.h" + +#include "language.h" + +int imem_temp; +int iloc_temp; + +// obtiene el nombre esencial de la libreria (sin extension ni path) + +void get_rawname(char* completo, char* rawname) +{ + char* p=completo; + int i; + + for(i=strlen(completo)-1;i>0;i--) + if(completo[i]=='\\' || completo[i]=='/') { + p=&completo[i+1]; + break; + } + + strcpy(rawname,p); + i=strlen(rawname); + + #ifdef _WIN32 + if (rawname[i-4]=='.' && (rawname[i-3]=='d' || rawname[i-3]=='D') + && (rawname[i-2]=='l' || rawname[i-2]=='L') + && (rawname[i-1]=='l' || rawname[i-1]=='L')) + + rawname[i-4]=0; + + #else + if(rawname[i-3]=='.' && (rawname[i-2]=='s' || rawname[i-2]=='S') + && (rawname[i-1]=='o' || rawname[i-1]=='O')) + + rawname[i-3]=0; + #endif +} + + +// compara prioridades de dos dlls, para el qsort descendente + +int compara(const void* _a, const void* _b) +{ + struct _dlls a=*(struct _dlls*)_a; + struct _dlls b=*(struct _dlls*)_b; + return a.prioridadb.prioridad?-1:0); +} + +int compara2(const void* _a, const void* _b) +{ + int a=*(int*)_a; + int b=*(int*)_b; + return dlls[a].prioridaddlls[b].prioridad?-1:0); +} + + +void dll_func() // ke original, no? XD +{ + char dllkey[256]="dll_priority:"; + char rawname[256]; + int carga=1; + char *dir=NULL; + int i; + + #ifdef _WIN32 + int buscafich; + struct _finddata_t fichero_dll; // busqueda de DLLs + char mask[256]; + #else + DIR *directorio; + struct dirent *fichero_dll; + #endif + + numdlls=0; + n_externs=0; + + #ifdef _WIN32 + // Inicializa la carga de DLLs + CheckWindowsVersion(); + InitializeDLLLoad(); + #endif + + #ifdef _WIN32 + if (ini) + dir=iniparser_getstr(ini,"dll:windll"); + + if (!dir) + dir="dll"; + + strcpy(mask,dir); + strcat(mask,"\\*.dll"); + + // Busca las DLLs que hay en el directorio + buscafich = _findfirst(mask, &fichero_dll); + if (buscafich==-1) { + printf(translate(43)); // no hay dlls + exit(1); + } + + #ifdef _DEBUG + printf("dbg: DLL encontrada: %s\n",fichero_dll.name); + #endif + + sprintf(fichdll,"%s\\%s",dir,fichero_dll.name); + + get_rawname(fichero_dll.name,rawname); + strcat(dllkey,rawname); + + if (ini) + if (iniparser_getint(ini,dllkey,0)<=P_NUNCA) + carga=0; + + if (carga) + if(!leedll()) { + dlls[numdlls].prioridad=0; + // guarda el nombre de fichero en la tabla de DLLs + dlls[0].nombre=(char*)e_malloc(strlen(rawname)+1); + strcpy(dlls[0].nombre,rawname); + + // importa las funciones de la DLL + if (ini) + dlls[numdlls].prioridad=iniparser_getint(ini,dllkey,dlls[numdlls].prioridad); + + numdlls=1; + } + + // hace lo mismo con el resto + while(1) { + if(_findnext(buscafich,&fichero_dll)==0) { + #ifdef _DEBUG + printf("dbg: DLL encontrada: %s\n",fichero_dll.name); + #endif + carga=1; + sprintf(fichdll,"%s\\%s",dir,fichero_dll.name); +// dlls[numdlls].nfuncs=0; + dlls[numdlls].prioridad=0; + get_rawname(fichero_dll.name,rawname); + strcpy(dllkey,"dll_priority:"); + strcat(dllkey,rawname); + if(ini) if(iniparser_getint(ini,dllkey,0)<=P_NUNCA) carga=0; + if(carga) if(!leedll()) { + dlls[numdlls].nombre=(char*)e_malloc(strlen(rawname)+1); + strcpy(dlls[numdlls].nombre,rawname); + dlls[numdlls].usado=0; + if(ini) dlls[numdlls].prioridad=iniparser_getint(ini,dllkey,dlls[numdlls].prioridad); + numdlls++; + } + } + else + break; + } + + #else // si estamos en Linux + + if(ini) dir=iniparser_getstr(ini,"dll:nixdll")); + if(!dir) dir="so"; + + directorio=opendir(dir); + if(!directorio) { + printf(translate(44),dir); // no hay directorio so/ + exit(1); + } + // Nos saltamos las dos primeras entradas "./" y "../" + for(i=0;i<2;i++) { + fichero_dll=readdir(directorio); + if(fichero_dll==0) { + printf(translate(43)); // no hay so's + exit(1); + } + } + // Busca las .so + while (1) { + fichero_dll=readdir(directorio); + if(fichero_dll==0) + break; + if(fichero_dll->d_type==DT_REG) { + char dllkey[256]="dll_priority:"; + #ifdef _DEBUG + printf("dbg: Librería encontrada: %s/%s\n",dir,fichero_dll->d_name); + #endif + carga=1; + sprintf(fichdll,"%s/%s",dir,fichero_dll->d_name); +// dlls[numdlls].nfuncs=0; + dlls[numdlls].prioridad=0; + get_rawname(fichero_dll->d_name,rawname); + strcpy(dllkey,"dll_priority:"); + strcat(dllkey,rawname); + if(ini) if(iniparser_getint(ini,dllkey,0)<=P_NUNCA) carga=0; + if(carga) if(!leedll()) { + dlls[numdlls].nombre=(char*)e_malloc(strlen(rawname)+1); + strcpy(dlls[numdlls].nombre,rawname); + dlls[numdlls].usado=0; + if(ini) dlls[numdlls].prioridad=iniparser_getint(ini,dllkey,dlls[numdlls].prioridad); + numdlls++; + } + } + } + + #endif + + if(numdlls==0) { + printf(translate(43)); // no hay librerias + exit(1); + } + + nuevo_orden=e_malloc(numdlls*4); + for(i=0;iP_NUNCA) && (dlls[numdlls].usado || dlls[numdlls].prioridad>=P_SIEMPRE)) { + #ifdef _DEBUG + printf("dbg: Se requiere %s (id=%d)\n",dlls[numdlls].nombre,numdlls); + #endif + #ifdef _WIN32 + if(ini) dir=iniparser_getstr(ini,"dll:windll"); + if(!dir) dir="dll"; + #else + if(ini) dir=iniparser_getstr(ini,"dll:nixdll"); + if(!dir) dir="so"; + #endif + sprintf(fichdll,"%s\\%s.dll",dir,dlls[numdlls].nombre); + if(leedll()) { + printf(translate(45),dlls[numdlls].nombre); // error al cargar libreria + exit(1); + } + } + } +} + + +int leedll() +{ +#ifdef _WIN32 + TYPEOF_ExportaFuncs *ExportaFuncs; + HINSTANCE hDLL; +// TYPEOF_extfunc *extfunc; // *** PRUEBA *** + + // Carga la DLL + hDLL=LoadDLL(fichdll); + + if(hDLL==NULL) { + printf(translate(46),fichdll); // no puedo cargar libreria + return 1; + } + + // Inicializa y ejecuta la funcion ExportaFuncs de la DLL + + ExportaFuncs=NULL; + + ExportaFuncs=(TYPEOF_ExportaFuncs *)GetDLLProcAddress(hDLL,"ExportaFuncs"); + + if(ExportaFuncs==NULL) { + printf(translate(47),fichdll); // exportafuncs no encontrado + FreeDLL(hDLL); + return 1; + } + + #ifdef DEBUG_DLL + printf("dbg: ExportaFuncs encontrado!! :D\n"); + #endif + + ExportaFuncs(EXPORTAFUNCS_PARAMS); + +/***** PRUEBA ****** PRUEBA ***** PRUEBA ***** PRUEBA ***** + if(n_externs==5) { + extfunc=ext_funcs[4].hfuncion; + putparm("hola"); + extfunc(params,sp); + } + ***** PRUEBA ****** PRUEBA ***** PRUEBA ***** PRUEBA *****/ + + FreeDLL(hDLL); + +#else // linux + + TYPEOF_ExportaFuncs *ExportaFuncs; + void *hDLL; + char *errordll; +// TYPEOF_extfunc *extfunc; // *** PRUEBA *** + + // Carga la DLL + hDLL=dlopen(fichdll,RTLD_NOW); + + if(!hDLL) { + printf(translate(46),fichdll,dlerror()); // no puedo cargar libreria + return 1; + } + + // Inicializa y ejecuta la funcion ExportaFuncs de la DLL + + ExportaFuncs=NULL; + + ExportaFuncs=(TYPEOF_ExportaFuncs *) dlsym(hDLL,"ExportaFuncs"); + + if((errordll=dlerror())!=NULL) { + printf(translate(47),fichdll,errordll); // exportafuncs no encontrado + dlclose(hDLL); + return 1; + } + + #ifdef DEBUG_DLL + printf("dbg: ExportaFuncs encontrado!! :D\n"); + #endif + + ExportaFuncs(EXPORTAFUNCS_PARAMS); + +/***** PRUEBA ****** PRUEBA ***** PRUEBA ***** PRUEBA ***** + //if(n_externs==3) { + extfunc=ext_funcs[1].hfuncion; + putparm(63); + putparm(30); + putparm(24); + putparm(6); + extfunc(params,sp); + //} + ***** PRUEBA ****** PRUEBA ***** PRUEBA ***** PRUEBA *****/ + + dlclose(hDLL); +#endif + + return 0; +} diff --git a/ediv/src/ediv/modulos.h b/ediv/src/ediv/modulos.h new file mode 100644 index 0000000..b79317a --- /dev/null +++ b/ediv/src/ediv/modulos.h @@ -0,0 +1,27 @@ +/*************************************************************************** + modulos.h - description + ------------------- + begin : Sat Jun 23 2001 + copyright : (C) 2001 by Sion Entertainment + email : bugs@edivcentral.com + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef __MODULOS_H +#define __MODULOS_H + +int* nuevo_orden; + +int leedll(); +void dll_func(); +void dll_func2(); + +#endif \ No newline at end of file diff --git a/ediv/src/ediv/parser.c b/ediv/src/ediv/parser.c new file mode 100644 index 0000000..d8984e2 --- /dev/null +++ b/ediv/src/ediv/parser.c @@ -0,0 +1,3642 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 "main.h" +#include "parser.h" +#include "compiler.h" +#include "lower.h" +#include "expresion.h" +#include "extern.h" +#include "modulos.h" + +// Para los objetos predefinidos (DLL) +#ifdef _WIN32 +#pragma warning(disable:4018) // Signed/Unsigned Mismatch :) +#endif + +int crea_objeto(byte * nombre) +{ + struct objeto * * ptr_o; + byte ** ptr, * _ivnom, h; + + _ivnom=ivnom.b; *ivnom.p++=0; *ivnom.p++=0; h=0; + while (*ivnom.b=lower[*nombre++]) h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + ivnom.b++; if (ivnom.b-vnom>max_obj*long_med_id) return 1; // error "sobrepasado buffer de nombres de objeto" + ptr=&vhash[h]; + while (*ptr && strcmp((char *)(ptr+2),(char *)_ivnom+8)) ptr=(byte**)*ptr; + if (!strcmp((byte *)(ptr+2),_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + + ptr_o=(void*)(ptr+1); o=*ptr_o; pieza=p_id; + + // TODO: TESTEAR!!! + + // busca si el id encontrado se encuentra en la misma struct + while(o!=NULL && ((*o).member!=member)) o=(*o).anterior; + if(o==NULL) { // ok, no hay problema + o=iobj++; (*o).anterior=*ptr_o; *ptr_o=o; + (*o).name=(byte*)(ptr_o+1); + (*o).member=member; + (*o).param=0; + if (num_obj++==max_obj) return 3; // error "demasiados objetos" + } else { + return 2; // dos nombres iguales en el mismo nivel de struct -> "el nombre no es nuevo" + } + + } else { + *ptr=_ivnom; ptr_o=(void*)(_ivnom+4); *ptr_o=o=iobj++; // id nuevo + (*o).name=(byte*)_ivnom+8; + (*o).member=member; + if (num_obj++==max_obj) return 3; // error "demasiados objetos" + } + + (*o).dll=numdlls; +// (*o).usado_dll=0; + + return 0; +} + + +//////////////////// +// PRECOMPILACIÓN // +//////////////////// + +void psintactico(void) +{ + byte * _ivnom=ivnom.b; + + longitud_textos=0; + source=prog; + + do { + plexico(); + } while (pieza!=p_ultima); + + ivnom.b=_ivnom; + source=prog; + _source=source; + coment=0; +} + +void plexico(void) +{ + byte ** ptr, * _ivnom, h, * _source=source; + struct lex_ele * e; + + if (!coment) { + old_linea=linea; + old_ierror=ierror; + old_ierror_end=ierror_end; + } + +lex_scan: + + ierror=_source; + + switch ((int)lex_case[*_source]) { // Puntero a un lex_ele o l_??? + + case l_err: + if (coment) { pieza=p_rem; _source++; } + else error(0,5); // carácter no reconocido + _source++; + break; + + case l_eof: + pieza=p_ultima; + if (coment) error(0,1); // llegó el final dentro de un comentario + break; + + case l_cr: + linea++; + if (*_source==cr && *(_source+1)==lf) _source+=2; + else _source++; + + ultima_linea=_source; + goto lex_scan; + + case l_id : + if (coment) { pieza=p_rem; _source++; break; } + + _ivnom=ivnom.b; + *ivnom.p++=0; + *ivnom.p++=0; + h=0; + + while (*ivnom.b=lower[*_source++]) + h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + + ivnom.b++; + _source--; + if (ivnom.b-vnom>max_obj*long_med_id) error(0,2); // Excedida la capacidad del vector de nombres + + ptr=&vhash[h]; + while (*ptr && strcmp((byte *)(ptr+2),_ivnom+8)) + ptr=(void*)*ptr; + + if (!strcmp((byte *)(ptr+2),_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + pieza=(int)*(ptr+1); + if (pieza<256 && pieza>=0) { // palabra reservada (token) + if (pieza==p_rem) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + } else { // objeto (id anterior) + pieza=p_id; + } + } + else { // id nuevo + ivnom.b=_ivnom; // lo saca de vnom + pieza=p_id; + } + + break; + + case l_spc: + while ((*++_source)==' '); + goto lex_scan; + + case l_lit: + if (coment) { pieza=p_rem; _source++; break; } + + pieza=p_lit; // Literal entre dos h + h=*_source; + _ivnom=ivnom.b; + + do { + _source++; + + if (*_source==cr || *_source==lf) { + error(0,3); // literal sin cerrar + break; + } + + if (*_source==h) { + if (*(_source+1)==h) *_ivnom=*++_source; + else *_ivnom=0; + } + else + *_ivnom=*_source; + + } while (*_ivnom++); + + _source++; + longitud_textos+=(strlen(ivnom.b)+4)/4; + ivnom.b=_ivnom; // lo saca de vnom + break; + + case l_num: + if (coment) { pieza=p_rem; _source++; break; } + + pieza=p_num; + pieza_num=0; + + if (*_source=='0' && lower[*(_source+1)]=='x') { + _source+=2; + while ((int)lex_case[*_source]==l_num || + (lower[*_source]>='a' && lower[*_source]<='f')) { + if ((int)lex_case[*_source]==l_num) + pieza_num=pieza_num*16+*_source++-0x30; + else + pieza_num=pieza_num*16+lower[*_source++]-'a'+10; + } + } + else + do { + pieza_num=pieza_num*10+*_source++-0x30; + } while ((int)lex_case[*_source]==l_num); + + break; + + default: // puntero a un lex_ele + e=lex_case[*_source++]; + _ivnom=_source; + pieza=(*e).token; + + while (e=(*e).siguiente) { + while (*_source!=(*e).caracter && (*e).alternativa) + e=(*e).alternativa; + + if (*_source++==(*e).caracter && (*e).token) { + pieza=(*e).token; + _ivnom=_source; + } + } + _source=_ivnom; + + if (pieza==p_rem && !coment) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + + if (pieza==p_ini_rem) { + coment++; + do { + source=_source; + plexico(); + _source=source; + } while (pieza!=p_end_rem); + coment--; + goto lex_scan; + } + + if (pieza==p_ultima) { + if (coment) error(0,1); // llegó el final dentro de un comentario + else error(0,4); // símbolo no reconocido (¡¡creo!!) + } + + break; + + } + + source=_source; + ierror_end=_source-1; +} + + +////////////////////////////////////// +// ANÁLISIS SINTÁCTICO DEL PROGRAMA // +////////////////////////////////////// + +void sintactico(void) +{ + struct objeto * ob, * member2; + int _imem,_imem_old,num_par,n; + byte *oimemptr; + int _itxt,dup; +// byte * old_source,*nombre_dll; +// char cWork[256]; +// int num_extern; + + lexico(); + + // + // Opciones de compilacion + // + // p_compiler_options {opcion} {;} + // + +/* max_process=0; // Valores de las opciones por defecto + ignore_errors=0; + free_sintax=0; + extended_conditions=0; + simple_conditions=0; + comprueba_rango=1; + comprueba_id=1; + comprueba_null=1; + hacer_strfix=1; + optimizar=1;*/ + + if(case_sensitive) { + memcpy(lower+129,"üéâäàåçêëèïîìäåéææôöòûùÿöü¢£¥áíóú",35); + memcpy(lower+'A',"ABCDEFGHIJKLMNOPQRSTUVWXYZ",26); + lower['Ñ']='Ñ'; + } + + if (pieza==p_compiler_options) { + lexico(); + do { + if (pieza==p_ptocoma) { lexico(); break; } + if (pieza==p_coma) lexico(); + if (pieza==p_id && (*o).tipo==tcons) { + switch((*o).cons.valor) { + case 0: // _max_process + lexico(); + if (pieza!=p_asig) error(3,7); // se esperaba '=' + lexico(); + max_process=constante(); + if (max_process<0) max_process=0; + #ifdef _DEBUG + printf("dbg: max_process=%d\n",max_process); + #endif + break; + case 1: // _extended_conditions + lexico(); + extended_conditions=1; + break; + case 2: // _simple_conditions + lexico(); + simple_conditions=1; + break; + case 3: // _case_sensitive + lexico(); + case_sensitive=1; + memcpy(lower+129,"üéâäàåçêëèïîìäåéææôöòûùÿöü¢£¥áíóú",35); + memcpy(lower+'A',"ABCDEFGHIJKLMNOPQRSTUVWXYZ",26); + lower['Ñ']='Ñ'; + break; + case 4: // _ignore_errors + lexico(); + ignore_errors=1; + break; + case 5: // _free_sintax + lexico(); + free_sintax=1; + break; + case 6: // _no_check + lexico(); + comprueba_rango=0; + comprueba_id=0; + comprueba_null=0; + break; + case 7: // _no_strfix + lexico(); + hacer_strfix=0; + break; + case 8: // _no_optimization + lexico(); + optimizar=0; + break; + case 9: // _no_range_check + lexico(); + comprueba_rango=0; + break; + case 10: // _no_id_check + lexico(); + comprueba_id=0; + break; + case 11: // _no_null_check + lexico(); + comprueba_null=0; + break; + default: + error(0,8); // se esperaba una opción de compilación + break; + } + } else { + if (!free_sintax) { + if (pieza==p_program) { + error(3,9); // se esperaba ';' (¡creo!) + //lexico(); + break; + } + else { + error(0,8); // se esperaba una opción de compilación + //lexico(); + // puede ser peligroso + while(pieza!=p_coma && pieza!=p_ptocoma && pieza!=p_program) + lexico(); + } + } else break; + } + } while (1); + } + + // + // Cabecera + // + // p_program p_id {;} + // + + save_error(0); + if (pieza!=p_program && pieza!=p_setup_program) error(4,44); // esperando PROGRAM + + if (pieza==p_setup_program) + warning(1); // característica desfasada + + //if ((lins=fopen(cWork,"wb"))==NULL) c_error(0,0); // cWork="system\exec.ins" + + inicio_sentencia(); lexico(); + if (pieza!=p_id) error(1,45); // esperando el nombre del programa + + ob=o; + if ((*ob).tipo!=tnone) error(0,30); // el nombre no es nuevo + (*ob).tipo=tproc; + (*ob).proc.bloque=bloque_actual=ob; + (*ob).proc.offset=0; + (*ob).proc.num_par=0; + lexico(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + final_sentencia(); + + // + // Import (DESFASADO), se ignora + // + // {p_import p_lit {;}} + // + + while (pieza==p_import) { + warning(2); // sintaxis antigua + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(1,46); // se esperaba un literal + lexico(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + // + // Zona de constantes + // + // [ p_const {;} { p_id p_asig {; | ,} } ] + // + + if (pieza==p_const) { + pasa_ptocoma(); + while (pieza==p_id) { + ob=o; + if ((*ob).tipo!=tnone && (*ob).tipo!=tcons) error(0,30); // el nombre no es nuevo + (*ob).tipo=tcons; + lexico(); if (pieza!=p_asig) error(3,7); // esperando '=' + + lexico(); + if (pieza==p_lit || (pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + (*ob).cons.literal=1; + else + (*ob).cons.literal=0; + + (*ob).cons.valor=constante(); + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + } + + // + // Variables globales, pueden usarse en expresiones constantes + // + // := p_id [ p_asig ] {;} + // + // := p_id p_corab ( p_corce p_asig + // | p_corce [ p_asig ] ) {;} + // + // := ( | [ [p_dup] p_abrir p_cerrar ] ) + // [ p_coma ] + // + + if (pieza==p_global) { + pasa_ptocoma(); + while (pieza==p_id || pieza==p_int || pieza==p_pointer || pieza==p_struct || pieza==p_string || pieza==p_byte || pieza==p_word) { + + if (pieza==p_struct) { // Struct global + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + lexico(); if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + analiza_pointer_struct(tpsgl,imem,ob); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,imem++); + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; member=ob; lexico(); + + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsglo; (*ob).sglo.offset=_imem=imem; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sglo.items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sglo.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sglo.items3=constante())<0) error(4,43); // reidem + } else (*ob).sglo.items3=-1; + } else { (*ob).sglo.items2=-1; (*ob).sglo.items3=-1; } + member=member2; + (*ob).sglo.totalitems=(*ob).sglo.items1+1; + if ((*ob).sglo.items2>-1) (*ob).sglo.totalitems*=(*ob).sglo.items2+1; + if ((*ob).sglo.items3>-1) (*ob).sglo.totalitems*=(*ob).sglo.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // espernado ']' + } else { + (*ob).sglo.totalitems=1; + (*ob).sglo.items1=0; (*ob).sglo.items2=-1; (*ob).sglo.items3=-1; + } + if (((*ob).sglo.len_item=analiza_struct(_imem))==0) error(0,47); // estructua vacia + member=NULL; lexico(); + imem=(*ob).sglo.offset; dup=(*ob).sglo.totalitems+1; + if (dup>1) { + test_buffer(&mem,&imem_max,imem+(*ob).sglo.len_item*(*ob).sglo.totalitems); + test_buffer(&frm,&ifrm_max,imem+(*ob).sglo.len_item*(*ob).sglo.totalitems); + while (--dup) { + memcpy(&mem[imem],&mem[_imem],(*ob).sglo.len_item<<2); + memcpy(&frm[imem],&frm[_imem],(*ob).sglo.len_item<<2); + imem+=(*ob).sglo.len_item; + } + } imem=_imem; + if (pieza==p_asig) { + save_error(1); + lexico(); tglo_init(0); + if (imem-_imem-1>=(*ob).sglo.len_item*(*ob).sglo.totalitems) error(4,55); // demasiados valores para la estructura + } while (pieza==p_ptocoma) lexico(); + + imem=_imem+(*ob).sglo.len_item*(*ob).sglo.totalitems; + test_buffer(&mem,&imem_max,imem); + } + + } else if (pieza==p_string) { // Cadena global + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpcgl,imem); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcglo; + _imem=imem; + (*ob).cglo.offset=_imem+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cglo.totalen=255; + } else { + if (((*ob).cglo.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cglo.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cglo.totalen=255; + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cglo.totalen+1) + error(4,49); // literal demasiado largo + imem=_imem+1+((*ob).cglo.totalen+5)/4; // ej. c[32] -> c[0]..c[32],NUL + test_buffer(&mem,&imem_max,imem); + strcpy((char*)&mem[_imem+1],(char*)&mem[pieza_num]); + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + imem=_imem+1+((*ob).cglo.totalen+5)/4; + test_buffer(&mem,&imem_max,imem); + } mem[_imem]=0xDAD00000|(*ob).cglo.totalen; + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Tabla Byte global + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpbgl,imem); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbglo; (*ob).bglo.offset=_imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + (*ob).bglo.len1=imemptr-oimemptr-1; + (*ob).bglo.len2=-1; + (*ob).bglo.len3=-1; + (*ob).bglo.totalen=((*ob).bglo.len1+4)/4; + } else { + if (((*ob).bglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bglo.len3=constante())<0) error(4,40); // reidem + } else (*ob).bglo.len3=-1; + } else { (*ob).bglo.len2=-1; (*ob).bglo.len3=-1; } + + (*ob).bglo.totalen=(*ob).bglo.len1+1; + if ((*ob).bglo.len2>-1) (*ob).bglo.totalen*=(*ob).bglo.len2+1; + if ((*ob).bglo.len3>-1) (*ob).bglo.totalen*=(*ob).bglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + if (imemptr-oimemptr>(*ob).bglo.totalen) error(4,48); // demasiados valores para la tabla + } (*ob).bglo.totalen=((*ob).bglo.totalen+3)/4; + } + } else { // Byte global + (*ob).tipo=tbglo; (*ob).bglo.offset=imem; + (*ob).bglo.len1=0; + (*ob).bglo.len2=-1; + (*ob).bglo.len3=-1; + (*ob).bglo.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + mem[imem]=constante(); + if (mem[imem]<0 || mem[imem]>255) error(4,50); // valor byte fuera de rango + } + } imem=_imem+(*ob).bglo.totalen; test_buffer(&mem,&imem_max,imem); + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Tabla Word global + + lexico(); + + if (pieza==p_pointer) { // Puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwgl,imem); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twglo; (*ob).wglo.offset=_imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + (*ob).wglo.len1=(imemptr-oimemptr)/2-1; + (*ob).wglo.len2=-1; + (*ob).wglo.len3=-1; + (*ob).wglo.totalen=((*ob).wglo.len1+2)/2; + } else { + if (((*ob).wglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wglo.len3=constante())<0) error(4,40); // reidem + } else (*ob).wglo.len3=-1; + } else { (*ob).wglo.len2=-1; (*ob).wglo.len3=-1; } + + (*ob).wglo.totalen=(*ob).wglo.len1+1; + if ((*ob).wglo.len2>-1) (*ob).wglo.totalen*=(*ob).wglo.len2+1; + if ((*ob).wglo.len3>-1) (*ob).wglo.totalen*=(*ob).wglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + if (imemptr-oimemptr>(*ob).wglo.totalen*2) error(4,48); // demasiados valores para la tabla + } (*ob).wglo.totalen=((*ob).wglo.totalen+1)/2; + } + } else { // Word global + (*ob).tipo=twglo; (*ob).wglo.offset=imem; + (*ob).wglo.len1=0; + (*ob).wglo.len2=-1; + (*ob).wglo.len3=-1; + (*ob).wglo.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + mem[imem]=constante(); + if (mem[imem]<0 || mem[imem]>65535) error(4,51); // valor word fuera de rango + } + } imem=_imem+(*ob).wglo.totalen; test_buffer(&mem,&imem_max,imem); + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpigl,imem); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { // Tabla global + lexico(); + (*ob).tipo=ttglo; (*ob).tglo.offset=_imem=imem; + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + tglo_init(3); + (*ob).tglo.len1=imem-_imem-1; + (*ob).tglo.len2=-1; + (*ob).tglo.len3=-1; + (*ob).tglo.totalen=imem-_imem; + } else { + if (((*ob).tglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tglo.len3=constante())<0) error(4,40); // reidem + } else (*ob).tglo.len3=-1; + } else { (*ob).tglo.len2=-1; (*ob).tglo.len3=-1; } + (*ob).tglo.totalen=(*ob).tglo.len1+1; + if ((*ob).tglo.len2>-1) (*ob).tglo.totalen*=(*ob).tglo.len2+1; + if ((*ob).tglo.len3>-1) (*ob).tglo.totalen*=(*ob).tglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); tglo_init(3); + if (imem-_imem>(*ob).tglo.totalen) error(4,48); // demasiados valores para la tabla + } + } + imem=_imem+(*ob).tglo.totalen; + test_buffer(&mem,&imem_max,imem); + + } else { // Variable global + + (*ob).tipo=tvglo; (*ob).vglo.offset=imem; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + } + } + + // + // Variables locales, no se pueden usar en expresiones constantes + // + // := p_id [ p_asig ] {;} + // + // := p_id p_corab ( p_corce p_asig + // | p_corce [ p_asig ] ) {;} + // + + if (pieza==p_local) { + pasa_ptocoma(); + while (pieza==p_id || pieza==p_int || pieza==p_pointer || pieza==p_struct || pieza==p_string || pieza==p_byte || pieza==p_word) { + + if (pieza==p_struct) { + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + lexico(); if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct_local: + analiza_pointer_struct(tpslo,iloc,ob); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,iloc++); + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct_local; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; member=ob; lexico(); + + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsloc; (*ob).sloc.offset=_imem=iloc; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sloc.items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items3=constante())<0) error(4,43); // reidem + } else (*ob).sloc.items3=-1; + } else { (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; } + member=member2; + (*ob).sloc.totalitems=(*ob).sloc.items1+1; + if ((*ob).sloc.items2>-1) (*ob).sloc.totalitems*=(*ob).sloc.items2+1; + if ((*ob).sloc.items3>-1) (*ob).sloc.totalitems*=(*ob).sloc.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sloc.totalitems=1; + (*ob).sloc.items1=0; (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; + } + if (((*ob).sloc.len_item=analiza_struct_local(_imem))==0) error(0,47); // estructura vacia + member=NULL; lexico(); + iloc=(*ob).sloc.offset; dup=(*ob).sloc.totalitems+1; + if (dup>1) { + test_buffer(&loc,&iloc_max,iloc+(*ob).sloc.len_item*(*ob).sloc.totalitems); + test_buffer(&frm,&ifrm_max,imem+(*ob).sloc.len_item*(*ob).sloc.totalitems); + while (--dup) { + memcpy(&loc[iloc],&loc[_imem],(*ob).sloc.len_item<<2); + memcpy(&frm[iloc],&frm[_imem],(*ob).sloc.len_item<<2); + iloc+=(*ob).sloc.len_item; + } + } iloc=_imem; + if (pieza==p_asig) { + save_error(1); lexico(); tloc_init(0); + if (iloc-_imem-1>=(*ob).sloc.len_item*(*ob).sloc.totalitems) error(4,55); // demasiados valores para la estructura + } while (pieza==p_ptocoma) lexico(); + iloc=_imem+(*ob).sloc.len_item*(*ob).sloc.totalitems; + test_buffer(&loc,&iloc_max,iloc); + } + + } else if (pieza==p_string) { // Cadena local + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero5: + ob=analiza_pointer(tpclo,iloc); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero5; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcloc; + _imem=iloc; + (*ob).cloc.offset=_imem+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cloc.totalen=255; + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cloc.totalen+1) + error(4,49); // literal demasiado largo + iloc=_imem+1+((*ob).cloc.totalen+5)/4; // ej. c[32] -> c[0]..c[32],NUL + test_buffer(&loc,&iloc_max,iloc); + strcpy((char*)&loc[_imem+1],(char*)&mem[pieza_num]); + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + iloc=_imem+1+((*ob).cloc.totalen+5)/4; + test_buffer(&loc,&iloc_max,iloc); + } loc[_imem]=0xDAD00000|(*ob).cloc.totalen; + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Tabla Byte local + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero6: + ob=analiza_pointer(tpblo,iloc); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero6; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbloc; (*ob).bloc.offset=_imem=iloc; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&loc[iloc]; + tloc_init(2); + (*ob).bloc.len1=imemptr-oimemptr-1; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=((*ob).bloc.len1+4)/4; + } else { + if (((*ob).bloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).bloc.len3=-1; + } else { (*ob).bloc.len2=-1; (*ob).bloc.len3=-1; } + + (*ob).bloc.totalen=(*ob).bloc.len1+1; + if ((*ob).bloc.len2>-1) (*ob).bloc.totalen*=(*ob).bloc.len2+1; + if ((*ob).bloc.len3>-1) (*ob).bloc.totalen*=(*ob).bloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&loc[iloc]; + tloc_init(2); + if (imemptr-oimemptr>(*ob).bloc.totalen) error(4,48); // demasiados valores para la tabla + } (*ob).bloc.totalen=((*ob).bloc.totalen+3)/4; + } + } else { // Byte local + (*ob).tipo=tbloc; (*ob).bloc.offset=iloc; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + loc[iloc]=constante(); + if (loc[iloc]<0 || loc[iloc]>255) error(4,50); // valor byte fuera de rango + } + } iloc=_imem+(*ob).bloc.totalen; test_buffer(&loc,&iloc_max,iloc); + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Tabla Word local + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero7: + ob=analiza_pointer(tpwlo,iloc); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero7; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twloc; (*ob).wloc.offset=_imem=iloc; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&loc[iloc]; + tloc_init(1); + (*ob).wloc.len1=(imemptr-oimemptr)/2-1; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=((*ob).wloc.len1+2)/2; + } else { + if (((*ob).wloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).wloc.len3=-1; + } else { (*ob).wloc.len2=-1; (*ob).wloc.len3=-1; } + + (*ob).wloc.totalen=(*ob).wloc.len1+1; + if ((*ob).wloc.len2>-1) (*ob).wloc.totalen*=(*ob).wloc.len2+1; + if ((*ob).wloc.len3>-1) (*ob).wloc.totalen*=(*ob).wloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&loc[iloc]; + tloc_init(1); + if (imemptr-oimemptr>(*ob).wloc.totalen*2) error(4,48); // demasiados valores para la tabla + } (*ob).wloc.totalen=((*ob).wloc.totalen+1)/2; + } + } else { // Word local + (*ob).tipo=twloc; (*ob).wloc.offset=iloc; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + loc[iloc]=constante(); + if (loc[iloc]<0 || loc[iloc]>65535) error(4,51); // valor word fuera de rango + } + } iloc=_imem+(*ob).wloc.totalen; test_buffer(&loc,&iloc_max,iloc); + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero8: + ob=analiza_pointer(tpilo,iloc); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero8; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { // Tabla local + lexico(); + (*ob).tipo=ttloc; (*ob).tloc.offset=_imem=iloc; + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + tloc_init(3); + (*ob).tloc.len1=iloc-_imem-1; + (*ob).tloc.len2=-1; + (*ob).tloc.len3=-1; + (*ob).tloc.totalen=iloc-_imem; + } else { + if (((*ob).tloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).tloc.len3=-1; + } else { (*ob).tloc.len2=-1; (*ob).tloc.len3=-1; } + (*ob).tloc.totalen=(*ob).tloc.len1+1; + if ((*ob).tloc.len2>-1) (*ob).tloc.totalen*=(*ob).tloc.len2+1; + if ((*ob).tloc.len3>-1) (*ob).tloc.totalen*=(*ob).tloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); tloc_init(3); + if (iloc-_imem>(*ob).tloc.totalen) error(4,48); } // demasiados valores para la tabla + } + iloc=_imem+(*ob).tloc.totalen; + test_buffer(&loc,&iloc_max,iloc); + + } else { // Variable local + + (*ob).tipo=tvloc; (*ob).vloc.offset=iloc; + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + } + } + + // + // Código principal + // + + // Genera el salto al inicio del código (long_header) + + mem[0]=0; mem[1]=imem; iloc_len=iloc; + + g2(ltyp,(int)bloque_actual); + g2(lcbp,0); + inicio=0; final=imem-1; + grabar_sentencia(); + + // otra vez import... se ha usado sintaxis de DIV 1. + // de nuevo le decimos k se lo meta por las narices... + + if (pieza==p_import) { + warning(2); // sintaxis antigua + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(1,46); // se esperaba un literal + lexico(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + // esta instrucción realiza un salto a la rutina donde están los limp + // (importación de DLLs). Como esta la colocaremos al final (porque, hasta + // que lleguemos al final no sabremos qué dlls hay que importar), dejamos + // el parámetro de ljmp de momento a 0 y guardamos el offset en + // salto_import, donde al final sustituiremos el 0 por el offset adecuado. + + salto_import=imem+1; + g2(ljmp,0); + + // El primer FRAME, y la carga de variables PRIVATE, se ejecutan + // conjuntamente en el BEGIN del programa principal. + + final=imem; + + parametros=-1; + bloque_lexico=bloque_actual; + n=iloc; + analiza_private(); + if (iloc>iloc_len) iloc_len=iloc; + iloc=n; + parametros=0; + + g1(lfrm); + + if (pieza!=p_begin) error(0,56); + inicio_sentencia(); inicio=final; + lexico(); final_sentencia(); grabar_sentencia(); + + sentencia(); + + if (pieza!=p_end) error(0,57); inicio_sentencia(); + g1(lret); + pasa_ptocoma(); final_sentencia(); grabar_sentencia(); + + + // + // Procesos + // + // p_process p_id p_abrir [ id { , id } ] p_cerrar { ; } p_begin ... p_end + // + + save_error(0); + while (pieza==p_process || pieza==p_function) { + n=pieza; inicio_sentencia(); lexico(); + if (pieza!=p_id) error(1,70); // esperando el nombre del proceso o funcion + ob=o; lexico(); + if ((*ob).tipo==tproc && (*ob).usado) { + num_par=(*ob).proc.num_par; bloque_lexico=bloque_actual=ob; + _imem=(*ob).proc.offset; while(_imem) { + _imem_old=mem[_imem]; mem[_imem]=imem; _imem=_imem_old; } + } else if ((*ob).tipo==tnone) { + (*ob).usado=0; (*ob).tipo=tproc; + (*ob).proc.bloque=bloque_lexico=bloque_actual=ob; + } else error(2,30); // el nombre no es nuevo + (*ob).proc.offset=imem; (*ob).proc.num_par=0; + + g2(ltyp,(int)bloque_actual); + if (n==p_function) g1(lnop); + g2(lcbp,0); _imem=imem-1; + if (pieza!=p_abrir) error(3,22); // esperando '(' + + parametros=1; n=iloc; lexico(); + + while (pieza!=p_cerrar) { + (*ob).proc.num_par++; expresion_cpa(); + if (pieza!=p_cerrar) if (pieza!=p_coma) error(3,35); // se esperaba una coma + else { lexico(); if (pieza==p_cerrar) error(3,36); } // se esperaba otro parámetro + } + if ((*ob).usado) { + if (num_par==(*ob).proc.num_par) (*ob).usado=0; else error(0,38); // nº de parametros incorrecto + } + pasa_ptocoma(); final_sentencia(); + + if (parametros>1) { + g2(lpar,parametros-1); + } + + parametros=-1; // Para que los parámetros se puedan repetir como PRIVATE + + num_par=mem[_imem]=(*ob).proc.num_par; + + analiza_private(); parametros=0; + + if (iloc>iloc_len) iloc_len=iloc; iloc=n; + + if (pieza!=p_begin) error(0,56); lexico(); // esperando BEGIN + final=imem-1; grabar_sentencia(); + sentencia(); + if (pieza!=p_end) error(0,57); // esperando END + inicio_sentencia(); + g1(lret); + pasa_ptocoma(); final_sentencia(); grabar_sentencia(); + + save_error(0); + } + + if (pieza!=p_ultima) error(4,71); // esperando PROCESS o FUNCTION + +} + +//----------------------------------------------------------------------------- +// Lexico (lee una nueva pieza del *source) +//----------------------------------------------------------------------------- + +void lexico(void) +{ + struct objeto * * ptr_o; + byte ** ptr, * _ivnom, h, * _source=source; + struct lex_ele * e; + + int n,i; + + if (!coment) { + old_linea=linea; + old_ierror=ierror; + old_ierror_end=ierror_end; + } + +lex_scan: + + ierror=_source; + + switch ((int)lex_case[*_source]) { // Puntero a un lex_ele o l_??? + + case l_err: + if (coment) { pieza=p_rem; _source++; } + else error(0,5); // carácter no reconocido + _source++; + break; + + case l_eof: + pieza=p_ultima; + break; + + case l_cr: + linea++; + if (*_source==cr && *(_source+1)==lf) _source+=2; + else _source++; + + ultima_linea=_source; + goto lex_scan; + + case l_id : + if (coment) { pieza=p_rem; _source++; break; } + + _ivnom=ivnom.b; + *ivnom.p++=0; + *ivnom.p++=0; + h=0; + + while (*ivnom.b=lower[*_source++]) + h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + + ivnom.b++; + _source--; + if (ivnom.b-vnom>max_obj*long_med_id) error(0,2); // Excedida la capacidad del vector de nombres + + ptr=&vhash[h]; + + while (*ptr && strcmp((char *)(ptr+2),(char *)_ivnom+8)) + ptr=(byte**)*ptr; + + if (!strcmp((byte *)(ptr+2),_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + pieza=(int)*(ptr+1); + + if (pieza<256 && pieza>=0) { // palabra reservada (token) + + if (pieza==p_rem) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + + } + else { // objeto (id anterior) + + ptr_o=(void*)(ptr+1); + o=*ptr_o; + pieza=p_id; + + while(o!=NULL && ( ((*o).bloque && bloque_lexico!=(*o).bloque) || + ((*o).member!=member) )) + o=(*o).anterior; + + if(o==NULL) { // No encontrado + o=iobj++; (*o).anterior=*ptr_o; *ptr_o=o; + (*o).name=(byte*)(ptr_o+1); + (*o).member=member; + (*o).param=0; + (*o).dll=-1; + if (parametros) (*o).bloque=bloque_actual; + if (num_obj++==max_obj) + error(0,6); // excedida la capacidad de la tabla de objetos + } + else { + //printf("->->-> %s\n",(char*)_ivnom+8); + if ((*o).tipo==tcons) + pieza_num=(*o).cons.valor; + if((*o).dll!=-1) { + for(i=0;i='a' && lower[*_source]<='f')) { + if ((int)lex_case[*_source]==l_num) + pieza_num=pieza_num*16+*_source++-0x30; + else + pieza_num=pieza_num*16+lower[*_source++]-'a'+10; + } + } + else do { + pieza_num=pieza_num*10+*_source++-0x30; + } while ((int)lex_case[*_source]==l_num); + + break; + + default: // puntero a un lex_ele + + e=lex_case[*_source++]; + _ivnom=_source; + pieza=(*e).token; + + while (e=(*e).siguiente) { + + while (*_source!=(*e).caracter && (*e).alternativa) + e=(*e).alternativa; + + if (*_source++==(*e).caracter && (*e).token) { + pieza=(*e).token; + _ivnom=_source; + } + } + + _source=_ivnom; + + if (pieza==p_rem && !coment) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + + if (pieza==p_ini_rem) { + coment++; + do { + source=_source; + lexico(); + _source=source; + } while (pieza!=p_end_rem); + coment--; + goto lex_scan; + } + + if (pieza==p_ultima) { + if (coment) error(0,1); // llegó el final dentro de un comentario + else error(0,4); // símbolo no reconocido (¡¡creo!!) + } + + break; + + } + + source=_source; + ierror_end=_source-1; +} + + +//----------------------------------------------------------------------------- +// Adivina cual será la siguiente pieza lexica leida (y donde estará) +//----------------------------------------------------------------------------- + +// No genera nunca errores + +byte * next_lexico(byte * _source, int coment, int linea) +{ + byte ** ptr, * _ivnom, h; + struct lex_ele * e; + + if (!coment && linea) { + old_linea=linea; + old_ierror=ierror; + old_ierror_end=ierror_end; + } + +lex_scan: + + if (linea) ierror=_source; + next_source=_source; + + switch ((int)lex_case[*_source]) { + + case l_err: + if (coment) { _source++; goto lex_scan; } + next_pieza=0; + break; + + case l_cr : + if (linea) { + + linea++; + if (*_source==cr && *(_source+1)==lf) _source+=2; + else _source++; + + ultima_linea=_source; + goto lex_scan; + + } + else { + + if (*_source==cr && *(_source+1)==lf) _source+=2; + else _source++; + + goto lex_scan; + + } + + case l_eof: + next_pieza=0; + break; + + case l_id : + if (coment) { _source++; goto lex_scan; } + + _ivnom=ivnom.b; + *ivnom.p++=0; + *ivnom.p++=0; + h=0; + + while (*ivnom.b=lower[*_source++]) + h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + + ivnom.b++; + _source--; + ptr=&vhash[h]; + + while (*ptr && strcmp((char *)(ptr+2),(char *)_ivnom+8)) + ptr=(unsigned char **)*ptr; + + if (!strcmp((char *)(ptr+2),(char *)_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + next_pieza=(int)*(ptr+1); + if (next_pieza<256 && next_pieza>=0) { // palabra reservada (token) + if (next_pieza==p_rem) { + while (*_source!=cr) _source++; + goto lex_scan; + } + } else { // objeto (id anterior) + next_pieza=p_id; + } + } else { + ivnom.b=_ivnom; // lo saca de vnom + next_pieza=p_id; // id nuevo + } + + break; + + case l_spc: + while ((*++_source)==' '); + goto lex_scan; + + case l_lit: + if (coment) { _source++; goto lex_scan; } + next_pieza=p_lit; + break; + + case l_num: + if (coment) { _source++; goto lex_scan; } + next_pieza=p_num; + break; + + default: // puntero a un lex_ele + e=lex_case[*_source++]; + next_pieza=(*e).token; + _ivnom=_source; + + while (e=(*e).siguiente) { + while (*_source!=(*e).caracter && (*e).alternativa) + e=(*e).alternativa; + + if (*_source++==(*e).caracter && (*e).token) { + next_pieza=(*e).token; + _ivnom=_source; + } + } + + _source=_ivnom; + + if (next_pieza==p_rem && !coment) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + + if (next_pieza==p_ini_rem) { + coment++; + do { + _source=next_lexico(_source,coment,linea); + linea=next_linea; + } while (next_pieza!=p_end_rem); + coment--; + goto lex_scan; + } + + break; + + } + + next_linea=linea; + return(_source); +} + + +//----------------------------------------------------------------------------- +// Pasa varias comas o puntos y coma seguidos +//----------------------------------------------------------------------------- + +void pasa_ptocoma(void) +{ + do { + lexico(); + } while (pieza==p_ptocoma); +} + + + // + // Analiza las variables privadas de un bloque, como las locales + // + + // *** OJO *** No se debe permitir #id.tvpri + // pues fallaría a no ser que #id fuera del mismo tipo que el + // proceso actual (hermano) + +void analiza_private(void) { + struct objeto * ob, * member2; + int _imem,_imem_old,_itxt,dup; + byte *oimemptr; + + if (pieza==p_private) { + pasa_ptocoma(); + + g2(lpri,0); _imem_old=imem-1; + + while (pieza==p_id || pieza==p_int || pieza==p_pointer || pieza==p_struct || pieza==p_string || pieza==p_byte || pieza==p_word) { + + if (pieza==p_struct) { + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + lexico(); if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + if (analiza_pointer_struct(tpslo,iloc,ob)==1) { + iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + } + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; member=ob; lexico(); + + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsloc; (*ob).sloc.offset=_imem=imem; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sloc.items1=constante())<0) error(4,43); // estructura de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items3=constante())<0) error(4,43); // reidem + } else (*ob).sloc.items3=-1; + } else { (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; } + member=member2; + (*ob).sloc.totalitems=(*ob).sloc.items1+1; + if ((*ob).sloc.items2>-1) (*ob).sloc.totalitems*=(*ob).sloc.items2+1; + if ((*ob).sloc.items3>-1) (*ob).sloc.totalitems*=(*ob).sloc.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sloc.totalitems=1; + (*ob).sloc.items1=0; (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; + } + if (((*ob).sloc.len_item=analiza_struct_private(_imem))==0) error(0,47); // estructura vacia + + member=NULL; lexico(); + + imem=(*ob).sloc.offset; dup=(*ob).sloc.totalitems+1; + if (dup>1) { + test_buffer(&mem,&imem_max,imem+(*ob).sloc.len_item*(*ob).sloc.totalitems); + test_buffer(&frm,&ifrm_max,imem+(*ob).sloc.len_item*(*ob).sloc.totalitems); + while (--dup) { + memcpy(&mem[imem],&mem[_imem],(*ob).sloc.len_item<<2); + memcpy(&frm[imem],&frm[_imem],(*ob).sloc.len_item<<2); + imem+=(*ob).sloc.len_item; + } + } imem=_imem; + + if (pieza==p_asig) { + save_error(1); lexico(); tglo_init(0); + if (imem-_imem-1>=(*ob).sloc.len_item*(*ob).sloc.totalitems) error(4,55); // demasiados valores para la estructura + } while (pieza==p_ptocoma) lexico(); + + imem=_imem+(*ob).sloc.len_item*(*ob).sloc.totalitems; + (*ob).sloc.offset=iloc; iloc+=(*ob).sloc.len_item*(*ob).sloc.totalitems; + test_buffer(&mem,&imem_max,imem); + } + + } else if (pieza==p_string) { // Cadena privada + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpclo,iloc); + if (ob==NULL) continue; else iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) { // Mira si se repite un parámetro ... + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tcloc) { // Se repite un string + save_error(0); + lexico(); + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + dup=255; + } else { + dup=constante(); + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else dup=255; + if (dup!=(*ob).cloc.totalen) error(4,41); // la longitud no coincide con la declaración anterior + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + (*ob).param++; + continue; + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + + (*ob).tipo=tcloc; + _imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cloc.totalen=255; + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cloc.totalen+1) + error(4,49); // literal demasiado largo + imem=_imem+1+((*ob).cloc.totalen+5)/4; // ej. c[32] -> c[0]..c[32],NUL + test_buffer(&mem,&imem_max,imem); + strcpy((char*)&mem[_imem+1],(char*)&mem[pieza_num]); + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + imem=_imem+1+((*ob).cloc.totalen+5)/4; + test_buffer(&mem,&imem_max,imem); + } mem[_imem]=0xDAD00000|(*ob).cloc.totalen; + (*ob).cloc.offset=iloc+1; + iloc+=1+((*ob).cloc.totalen+5)/4; + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Tabla Byte privado + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpblo,iloc); + if (ob==NULL) continue; else iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tbloc) { // Se repite un byte parámetro + lexico(); + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parámetro + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) { + lexico(); + } + (*ob).param++; + continue; + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + + (*ob).tipo=tbloc; _imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + (*ob).bloc.len1=imemptr-oimemptr-1; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=((*ob).bloc.len1+4)/4; + } else { + if (((*ob).bloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).bloc.len3=-1; + } else { (*ob).bloc.len2=-1; (*ob).bloc.len3=-1; } + + (*ob).bloc.totalen=(*ob).bloc.len1+1; + if ((*ob).bloc.len2>-1) (*ob).bloc.totalen*=(*ob).bloc.len2+1; + if ((*ob).bloc.len3>-1) (*ob).bloc.totalen*=(*ob).bloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + if (imemptr-oimemptr>(*ob).bloc.totalen) error(4,48); // demasiados valores para la tabla + } (*ob).bloc.totalen=((*ob).bloc.totalen+3)/4; + } + } else { // Byte privado + (*ob).tipo=tbloc; (*ob).bloc.offset=imem; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + mem[imem]=constante(); + if (mem[imem]<0 || mem[imem]>255) error(4,50); // valor byte fuera de rango + } + } + imem=_imem+(*ob).bloc.totalen; test_buffer(&mem,&imem_max,imem); + (*ob).bloc.offset=iloc; iloc+=(*ob).bloc.totalen; + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Tabla Word privada + + lexico(); + + if (pieza==p_pointer) { // Puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwlo,iloc); + if (ob==NULL) continue; else iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==twloc) { // Se repite un word parámetro + lexico(); + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parámetro + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) { + lexico(); + } + (*ob).param++; + continue; + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + + (*ob).tipo=twloc; _imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + (*ob).wloc.len1=(imemptr-oimemptr)/2-1; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=((*ob).wloc.len1+2)/2; + } else { + if (((*ob).wloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).wloc.len3=-1; + } else { (*ob).wloc.len2=-1; (*ob).wloc.len3=-1; } + + (*ob).wloc.totalen=(*ob).wloc.len1+1; + if ((*ob).wloc.len2>-1) (*ob).wloc.totalen*=(*ob).wloc.len2+1; + if ((*ob).wloc.len3>-1) (*ob).wloc.totalen*=(*ob).wloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + if (imemptr-oimemptr>(*ob).wloc.totalen*2) error(4,48); // demasiados valores para la tabla + } (*ob).wloc.totalen=((*ob).wloc.totalen+1)/2; + } + } else { // Word privado + (*ob).tipo=twloc; (*ob).wloc.offset=imem; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + mem[imem]=constante(); + if (mem[imem]<0 || mem[imem]>65535) error(4,51); // valor word fuera de rango + } + } + imem=_imem+(*ob).wloc.totalen; test_buffer(&mem,&imem_max,imem); + (*ob).wloc.offset=iloc; iloc+=(*ob).wloc.totalen; + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpilo,iloc); + if (ob==NULL) continue; else iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + // Si el objeto no es tnone, se repite un parámetro o bien es un error + + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tvloc) { // Se repite una variable local + lexico(); + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parámetro + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) { + lexico(); + } + (*ob).param++; + continue; + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + + if (pieza==p_corab) { // Tabla privada + lexico(); + (*ob).tipo=ttloc; _imem=imem; + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + tglo_init(3); + (*ob).tloc.len1=imem-_imem-1; + (*ob).tloc.len2=-1; + (*ob).tloc.len3=-1; + (*ob).tloc.totalen=imem-_imem; + } else { + if (((*ob).tloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).tloc.len3=-1; + } else { (*ob).tloc.len2=-1; (*ob).tloc.len3=-1; } + (*ob).tloc.totalen=(*ob).tloc.len1+1; + if ((*ob).tloc.len2>-1) (*ob).tloc.totalen*=(*ob).tloc.len2+1; + if ((*ob).tloc.len3>-1) (*ob).tloc.totalen*=(*ob).tloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); lexico(); tglo_init(3); + if (imem-_imem>(*ob).tloc.totalen) error(4,48); } // demasiados valores para la tabla + } + imem=_imem+(*ob).tloc.totalen; + test_buffer(&mem,&imem_max,imem); + (*ob).tloc.offset=iloc; iloc+=(*ob).tloc.totalen; + + } else { // Variable privada + + (*ob).tipo=tvloc; (*ob).vloc.offset=iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } (*ob).bloque=bloque_actual; + } + + mem[_imem_old]=imem; + + }; + +} + +//----------------------------------------------------------------------------- +// Análisis de una declaración pointer (int, word o byte) +//----------------------------------------------------------------------------- + +struct objeto * analiza_pointer(int tipo, int offset) +{ + struct objeto * ob; + int len1,len2,len3; + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tipo) { // Se repite un pointer parámetro como private + save_error(0); lexico(); + len1=-1; len2=-1; len3=-1; + if (pieza==p_corab) { lexico(); + if ((len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if ((len2=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if ((len3=constante())<0) error(4,40); // tabla de longitud negativa + } + } if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } + if (len1!=(*ob).pilo.len1 || len2!=(*ob).pilo.len2 || len3!=(*ob).pilo.len3) error(4,41); // la longitud no coincide con la declaración anterior + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + (*ob).param++; // No permite volver a redeclararlo + return(NULL); + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + if (parametros==-1) (*ob).bloque=bloque_actual; + (*ob).pilo.len1=-1; (*ob).pilo.len2=-1; (*ob).pilo.len3=-1; + if (pieza==p_corab) { lexico(); + if (((*ob).pilo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).pilo.len2=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).pilo.len3=constante())<0) error(4,40); // tabla de longitud negativa + } + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } (*ob).pilo.totalen=0; + if ((*ob).pilo.len1>-1) (*ob).pilo.totalen=(*ob).pilo.len1+1; + if ((*ob).pilo.len2>-1) (*ob).pilo.totalen*=(*ob).pilo.len2+1; + if ((*ob).pilo.len3>-1) (*ob).pilo.totalen*=(*ob).pilo.len3+1; + + (*ob).tipo=tipo; (*ob).pilo.offset=offset; + + return(ob); +} + +//----------------------------------------------------------------------------- + +int analiza_struct(int offstruct) { // tras " struct id [ ] " // idðmember + int len=0,dup,i,_itxt,_imem; + struct objeto * ob; + struct objeto * old_member,* member2; + byte * oimemptr; + + while (pieza==p_ptocoma) lexico(); + + while (pieza!=p_end) { + + if (pieza==p_struct) { // Miembro struct + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + old_member=member; member=NULL; lexico(); member=old_member; + if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + analiza_pointer_struct(tpsgl,len,ob); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; + old_member=member; member=ob; lexico(); + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsglo; (*ob).sglo.offset=len; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sglo.items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sglo.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sglo.items3=constante())<0) error(4,43); // reidem + } else (*ob).sglo.items3=-1; + } else { (*ob).sglo.items2=-1; (*ob).sglo.items3=-1; } + member=member2; + (*ob).sglo.totalitems=(*ob).sglo.items1+1; + if ((*ob).sglo.items2>-1) (*ob).sglo.totalitems*=(*ob).sglo.items2+1; + if ((*ob).sglo.items3>-1) (*ob).sglo.totalitems*=(*ob).sglo.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sglo.totalitems=1; + (*ob).sglo.items1=0; (*ob).sglo.items2=-1; (*ob).sglo.items3=-1; + } + if (((*ob).sglo.len_item=analiza_struct(offstruct+len))==0) error(0,47); // estructura vacia + i=offstruct+len; dup=(*ob).sglo.totalitems+1; + if (dup>1) { + test_buffer(&mem,&imem_max,i+(*ob).sglo.len_item*(*ob).sglo.totalitems); + test_buffer(&frm,&ifrm_max,i+(*ob).sglo.len_item*(*ob).sglo.totalitems); + while (--dup) { + memcpy(&mem[i],&mem[offstruct+len],(*ob).sglo.len_item<<2); + memcpy(&frm[i],&frm[offstruct+len],(*ob).sglo.len_item<<2); + i+=(*ob).sglo.len_item; + } + } + len+=(*ob).sglo.len_item*(*ob).sglo.totalitems; + member=old_member; lexico(); + while (pieza==p_ptocoma) lexico(); + } + } else if (pieza==p_string) { // Miembro cadena + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpcgl,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcglo; (*ob).cglo.offset=len+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cglo.totalen=255; + } else { + if (((*ob).cglo.totalen=constante())<0) error(4,31); // cadena de longitud negativa + if ((*ob).cglo.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cglo.totalen=255; + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=0xDAD00000; + + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cglo.totalen+1) + error(4,49); // literal demasiado largo + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=0xDAD00000|(*ob).cglo.totalen; + strcpy((char*)&mem[offstruct+len+1],(char*)&mem[pieza_num]); + len+=1+((*ob).cglo.totalen+5)/4; + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=0xDAD00000|(*ob).cglo.totalen; + len+=1+((*ob).cglo.totalen+5)/4; + } + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Miembro byte + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpbgl,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbglo; (*ob).bglo.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).bglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bglo.len3=constante())<0) error(4,40); // reidem + } else (*ob).bglo.len3=-1; + } else { (*ob).bglo.len2=-1; (*ob).bglo.len3=-1; } + (*ob).bglo.totalen=(*ob).bglo.len1+1; + if ((*ob).bglo.len2>-1) (*ob).bglo.totalen*=(*ob).bglo.len2+1; + if ((*ob).bglo.len3>-1) (*ob).bglo.totalen*=(*ob).bglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + test_buffer(&mem,&imem_max,offstruct+len+((*ob).bglo.totalen+3)/4); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).bglo.totalen+3)/4); + memset(&frm[offstruct+len],2,(*ob).bglo.totalen); + + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + if (imemptr-oimemptr>(*ob).bglo.totalen) error(4,48); // demasiados valores para la tabla + imem=_imem; + } (*ob).bglo.totalen=((*ob).bglo.totalen+3)/4; + } else { + (*ob).tipo=tbglo; (*ob).bglo.offset=len; + (*ob).bglo.len1=0; + (*ob).bglo.len2=-1; + (*ob).bglo.len3=-1; + (*ob).bglo.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=2; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=constante(); + if (mem[offstruct+len]<0 || mem[offstruct+len]>255) error(4,50); // valor byte fuera de rango + } + } len+=(*ob).bglo.totalen; + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Miembro word + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwgl,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twglo; (*ob).wglo.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).wglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wglo.len3=constante())<0) error(4,40); // idem + } else (*ob).wglo.len3=-1; + } else { (*ob).wglo.len2=-1; (*ob).wglo.len3=-1; } + (*ob).wglo.totalen=(*ob).wglo.len1+1; + if ((*ob).wglo.len2>-1) (*ob).wglo.totalen*=(*ob).wglo.len2+1; + if ((*ob).wglo.len3>-1) (*ob).wglo.totalen*=(*ob).wglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + test_buffer(&mem,&imem_max,offstruct+len+((*ob).wglo.totalen+1)/2); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).wglo.totalen+1)/2); + memset(&frm[offstruct+len],1,(*ob).wglo.totalen*2); + + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + if (imemptr-oimemptr>(*ob).wglo.totalen*2) error(4,48); // demasiados valores para la tabla + imem=_imem; + } (*ob).wglo.totalen=((*ob).wglo.totalen+1)/2; + } else { + (*ob).tipo=twglo; (*ob).wglo.offset=len; + (*ob).wglo.len1=0; + (*ob).wglo.len2=-1; + (*ob).wglo.len3=-1; + (*ob).wglo.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=1; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=constante(); + if (mem[offstruct+len]<0 || mem[offstruct+len]>65535) error(4,51); // valor word fuera de rango + } + } len+=(*ob).wglo.totalen; + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpigl,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { lexico(); // Miembro tabla + (*ob).tipo=ttglo; (*ob).tglo.offset=len; + if (((*ob).tglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tglo.len3=constante())<0) error(4,40); // idem + } else (*ob).tglo.len3=-1; + } else { (*ob).tglo.len2=-1; (*ob).tglo.len3=-1; } + (*ob).tglo.totalen=(*ob).tglo.len1+1; + if ((*ob).tglo.len2>-1) (*ob).tglo.totalen*=(*ob).tglo.len2+1; + if ((*ob).tglo.len3>-1) (*ob).tglo.totalen*=(*ob).tglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&mem,&imem_max,offstruct+len+(*ob).tglo.totalen); + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); tglo_init(0); + if (imem-(offstruct+len)>(*ob).tglo.totalen) error(4,48); // demasiados valores para la tabla + imem=_imem; + } len+=(*ob).tglo.totalen; + + } else { // Miembro variable + + (*ob).tipo=tvglo; (*ob).vglo.offset=len; + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } else { error(0,39); do lexico(); while (pieza==p_ptocoma); } // esperando un elemento de la estructura + } return(len); +} + +// + +int analiza_struct_local(int offstruct) { // tras " struct id [ ] " // idðmember + int len=0,dup,i,_itxt,_iloc; + struct objeto * ob; + struct objeto * old_member,* member2; + byte * oimemptr; + + while (pieza==p_ptocoma) lexico(); + + while (pieza!=p_end) { + + if (pieza==p_struct) { // Miembro struct + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + old_member=member; member=NULL; lexico(); member=old_member; + if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + analiza_pointer_struct(tpslo,len,ob); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; + + old_member=member; member=ob; lexico(); + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsloc; (*ob).sloc.offset=len; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sloc.items1=constante())<0) error(4,43); // estructura de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items3=constante())<0) error(4,43); // reidem + } else (*ob).sloc.items3=-1; + } else { (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; } + member=member2; + (*ob).sloc.totalitems=(*ob).sloc.items1+1; + if ((*ob).sloc.items2>-1) (*ob).sloc.totalitems*=(*ob).sloc.items2+1; + if ((*ob).sloc.items3>-1) (*ob).sloc.totalitems*=(*ob).sloc.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sloc.totalitems=1; + (*ob).sloc.items1=0; (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; + } + if (((*ob).sloc.len_item=analiza_struct_local(offstruct+len))==0) error(0,47); // estructura vacia + i=offstruct+len; dup=(*ob).sloc.totalitems+1; + if (dup>1) { + test_buffer(&loc,&iloc_max,i+(*ob).sloc.len_item*(*ob).sloc.totalitems); + test_buffer(&frm,&ifrm_max,i+(*ob).sloc.len_item*(*ob).sloc.totalitems); + while (--dup) { + memcpy(&loc[i],&loc[offstruct+len],(*ob).sloc.len_item<<2); + memcpy(&frm[i],&frm[offstruct+len],(*ob).sloc.len_item<<2); + i+=(*ob).sloc.len_item; + } + } + len+=(*ob).sloc.len_item*(*ob).sloc.totalitems; + member=old_member; lexico(); + while (pieza==p_ptocoma) lexico(); + } + + } else if (pieza==p_string) { // Miembro cadena + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpclo,len); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcloc; (*ob).cloc.offset=len+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cloc.totalen=255; + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=0xDAD00000; + + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cloc.totalen+1) + error(4,49); // literal demasiado largo + test_buffer(&loc,&iloc_max,offstruct+len); + loc[offstruct+len]=0xDAD00000|(*ob).cloc.totalen; + strcpy((char*)&loc[offstruct+len+1],(char*)&mem[pieza_num]); + len+=1+((*ob).cloc.totalen+5)/4; + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + test_buffer(&loc,&iloc_max,offstruct+len); + loc[offstruct+len]=0xDAD00000|(*ob).cloc.totalen; + len+=1+((*ob).cloc.totalen+5)/4; + } + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Miembro byte + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpblo,len); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbloc; (*ob).bloc.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).bloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).bloc.len3=-1; + } else { (*ob).bloc.len2=-1; (*ob).bloc.len3=-1; } + (*ob).bloc.totalen=(*ob).bloc.len1+1; + if ((*ob).bloc.len2>-1) (*ob).bloc.totalen*=(*ob).bloc.len2+1; + if ((*ob).bloc.len3>-1) (*ob).bloc.totalen*=(*ob).bloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&loc,&iloc_max,offstruct+len+((*ob).bloc.totalen+3)/4); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).bloc.totalen+3)/4); + memset(&frm[offstruct+len],2,(*ob).bloc.totalen); + + if (pieza==p_asig) { + _iloc=iloc; iloc=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&loc[iloc]; + tloc_init(2); + if (imemptr-oimemptr>(*ob).bloc.totalen) error(4,48); // demasiados valores para la tabla + iloc=_iloc; + } (*ob).bloc.totalen=((*ob).bloc.totalen+3)/4; + } else { + (*ob).tipo=tbloc; (*ob).bloc.offset=len; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=2; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&loc,&iloc_max,offstruct+len); + loc[offstruct+len]=constante(); + if (loc[offstruct+len]<0 || loc[offstruct+len]>255) error(4,51); // valor byte fuera de rango + } + } len+=(*ob).bloc.totalen; + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ; + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Miembro word + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwlo,len); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twloc; (*ob).wloc.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).wloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).wloc.len3=-1; + } else { (*ob).wloc.len2=-1; (*ob).wloc.len3=-1; } + (*ob).wloc.totalen=(*ob).wloc.len1+1; + if ((*ob).wloc.len2>-1) (*ob).wloc.totalen*=(*ob).wloc.len2+1; + if ((*ob).wloc.len3>-1) (*ob).wloc.totalen*=(*ob).wloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&loc,&iloc_max,offstruct+len+((*ob).wloc.totalen+1)/2); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).wloc.totalen+1)/2); + memset(&frm[offstruct+len],1,(*ob).wloc.totalen*2); + + if (pieza==p_asig) { + _iloc=iloc; iloc=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&loc[iloc]; + tloc_init(1); + if (imemptr-oimemptr>(*ob).wloc.totalen*2) error(4,48); // demasiados valores para la tabla + iloc=_iloc; + } (*ob).wloc.totalen=((*ob).wloc.totalen+1)/2; + } else { + (*ob).tipo=twloc; (*ob).wloc.offset=len; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=1; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&loc,&iloc_max,offstruct+len); + loc[offstruct+len]=constante(); + if (loc[offstruct+len]<0 || loc[offstruct+len]>65535) error(4,51); // valor word fuera de rango + } + } len+=(*ob).wloc.totalen; + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpilo,len); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { lexico(); // Miembro tabla + (*ob).tipo=ttloc; (*ob).tloc.offset=len; + if (((*ob).tloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).tloc.len3=-1; + } else { (*ob).tloc.len2=-1; (*ob).tloc.len3=-1; } + (*ob).tloc.totalen=(*ob).tloc.len1+1; + if ((*ob).tloc.len2>-1) (*ob).tloc.totalen*=(*ob).tloc.len2+1; + if ((*ob).tloc.len3>-1) (*ob).tloc.totalen*=(*ob).tloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&loc,&iloc_max,offstruct+len+(*ob).tloc.totalen); + if (pieza==p_asig) { + _iloc=iloc; iloc=offstruct+len; + save_error(1); lexico(); tloc_init(0); + if (iloc-(offstruct+len)>(*ob).tloc.totalen) error(4,48); // demasiados valores para la tabla + iloc=_iloc; + } len+=(*ob).tloc.totalen; + + } else { // Miembro variable + + (*ob).tipo=tvloc; (*ob).vloc.offset=len; + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } else { error(0,39); do lexico(); while (pieza==p_ptocoma); } // esperando un elemento de la estructura + (*ob).bloque=bloque_lexico; + } return(len); +} + + +// + +int analiza_struct_private(int offstruct) { // tras " struct id [ ] " // idðmember + int len=0,dup,i,_itxt,_imem; + struct objeto * ob; + struct objeto * old_member,* member2; + byte * oimemptr; + + while (pieza==p_ptocoma) lexico(); + + while (pieza!=p_end) { + + if (pieza==p_struct) { // Miembro struct + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + old_member=member; member=NULL; lexico(); member=old_member; + if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + analiza_pointer_struct(tpslo,len,ob); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; + + old_member=member; member=ob; lexico(); + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsloc; (*ob).sloc.offset=len; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sloc.items1=constante())<0) error(4,43); // estructura de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items3=constante())<0) error(4,43); // reidem + } else (*ob).sloc.items3=-1; + } else { (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; } + member=member2; + (*ob).sloc.totalitems=(*ob).sloc.items1+1; + if ((*ob).sloc.items2>-1) (*ob).sloc.totalitems*=(*ob).sloc.items2+1; + if ((*ob).sloc.items3>-1) (*ob).sloc.totalitems*=(*ob).sloc.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sloc.totalitems=1; + (*ob).sloc.items1=0; (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; + } + if (((*ob).sloc.len_item=analiza_struct_private(offstruct+len))==0) error(0,55); // demasiados valores para la estructura + i=offstruct+len; dup=(*ob).sloc.totalitems+1; + if (dup>1) { + test_buffer(&mem,&imem_max,i+(*ob).sloc.len_item*(*ob).sloc.totalitems); + test_buffer(&frm,&ifrm_max,i+(*ob).sloc.len_item*(*ob).sloc.totalitems); + while (--dup) { + memcpy(&mem[i],&mem[offstruct+len],(*ob).sloc.len_item<<2); + memcpy(&frm[i],&frm[offstruct+len],(*ob).sloc.len_item<<2); + i+=(*ob).sloc.len_item; + } + } + len+=(*ob).sloc.len_item*(*ob).sloc.totalitems; + member=old_member; lexico(); + while (pieza==p_ptocoma) lexico(); + } + + } else if (pieza==p_string) { // Miembro cadena + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpclo,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcloc; (*ob).cloc.offset=len+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cloc.totalen=255; + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=0xDAD00000; + + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cloc.totalen+1) + error(4,49); // literal demasiado largo + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=0xDAD00000|(*ob).cloc.totalen; + strcpy((char*)&mem[offstruct+len+1],(char*)&mem[pieza_num]); + len+=1+((*ob).cloc.totalen+5)/4; + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=0xDAD00000|(*ob).cloc.totalen; + len+=1+((*ob).cloc.totalen+5)/4; + } + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Miembro byte + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpblo,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbloc; (*ob).bloc.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).bloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).bloc.len3=-1; + } else { (*ob).bloc.len2=-1; (*ob).bloc.len3=-1; } + (*ob).bloc.totalen=(*ob).bloc.len1+1; + if ((*ob).bloc.len2>-1) (*ob).bloc.totalen*=(*ob).bloc.len2+1; + if ((*ob).bloc.len3>-1) (*ob).bloc.totalen*=(*ob).bloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + test_buffer(&mem,&imem_max,offstruct+len+((*ob).bloc.totalen+3)/4); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).bloc.totalen+3)/4); + memset(&frm[offstruct+len],2,(*ob).bloc.totalen); + + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + if (imemptr-oimemptr>(*ob).bloc.totalen) error(4,48); // demasiados valores para la tabla + imem=_imem; + } (*ob).bloc.totalen=((*ob).bloc.totalen+3)/4; + } else { + (*ob).tipo=tbloc; (*ob).bloc.offset=len; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=2; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=constante(); + if (mem[offstruct+len]<0 || mem[offstruct+len]>255) error(4,50); // valor byte fuera de rango + } + } len+=(*ob).bloc.totalen; + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Miembro word + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwlo,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twloc; (*ob).wloc.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).wloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).wloc.len3=-1; + } else { (*ob).wloc.len2=-1; (*ob).wloc.len3=-1; } + (*ob).wloc.totalen=(*ob).wloc.len1+1; + if ((*ob).wloc.len2>-1) (*ob).wloc.totalen*=(*ob).wloc.len2+1; + if ((*ob).wloc.len3>-1) (*ob).wloc.totalen*=(*ob).wloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + test_buffer(&mem,&imem_max,offstruct+len+((*ob).wloc.totalen+1)/2); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).wloc.totalen+1)/2); + memset(&frm[offstruct+len],1,(*ob).wloc.totalen*2); + + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + if (imemptr-oimemptr>(*ob).wloc.totalen*2) error(4,48); // demasiados valores para la tabla + imem=_imem; + } (*ob).wloc.totalen=((*ob).wloc.totalen+1)/2; + } else { + (*ob).tipo=twloc; (*ob).wloc.offset=len; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=1; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=constante(); + if (mem[offstruct+len]<0 || mem[offstruct+len]>65535) error(4,51); // valor word fuera de rango + } + } len+=(*ob).wloc.totalen; + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpilo,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { lexico(); // Miembro tabla + (*ob).tipo=ttloc; (*ob).tloc.offset=len; + if (((*ob).tloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).tloc.len3=-1; + } else { (*ob).tloc.len2=-1; (*ob).tloc.len3=-1; } + (*ob).tloc.totalen=(*ob).tloc.len1+1; + if ((*ob).tloc.len2>-1) (*ob).tloc.totalen*=(*ob).tloc.len2+1; + if ((*ob).tloc.len3>-1) (*ob).tloc.totalen*=(*ob).tloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&mem,&imem_max,offstruct+len+(*ob).tloc.totalen); + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); tglo_init(0); + if (imem-(offstruct+len)>(*ob).tloc.totalen) error(4,48); // demasiados valores para la tabla + imem=_imem; + } len+=(*ob).tloc.totalen; + + } else { // Miembro variable + + (*ob).tipo=tvloc; (*ob).vloc.offset=len; + + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + } + } + + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + + } else { error(0,39); do lexico(); while (pieza==p_ptocoma); } // esperando un elemento de la estructura + (*ob).bloque=bloque_lexico; + } return(len); +} + + +// + +int analiza_pointer_struct(int tipo, int offset, struct objeto * estructura) +{ + struct objeto * ob; + int items1,items2,items3; + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tipo) { // Se repite un pointer parámetro como private + save_error(0); lexico(); + items1=-1; items2=-1; items3=-1; + if (pieza==p_corab) { lexico(); + if ((items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if ((items2=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if ((items3=constante())<0) error(4,43); // estructura de longitud negativa + } + } if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } + if (items1!=(*ob).psgl.items1 || items2!=(*ob).psgl.items2 || items3!=(*ob).psgl.items3) error(4,41); // la longitud no coincide con la declaración anterior + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + (*ob).param++; return(0); // No permite volver a redeclararlo + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + if (parametros==-1) (*ob).bloque=bloque_actual; + (*ob).psgl.items1=-1; (*ob).psgl.items2=-1; (*ob).psgl.items3=-1; + if (pieza==p_corab) { lexico(); + if (((*ob).psgl.items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).psgl.items2=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).psgl.items3=constante())<0) error(4,43); // estructura de longitud negativa + } + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } (*ob).psgl.totalitems=0; + if ((*ob).psgl.items1>-1) (*ob).psgl.totalitems=(*ob).psgl.items1+1; + if ((*ob).psgl.items2>-1) (*ob).psgl.totalitems*=(*ob).psgl.items2+1; + if ((*ob).psgl.items3>-1) (*ob).psgl.totalitems*=(*ob).psgl.items3+1; + + (*ob).tipo=tipo; // tpsgl o tpslo + (*ob).psgl.offset=offset; // del pointer + (*ob).psgl.ostruct=estructura; // struct original + + // (*ob).psgl.len_item ð (*((*ob).psgl.ostruct)).len_item; + + return(1); +} + + // + // Inicialización de tablas (a mem[imem++]) + // + // := ( | [ [p_dup] p_abrir p_cerrar ] ) + // [ p_coma ] + // + + +void tglo_init(int tipo) { // Tipo: 0-Int o variado (struct), 1-Word, 2-Byte + if (tipo==3) { memset(frm,0,ifrm_max*sizeof(int)); tipo=0; } + imemptr=(byte*)&mem[imem]; + tglo_init2(tipo); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' +} + +void tloc_init(int tipo) { + int * ptr; + + if (tipo==3) { memset(frm,0,ifrm_max*sizeof(int)); tipo=0; } + + ptr=mem; mem=loc; loc=ptr; + swap(imem,iloc); swap(imem_max,iloc_max); + + imemptr=(byte*)&mem[imem]; + tglo_init2(tipo); + + ptr=mem; mem=loc; loc=ptr; + swap(imem,iloc); swap(imem_max,iloc_max); + + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' +} + +// OJO!!! tglo_init no puede llamar a test_buffer !!! + +void tglo_init2(int tipo) { + int valor,dup,_imem,len,n; + byte *oimemptr; + + while (1) { + + // Mira si finaliza la inicialización de datos + + if (pieza==p_cerrar || pieza==p_ptocoma) { + if (*(imemptr-(int)mem+(int)frm)==1 || tipo==1) { + imemptr+=2; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=1 && tipo!=1) imemptr=(byte*)&mem[imem]; + } else if (*(imemptr-(int)mem+(int)frm)==2 || tipo==2) { + imemptr++; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=2 && tipo!=2) imemptr=(byte*)&mem[imem]; + } else { + imemptr+=4; + imem=((int)imemptr-(int)mem+3)/4; + } +// test_buffer(&mem,&imem_max,imem); + return; + } + + // Una coma sola, como "3,,4", avanza una posición (y define un 0) + + if (pieza==p_coma) { + if (*(imemptr-(int)mem+(int)frm)==1 || tipo==1) { + (*(word*)imemptr)=0; + imemptr+=2; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=1 && tipo!=1) imemptr=(byte*)&mem[imem]; + } else if (*(imemptr-(int)mem+(int)frm)==2 || tipo==2) { + *imemptr++=0; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=2 && tipo!=2) imemptr=(byte*)&mem[imem]; + } else { + imemptr+=4; + imem=((int)imemptr-(int)mem+3)/4; + } +// test_buffer(&mem,&imem_max,imem); + lexico(); continue; + } + + if (pieza==p_abrir) { // Dup x 1 + + dup=1; + + } else if (pieza==p_dup) { // Dup x 2 + + dup=2; lexico(); + if (pieza!=p_abrir) error(3,22); // esperando '(' + + } else if (pieza==p_lit || (pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) { + + valor=pieza_num; lexico(); + if (pieza==p_abrir || pieza==p_dup) error(2,52); // no se puede duplicar 0 o menos veces (se ha indicado un literal como número de veces) + + // Mete un literal en un dato de tipo string + + if ((((int)imemptr-(int)mem)%4)==0) { + imem=((int)imemptr-(int)mem+3)/4; + if (frm[imem]==0xdad00000) { + if (strlen((char*)&mem_ory[valor])>(mem[imem]&0xFFFFF)+1) error(2,49); // literal demasiado largo + _imem=imem; + imem+=1+((mem[imem]&0xFFFFF)+5)/4; +// test_buffer(&mem,&imem_max,imem); + imemptr=(byte*)&mem[imem]; + strcpy((char*)&mem[_imem+1],(char*)&mem_ory[valor]); + if (pieza!=p_coma) return; + lexico(); continue; + } + } + + // Mete un valor literal en otro tipo de dato (en lugar de un string) + + if (*(imemptr-(int)mem+(int)frm)==1 || tipo==1) { // Un string en words (el puntero short) + + imemptr=(byte*)(((int)imemptr+1)&-2); // Lo hace par + *((word*)imemptr)=valor; + imemptr+=2; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=1 && tipo!=1) imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } else if (*(imemptr-(int)mem+(int)frm)==2 || tipo==2) { // Un string en bytes + + oimemptr=imemptr; + while (*(oimemptr-(int)mem+(int)frm)==2) oimemptr++; + if (tipo==0) if (strlen((char*)&mem_ory[valor])>(int)(oimemptr-imemptr)) error(2,48); // demasiados valores para la tabla + strcpy(imemptr,(char*)&mem_ory[valor]); + imemptr+=strlen(imemptr); + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=2 && tipo!=2) imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } else { // Un string en un int (el puntero long, como en DIV 1) + + imem=((int)imemptr-(int)mem+3)/4; + mem[imem++]=valor; +// test_buffer(&mem,&imem_max,imem); + imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } + + } else { + valor=constante(); + if (pieza!=p_abrir) { + if (pieza!=p_dup) { + + if ((((int)imemptr-(int)mem)%4)==0) { + imem=((int)imemptr-(int)mem+3)/4; + if (frm[imem]==0xdad00000) error(2,46); // se esperaba un literal + } + + // Mete un valor numérico en la memoria + + if (*(imemptr-(int)mem+(int)frm)==1 || tipo==1) { // En un word + + if (valor<0 || valor>65535) error(2,51); // valor word fuera de rango + imemptr=(byte*)(((int)imemptr+1)&-2); // Lo hace par + *((word*)imemptr)=valor; + imemptr+=2; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=1 && tipo!=1) imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } else if (*(imemptr-(int)mem+(int)frm)==2 || tipo==2) { // En un byte + + if (valor<0 || valor>255) error(2,50); // valor byte fuera de rango + *imemptr++=valor; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=2 && tipo!=2) imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } else { // En un int (lo normal en DIV 1) + + imem=((int)imemptr-(int)mem+3)/4; + mem[imem++]=valor; +// test_buffer(&mem,&imem_max,imem); + imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } + + } else { + dup=valor; lexico(); + if (pieza!=p_abrir) error(3,22); // esperando '(' + } + } else dup=valor; + } + + // Duplica una secuencia de valores + + if (dup<1) error(2,52); // no se puede duplicar 0 o menos veces + lexico(); + + // Analiza la secuencia como otra inicialización ... + + oimemptr=imemptr; + tglo_init2(tipo); + if (pieza!=p_cerrar) error(3,18); // esperando ')' + + // Y la duplica el número de veces indicado + + if (dup>1) { + len=imemptr-oimemptr; +// test_buffer(&mem,&imem_max,(((int)oimemptr-(int)mem)+len*dup+3)/4); + while (--dup) { + for (n=0;n + +#define p_program 0x01 +#define p_const 0x02 +#define p_global 0x03 +#define p_local 0x04 +#define p_begin 0x05 +#define p_end 0x06 +#define p_process 0x07 +#define p_private 0x08 +#define p_struct 0x09 +#define p_import 0x0A // sólo para mostrar el warning de que ya no se usa +#define p_setup_program 0x0B // idem + +#define p_string 0x0C +#define p_byte 0x0D +#define p_word 0x0E +#define p_int 0x0F + +#define p_compiler_options 0x10 +#define p_function 0x11 + +#define p_until 0x15 // antes 0x16 +#define p_else 0x16 // antes 0x17 +#define p_elseif 0x17 // NUEVO! + +#define p_return 0x18 + +#define p_from 0x19 +#define p_to 0x1a +#define p_step 0x1b +#define p_if 0x20 +#define p_loop 0x21 +#define p_while 0x22 +#define p_repeat 0x23 +#define p_for 0x24 +#define p_switch 0x25 +#define p_case 0x26 +#define p_default 0x27 + +#define p_frame 0x28 + +#define p_break 0x29 +#define p_continue 0x2A + +#define p_clone 0x2B + +#define p_debug 0x2C + +#define p_ptocoma 0x30 +#define p_coma 0x31 +#define p_corab 0x32 +#define p_corce 0x33 + +#define p_asig 0x38 + +#define p_dup 0x3C + +#define p_abrir 0x40 +#define p_cerrar 0x41 + +#define p_suma 0x44 +#define p_resta 0x45 + +#define p_shr 0x46 +#define p_shl 0x47 + +#define p_or 0x48 +#define p_xor 0x49 +#define p_and 0x4a + +#define p_xorptr 0x4b +#define p_andofs 0x4c + +#define p_neg 0x4e +#define p_pointer 0x4f + +#define p_offset 0x50 +#define p_not 0x51 + +#define p_add 0x52 +#define p_sub 0x53 + +#define p_mul 0x54 +#define p_div 0x55 +#define p_mod 0x56 +#define p_multi 0x57 + +#define p_inc 0x58 +#define p_dec 0x59 + +#define p_igu 0x5b +#define p_dis 0x5c + +#define p_may 0x5d +#define p_men 0x5e +#define p_mei 0x5f +#define p_mai 0x60 + +#define p_sizeof 0x66 + +#define p_type 0x67 + +#define p_whoami 0x68 + +#define p_punto 0x69 + +#define p_rango 0x6a + +#define p_add_asig 0x6b +#define p_sub_asig 0x6c +#define p_mul_asig 0x6d +#define p_div_asig 0x6e +#define p_mod_asig 0x6f +#define p_and_asig 0x70 +#define p_or_asig 0x71 +#define p_xor_asig 0x72 +#define p_shr_asig 0x73 +#define p_shl_asig 0x74 + +#define p_ini_rem 0x7d //Inicio comentario +#define p_end_rem 0x7e //Fin comentario +#define p_rem 0x7f //Comentario de una linea + +#define p_strigu 0xc0 +#define p_strdis 0xc1 +#define p_strmay 0xc2 +#define p_strmen 0xc3 +#define p_strmei 0xc4 +#define p_strmai 0xc5 + +#define p_pointerword 0xd0 +#define p_sumaword 0xd1 +#define p_restaword 0xd2 +#define p_incword 0xd3 +#define p_decword 0xd4 +#define p_asigword 0xd5 +#define p_add_asigword 0xd6 +#define p_sub_asigword 0xd7 +#define p_mul_asigword 0xd8 +#define p_div_asigword 0xd9 +#define p_mod_asigword 0xda +#define p_and_asigword 0xdb +#define p_or_asigword 0xdc +#define p_xor_asigword 0xdd +#define p_shr_asigword 0xde +#define p_shl_asigword 0xdf + +#define p_pointerchar 0xe0 +#define p_sumachar 0xe1 +#define p_restachar 0xe2 +#define p_incchar 0xe3 +#define p_decchar 0xe4 +#define p_asigchar 0xe5 +#define p_add_asigchar 0xe6 +#define p_sub_asigchar 0xe7 +#define p_mul_asigchar 0xe8 +#define p_div_asigchar 0xe9 +#define p_mod_asigchar 0xea +#define p_and_asigchar 0xeb +#define p_or_asigchar 0xec +#define p_xor_asigchar 0xed +#define p_shr_asigchar 0xee +#define p_shl_asigchar 0xef + +#define p_strcpy 0xf0 +#define p_strfix 0xf1 +#define p_strcat 0xf2 +#define p_stradd 0xf3 +#define p_strdec 0xf4 +#define p_strsub 0xf5 +#define p_strlen 0xf6 + +#define p_pointerbyte 0xf7 + +#define p_lit 0xfc //Puntero al literal (txt) en pieza_num +#define p_id 0xfd //o es un ptr a vnom (a un ptr al objeto) +#define p_num 0xfe //Número en pieza_num + + +//----------------------------------------------------------------------------- + +// Tabla de elementos léxicos (distintos tipos de token) + +struct lex_ele { byte caracter; + byte token; + struct lex_ele * alternativa; + struct lex_ele * siguiente; } + lex_simb[max_nodos], * ilex_simb, * lex_case[256]; + +// Pieza (token) que se está leyendo (ver constantes p_xxxx) +int pieza, pieza_num; + +struct objeto * o; // Cuando pieza=p_id, objeto de tipo (**o).tipo +struct objeto * bloque_actual; // Bloque que esta siendo analizado +struct objeto * bloque_lexico; // Es 0 hasta las privadas del program + +struct objeto * member; // !=0 al declarar/acceder un miembro de un struct + +// número de nodos, número de objetos +int num_nodos, num_obj; + +int num_obj_predefinidos; + + +//----------------------------------------------------------------------------- +// Variables relacionadas con el listado formateado +//----------------------------------------------------------------------------- + +int coment; // 0-Código, 1-Dentro de comentario, 2-Anidado, ... +//int convert; // Indica si se deben generar ya los token en ls + + +//----------------------------------------------------------------------------- + +int old_linea; // Situación en el fichero del token anterior al último leido +byte * old_ierror, * old_ierror_end; + +// El último token leido está en (linea,ierror,ierror_end) + +byte * ultima_linea,cero; + +// Siguiente token -> next_lexico() +int next_pieza; +int next_linea; +byte * next_source; + +//----------------------------------------------------------------------------- + +int parametros; + +int acceso_remoto; // Para no permitir id.private + +//----------------------------------------------------------------------------- + + +//----------------------------------------------------------------------------- +// PROTOTIPOS +//----------------------------------------------------------------------------- + +int crea_objeto(byte * nombre); +void psintactico(void); +void plexico(void); +void sintactico(void); +void lexico(void); +byte * next_lexico(byte * _source, int coment, int linea); +void pasa_ptocoma(void); + +void analiza_private(void); +struct objeto * analiza_pointer(int tipo, int offset); +int analiza_struct(int offstruct); +int analiza_struct_local(int offstruct); +int analiza_struct_private(int offstruct); +int analiza_pointer_struct(int tipo, int offset, struct objeto * estructura); +void tglo_init(int tipo); +void tloc_init(int tipo); +void tglo_init2(int tipo); + +#endif // __PARSER_H \ No newline at end of file diff --git a/ediv/src/ediv/varindex.c b/ediv/src/ediv/varindex.c new file mode 100644 index 0000000..3471ae8 --- /dev/null +++ b/ediv/src/ediv/varindex.c @@ -0,0 +1,156 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifdef DEBUG_DLL +# include +#endif + +#include + +#include "shared.h" +#include "varindex.h" + +struct _vars { + tipo_t tipo; + char* nombre; +} vars[] = { + global, "timer", + global, "max_process_time", + global, "argc", + global, "argv", + global, "draw_z", + global, "scroll", + global, "fps", + reserved, "process_id", + reserved, "id_scan", + reserved, "process_type", + reserved, "type_scan", + reserved, "status", + reserved, "parameters", + reserved, "param_offset", + reserved, "program_index", + reserved, "stack_pointer", + reserved, "is_executed", + reserved, "is_painted", + reserved, "m8_object", + reserved, "old_ctype", + reserved, "frame_percent", + reserved, "box_x0", + reserved, "box_y0", + reserved, "box_x1", + reserved, "box_y1", + reserved, "f_count", + reserved, "caller_id", + local, "father", + local, "son", + local, "smallbro", + local, "bigbro", + local, "priority", + local, "ctype", + local, "x", + local, "y", + local, "z", + local, "graph", + local, "size", + local, "angle", + local, "region", + local, "file", + local, "xgraph", + local, "height", + local, "cnumber", + local, "resolution", + local, "flags", + local, "transparency" +}; + +#define NUM_INDEXED_VARS (sizeof(vars)/sizeof(struct _vars)) + +byte hash[NUM_INDEXED_VARS]; +static int varptr[NUM_INDEXED_VARS]; + +int res_pos=0, loc_pos=0; + +byte index_inicializado=0; + + +void inicializa_index() +{ + int i; + byte *c, h; + + memset(varptr,0,NUM_INDEXED_VARS*4); + + for(i=0;i>7))^*c; + hash[i]=h; + if(!res_pos && vars[i].tipo==reserved) + res_pos=i; + else if (!loc_pos && vars[i].tipo==local) + loc_pos=i; + } + index_inicializado=1; + return; +} + + +void indexa_variable(tipo_t tipo, char* nombre, int ptr) +{ + int i; + byte *c, h=0; + + if(!index_inicializado) return; + + for(c=(byte*)nombre;*c;c++) + h=((byte)(h<<1)+(h>>7))^*c; + + #ifdef DEBUG_DLL + printf("-- Indexando %s \"%s\" (hash: %d) ptr=%d... ", + tipo==global?"global":tipo==reserved?"reserved":"local", + nombre,h,ptr); + #endif + + i=(tipo==reserved)?res_pos:((tipo==local)?loc_pos:0); + for(;i +#include +#include +#include + +#include "shared.h" + +int stub_size; + +void _encriptar(int encode, char * fichero, char * clave); +void _comprimir(int encode, char *fichero); + +int main(int argc, char * argv[]) +{ + if(argc<2) { + printf("Modo de uso: %s [flag_encriptar]\n",argv[0]); + exit(1); + } + if(argc==2) { + _comprimir(1,el_stub); + _encriptar(1,el_stub,la_clave); + rename(el_stub,argv[1]); + } + else { + _encriptar(0,argv[1],la_clave); + _comprimir(0,argv[1]); + rename(argv[1],el_stub); + #ifdef __linux__ + chmod(el_stub,493); // -rwxr-xr-x + #endif + } + printf("STUB_SIZE: %d\n",stub_size); + return 0; +} + + +union { + byte b[128]; + int d[32]; +} seed_coder; // Seed aleatorio (127 bytes + PTR) + +byte rndb(void) +{ + byte ptr; + ptr=seed_coder.b[127]; + + if ((seed_coder.b[127]=(ptr+seed_coder.b[ptr])&127)==127) + seed_coder.b[127]=0; + return(seed_coder.b[seed_coder.b[127]]+=++ptr); +} + +int rnd_coder(void) +{ + return((((rndb()&127)*256+rndb())*256+rndb())*256+rndb()); +} + +int rnd2(int min,int max) { + if (max=size-12) { + free(ptr_dest); + free(ptr); + return; + } + } else { + if (strcmp(ptr,"zx!\x1a\x0d\x0a\xff")) + return; + size2=*(int*)(ptr+8); + stub_size=(int)size2; + if ((ptr_dest=(byte *)malloc(size2))==NULL) { + free(ptr); + return; + } + + if (uncompress(ptr_dest, &size2, ptr+12, size-12)) { + free(ptr_dest); + free(ptr); + return; + } + size2=*(int*)(ptr+8); + } + + free(ptr); + + if (rename(fichero,"temp.ZX!")) { + free(ptr_dest); + return; + } + + if ((f=fopen(fichero,"wb"))==NULL) { + rename("temp.ZX!",fichero); + free(ptr_dest); + return; + } + + if (encode) { + if(fwrite("zx!\x1a\x0d\x0a\xff",1,8,f)!=8) { + fclose(f); + remove(fichero); + rename("temp.ZX!",fichero); + free(ptr_dest); + return; + } + if(fwrite(&size,1,4,f)!=4) { + fclose(f); + remove(fichero); + rename("temp.ZX!",fichero); + free(ptr_dest); + return; + } + } + + if(fwrite(ptr_dest,1,size2,f)!=size2) { + fclose(f); + remove(fichero); + rename("temp.ZX!",fichero); + free(ptr_dest); + return; + } + + // Si todo ha ido bien ... + + fclose(f); + free(ptr_dest); + remove("temp.ZX!"); +} diff --git a/ediv/src/encrypt/vssver.scc b/ediv/src/encrypt/vssver.scc new file mode 100644 index 0000000..87ec4a4 Binary files /dev/null and b/ediv/src/encrypt/vssver.scc differ diff --git a/ediv/src/kdevelop/ChangeLog b/ediv/src/kdevelop/ChangeLog new file mode 100644 index 0000000..473a0f4 diff --git a/ediv/src/kdevelop/authors b/ediv/src/kdevelop/authors new file mode 100644 index 0000000..a2e458e --- /dev/null +++ b/ediv/src/kdevelop/authors @@ -0,0 +1 @@ +Sion Entertainment diff --git a/ediv/src/kdevelop/copying b/ediv/src/kdevelop/copying new file mode 100644 index 0000000..efda5b4 --- /dev/null +++ b/ediv/src/kdevelop/copying @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/ediv/src/kdevelop/ediv.kdevprj b/ediv/src/kdevelop/ediv.kdevprj new file mode 100644 index 0000000..6da2d01 --- /dev/null +++ b/ediv/src/kdevelop/ediv.kdevprj @@ -0,0 +1,209 @@ +[AUTHORS] +dist=true +install=false +install_location= +type=DATA +[COPYING] +dist=true +install=false +install_location= +type=DATA +[ChangeLog] +dist=true +install=false +install_location= +type=DATA +[Config for BinMakefileAm] +addcxxflags= +bin_program=ediv +cxxflags=-O0 -g3 -Wall +ldadd= +ldflags= +libtool_dir= +path_to_bin_program=../../bin +[General] +AMChanged=false +author=Sion Entertainment +configure_args=a.prg +debug_args=a.prg +dir_where_make_will_be_called=ediv/ +email=bugs@edivcentral.com +execute_args=a.prg +kdevprj_version=1.3 +lfv_open_groups=Fuentes +make_options=-j1 +makefiles=Makefile.am,ediv/Makefile.am,ediv/docs/Makefile.am,ediv/docs/en/Makefile.am,po/Makefile.am +modifyMakefiles=false +project_name=Ediv +project_type=normal_empty +short_info= +sub_dir=ediv/ +version=0.1 +version_control=None +workspace=1 +[INSTALL] +dist=true +install=false +install_location= +type=DATA +[LFV Groups] +Cabeceras=*.h,*.hh,*.hxx,*.hpp,*.H +Fuentes=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l +GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS +Interfaz de usuario=*.kdevdlg,*.ui,*.rc +Otros=* +groups=Cabeceras,Fuentes,Interfaz de usuario,GNU,Otros +[Makefile.am] +files=ediv.kdevprj,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,ediv.lsm +sub_dirs=ediv +type=normal +[README] +dist=true +install=false +install_location= +type=DATA +[TODO] +dist=true +install=false +install_location= +type=DATA +[Workspace_1] +browser_file=file:/mnt/d/Musica/Letras/Bares1.html +cpp_file=/home/ermaki/ediv/src/ediv/expresion.c +header_file=SinNombre.h +openfiles=SinNombre.h,SinNombre.cpp,/home/ermaki/ediv/src/ediv/ediv.c,/home/ermaki/ediv/src/ediv/listados.c,/home/ermaki/ediv/src/ediv/compiler.c,/home/ermaki/ediv/src/ediv/expresion.c,/home/ermaki/ediv/src/ediv/parser.c +show_outputview=true +show_treeview=true +[ediv.kdevprj] +dist=true +install=false +install_location= +type=DATA +[ediv.lsm] +dist=true +install=false +install_location= +type=DATA +[ediv/Makefile] +dist=true +install=false +install_location= +type=DATA +[ediv/Makefile.am] +files=ediv/expresion.c,ediv/_ml.c,ediv/_ml.h,ediv/compiler.c,ediv/compiler.h,ediv/ediv.c,ediv/ediv_export.c,ediv/encrypt.c,ediv/encrypt.h,ediv/extern.h,ediv/lower.c,ediv/lower.h,ediv/ltlex.c,ediv/main.h,ediv/parser.c,ediv/parser.h,ediv/Makefile,ediv/expresion.h,ediv/modulos.c,ediv/modulos.h,ediv/listados.c,ediv/listados.h +sub_dirs= +type=prog_main +[ediv/_ml.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/_ml.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/compiler.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/compiler.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/docs/Makefile.am] +sub_dirs= +type=normal +[ediv/docs/en/Makefile.am] +sub_dirs= +type=normal +[ediv/ediv.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/ediv_export.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/encrypt.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/encrypt.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/expresion.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/expresion.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/extern.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/listados.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/listados.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/lower.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/lower.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/ltlex.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/main.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/modulos.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/modulos.h] +dist=true +install=false +install_location= +type=HEADER +[ediv/parser.c] +dist=true +install=false +install_location= +type=SOURCE +[ediv/parser.h] +dist=true +install=false +install_location= +type=HEADER +[po/Makefile.am] +sub_dirs= +type=po diff --git a/ediv/src/kdevelop/ediv.lsm b/ediv/src/kdevelop/ediv.lsm new file mode 100644 index 0000000..aaad37a --- /dev/null +++ b/ediv/src/kdevelop/ediv.lsm @@ -0,0 +1,14 @@ +Begin3 +Title: Ediv +Version: 0.1 +Entered-date: +Description: +Keywords: +Author: Sion Entertainment +Maintained-by: Sion Entertainment +Primary-site: +Home-page: http:// +Original-site: +Platforms: Linux and other Unices +Copying-policy: GNU Public License +End diff --git a/ediv/src/kdevelop/install b/ediv/src/kdevelop/install new file mode 100644 index 0000000..b683bb6 --- /dev/null +++ b/ediv/src/kdevelop/install @@ -0,0 +1,167 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Type `make install' to install the programs and any data files and + documentation. + + 4. You can remove the program binaries and object files from the + source code directory by typing `make clean'. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/ediv/src/kdevelop/readme b/ediv/src/kdevelop/readme new file mode 100644 index 0000000..4c0d52d --- /dev/null +++ b/ediv/src/kdevelop/readme @@ -0,0 +1 @@ + diff --git a/ediv/src/kdevelop/stub.kdevprj b/ediv/src/kdevelop/stub.kdevprj new file mode 100644 index 0000000..42ab48e --- /dev/null +++ b/ediv/src/kdevelop/stub.kdevprj @@ -0,0 +1,53 @@ +[Config for BinMakefileAm] +bin_program=stub +cxxflags=-O0 -g3 -Wall +ldflags= +[General] +author=Sion Entertainment +email=bugs@edivcentral.com +kdevprj_version=1.3 +lfv_open_groups=Cabeceras,Fuentes +makefiles=Makefile.am,stub/Makefile.am,stub/docs/Makefile.am,stub/docs/en/Makefile.am,po/Makefile.am +project_name=Stub +project_type=normal_empty +sub_dir=stub/ +version=0.1 +version_control=None +[LFV Groups] +Cabeceras=*.h,*.hh,*.hxx,*.hpp,*.H +Fuentes=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l +Interfaz de usuario=*.kdevdlg,*.ui,*.rc +Otros=* +groups=Cabeceras,Fuentes,Interfaz de usuario,Otros +[Makefile.am] +files=stub.kdevprj +sub_dirs=stub +type=normal +[po/Makefile.am] +sub_dirs= +type=po +[stub.kdevprj] +dist=true +install=false +install_location= +type=DATA +[stub/Makefile.am] +files=stub/stub.c,stub/main.h +sub_dirs= +type=prog_main +[stub/docs/Makefile.am] +sub_dirs= +type=normal +[stub/docs/en/Makefile.am] +sub_dirs= +type=normal +[stub/main.h] +dist=true +install=false +install_location= +type=HEADER +[stub/stub.c] +dist=true +install=false +install_location= +type=SOURCE diff --git a/ediv/src/kdevelop/todo b/ediv/src/kdevelop/todo new file mode 100644 index 0000000..4c0d52d --- /dev/null +++ b/ediv/src/kdevelop/todo @@ -0,0 +1 @@ + diff --git a/ediv/src/shared/dll_load.c b/ediv/src/shared/dll_load.c new file mode 100644 index 0000000..7f1aa3e --- /dev/null +++ b/ediv/src/shared/dll_load.c @@ -0,0 +1,991 @@ +/* Back Orifice 2000 - Remote Administration Suite + Copyright (C) 1999, Cult Of The Dead Cow + + 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 + + The author of this program may be contacted at dildog@l0pht.com. +*/ + +#include +#include + +#include "dll_load.h" +byte g_bIsWinNT; + +#pragma pack(push,1) + +typedef struct { + DWORD dwPageRVA; + DWORD dwBlockSize; +} IMAGE_FIXUP_BLOCK, *PIMAGE_FIXUP_BLOCK; + +typedef struct { + WORD offset:12; + WORD type:4; +} IMAGE_FIXUP_ENTRY, *PIMAGE_FIXUP_ENTRY; + +typedef struct __imageparameters { + void *pImageBase; + char svName[MAX_PATH]; + DWORD dwFlags; + int nLockCount; + struct __imageparameters *next; +} IMAGE_PARAMETERS; + +typedef BOOL (WINAPI *DLLMAIN_T)(HMODULE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); + +#pragma pack(pop) + + +// Process-global variables + +IMAGE_PARAMETERS *g_pImageParamHead; +CRITICAL_SECTION g_DLLCrit; + +// Function implementations + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Detecta la version de windows // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Si es WinNT devuelve g_bIsWinNT=1 +// Si es Win'9x/Me devuelve g_bIsWinNT=0; +void CheckWindowsVersion(void) +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize=sizeof(OSVERSIONINFO); + + GetVersionEx(&osvi); + + if (osvi.dwPlatformId==VER_PLATFORM_WIN32_NT) + g_bIsWinNT=1; + else + g_bIsWinNT=0; + +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Initialization Routines // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void InitializeDLLLoad(void) +{ + InitializeCriticalSection(&g_DLLCrit); + g_pImageParamHead=NULL; +} + +void KillDLLLoad(void) +{ + IMAGE_PARAMETERS *cur,*next; + cur=g_pImageParamHead; + while(cur!=NULL) { + next=cur->next; + free(cur); + cur=next; + } + + DeleteCriticalSection(&g_DLLCrit); +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Internal DLL list management // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// returns 0 if just ref count increment, 1 if this is a new addition, -1 on error +static int AddDLLReference(void *pImageBase, char *svName, DWORD dwFlags) +{ + IMAGE_PARAMETERS *cur; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==pImageBase) break; + } + + if(cur!=NULL) { + // increment dll count + cur->nLockCount++; + LeaveCriticalSection(&g_DLLCrit); + return 0; + } + + // Add new dll to list + cur=(IMAGE_PARAMETERS *)malloc(sizeof(IMAGE_PARAMETERS)); + if(cur==NULL) { + LeaveCriticalSection(&g_DLLCrit); + return -1; + } + + cur->pImageBase=pImageBase; + if(svName!=NULL) { + lstrcpyn(cur->svName,svName, MAX_PATH); + } else cur->svName[0]='\0'; + cur->nLockCount=1; + cur->dwFlags=dwFlags; + cur->next=g_pImageParamHead; + g_pImageParamHead=cur; + + LeaveCriticalSection(&g_DLLCrit); + return 1; +} + +// returns 0 if just a reference count dec, 1 if fully removed from list, -1 on error +static int RemoveDLLReference(void *pImageBase, char *svName, DWORD *pdwFlags) +{ + IMAGE_PARAMETERS *cur,*prev; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + prev=NULL; + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==pImageBase) break; + prev=cur; + } + if(cur==NULL) { + LeaveCriticalSection(&g_DLLCrit); + return -1; + } + + // decrement dll count + cur->nLockCount--; + // look up dll information + *pdwFlags=cur->dwFlags; + lstrcpyn(svName,cur->svName,MAX_PATH); + + // Remove if time to go + if(cur->nLockCount==0) { + if(prev==NULL) { + g_pImageParamHead=g_pImageParamHead->next; + free(cur); + } else { + prev->next=cur->next; + free(cur); + } + + LeaveCriticalSection(&g_DLLCrit); + return 1; + } + + LeaveCriticalSection(&g_DLLCrit); + return 0; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLHandle() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +// Like GetModuleHandle(), returns null if the module is not loaded, returns a base address otherwise +HMODULE GetDLLHandle(char *svName) +{ + IMAGE_PARAMETERS *cur; + + if(svName==NULL) return NULL; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(lstrcmpi(cur->svName,svName)==0) break; + } + + if(cur!=NULL) { + LeaveCriticalSection(&g_DLLCrit); + return (HMODULE) cur->pImageBase; + } + + LeaveCriticalSection(&g_DLLCrit); + return NULL; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLFileName() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +// Like GetModuleFileName(), returns 0 on failure +DWORD GetDLLFileName(HMODULE hModule, LPTSTR lpFileName, DWORD nSize) +{ + DWORD dwRet; + IMAGE_PARAMETERS *cur; + + if(hModule==NULL || lpFileName==NULL || nSize==0) return 0; + + if((dwRet=GetModuleFileName(hModule,lpFileName,nSize))!=0) return dwRet; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==hModule) break; + } + + if(cur!=NULL) { + LeaveCriticalSection(&g_DLLCrit); + lstrcpyn(lpFileName,cur->svName,nSize); + return lstrlen(lpFileName); + } + + LeaveCriticalSection(&g_DLLCrit); + return 0; +} + + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +// Like GetProcAddress(), returns null if the procedure/ordinal is not there, otherwise returns function addr. +FARPROC GetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName) +{ + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_EXPORT_DIRECTORY ped; + int nOrdinal; + int nDirCount; + DWORD *pAddrTable; + DWORD dwRVA; + DWORD dwAddr; + + if(hModule==NULL) return NULL; + + // Get header + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (hModule); + + // Get number of image directories in list + + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Sift through export table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size==0) return NULL; + + // Good, we have an export table. Lets get it. + + ped=(IMAGE_EXPORT_DIRECTORY *)RVATOVA(hModule,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress); + + // Get ordinal of desired function + + if(HIWORD((DWORD)lpProcName)==0) { + nOrdinal=(LOWORD((DWORD)lpProcName)) - ped->Base; + } else { + + // Go through name table and find appropriate ordinal + + int i,count; + DWORD *pdwNamePtr; + WORD *pwOrdinalPtr; + + count=ped->NumberOfNames; + pdwNamePtr=(DWORD *)RVATOVA(hModule,ped->AddressOfNames); + pwOrdinalPtr=(WORD *)RVATOVA(hModule,ped->AddressOfNameOrdinals); + + for(i=0;iAddressOfFunctions); + + dwRVA=pAddrTable[nOrdinal]; + + + // Check if it's a forwarder, or a local addr + // XXX Should probably do this someday. Just don't define forwarders. You're + // XXX not loading kernel32.dll with this shit anyway. + + dwAddr=(DWORD) RVATOVA(hModule,dwRVA); + + return (FARPROC) dwAddr; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Modifies an image. Must be loaded with RWX_PERMISSIONS, or have the export +// table writable +FARPROC SetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName, FARPROC fpAddr) +{ + PIMAGE_OPTIONAL_HEADER poh; + int nDirCount; + PIMAGE_EXPORT_DIRECTORY ped; + int nOrdinal; + DWORD *pAddrTable; + DWORD dwOldAddr; + + if(hModule==NULL) return FALSE; + + // Get header + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (hModule); + + // Get number of image directories in list + + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Sift through export table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size==0) return FALSE; + + // Good, we have an export table. Lets get it. + + ped=(IMAGE_EXPORT_DIRECTORY *)RVATOVA(hModule,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress); + + // Get ordinal of desired function + + if(HIWORD((DWORD)lpProcName)==0) { + nOrdinal=(LOWORD((DWORD)lpProcName)) - ped->Base; + } else { + + // Go through name table and find appropriate ordinal + + int i,count; + DWORD *pdwNamePtr; + WORD *pwOrdinalPtr; + + count=ped->NumberOfNames; + pdwNamePtr=(DWORD *)RVATOVA(hModule,ped->AddressOfNames); + pwOrdinalPtr=(WORD *)RVATOVA(hModule,ped->AddressOfNameOrdinals); + + for(i=0;iAddressOfFunctions); + + dwOldAddr=(DWORD) RVATOVA(hModule,(pAddrTable[nOrdinal])); + pAddrTable[nOrdinal]=(DWORD) VATORVA(hModule,((DWORD)fpAddr)); + + return (FARPROC) dwOldAddr; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ResetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +BOOL ResetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName) +{ + char svName[MAX_PATH+1]; + DWORD dwAddr; + DWORD dwNewAddr; + + if(GetDLLFileName(hModule,svName,MAX_PATH+1)) { + // Load another copy of the DLL + HMODULE hNewMod=LoadDLLEx(svName,NULL,FORCE_LOAD_NEW_IMAGE); + if(hNewMod==NULL) return FALSE; + dwAddr=(DWORD)GetDLLProcAddress(hNewMod,lpProcName); + if(dwAddr==(DWORD)NULL) { + FreeDLL(hNewMod); + return FALSE; + } + + dwNewAddr=(DWORD)RVATOVA(hModule,VATORVA(hNewMod,dwAddr)); + + FreeDLL(hNewMod); + + SetDLLProcAddress(hModule,lpProcName,(FARPROC)dwNewAddr); + + return TRUE; + } + + return FALSE; +} + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Internal DLL Loader code // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +static BOOL RunDLLMain(void *pImageBase, DWORD dwImageSize, BOOL bDetach) +{ + // Get entry point from header + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_FILE_HEADER pfh; + DLLMAIN_T pDllMain; + BOOL bRet; + + pfh = (PIMAGE_FILE_HEADER)PEFHDROFFSET(pImageBase); + if((pfh->Characteristics & IMAGE_FILE_DLL)==0) return TRUE; + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (pImageBase); + pDllMain=(DLLMAIN_T) RVATOVA(pImageBase, poh->AddressOfEntryPoint); + + // Call dllmain the right way + + if(bDetach) { + bRet=pDllMain((HMODULE) pImageBase, DLL_PROCESS_DETACH, NULL); + } else { + bRet=pDllMain((HMODULE) pImageBase, DLL_PROCESS_ATTACH, NULL); + } + + return bRet; +} + +BOOL PrepareDLLImage(void *pMemoryImage, DWORD dwImageSize, BOOL bResolve, BOOL bRebind) +{ + // Get headers + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_SECTION_HEADER psh; + int nDirCount; + DWORD delta; + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (pMemoryImage); + psh = (PIMAGE_SECTION_HEADER)SECHDROFFSET (pMemoryImage); + + // Get number of image directories in list + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Process import table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].Size!=0) { + PIMAGE_IMPORT_DESCRIPTOR pid; + pid=(IMAGE_IMPORT_DESCRIPTOR *)RVATOVA(pMemoryImage,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress); + + // For all imported DLLs + while(pid->OriginalFirstThunk!=0) { + char *svDllName; + HMODULE hDll; + + svDllName=(char *) RVATOVA(pMemoryImage,pid->Name); + + // Map library into address space (could also use LoadDLL()) + hDll=GetModuleHandle(svDllName); + if(hDll==NULL) hDll=LoadLibrary(svDllName); + + if(hDll==NULL) return FALSE; + + // Bind if not bound already + if(pid->TimeDateStamp==0 || bRebind) { + PIMAGE_THUNK_DATA ptd_in,ptd_out; + + // Store DLL infoz + + pid->ForwarderChain=(DWORD)hDll; + pid->TimeDateStamp=0xCDC31337; // This is bullshit cuz I don't want to call libc. + + // Fill in Import Address Table + + ptd_in=(PIMAGE_THUNK_DATA) RVATOVA(pMemoryImage, pid->OriginalFirstThunk); + ptd_out=(PIMAGE_THUNK_DATA) RVATOVA(pMemoryImage, pid->FirstThunk); + + while(ptd_in->u1.Function!=NULL) { + FARPROC func; + + // Determine if ordinal or name pointer + if(ptd_in->u1.Ordinal & 0x80000000) { + // Ordinal + func=GetProcAddress(hDll,MAKEINTRESOURCE(ptd_in->u1.Ordinal)); + } else { + // Function name + PIMAGE_IMPORT_BY_NAME pibn; + pibn=(PIMAGE_IMPORT_BY_NAME) RVATOVA(pMemoryImage,ptd_in->u1.AddressOfData); + func=GetProcAddress(hDll,(char *)pibn->Name); + } + + if(func==NULL) return FALSE; + + // Write address to appropriate location + ptd_out->u1.Function = (PDWORD) func; + + ptd_in++; + ptd_out++; + } + } + + pid++; + } + } + + // - Process relocation tables if necessary ---------------------------------- + + // Calculate fixup delta + delta=(DWORD)pMemoryImage - (DWORD)poh->ImageBase; + + if((delta!=0) && (poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size!=0)) { + PIMAGE_FIXUP_BLOCK pfb; + pfb=(PIMAGE_FIXUP_BLOCK)RVATOVA(pMemoryImage,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress); + + + // For each fixup block + while(pfb->dwPageRVA!=0) { + PIMAGE_FIXUP_ENTRY pfe; + int i,count; + + count=(pfb->dwBlockSize-sizeof(IMAGE_FIXUP_BLOCK))/sizeof(IMAGE_FIXUP_ENTRY); + pfe=(PIMAGE_FIXUP_ENTRY)((char *)pfb + sizeof(IMAGE_FIXUP_BLOCK)); + + // For each fixup entry + for(i=0;idwPageRVA + pfe->offset); + switch(pfe->type) { + case IMAGE_REL_BASED_ABSOLUTE: + break; + case IMAGE_REL_BASED_HIGH: + *((WORD *)fixaddr) += HIWORD(delta); + break; + case IMAGE_REL_BASED_LOW: + *((WORD *)fixaddr) += LOWORD(delta); + break; + case IMAGE_REL_BASED_HIGHLOW: + *((DWORD *)fixaddr) += delta; + break; + case IMAGE_REL_BASED_HIGHADJ: // This one's really fucked up. + adjust=((*((WORD *)fixaddr)) << 16) | (*(WORD *)(pfe+1)); + adjust += delta; + adjust += 0x00008000; + *((WORD *)fixaddr) = HIWORD(adjust); + pfe++; + break; + default: + return FALSE; + } + + pfe++; + } + + pfb=(PIMAGE_FIXUP_BLOCK)((char *)pfb + pfb->dwBlockSize); + } + } + + + + return TRUE; +} + +static BOOL ProtectDLLImage(void *pMemoryImage, BOOL bRWX) +{ + // Get Number of Sections + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + PIMAGE_OPTIONAL_HEADER poh; + DWORD hdrlen; + int i; + PIMAGE_SECTION_HEADER psh; + + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pMemoryImage); + nSectionCount=pfh->NumberOfSections; + + // Get PE Header Length + Section Header Length + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pMemoryImage); + hdrlen=poh->SizeOfHeaders; + + // Protect sections one by one + psh=(PIMAGE_SECTION_HEADER) SECHDROFFSET(pMemoryImage); + for(i=0;iVirtualAddress); + secLen = psh->SizeOfRawData; + + // Parse Characteristics and protect memory appropriately + bWrite = (psh->Characteristics & IMAGE_SCN_MEM_WRITE)?TRUE:FALSE; + bRead = (psh->Characteristics & IMAGE_SCN_MEM_READ)?TRUE:FALSE; + bExec = (psh->Characteristics & IMAGE_SCN_MEM_EXECUTE)?TRUE:FALSE; + bShared = (psh->Characteristics & IMAGE_SCN_MEM_SHARED)?TRUE:FALSE; + + if(bWrite && bRead && bExec && bShared) newProtect=PAGE_EXECUTE_READWRITE; + else if(bWrite && bRead && bExec) newProtect=PAGE_EXECUTE_WRITECOPY; + else if(bRead && bExec) newProtect=PAGE_EXECUTE_READ; + else if(bExec) newProtect=PAGE_EXECUTE; + else if(bWrite && bRead && bShared) newProtect=PAGE_READWRITE; + else if(bWrite && bRead) newProtect=PAGE_WRITECOPY; + else if(bRead) newProtect=PAGE_READONLY; + + if(bRWX) newProtect=PAGE_WRITECOPY; + + if(psh->Characteristics & IMAGE_SCN_MEM_NOT_CACHED) newProtect |= PAGE_NOCACHE; + + if(newProtect==0) return FALSE; + + VirtualProtect(secMemAddr,secLen,newProtect,&oldProtect); + + psh++; + } + + return TRUE; +} + + +BOOL MapDLLFromImage(void *pDLLFileImage, void *pMemoryImage) +{ + // Get Number of Sections + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + PIMAGE_OPTIONAL_HEADER poh; + DWORD hdrlen; + int i; + PIMAGE_SECTION_HEADER psh; + + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pDLLFileImage); + nSectionCount=pfh->NumberOfSections; + + // Get PE Header Length + Section Header Length + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pDLLFileImage); + hdrlen=poh->SizeOfHeaders; + + // Copy PE Header + Section Headers + memcpy(pMemoryImage,pDLLFileImage,hdrlen); + + // Copy Sections one by one + psh=(PIMAGE_SECTION_HEADER) SECHDROFFSET(pDLLFileImage); + for(i=0;iVirtualAddress; + secFileAddr = (char *)pDLLFileImage + psh->PointerToRawData; + secLen = psh->SizeOfRawData; + + memcpy(secMemAddr,secFileAddr,secLen); + + psh++; + } + + + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLLFromImage() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HMODULE LoadDLLFromImage(void *pDLLFileImage, char *svMappingName, DWORD dwFlags) +{ + // Examine DOS Header + PIMAGE_DOS_HEADER doshead; + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + void *pPreferredImageBase; + DWORD dwImageSize; + void *pImageBase; + HANDLE hmapping; + PIMAGE_OPTIONAL_HEADER poh; + int dllaction; + + doshead=(PIMAGE_DOS_HEADER) pDLLFileImage; + if(doshead->e_magic!=IMAGE_DOS_SIGNATURE) return NULL; + + // Ensure our input is of good length + if(svMappingName!=NULL) { + if(lstrlen(svMappingName) >= MAX_PATH) return NULL; + } + + // Determine File Format + if(*(DWORD *)NTSIGNATURE(pDLLFileImage) != IMAGE_NT_SIGNATURE) return NULL; + + + // Get PE Header + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pDLLFileImage); + + + // Ensure proper machine type + //if(pfh->Machine!=IMAGE_FILE_MACHINE_I386) return NULL; + // XXX Verify Characteristics + // XXX I don't bother to do this yet. + + + // Get Section Count + nSectionCount=pfh->NumberOfSections; + + + // Get PE Optional Header + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pDLLFileImage); + + + // Ensure we are an executable image, not a rom image + if(poh->Magic!=0x010B) return NULL; + + + // Get preferred image base and image length + pPreferredImageBase=(void *)poh->ImageBase; + dwImageSize=poh->SizeOfImage; + + // Get base address of virtual image + hmapping=NULL; + + pImageBase=GetDLLHandle(svMappingName); + if(pImageBase==NULL) { + BOOL bCreated=FALSE; + BOOL bRebased=FALSE; + // If not mapped into this process, then we should map it now + +// Esto es para windows nt, de momento se quita + + if(g_bIsWinNT) { + // === Windows NT DLL Loading (supports shared sections) === + if(svMappingName!=NULL) { + hmapping=OpenFileMapping(FILE_MAP_WRITE,TRUE,svMappingName); + bCreated=FALSE; + } + if(hmapping==NULL) { + hmapping=CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE,0,dwImageSize+SIZE_OF_PARAMETER_BLOCK,svMappingName); + if(hmapping==NULL) return NULL; + bCreated=TRUE; + } + + // Try to load file mapping view at preferred image base (not gonna happen in Win9x..sigh) + + pImageBase=MapViewOfFileEx(hmapping,FILE_MAP_WRITE,0,0,0,pPreferredImageBase); + if(pImageBase==NULL) { + pImageBase=MapViewOfFileEx(hmapping,FILE_MAP_WRITE,0,0,0,NULL); + } + CloseHandle(hmapping); + if(pImageBase==NULL) return NULL; + } else { + // === Windows 9x DLL Loading (does not support shared sections) === + pImageBase=VirtualAlloc(pPreferredImageBase,dwImageSize,MEM_COMMIT|MEM_RESERVE,PAGE_READWRITE); + if(pImageBase==NULL) { + pImageBase=VirtualAlloc(NULL,dwImageSize,MEM_COMMIT|MEM_RESERVE,PAGE_READWRITE); + if(pImageBase==NULL) return NULL; + } + + bCreated=TRUE; + } + + // Now map DLL from file image into appropriate memory image (if just created) + // Also remap if DLL is being rebased as well (gotta fix relocations) + + if(bCreated || (pImageBase!=pPreferredImageBase)) { + if(!MapDLLFromImage(pDLLFileImage,pImageBase)) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + + // Prepare DLL image (handle relocations/import/export/etc) + + if(!(dwFlags & LOAD_LIBRARY_AS_DATAFILE)) { + if(!PrepareDLLImage(pImageBase, dwImageSize, (dwFlags & DONT_RESOLVE_DLL_REFERENCES)?FALSE:TRUE,(dwFlags & REBIND_IMAGE_IMPORTS)?TRUE:FALSE)) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + + // Resolve DLL references + + if(!(dwFlags & DONT_RESOLVE_DLL_REFERENCES)) { + BOOL bRet; + bRet=RunDLLMain(pImageBase,dwImageSize,DLL_ATTACH); + if(!bRet) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + + + // Apply appropriate protections + + if(!ProtectDLLImage(pImageBase, (dwFlags & RWX_PERMISSIONS)?TRUE:FALSE) ){ + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + } + + + // Add to DLL table/increase reference count + + dllaction=AddDLLReference(pImageBase,svMappingName,dwFlags); + if(dllaction==-1) { + if(hmapping!=NULL) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + } + return NULL; + } + + return (HMODULE) pImageBase; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLLEx() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HMODULE LoadDLLEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags) +{ + char svPath[MAX_PATH+1]; + char *svFilePart; + int nPathLen; + HANDLE hfile; + HANDLE hmapping; + void *baseaddr; + HMODULE ret; + + // Find DLL File + if(dwFlags & LOAD_WITH_ALTERED_SEARCH_PATH) { + return NULL; + } else { + nPathLen=SearchPath(NULL,lpLibFileName,".dll",MAX_PATH,svPath,&svFilePart); + if(nPathLen==0) return NULL; + } + + // Open File + hfile=CreateFile(svPath,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,0,NULL); + if(hfile==INVALID_HANDLE_VALUE) return NULL; + + // Create a file mapping + hmapping=CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL); + + // Close file handle since we don't need it anymore + CloseHandle(hfile); + + // Map file mapping object to memory image + baseaddr=MapViewOfFile(hmapping,FILE_MAP_READ,0,0,0); + if(baseaddr==NULL) { + CloseHandle(hmapping); + return NULL; + } + + // Now pass off to LoadDLLFromImage + if(dwFlags & FORCE_LOAD_NEW_IMAGE) { + ret=LoadDLLFromImage(baseaddr, NULL, dwFlags & ~LOAD_WITH_ALTERED_SEARCH_PATH); + } else { + ret=LoadDLLFromImage(baseaddr, svFilePart, dwFlags & ~LOAD_WITH_ALTERED_SEARCH_PATH); + } + + + // Close file mapping + UnmapViewOfFile(baseaddr); + CloseHandle(hmapping); + + // Return base address as an instance handle + return (HMODULE) ret; +} + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLL() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +HMODULE LoadDLL(LPCTSTR lpLibFileName) +{ + return LoadDLLEx(lpLibFileName,NULL,0); +} + + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// FreeDLL() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +BOOL FreeDLL(HMODULE hLibModule) +{ + PIMAGE_DOS_HEADER doshead; + PIMAGE_OPTIONAL_HEADER poh; + DWORD dwImageSize; + DWORD dwFlags; + char svName[MAX_PATH]; + int dllaction; + BOOL bRet; + + if(hLibModule==NULL) return FALSE; + + // Examine DOS Header + doshead=(PIMAGE_DOS_HEADER) hLibModule; + if(doshead->e_magic!=IMAGE_DOS_SIGNATURE) return FALSE; + + // Determine File Format + if(*(DWORD *)NTSIGNATURE(hLibModule) != IMAGE_NT_SIGNATURE) return FALSE; + + // Get PE Optional Header + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(hLibModule); + + // Ensure we are an executable image, not a rom image + if(poh->Magic!=0x010B) return FALSE; + + // Get image length + dwImageSize=poh->SizeOfImage; + + // Get from DLL table/decrease reference count + dllaction=RemoveDLLReference(hLibModule,svName,&dwFlags); + if(dllaction==-1) return (BOOL) NULL; + + // Call DllMain if necessary + bRet=TRUE; + + if(!(dwFlags & (LOAD_LIBRARY_AS_DATAFILE | DONT_RESOLVE_DLL_REFERENCES))) { + if(dllaction) { + RunDLLMain(hLibModule,dwImageSize,DLL_DETACH); + if(g_bIsWinNT) bRet=UnmapViewOfFile(hLibModule); + else bRet=VirtualFree(hLibModule,0,MEM_RELEASE); + } + } + + return bRet; +} diff --git a/ediv/src/shared/dll_load.h b/ediv/src/shared/dll_load.h new file mode 100644 index 0000000..78721fc --- /dev/null +++ b/ediv/src/shared/dll_load.h @@ -0,0 +1,64 @@ +/* Back Orifice 2000 - Remote Administration Suite + Copyright (C) 1999, Cult Of The Dead Cow + + 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 + + The author of this program may be contacted at dildog@l0pht.com. */ + +#ifndef __DLL_LOAD_H__ +#define __DLL_LOAD_H__ + +#include + +#define NTSIGNATURE(ptr) ((LPVOID)((BYTE *)(ptr) + ((PIMAGE_DOS_HEADER)(ptr))->e_lfanew)) +#define SIZE_OF_NT_SIGNATURE (sizeof(DWORD)) +#define PEFHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE)) +#define OPTHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE+sizeof(IMAGE_FILE_HEADER))) +#define SECHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE+sizeof(IMAGE_FILE_HEADER)+sizeof(IMAGE_OPTIONAL_HEADER))) +#define RVATOVA(base,offset) ((LPVOID)((DWORD)(base)+(DWORD)(offset))) +#define VATORVA(base,offset) ((LPVOID)((DWORD)(offset)-(DWORD)(base))) + +#define SIZE_OF_PARAMETER_BLOCK 4096 +#define IMAGE_PARAMETER_MAGIC 0xCDC31337 +#define MAX_DLL_PROCESSES 256 +#define DLL_ATTACH 0 +#define DLL_DETACH 1 + +// NEW FLAGS +#define REBIND_IMAGE_IMPORTS 0x00000100 +#define RWX_PERMISSIONS 0x00000200 +#define FORCE_LOAD_NEW_IMAGE 0x00000400 + +// Internal functions +BOOL MapDLLFromImage(void *pDLLFileImage, void *pMemoryImage); +BOOL PrepareDLLImage(void *pMemoryImage, DWORD dwImageSize, BOOL bResolve, BOOL bRebind); + +// Primary functions +void InitializeDLLLoad(void); +void KillDLLLoad(void); +HMODULE GetDLLHandle(char *svName); +DWORD GetDLLFileName(HMODULE hModule, LPTSTR lpFileName, DWORD nSize); +FARPROC GetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName); +FARPROC SetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName, FARPROC fpAddr); +BOOL ResetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName); +HMODULE LoadDLLFromImage(void *pDLLFileImage, char *svMappingName, DWORD dwFlags); +HMODULE LoadDLLEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags); +HMODULE LoadDLL(LPCTSTR lpLibFileName); +BOOL FreeDLL(HMODULE hLibModule); +void CheckWindowsVersion(void); + + + +#endif // __DLL_LOAD_H__ \ No newline at end of file diff --git a/ediv/src/shared/edivfont.h b/ediv/src/shared/edivfont.h new file mode 100644 index 0000000..e73479f --- /dev/null +++ b/ediv/src/shared/edivfont.h @@ -0,0 +1,45 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +// FICHERO DEL FORMATO DE LOS FICHEROS .FNT +// by Riseven + +/* + -Estructura de control + contiene informacion sobre el offset y tamaño del bmp en el fichero .fnt + para poder leerlo, tambien contiene el offset de la estructura de informacion + -Mapa de caracteres + es la imagen del mapa de caracteres, se copia directamente. +*/ + +#ifndef __EDIVFONT_H +#define __EDIVFONT_H + +#include + +struct _fuente_control_s{ + int offset_imagen ; + int size_imagen ; + int w , h , bytespp ; + SDL_Rect rect[256] ; + SDL_Surface *imagen ; +}; + +#endif \ No newline at end of file diff --git a/ediv/src/shared/extern.h b/ediv/src/shared/extern.h new file mode 100644 index 0000000..e1d4820 --- /dev/null +++ b/ediv/src/shared/extern.h @@ -0,0 +1,290 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __EXTERN_H +#define __EXTERN_H + + /*#ifdef _WIN32 +# include "dll_load.h" +#endif*/ + +#include +#include "main.h" + +#define MAX_EXTERN_FUNCS 0xFFFF // ¿Demasiado? +#define MAX_EXTFUNC_PARMS 0xFF +#define MAX_DLLS 0xFF +#define MAX_ENTRYPOINTS 0xFF + +#define P_SIEMPRE 512 // yo creo ke esto vale +#define P_NUNCA -512 + +char fichdll[256]; // Nombre de la DLL que se está ejecutando ahora + + +/////////// +// EXPORT + +int EDIV_Export(char* cadena, int nparam, void* hfuncion); // Funcion +int EDIV_Export_Const(char* cadena, int valor); // Constante +int EDIV_Export_Global(char* cadena, int valor); // Global +int EDIV_Export_Global_Tab(char* cadena, int numregs); // Tabla global +int EDIV_Export_Global_Struct(char* cadena, int numregs); // Struct global +int EDIV_Export_Member_Int(char* cadena, int valor); // Miembro int +int EDIV_Export_Member_Str(char* cadena, int tamano); // Miembro string +int EDIV_Export_Member_Tab(char* cadena, int numregs); // Miembro tabla +int EDIV_Export_EndStruct(); // Cierra struct +int EDIV_Export_Local(char* cadena, int valor); // Local +int EDIV_Export_Local_Tab(char* cadena, int numregs); // Tabla local (NO USADO EN DIV2) +int EDIV_Export_Local_Struct(char* cadena, int numregs); // Struct local +int EDIV_Export_Entrypoint(int ep, void* hfuncion); // Entrypoint +int EDIV_Export_Priority(int priority); // Prioridad de la DLL + +// TYPEOF_EXPORT + +typedef int (TYPEOF_EDIV_Export)(char* cadena, int nparam, void* hfuncion); +typedef int (TYPEOF_EDIV_Export_Const)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Global)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Global_Tab)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Global_Struct)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Member_Int)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Member_Str)(char* cadena, int tamano); +typedef int (TYPEOF_EDIV_Export_Member_Tab)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_EndStruct)(); +typedef int (TYPEOF_EDIV_Export_Local)(char* cadena, int valor); +typedef int (TYPEOF_EDIV_Export_Local_Tab)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Local_Struct)(char* cadena, int numregs); +typedef int (TYPEOF_EDIV_Export_Entrypoint)(int ep, void* hfuncion); +typedef int (TYPEOF_EDIV_Export_Priority)(int priority); + +// Call_Entrypoint +typedef int (TYPEOF_Call_Entrypoint)(int ep, ...); + +// Dibuja +typedef int (TYPEOF_Dibuja)(SDL_Surface *, SDL_Rect , SDL_Rect , int , int ) ; + +///////////// +// ENTRY-POINTS +/////////// +// Estas funciones son llamadas por el STUB en determinados eventos +// (Cuando una DLL hace cierta acción, lo avisa al Stub y el stub se encarga de llamar +// a las correspondientes rutinas de las dll's, ordenadas por prioridad) +///////// + +// Constantes para EDIV_Export_Entrypoint + +#define EDIV_set_video_mode 1 // Al activar un nuevo modo de vídeo +#define EDIV_process_palette 2 // Al cargar una paleta +#define EDIV_process_active_palette 3 // Al modificar la paleta activa (usada en los fades) +#define EDIV_process_sound 4 // Al cargar un efecto sonoro +#define EDIV_process_map 5 // Al cargar un mapa +#define EDIV_process_fpg 6 // Al cargar un FPG +#define EDIV_process_fnt 7 // Al cargar una fuente +#define EDIV_background_to_buffer 8 // Volcar el fondo al buffer +#define EDIV_buffer_to_video 9 // Volcar el buffer a la memoria de video +#define EDIV_post_process_scroll 10 // Tras dibujar una ventana de scroll (sin los sprites) +#define EDIV_post_process_m7 11 // Tras dibujar una ventana de modo7 (sin los sprites) +#define EDIV_post_process_m8 12 // Tras dibujar una ventana de modo8 (sin los sprites) +#define EDIV_post_process_buffer 13 // Tras haber terminado de dibujarlo todo +#define EDIV_post_process 14 // Tras ejecutar el frame de un proceso (cualquier %) +#define EDIV_put_sprite 15 // Dibujar un sprite +#define EDIV_ss_init 16 // Inicio de salvapantallas +#define EDIV_ss_frame 17 // Frame de salvapantallas +#define EDIV_ss_end 18 // Fin de salvapantallas +#define EDIV_frame 19 // En cada frame +#define EDIV_trace 20 // Después de ejecutar cada instrucción de bytecode (solo en debug) +#define EDIV_debug 21 // Invocar al trazador - sentencia debug (solo en debug) +#define EDIV_first_load 22 // Se ejecuta al cargar la DLL en ejecucion + + +// Call_Entrypoint +// Devuelve el número de entrypoints a los que corresponde ese identificador. +// (0 si no hay ninguno) +int Call_Entrypoint(int ep, ...); + +// Prototipos de los entrypoints (no hacen falta aki) +/* +void set_video_mode(void); +void process_palette(void); +void process_active_palette(void); +void process_sound(char *sound,int lenght); +void process_fpg(char *fpg,int fpg_lenght); +void process_map(char *map,int map_lenght); +void process_fnt(char *fnt,int fnt_lenght); +void background_to_buffer(void); +void buffer_to_video(void); +void post_process_scroll(void); +void post_process_m7(void); +void post_process_m8(void); +void post_process_buffer(void); +void post_process(void); +void put_sprite(unsigned char * si, int x,int y, int an, int al, int xg, int yg, + int ang, int size, int flags); +void ss_init(void); +void ss_frame(void); +void ss_end(void); +void frame(void); +*/ +////////////////////////////// + + +#define EXPORTAFUNCS_PARAMS \ + EDIV_Export ,\ + EDIV_Export_Const ,\ + EDIV_Export_Global ,\ + EDIV_Export_Global_Tab ,\ + EDIV_Export_Global_Struct,\ + EDIV_Export_Member_Int ,\ + EDIV_Export_Member_Str ,\ + EDIV_Export_Member_Tab ,\ + EDIV_Export_EndStruct ,\ + EDIV_Export_Local ,\ + EDIV_Export_Local_Tab ,\ + EDIV_Export_Local_Struct ,\ + EDIV_Export_Entrypoint ,\ + EDIV_Export_Priority + +#define EXPORTAFUNCS_PARAMS_DECLARE \ +TYPEOF_EDIV_Export *,\ +TYPEOF_EDIV_Export_Const *,\ +TYPEOF_EDIV_Export_Global *,\ +TYPEOF_EDIV_Export_Global_Tab *,\ +TYPEOF_EDIV_Export_Global_Struct *,\ +TYPEOF_EDIV_Export_Member_Int *,\ +TYPEOF_EDIV_Export_Member_Str *,\ +TYPEOF_EDIV_Export_Member_Tab *,\ +TYPEOF_EDIV_Export_EndStruct *,\ +TYPEOF_EDIV_Export_Local *,\ +TYPEOF_EDIV_Export_Local_Tab *,\ +TYPEOF_EDIV_Export_Local_Struct *,\ +TYPEOF_EDIV_Export_Entrypoint *,\ +TYPEOF_EDIV_Export_Priority * + + + +/// FUNCIONES PREDEFINIDAS /// + +typedef int (TYPEOF_ExportaFuncs)(EXPORTAFUNCS_PARAMS_DECLARE); + + +// FUNCIÓN EXTERNA + +// ¡ojo! debe ser igual en export.h +#define FUNCTION_PARAMS \ + int *params, int *sp, \ + int mem[], \ + int *varindex, \ + struct _procs_s *procs_s, \ + TYPEOF_Call_Entrypoint *Call_Entrypoint + +struct _procs_s{ + int id ; // offset de los datos locales del proceso + int tipo ; // tipo de proceso + int orden ; // indice en proc_orden[] + int num_params ; // numero de parametros k coje ( NO SE PARA K SIRVE PERO PARA ALGO ESTARA CBP NO ? ) + int imem ; // Posicion en la k se quedo suspendido el proceso + int priority ; // Priority + int frame; // Frame completado + int graph ; +} procs_s[ 4096 ] ; + +struct _regions +{ + int x , y , w , h ; +} ; + +struct _existe { + int regions ; + int dibuja ; +} ; + +struct _file +{ + SDL_Surface *Surface ; + int existe ; + struct + { + int x , y ; + } cpoint[ 20 ] ; +} ; + +struct _files +{ + int num ; + int existe ; + struct _file *mapa ; +} ; + + +struct _fun_params{ + int *pila ; + int *sp ; + int *mem ; + int *varindex ; + struct _procs_s *procs_s ; + int *num_procs ; + int *proc_orden ; + int *proceso_actual ; + struct _regions *regions ; + struct _existe existe ; + struct _files *files ; + TYPEOF_Dibuja *Dibuja ; // <- Tienes una funcion identica a esta variable (Daijo) <<- Y que? , la funcion no esta dentro de esta estructura :P (Riseven) + TYPEOF_Call_Entrypoint *Call_Entrypoint ; +} fp ; + + + +// La pila de parametros y su señalador o como se llame +//int params[MAX_EXTFUNC_PARMS]; +//int sp; + +void* extfuncs[MAX_EXTERN_FUNCS]; // tabla de punteros a las funciones de las DLLs (stub) + +struct _entrypoints { + int tipo; // Ver #defines de entrypoints más arriba + int dll; // DLL que contiene este entrypoint + void* hfuncion; // Puntero a la función entrypoint de la DLL +} entrypoints[MAX_ENTRYPOINTS]; + +struct _dlls { + char* nombre; // nombre de la DLL (ej: "sample.so") + byte usado; // si la dll es requerida por el programa + int mem_nombre; // posición del nombre en mem[] + int prioridad; // prioridad por defecto de la DLL + void* hDLL; +// int mem_size; // tamaño ocupado en mem[] +// int loc_size; // tamaño ocupado en loc[] +// int nfuncs; // numero de funciones que contiene +// struct _extfunc ext_funcs[MAX_EXTERN_FUNCS]; +} dlls[MAX_DLLS]; + +int dimem; // indices para poder devolver offsets de variables segun se van declarando +int diloc; + +int numdlls; // Número de DLLs encontradas en el directorio +int n_dlls; // Número de DLLs requeridas por el programa +int n_externs; // Número de funciones importadas +int n_entrypoints; // Número de entrypoints declarados + +// usar putparm() para poner los parametros en la pila de parametros en el orden normal +// (del primero al ultimo) +//#define putparm(a) params[sp++]=(int)a + +#endif // __EXTERN_H \ No newline at end of file diff --git a/ediv/src/shared/language.h b/ediv/src/shared/language.h new file mode 100644 index 0000000..693592e --- /dev/null +++ b/ediv/src/shared/language.h @@ -0,0 +1,53 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* IDs de idioma: + * 0 - ES - Español + * 1 - IT - Italiano (CicTec) + * 2 - PT - Portugués (tareco) + * 3 - EN - Inglés (de momento Er_Makina :P) + * 4 - CA - Catalán (BenKo) + * 5 - EU - Euskera (Jorge Urreta) + */ + +#ifndef __LANGUAGE_H +#define __LANGUAGE_H + +#define NUM_LANGUAGES 6 + +#define DEFAULT_LANGUAGE 3 + +int idioma; + +// comunes +int detecta_idioma(); +char* translate(int id_cadena); +char* translate_dll_error(int num); + +// compilador +char* translate_error(int num); +char* translate_warning(int num); +char* translate_ltlex_error(int num); + +// stub +char* translate_runtime_error(int num); +char* translate_critical_error(int num); + +#endif // __LANGUAGE_H diff --git a/ediv/src/shared/shared.h b/ediv/src/shared/shared.h new file mode 100644 index 0000000..f6a4dd4 --- /dev/null +++ b/ediv/src/shared/shared.h @@ -0,0 +1,22 @@ +/* + Definiciones compartidas de eDiv - Usar en eDiv, encrypt y stub :) +*/ + +#ifndef __SHARED_H +#define __SHARED_H + +#define VERSION "0.1 - beta 1 (Orion)" +#define la_clave "Open_eDiv" + +#define uchar char +#define byte unsigned char +#define ushort unsigned short +#define word unsigned short +#define ulong unsigned int +#define dword unsigned int + +#define magic "eDIV Stub\x1a\x0d\x0a\xff" + +#define long_header 9 //Longitud de la cabecera al inicio de los programas + +#endif // __SHARED_H \ No newline at end of file diff --git a/ediv/src/shared/utils.c b/ediv/src/shared/utils.c new file mode 100644 index 0000000..7db232c --- /dev/null +++ b/ediv/src/shared/utils.c @@ -0,0 +1,75 @@ +#include "utils.h" +#include "../ediv/lower.h" + +#ifdef _WIN32 /* Codigo 'Windowsero' */ +unsigned char tolowertab[] = { + 0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, + 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, + 0x1e, 0x1f, + ' ', '!', '"', '#', '$', '%', '&', 0x27, '(', ')', + '*', '+', ',', '-', '.', '/', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + ':', ';', '<', '=', '>', '?', + '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', + 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', + '_', + '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', + 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', + 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, + 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, + 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, + 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, + 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, + 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, + 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, + 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }; + +int strcasecmp(const char *s1, const char *s2) +{ +int diff=0; + + while(*s1) { + diff=tolowertab[*(unsigned char *)s1++]-tolowertab[*(unsigned char *)s2++]; + if(diff) break; + } + return diff; +} + +int strncasecmp(const char *s1, const char *s2, int n) +{ +int diff=0; + + while((*s1)&&(n-->0)) { + diff=tolowertab[*(unsigned char *)s1++]-tolowertab[*(unsigned char *)s2++]; + if(diff) break; + } + return diff; +} + +#endif /* Codigo 'Windowsero' */ + +#ifdef _LINUX /* Codigo 'Linuxsero' */ +char *strlwr(char *str) +{ + if (!i_lower) + inicializa_lower(); + + for (i=0;str[i]!=0;i++) { + if (lower[str[i]]!=0) str[i]=lower[str[i]]; + } + + return str; +} +#endif /* Codigo 'Linuxsero' */ \ No newline at end of file diff --git a/ediv/src/shared/utils.h b/ediv/src/shared/utils.h new file mode 100644 index 0000000..a9e86aa --- /dev/null +++ b/ediv/src/shared/utils.h @@ -0,0 +1,13 @@ +#ifndef __UTILS_H +#define __UTILS_H + +#ifdef _WIN32 /* Codigo windowsero */ +int strcasecmp(const char *s1, const char *s2); +int strncasecmp2(const char *s1, const char *s2, int n); +#endif /* _WIN32 */ + +#ifdef _LINUX +char *strlwr(char *str); +#endif + +#endif /* __UTILS_H */ \ No newline at end of file diff --git a/ediv/src/shared/varindex.h b/ediv/src/shared/varindex.h new file mode 100644 index 0000000..1db2ad4 --- /dev/null +++ b/ediv/src/shared/varindex.h @@ -0,0 +1,176 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __VARINDEX_H +#define __VARINDEX_H + +typedef enum { global, reserved, local } tipo_t; + +/// PROTOTIPOS /// + +// compilador +void inicializa_index(); +void indexa_variable(tipo_t tipo, char* nombre, int ptr); +void get_varptr(int** ptr, int* nptr); + + +int num_indexed_vars; +int *varindex; + +#define var(a) mem[varindex[a]] + +/* +////////////////////////////// +/// GLOBALES /// +////////////////////////////// + +#define _glo_timer 0 +#define _glo_max_process_time 1 +#define _glo_argc 2 +#define _glo_argv 3 + + +////////////////////////////// +/// LOCALES /// +////////////////////////////// + +// Estructura reserved + +#define _res_process_id 4 +#define _res_id_scan 5 +#define _res_process_type 6 +#define _res_type_scan 7 +#define _res_status 8 +#define _res_parameters 9 +#define _res_param_offset 10 +#define _res_program_index 11 +#define _res_stack_pointer 12 +#define _res_is_executed 13 +#define _res_is_painted 14 +#define _res_m8_object 15 +#define _res_old_ctype 16 +#define _res_frame_percent 17 +#define _res_box_x0 18 +#define _res_box_y0 19 +#define _res_box_x1 20 +#define _res_box_y1 21 +#define _res_f_count 22 +#define _res_caller_id 23 + +// Jerarquía de procesos +#define _loc_father 24 +#define _loc_son 25 +#define _loc_smallbro 26 +#define _loc_bigbro 27 + +// Variables locales varias +#define _loc_priority 28 +#define _loc_ctype 29 +#define _loc_x 30 +#define _loc_y 31 +#define _loc_z 32 +#define _loc_graph 33 +#define _loc_size 34 +#define _loc_angle 35 +#define _loc_region 36 +#define _loc_file 37 +#define _loc_xgraph 38 +#define _loc_height 39 +#define _loc_cnumber 40 +#define _loc_resolution 41 +#define _loc_flags 42 + +#define _glo_draw_z 43 +#define _glo_scroll 44 +#define _glo_fps 45 +*/ + +enum { + +////////////////////////////// +/// GLOBALES /// +////////////////////////////// + + _glo_timer, + _glo_max_process_time, + _glo_argc, + _glo_argv, + _glo_draw_z, + _glo_scroll, + _glo_fps, + + +////////////////////////////// +/// LOCALES /// +////////////////////////////// + +// Estructura reserved + + _res_process_id, + _res_id_scan, + _res_process_type, + _res_type_scan, + _res_status, + _res_parameters, + _res_param_offset, + _res_program_index, + _res_stack_pointer, + _res_is_executed, + _res_is_painted, + _res_m8_object, + _res_old_ctype, + _res_frame_percent, + _res_box_x0, + _res_box_y0, + _res_box_x1, + _res_box_y1, + _res_f_count, + _res_caller_id, + +// Jerarquía de procesos + _loc_father, + _loc_son, + _loc_smallbro, + _loc_bigbro, + +// Variables locales varias + _loc_priority, + _loc_ctype, + _loc_x, + _loc_y, + _loc_z, + _loc_graph, + _loc_size, + _loc_angle, + _loc_region, + _loc_file, + _loc_xgraph, + _loc_height, + _loc_cnumber, + _loc_resolution, + _loc_flags, + _loc_transparency, + + + ___last // por si acaso + +}; + +#endif // __VARINDEX_H \ No newline at end of file diff --git a/ediv/src/stub/Makefile b/ediv/src/stub/Makefile new file mode 100644 index 0000000..51ee132 --- /dev/null +++ b/ediv/src/stub/Makefile @@ -0,0 +1,66 @@ +# eDIV Compiler +# Copyright (C) 2001 Sion Entertainment +# http://www.sion-e.com +# +# 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 +# + +# makefile chorizado descaradamente del fenix + +debug = true +target = linux + +CFLAGS += -Wall + +# Usar debug=true para activar versión de depurado + +ifeq ($(debug), true) +CFLAGS += -DDEBUG -g +else +CFLAGS += -O2 +endif + +# Usar efence=true para activar la librería Electric Fence + +ifeq ($(efence), true) +LIBS += -lefence +endif + +# Usar target=win32 para compilar el .EXE de Windows + +ifeq ($(target), win32) +TARGET = ../../bin/stub.exe +else +TARGET = ../../bin/stub +endif + +CFLAGS += -DTARGET_$(target) +CFLAGS += -I/usr/include/SDL +LIBS += -lz -lSDL -lpthread + +# Target + +$(TARGET): stub.o kernel.o inte.o + $(CC) -o $@ $^ + +stub.o: stub.c $(HEADERS) +kernel.o: kernel.c $(HEADERS) +inte.o: inte.c $(HEADERS) + +# Limpieza/empaquetado/etc. + +clean: + rm -f *.o core + diff --git a/ediv/src/stub/compiler.c b/ediv/src/stub/compiler.c new file mode 100644 index 0000000..b4b97e5 --- /dev/null +++ b/ediv/src/stub/compiler.c @@ -0,0 +1,1065 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 +#ifdef __linux__ +# include +#endif + +#include + +#include "compiler.h" +#include "parser.h" +#include "lower.h" +#include "expresion.h" +#include "extern.h" +#include "modulos.h" +#include "encrypt.h" +#include "listados.h" + +void analiza_ltlex(void); // en ltlex.c + + +void prepara_compilacion() +{ + int n; + + vnom=NULL; + + mem_ory=NULL; + frm=NULL; + mem=NULL; + loc=NULL; + + itbreak=0; itcont=0; itelseif=0; + coment=0; cero=0; error_25=25; + + memset(vhash,0,256*sizeof(byte*)); + + inicializa_lower(); + + // Inicializamos la tabla de objetos + memset(obj,0,sizeof(obj[0])*max_obj); + iobj=obj; + num_obj=0; + + // Inicializamos la tabla de símbolos + memset(lex_simb,0,sizeof(lex_simb)); + ilex_simb=lex_simb; + num_nodos=0; + + + // Inicializamos los caracteres básicos en lex_case + for (n=0;n<256;n++) + if (lower[n]) { + if (n>='0' && n<='9') + lex_case[n]=(struct lex_ele *)l_num; + else + lex_case[n]=(struct lex_ele *)l_id; + } + else + lex_case[n]=(struct lex_ele *)l_err; + + + // Inicializamos el vector de nombres + vnom=(byte *) e_malloc(max_obj*long_med_id+1024); + ivnom.b=vnom; + + + // Leemos los símbolos y palabras reservadas de ltlex.def + analiza_ltlex(); + + + // Terminamos de inicializar lex_case + lex_case[' ']=(struct lex_ele *)l_spc; + lex_case[tab]=(struct lex_ele *)l_spc; + lex_case[cr]=(struct lex_ele *)l_cr; + lex_case[lf]=(struct lex_ele *)l_cr; + lex_case[0]=(struct lex_ele *)l_eof; + + // Buffer para el bytecode + imem_max=default_buffer; imem=0; + mem_ory=mem=(int*)e_malloc(imem_max*sizeof(int)); + memset(mem,0,imem_max*sizeof(int)); + + // Buffer para variables locales y privadas + iloc_max=default_buffer/2; iloc=0; iloc_len=0; + loc=(int*)e_malloc(iloc_max*sizeof(int)); + memset(loc,0,iloc_max*sizeof(int)); + + // No se lo que es + ifrm_max=default_buffer/2; + frm=(int*)e_malloc(ifrm_max*sizeof(int)); + memset(frm,0,ifrm_max*sizeof(int)); + + imem=long_header; + + *(prog+progsize)=0; + + _source=NULL; +} + +void compila() +{ + struct objeto * i; + FILE *f; + int n,l; + unsigned long m; + byte * q, * p; + int start_lin, start_dbg; + + ultima_linea=prog; + acceso_remoto=0; parametros=0; linea=1; + linf=NULL; + + printf("Precompilando...\n"); + + itxt=inicio_textos=imem; + psintactico(); // Para obtener "longitud_textos" + imem+=longitud_textos; + #ifdef _DEBUG + printf("longitud_textos: %d\n",longitud_textos); + #endif + + test_buffer(&mem,&imem_max,imem); + + if(n_errors>0) return; + + num_obj_predefinidos=num_obj; + + ultima_linea=source; //fwrite(&cero,1,1,lprg); + acceso_remoto=0; parametros=0; linea=1; + + sintactico(); + + i=obj; + while (iusado) { + linea=i->linea; + ierror=i->ierror; + error(0,34,i->name); // nombre desconocido + } + i++; + } + + if(n_errors>0) return; + + // Borra todo y comienza de nuevo :P + + printf("Compilando...\n"); + + if (frm!=NULL) { free(frm); frm=NULL; } + if (loc!=NULL) { free(loc); loc=NULL; } + if (mem!=NULL) { free(mem); mem=mem_ory=NULL; } + if (vnom!=NULL) { free(vnom); vnom=NULL; } + + prepara_compilacion(); + source=prog; + + dll_func2(); // recarga sólo las dlls necesarias + + if(debug) { + if((linf=tmpfile())==NULL) { + printf("Error creando archivo de intercambio\n"); + exit(1); + } + } + + itxt=inicio_textos=imem; + imem+=longitud_textos; + test_buffer(&mem,&imem_max,imem); + num_obj_predefinidos=num_obj; + acceso_remoto=0; parametros=0; linea=1; + + sintactico(); + + // Ahora que estamos en el final del bytecode, añadiremos la rutina que carga + // las DLLs. Lo primero es guardar las cadenas con los nombres: + for(n=0;n2*1000*1000) errormem(); + + if (n>*maximo-security_distance) { + max=*maximo; + *maximo=n+buffer_grow; + max=*maximo-max; + if (*buffer==mem) { + if ((*buffer=mem_ory=(int *)realloc(*buffer,*maximo*sizeof(int)))==NULL) + errormem(); + } else { + if ((*buffer=(int *)realloc(*buffer,*maximo*sizeof(int)))==NULL) + errormem(); + } + memset((byte*)*buffer+(*maximo-max)*sizeof(int),0,max*sizeof(int)); + } +} + + +//----------------------------------------------------------------------------- +// Analisis de un bloque de sentencias +//----------------------------------------------------------------------------- + +void sentencia() { + + int im1,im2,im3,im4; + int dir,from,to,step; + + while (pieza>=p_return) { + test_buffer(&mem,&imem_max,imem); + switch (pieza) { + case p_return: + inicio_sentencia(); + lexico(); if (pieza==p_abrir) { + lexico(); if (pieza!=p_cerrar) { + expresion(); if (pieza!=p_cerrar) error(3,18); // esperando ')' + g1(lrtf); + } else { + g1(lret); + } lexico(); + } else { + g1(lret); + } + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + final_sentencia(); grabar_sentencia(); break; + case p_if: + telseif[itelseif++]=0; + inicio_sentencia(); + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + g2(ljpf,0); im1=imem-1; + final_sentencia(); grabar_sentencia(); + if1: + sentencia(); + if (pieza==p_else) { + inicio_sentencia(); + lexico(); + g2(ljmp,0); mem[im1]=imem; im1=imem-1; + final_sentencia(); grabar_sentencia(); + sentencia(); + }else if (pieza==p_elseif) { + if (itelseif==0) error(0,73); // elseif fuera de bloque if + inicio_sentencia(); + g2(ljmp,0); telseif[itelseif++]=imem-1; + mem[im1]=imem; + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + g2(ljpf,0); im1=imem-1; + final_sentencia(); grabar_sentencia(); + goto if1; + } + mem[im1]=imem; if (pieza!=p_end) error(0,57); lexico(); // esperando END + while (telseif[--itelseif]!=0) mem[telseif[itelseif]]=imem; + break; + case p_loop: + tbreak[itbreak++]=0; tcont[itcont++]=0; + lexico(); + im1=imem; sentencia(); + if (pieza!=p_end) error(0,57); // esperando END + inicio_sentencia(); lexico(); + g2(ljmp,im1); + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im1; + final_sentencia(); grabar_sentencia(); + break; + case p_while: + inicio_sentencia(); + tbreak[itbreak++]=0; tcont[itcont++]=0; im1=imem; + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + g2(ljpf,0); im2=imem-1; + final_sentencia(); grabar_sentencia(); + sentencia(); + if (pieza!=p_end) error(0,57); inicio_sentencia(); // esperando END + lexico(); + g2(ljmp,im1); mem[im2]=imem; + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im1; + final_sentencia(); grabar_sentencia(); + break; + case p_repeat: + tbreak[itbreak++]=0; tcont[itcont++]=0; + lexico(); + im1=imem; sentencia(); + if (pieza!=p_until) error(0,58); // esperando UNTIL + inicio_sentencia(); + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + g2(ljpf,im1); + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im1; + final_sentencia(); grabar_sentencia(); + break; + case p_from: + inicio_sentencia(); + tbreak[itbreak++]=0; tcont[itcont++]=0; + lexico(); + if (pieza!=p_id) error(0,59); // esperando una variable + + if ((*o).tipo==tvglo) { + dir=(*o).vglo.offset; g2(lcar,dir); + } else if ((*o).tipo==tvloc && (!(*o).bloque || (*o).bloque==bloque_actual)) { + dir=-(*o).vloc.offset; + g2(lcar,-dir); g1(laid); + } else error(0,59); // esperando una variable + + lexico(); + if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + from=constante(); + if (pieza!=p_to) error(1,60); lexico(); // esperando TO + to=constante(); + if (from==to) error(4,61); // sentencia FROM incorrecta + if (pieza==p_step) { + lexico(); + step=constante(); + if (fromto && step>=0) error(4,62); + } else { + if (from=0) { // Comparación de la condición de permanencia + g2(lcar,dir); + } else { + g2(lcar,-dir); g1(laid); + } + g1(lptr); g2(lcar,to); + if (step>0) g1(lmei); else g1(lmai); + g2(ljpf,0); im2=imem-1; + + final_sentencia(); grabar_sentencia(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + + sentencia(); + if (pieza!=p_end) error(0,57); inicio_sentencia(); // esperando END + lexico(); + + im3=imem; // Posición del continue + + if (dir>=0) { // Incremento y vuelta al inicio del bucle + g2(lcar,dir); + } else { + g2(lcar,-dir); g1(laid); + } + g2(lcar,step); + g1(lada); g1(lasp); + g2(ljmp,im1); mem[im2]=imem; + + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im3; + final_sentencia(); grabar_sentencia(); + + break; + + case p_for: + inicio_sentencia(); + tbreak[itbreak++]=0; tcont[itcont++]=0; + lexico(); + if (pieza!=p_abrir) error(3,22); lexico(); // esperando '(' + if (pieza!=p_ptocoma) { + expresion(); g1(lasp); + while (pieza==p_coma) { lexico(); expresion(); g1(lasp); } + } im1=imem; + if (pieza!=p_ptocoma) error(3,9); lexico(); // esperando ';' + if (pieza==p_ptocoma) { + g2(lcar,1); + } else expresion(); + g2(ljpf,0); im2=imem-1; + while (pieza==p_coma) { lexico(); expresion(); + g2(ljpf,im2); im2=imem-1; } + g2(ljmp,0); im3=imem-1; + if (pieza!=p_ptocoma) error(3,9); lexico(); // esperando ';' + if (pieza!=p_cerrar) { + expresion(); g1(lasp); + while (pieza==p_coma) { lexico(); expresion(); g1(lasp); } + } + g2(ljmp,im1); + if (pieza!=p_cerrar) error(3,18); lexico(); // esperando ')' + final_sentencia(); grabar_sentencia(); + mem[im3++]=imem; sentencia(); + if (pieza!=p_end) error(0,57); // esperando END + inicio_sentencia(); lexico(); + g2(ljmp,im3); + do { im1=mem[im2]; mem[im2]=imem; im2=im1; } while(im2); + while (tbreak[--itbreak]!=0) mem[tbreak[itbreak]]=imem; + while (tcont[--itcont]!=0) mem[tcont[itcont]]=im3; + final_sentencia(); grabar_sentencia(); + break; + case p_switch: + inicio_sentencia(); + lexico(); + if (!free_sintax) if (pieza!=p_abrir) error(3,22); // esperando '(' + if (pieza==p_abrir) lexico(); + condicion(); + if (!free_sintax) if (pieza!=p_cerrar) error(3,18); // esperando ')' + if (pieza==p_cerrar) lexico(); + while (pieza==p_ptocoma) { + lexico(); + } + final_sentencia(); grabar_sentencia(); + im1=0; im2=0; + while (pieza!=p_end) { + inicio_sentencia(); + if (pieza==p_case) { + im3=0; do { + + lexico(); + if (im1) mem[im1]=imem; + expresion(); if (pieza!=p_rango) { + g2(lcse,0); im1=imem-1; + } else { + lexico(); expresion(); + g2(lcsr,0); im1=imem-1; + } + + if (pieza==p_coma) { + g2(ljmp,im3); im3=imem-1; + } + + } while (pieza==p_coma); + + while(im3) { im4=mem[im3]; mem[im3]=imem; im3=im4; } + + } else if (pieza==p_default) { + lexico(); + if (im1) mem[im1]=imem; im1=0; + } else error(0,63); // esperando case, default o end + if (!free_sintax) if (pieza!=p_ptocoma) error(3,64); // esperando ':' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + g1(lasp); + final_sentencia(); grabar_sentencia(); + sentencia(); + if (pieza!=p_end) error(0,57); // esperando END + inicio_sentencia(); + g2(ljmp,im2); im2=imem-1; + pasa_ptocoma(); + final_sentencia(); grabar_sentencia(); + } inicio_sentencia(); + if (im1) mem[im1]=imem; g1(lasp); + while(im2) { im1=mem[im2]; mem[im2]=imem; im2=im1; } + lexico(); + final_sentencia(); grabar_sentencia(); break; + case p_frame: + inicio_sentencia(); + lexico(); if (pieza==p_abrir) { + lexico(); if (pieza!=p_cerrar) { + expresion(); if (pieza!=p_cerrar) error(3,18); // esperando ')' + g1(lfrf); + } else { + g1(lfrm); + } lexico(); + } else { + g1(lfrm); + } + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + final_sentencia(); grabar_sentencia(); break; + case p_debug: + inicio_sentencia(); + g1(ldbg); lexico(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + final_sentencia(); grabar_sentencia(); + break; + case p_break: + inicio_sentencia(); + if (itbreak==0) error(0,65); lexico(); // break fuera de un bucle + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + g2(ljmp,0); tbreak[itbreak++]=imem-1; + final_sentencia(); grabar_sentencia(); break; + case p_continue: + inicio_sentencia(); + if (itcont==0) error(0,66); lexico(); // continue fuera de un bucle + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + g2(ljmp,0); tcont[itcont++]=imem-1; + final_sentencia(); grabar_sentencia(); break; + case p_clone: + inicio_sentencia(); + lexico(); g2(lclo,0); im1=imem-1; + final_sentencia(); grabar_sentencia(); + sentencia(); + if (pieza!=p_end) error(0,57); lexico(); // esperando END + mem[im1]=imem; break; + case p_ptocoma: + lexico(); break; + default: + inicio_sentencia(); + error_25=67; + expresion(); + do { + _exp--; + } while ((*_exp).tipo==eoper && (*_exp).token==p_string); + error_25=25; + switch((*_exp).tipo) { + case ecall: break; + //case efunc: break; + case efext: break; + case eoper: + switch((*_exp).token) { + case p_asig: case p_inc: case p_suma: case p_dec: case p_resta: + case p_add_asig: case p_sub_asig: case p_mul_asig: + case p_div_asig: case p_mod_asig: case p_and_asig: + case p_or_asig: case p_xor_asig: case p_shr_asig: case p_shl_asig: + + case p_asigword: case p_incword: case p_sumaword: case p_decword: case p_restaword: + case p_add_asigword: case p_sub_asigword: case p_mul_asigword: + case p_div_asigword: case p_mod_asigword: case p_and_asigword: + case p_or_asigword: case p_xor_asigword: case p_shr_asigword: case p_shl_asigword: + + case p_asigchar: case p_incchar: case p_sumachar: case p_decchar: case p_restachar: + case p_add_asigchar: case p_sub_asigchar: case p_mul_asigchar: + case p_div_asigchar: case p_mod_asigchar: case p_and_asigchar: + case p_or_asigchar: case p_xor_asigchar: case p_shr_asigchar: case p_shl_asigchar: + + case p_strcpy: case p_strcat: case p_strsub: break; + default: error(4,68); break; // expresion sin sentido + } break; + default: error(4,68); // expresion sin sentido + } + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + g1(lasp); + final_sentencia(); grabar_sentencia(); + break; + } + } +} + + +//----------------------------------------------------------------------------- +// Funciones de generación de código +//----------------------------------------------------------------------------- + +// void g1(int op) { mem[imem++]=op; } +// void g2(int op, int pa) { mem[imem++]=op; mem[imem++]=pa; } + +//----------------------------------------------------------------------------- +// Optimización peephole de código intermedio EML +//----------------------------------------------------------------------------- + +// *** OJO!!! *** quizá se pueda quitar "dir" y esa comprobación absurda ... + +//struct { // Peephole, "mirilla" de optimizacion +// int dir; // Dirección +// int param; // Indica el número de parametros de la instruccion +// int op; // Opcode +//} code[16]; // En code[15] debe quedar siempre la última instrucción generada + +void gen(int param, int op, int pa); +void remove_code(int i); +void delete_code(void); +void add_code(int dir, int param, int op); + +void g1(int op) { + if (optimizar) gen(0,op,0); else mem[imem++]=op; +} + +void g2(int op, int pa) { + if (optimizar) gen(1,op,pa); else { mem[imem++]=op; mem[imem++]=pa; } +} + +int optimizado; + +void gen(int param, int op, int pa) { +// int n; + + optimizado=0; + + switch(op) { + case lcar: + if (code[15].op==lcar) { + code[15].op=mem[imem-2]=lcar2; + code[15].param=2; + mem[imem++]=pa; optimizado=1; + } else if (code[15].op==lcar2) { + code[15].op=mem[imem-3]=lcar3; + code[15].param=3; + mem[imem++]=pa; optimizado=1; + } else if (code[15].op==lcar3) { + code[15].op=mem[imem-4]=lcar4; + code[15].param=4; + mem[imem++]=pa; optimizado=1; + } break; + case lasp: + if (code[15].op==lasi) { + if (code[14].op==lcar) { + remove_code(1); + code[15].op=mem[imem-2]=lcarasiasp; + } else { + code[15].op=mem[imem-1]=lasiasp; + optimizado=1; + } + } else if (code[15].op==lfun) { + code[15].op=mem[imem-2]=lfunasp; + optimizado=1; + } break; + case laid: + if (code[15].op==lcar) { + code[15].op=mem[imem-2]=lcaraid; + optimizado=1; + } break; + case lptr: + if (code[15].op==lcar) { + code[15].op=mem[imem-2]=lcarptr; + optimizado=1; + } else if (code[15].op==lcaradd) { + code[15].op=mem[imem-2]=lcaraddptr; + optimizado=1; + } else if (code[15].op==laid) { + code[15].op=mem[imem-1]=laidptr; + optimizado=1; + } else if (code[15].op==ladd) { + code[15].op=mem[imem-1]=laddptr; + optimizado=1; + } else if (code[15].op==lcaraid) { + code[15].op=mem[imem-2]=lcaraidptr; + optimizado=1; + } break; + case lcpa: + if (code[15].op==lcaraid) { + code[15].op=mem[imem-2]=lcaraidcpa; + optimizado=1; + } break; + case ladd: + if (code[15].op==lcar2){ + code[15].op=mem[imem-3]=lcar; + code[15].param=1; + mem[imem-2]+=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar3){ + code[15].op=mem[imem-4]=lcar2; + code[15].param=2; + mem[imem-2]+=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar4){ + code[15].op=mem[imem-5]=lcar3; + code[15].param=3; + mem[imem-2]+=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar){ + if (mem[imem-1]==0) remove_code(1); else { + code[15].op=mem[imem-2]=lcaradd; + optimizado=1; + } + } else if (code[15].op==lcarmul){ + code[15].op=mem[imem-2]=lcarmuladd; + optimizado=1; + } break; + case lmul: + if (code[15].op==lcar2){ + code[15].op=mem[imem-3]=lcar; + code[15].param=1; + mem[imem-2]*=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar3){ + code[15].op=mem[imem-4]=lcar2; + code[15].param=2; + mem[imem-2]*=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar4){ + code[15].op=mem[imem-5]=lcar3; + code[15].param=3; + mem[imem-2]*=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar){ + if (mem[imem-1]==1) remove_code(1); else { + code[15].op=mem[imem-2]=lcarmul; + optimizado=1; + } + } break; + case lsub: + if (code[15].op==lcar2){ + code[15].op=mem[imem-3]=lcar; + code[15].param=1; + mem[imem-2]-=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar3){ + code[15].op=mem[imem-4]=lcar2; + code[15].param=2; + mem[imem-2]-=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar4){ + code[15].op=mem[imem-5]=lcar3; + code[15].param=3; + mem[imem-2]-=mem[imem-1]; + imem--; optimizado=1; + } else if (code[15].op==lcar){ + if (mem[imem-1]==0) remove_code(1); else { + code[15].op=mem[imem-2]=lcarsub; + optimizado=1; + } + } break; + case ldiv: + if (code[15].op==lcar2){ + if (mem[imem-1]!=0) { + code[15].op=mem[imem-3]=lcar; + code[15].param=1; + mem[imem-2]/=mem[imem-1]; + imem--; optimizado=1; + } + } else if (code[15].op==lcar3){ + if (mem[imem-1]!=0) { + code[15].op=mem[imem-4]=lcar2; + code[15].param=2; + mem[imem-2]/=mem[imem-1]; + imem--; optimizado=1; + } + } else if (code[15].op==lcar4){ + if (mem[imem-1]!=0) { + code[15].op=mem[imem-5]=lcar3; + code[15].param=3; + mem[imem-2]/=mem[imem-1]; + imem--; optimizado=1; + } + } else if (code[15].op==lcar){ + if (mem[imem-1]==1) remove_code(1); + else if (mem[imem-1]!=0) { + code[15].op=mem[imem-2]=lcardiv; // Un cardiv nunca será "cardiv 0" + optimizado=1; + } + } break; + case lneg: + if (code[15].op==lcar || code[15].op==lcar2 || code[15].op==lcar3 || code[15].op==lcar4) { + mem[imem-1]=-mem[imem-1]; optimizado=1; + } + break; + case lnot: + if (code[15].op==lcar || code[15].op==lcar2 || code[15].op==lcar3 || code[15].op==lcar4) { + mem[imem-1]=mem[imem-1]^-1; optimizado=1; + } + break; + } + + if (!optimizado) { + if (imem-code[15].dir>2) delete_code(); + add_code(imem,param,op); + if (param) { mem[imem++]=op; mem[imem++]=pa; } else mem[imem++]=op; + } + +} + +void remove_code(int i) { + int n; + optimizado=1; + while (i--) { + imem-=code[15].param+1; + for (n=15;n>0;n--) { + code[n].dir=code[n-1].dir; + code[n].param=code[n-1].param; + code[n].op=code[n-1].op; + } code[0].dir=0; code[0].param=0; code[0].op=0; + } +} + +void delete_code(void) { + int n; + for (n=0;n<16;n++) { + code[n].dir=0; code[n].param=0; code[n].op=0; + } +} + +void add_code(int dir, int param, int op) { + int n; + for (n=0;n<15;n++) { + code[n].dir=code[n+1].dir; + code[n].param=code[n+1].param; + code[n].op=code[n+1].op; + } code[15].dir=dir; code[15].param=param; code[15].op=op; +} + + +//----------------------------------------------------------------------------- +// Con el primer token leido guarda el inicio de una sentencia +//----------------------------------------------------------------------------- + +void inicio_sentencia(void) +{ + byte * p=ierror-1; + inicio=imem; + linea1=linea; + columna1=0; + while (*p!=cr && *p!=lf && p>_source) { + columna1++; p--; + } +} + +//----------------------------------------------------------------------------- +// Con el primer token que no es de la sentecia guarda el fin de una sentencia +//----------------------------------------------------------------------------- + +void final_sentencia(void) +{ + byte * p=old_ierror_end-1; + final=imem-1; + linea2=old_linea; + columna2=0; + while (*p!=cr && *p!=lf && p>=_source) { + columna2++; p--; + } +} + +//----------------------------------------------------------------------------- +// Guarda un registro (inicio,final,linea1,...) en el temporal (linf) +//----------------------------------------------------------------------------- + +void grabar_sentencia(void) +{ + if(debug && linf!=NULL) { + fwrite(&inicio,4,1,linf); + fwrite(&final,4,1,linf); + fwrite(&linea1,4,1,linf); + fwrite(&columna1,4,1,linf); + fwrite(&linea2,4,1,linf); + fwrite(&columna2,4,1,linf); + } +} + +//----------------------------------------------------------------------------- +// Agrega información de depurado al ejecutable +//----------------------------------------------------------------------------- + +void escribe_lin(FILE* f) +{ + int b; + + #ifdef WIN32 + // Resuelve la ruta del PRG + char resolved_path[_MAX_PATH]; + _fullpath(resolved_path,fichero_prg,_MAX_PATH); + #else + // Lo mismo pero en Linux + char resolved_path[PATH_MAX]; + realpath(fichero_prg,resolved_path); + #endif + + // Escribe la ruta resuelta + fputs(resolved_path,f); + fputc(0,f); + + // Escribe la información LIN (offset de cada sentencia en el prg y en el bytecode) + fseek(linf,0,SEEK_SET); + while((b=fgetc(linf))!=EOF) + fputc(b,f); + + fclose(linf); +} + + +// Escribe información sobre los objetos + +void escribe_dbg(FILE* f) +{ + int n; + + // Datos comunes de cada objeto + struct { + int tipo; + int nombre; + int bloque; + int miembro; + int v0,v1,v2,v3,v4,v5; + } ob; + + // Cabecera de sección DBG + fwrite(&num_obj,4,1,f); + fwrite(&num_obj_predefinidos,4,1,f); + n=(int)&obj[0]; + fwrite(&n,4,1,f); + n=sizeof(struct objeto); + fwrite(&n,4,1,f); + + // Escribe los datos de cada objeto + for (n=0;n +#else + #include + #include + #include +#endif + +#include +#include +#include "dll.h" +#include "extern.h" + +/*int imem_temp; +int iloc_temp;*/ + +int carga_dll(char* nombre) +{ +#ifdef _WIN32 + TYPEOF_ExportaFuncs *ExportaFuncs; + HINSTANCE hDLL=NULL; +// TYPEOF_extfunc *extfunc; // *** PRUEBA *** + char resolved_path[_MAX_PATH]; + + static char fichdll[256]; + strcpy(fichdll,nombre); + strcat(fichdll,".dll"); + + // Carga la DLL + //hDLL=LoadDLL(fichdll); + _fullpath(resolved_path,fichdll,_MAX_PATH); + printf("intento 1: %s\n",resolved_path); + if(resolved_path) hDLL=LoadLibraryEx(resolved_path,NULL,LOAD_WITH_ALTERED_SEARCH_PATH); + + if(hDLL==NULL) { + char fichdll2[256]=".\\dll\\"; + strcat(fichdll2,fichdll); + //hDLL=LoadDLL(fichdll2); + _fullpath(resolved_path,fichdll2,_MAX_PATH); + printf("intento 2: %s\n",resolved_path); + if(resolved_path) hDLL=LoadLibraryEx(resolved_path,NULL,LOAD_WITH_ALTERED_SEARCH_PATH); + if(hDLL==NULL) + critical_error(5,fichdll); // Librería no encontrada + } + + // Inicializa y ejecuta la funcion ExportaFuncs de la DLL + + ExportaFuncs=NULL; + + //ExportaFuncs=(TYPEOF_ExportaFuncs *)GetDLLProcAddress(hDLL,"ExportaFuncs"); + ExportaFuncs=(TYPEOF_ExportaFuncs *)GetProcAddress(hDLL,"ExportaFuncs"); + + if(ExportaFuncs==NULL) { + //FreeDLL(hDLL); + FreeLibrary(hDLL); + critical_error(6,fichdll); // exportafuncs no encontrado + } + + #ifdef DEBUG_DLL + printf("ExportaFuncs encontrado!! :D\n"); + #endif + + ExportaFuncs(EXPORTAFUNCS_PARAMS); + +/***** PRUEBA ****** PRUEBA ***** PRUEBA ***** PRUEBA ***** + if(n_externs==5) { + extfunc=ext_funcs[4].hfuncion; + putparm("hola"); + extfunc(params,sp); + } + ***** PRUEBA ****** PRUEBA ***** PRUEBA ***** PRUEBA *****/ + + dlls[numdlls++].hDLL=hDLL; + +#else // linux + + TYPEOF_ExportaFuncs *ExportaFuncs; + void *hDLL; + char *errordll; +// TYPEOF_extfunc *extfunc; // *** PRUEBA *** + + static char fichdll[256]; + + strcpy(fichdll,nombre); + strcat(fichdll,".so"); + + // Carga la DLL + hDLL=dlopen(fichdll,RTLD_NOW); + + if(!hDLL) { + char fichdll2[256]="so/"; + strcat(fichdll2,fichdll); + strcat(fichdll,".so"); + hDLL=LoadDLL(fichdll2); + if(!hDLL) + critical_error(5,fichdll); // Librería no encontrada + } + + // Inicializa y ejecuta la funcion ExportaFuncs de la DLL + + ExportaFuncs=NULL; + + ExportaFuncs=(TYPEOF_ExportaFuncs *) dlsym(hDLL,"ExportaFuncs"); + + if((errordll=dlerror())!=NULL) { + dlclose(hDLL); + critical_error(6,fichdll); // exportafuncs no encontrado + } + + #ifdef DEBUG_DLL + printf("ExportaFuncs encontrado!! :D\n"); + #endif + + ExportaFuncs(EXPORTAFUNCS_PARAMS); + +/***** PRUEBA ****** PRUEBA ***** PRUEBA ***** PRUEBA ***** + //if(n_externs==3) { + extfunc=ext_funcs[1].hfuncion; + putparm(63); + putparm(30); + putparm(24); + putparm(6); + extfunc(params,sp); + //} + ***** PRUEBA ****** PRUEBA ***** PRUEBA ***** PRUEBA *****/ + + dlls[numdlls++].hDLL=hDLL; + +#endif + + return 0; +} diff --git a/ediv/src/stub/dll.h b/ediv/src/stub/dll.h new file mode 100644 index 0000000..954c9f4 --- /dev/null +++ b/ediv/src/stub/dll.h @@ -0,0 +1,26 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __DLL_H +#define __DLL_H + +int carga_dll(char* nombre); + +#endif /* __DLL_H */ \ No newline at end of file diff --git a/ediv/src/stub/dll_load.c b/ediv/src/stub/dll_load.c new file mode 100644 index 0000000..7f1aa3e --- /dev/null +++ b/ediv/src/stub/dll_load.c @@ -0,0 +1,991 @@ +/* Back Orifice 2000 - Remote Administration Suite + Copyright (C) 1999, Cult Of The Dead Cow + + 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 + + The author of this program may be contacted at dildog@l0pht.com. +*/ + +#include +#include + +#include "dll_load.h" +byte g_bIsWinNT; + +#pragma pack(push,1) + +typedef struct { + DWORD dwPageRVA; + DWORD dwBlockSize; +} IMAGE_FIXUP_BLOCK, *PIMAGE_FIXUP_BLOCK; + +typedef struct { + WORD offset:12; + WORD type:4; +} IMAGE_FIXUP_ENTRY, *PIMAGE_FIXUP_ENTRY; + +typedef struct __imageparameters { + void *pImageBase; + char svName[MAX_PATH]; + DWORD dwFlags; + int nLockCount; + struct __imageparameters *next; +} IMAGE_PARAMETERS; + +typedef BOOL (WINAPI *DLLMAIN_T)(HMODULE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); + +#pragma pack(pop) + + +// Process-global variables + +IMAGE_PARAMETERS *g_pImageParamHead; +CRITICAL_SECTION g_DLLCrit; + +// Function implementations + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Detecta la version de windows // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Si es WinNT devuelve g_bIsWinNT=1 +// Si es Win'9x/Me devuelve g_bIsWinNT=0; +void CheckWindowsVersion(void) +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize=sizeof(OSVERSIONINFO); + + GetVersionEx(&osvi); + + if (osvi.dwPlatformId==VER_PLATFORM_WIN32_NT) + g_bIsWinNT=1; + else + g_bIsWinNT=0; + +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Initialization Routines // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void InitializeDLLLoad(void) +{ + InitializeCriticalSection(&g_DLLCrit); + g_pImageParamHead=NULL; +} + +void KillDLLLoad(void) +{ + IMAGE_PARAMETERS *cur,*next; + cur=g_pImageParamHead; + while(cur!=NULL) { + next=cur->next; + free(cur); + cur=next; + } + + DeleteCriticalSection(&g_DLLCrit); +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Internal DLL list management // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// returns 0 if just ref count increment, 1 if this is a new addition, -1 on error +static int AddDLLReference(void *pImageBase, char *svName, DWORD dwFlags) +{ + IMAGE_PARAMETERS *cur; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==pImageBase) break; + } + + if(cur!=NULL) { + // increment dll count + cur->nLockCount++; + LeaveCriticalSection(&g_DLLCrit); + return 0; + } + + // Add new dll to list + cur=(IMAGE_PARAMETERS *)malloc(sizeof(IMAGE_PARAMETERS)); + if(cur==NULL) { + LeaveCriticalSection(&g_DLLCrit); + return -1; + } + + cur->pImageBase=pImageBase; + if(svName!=NULL) { + lstrcpyn(cur->svName,svName, MAX_PATH); + } else cur->svName[0]='\0'; + cur->nLockCount=1; + cur->dwFlags=dwFlags; + cur->next=g_pImageParamHead; + g_pImageParamHead=cur; + + LeaveCriticalSection(&g_DLLCrit); + return 1; +} + +// returns 0 if just a reference count dec, 1 if fully removed from list, -1 on error +static int RemoveDLLReference(void *pImageBase, char *svName, DWORD *pdwFlags) +{ + IMAGE_PARAMETERS *cur,*prev; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + prev=NULL; + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==pImageBase) break; + prev=cur; + } + if(cur==NULL) { + LeaveCriticalSection(&g_DLLCrit); + return -1; + } + + // decrement dll count + cur->nLockCount--; + // look up dll information + *pdwFlags=cur->dwFlags; + lstrcpyn(svName,cur->svName,MAX_PATH); + + // Remove if time to go + if(cur->nLockCount==0) { + if(prev==NULL) { + g_pImageParamHead=g_pImageParamHead->next; + free(cur); + } else { + prev->next=cur->next; + free(cur); + } + + LeaveCriticalSection(&g_DLLCrit); + return 1; + } + + LeaveCriticalSection(&g_DLLCrit); + return 0; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLHandle() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +// Like GetModuleHandle(), returns null if the module is not loaded, returns a base address otherwise +HMODULE GetDLLHandle(char *svName) +{ + IMAGE_PARAMETERS *cur; + + if(svName==NULL) return NULL; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(lstrcmpi(cur->svName,svName)==0) break; + } + + if(cur!=NULL) { + LeaveCriticalSection(&g_DLLCrit); + return (HMODULE) cur->pImageBase; + } + + LeaveCriticalSection(&g_DLLCrit); + return NULL; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLFileName() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +// Like GetModuleFileName(), returns 0 on failure +DWORD GetDLLFileName(HMODULE hModule, LPTSTR lpFileName, DWORD nSize) +{ + DWORD dwRet; + IMAGE_PARAMETERS *cur; + + if(hModule==NULL || lpFileName==NULL || nSize==0) return 0; + + if((dwRet=GetModuleFileName(hModule,lpFileName,nSize))!=0) return dwRet; + + EnterCriticalSection(&g_DLLCrit); + + // Find DLL in list + for(cur=g_pImageParamHead;cur!=NULL;cur=cur->next) { + if(cur->pImageBase==hModule) break; + } + + if(cur!=NULL) { + LeaveCriticalSection(&g_DLLCrit); + lstrcpyn(lpFileName,cur->svName,nSize); + return lstrlen(lpFileName); + } + + LeaveCriticalSection(&g_DLLCrit); + return 0; +} + + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +// Like GetProcAddress(), returns null if the procedure/ordinal is not there, otherwise returns function addr. +FARPROC GetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName) +{ + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_EXPORT_DIRECTORY ped; + int nOrdinal; + int nDirCount; + DWORD *pAddrTable; + DWORD dwRVA; + DWORD dwAddr; + + if(hModule==NULL) return NULL; + + // Get header + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (hModule); + + // Get number of image directories in list + + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Sift through export table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size==0) return NULL; + + // Good, we have an export table. Lets get it. + + ped=(IMAGE_EXPORT_DIRECTORY *)RVATOVA(hModule,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress); + + // Get ordinal of desired function + + if(HIWORD((DWORD)lpProcName)==0) { + nOrdinal=(LOWORD((DWORD)lpProcName)) - ped->Base; + } else { + + // Go through name table and find appropriate ordinal + + int i,count; + DWORD *pdwNamePtr; + WORD *pwOrdinalPtr; + + count=ped->NumberOfNames; + pdwNamePtr=(DWORD *)RVATOVA(hModule,ped->AddressOfNames); + pwOrdinalPtr=(WORD *)RVATOVA(hModule,ped->AddressOfNameOrdinals); + + for(i=0;iAddressOfFunctions); + + dwRVA=pAddrTable[nOrdinal]; + + + // Check if it's a forwarder, or a local addr + // XXX Should probably do this someday. Just don't define forwarders. You're + // XXX not loading kernel32.dll with this shit anyway. + + dwAddr=(DWORD) RVATOVA(hModule,dwRVA); + + return (FARPROC) dwAddr; +} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Modifies an image. Must be loaded with RWX_PERMISSIONS, or have the export +// table writable +FARPROC SetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName, FARPROC fpAddr) +{ + PIMAGE_OPTIONAL_HEADER poh; + int nDirCount; + PIMAGE_EXPORT_DIRECTORY ped; + int nOrdinal; + DWORD *pAddrTable; + DWORD dwOldAddr; + + if(hModule==NULL) return FALSE; + + // Get header + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (hModule); + + // Get number of image directories in list + + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Sift through export table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size==0) return FALSE; + + // Good, we have an export table. Lets get it. + + ped=(IMAGE_EXPORT_DIRECTORY *)RVATOVA(hModule,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress); + + // Get ordinal of desired function + + if(HIWORD((DWORD)lpProcName)==0) { + nOrdinal=(LOWORD((DWORD)lpProcName)) - ped->Base; + } else { + + // Go through name table and find appropriate ordinal + + int i,count; + DWORD *pdwNamePtr; + WORD *pwOrdinalPtr; + + count=ped->NumberOfNames; + pdwNamePtr=(DWORD *)RVATOVA(hModule,ped->AddressOfNames); + pwOrdinalPtr=(WORD *)RVATOVA(hModule,ped->AddressOfNameOrdinals); + + for(i=0;iAddressOfFunctions); + + dwOldAddr=(DWORD) RVATOVA(hModule,(pAddrTable[nOrdinal])); + pAddrTable[nOrdinal]=(DWORD) VATORVA(hModule,((DWORD)fpAddr)); + + return (FARPROC) dwOldAddr; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ResetDLLProcAddress() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +BOOL ResetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName) +{ + char svName[MAX_PATH+1]; + DWORD dwAddr; + DWORD dwNewAddr; + + if(GetDLLFileName(hModule,svName,MAX_PATH+1)) { + // Load another copy of the DLL + HMODULE hNewMod=LoadDLLEx(svName,NULL,FORCE_LOAD_NEW_IMAGE); + if(hNewMod==NULL) return FALSE; + dwAddr=(DWORD)GetDLLProcAddress(hNewMod,lpProcName); + if(dwAddr==(DWORD)NULL) { + FreeDLL(hNewMod); + return FALSE; + } + + dwNewAddr=(DWORD)RVATOVA(hModule,VATORVA(hNewMod,dwAddr)); + + FreeDLL(hNewMod); + + SetDLLProcAddress(hModule,lpProcName,(FARPROC)dwNewAddr); + + return TRUE; + } + + return FALSE; +} + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Internal DLL Loader code // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +static BOOL RunDLLMain(void *pImageBase, DWORD dwImageSize, BOOL bDetach) +{ + // Get entry point from header + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_FILE_HEADER pfh; + DLLMAIN_T pDllMain; + BOOL bRet; + + pfh = (PIMAGE_FILE_HEADER)PEFHDROFFSET(pImageBase); + if((pfh->Characteristics & IMAGE_FILE_DLL)==0) return TRUE; + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (pImageBase); + pDllMain=(DLLMAIN_T) RVATOVA(pImageBase, poh->AddressOfEntryPoint); + + // Call dllmain the right way + + if(bDetach) { + bRet=pDllMain((HMODULE) pImageBase, DLL_PROCESS_DETACH, NULL); + } else { + bRet=pDllMain((HMODULE) pImageBase, DLL_PROCESS_ATTACH, NULL); + } + + return bRet; +} + +BOOL PrepareDLLImage(void *pMemoryImage, DWORD dwImageSize, BOOL bResolve, BOOL bRebind) +{ + // Get headers + PIMAGE_OPTIONAL_HEADER poh; + PIMAGE_SECTION_HEADER psh; + int nDirCount; + DWORD delta; + + poh = (PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET (pMemoryImage); + psh = (PIMAGE_SECTION_HEADER)SECHDROFFSET (pMemoryImage); + + // Get number of image directories in list + nDirCount=poh->NumberOfRvaAndSizes; + if(nDirCount<16) return FALSE; + + // - Process import table ----------------------------------------------- + + if(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].Size!=0) { + PIMAGE_IMPORT_DESCRIPTOR pid; + pid=(IMAGE_IMPORT_DESCRIPTOR *)RVATOVA(pMemoryImage,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress); + + // For all imported DLLs + while(pid->OriginalFirstThunk!=0) { + char *svDllName; + HMODULE hDll; + + svDllName=(char *) RVATOVA(pMemoryImage,pid->Name); + + // Map library into address space (could also use LoadDLL()) + hDll=GetModuleHandle(svDllName); + if(hDll==NULL) hDll=LoadLibrary(svDllName); + + if(hDll==NULL) return FALSE; + + // Bind if not bound already + if(pid->TimeDateStamp==0 || bRebind) { + PIMAGE_THUNK_DATA ptd_in,ptd_out; + + // Store DLL infoz + + pid->ForwarderChain=(DWORD)hDll; + pid->TimeDateStamp=0xCDC31337; // This is bullshit cuz I don't want to call libc. + + // Fill in Import Address Table + + ptd_in=(PIMAGE_THUNK_DATA) RVATOVA(pMemoryImage, pid->OriginalFirstThunk); + ptd_out=(PIMAGE_THUNK_DATA) RVATOVA(pMemoryImage, pid->FirstThunk); + + while(ptd_in->u1.Function!=NULL) { + FARPROC func; + + // Determine if ordinal or name pointer + if(ptd_in->u1.Ordinal & 0x80000000) { + // Ordinal + func=GetProcAddress(hDll,MAKEINTRESOURCE(ptd_in->u1.Ordinal)); + } else { + // Function name + PIMAGE_IMPORT_BY_NAME pibn; + pibn=(PIMAGE_IMPORT_BY_NAME) RVATOVA(pMemoryImage,ptd_in->u1.AddressOfData); + func=GetProcAddress(hDll,(char *)pibn->Name); + } + + if(func==NULL) return FALSE; + + // Write address to appropriate location + ptd_out->u1.Function = (PDWORD) func; + + ptd_in++; + ptd_out++; + } + } + + pid++; + } + } + + // - Process relocation tables if necessary ---------------------------------- + + // Calculate fixup delta + delta=(DWORD)pMemoryImage - (DWORD)poh->ImageBase; + + if((delta!=0) && (poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size!=0)) { + PIMAGE_FIXUP_BLOCK pfb; + pfb=(PIMAGE_FIXUP_BLOCK)RVATOVA(pMemoryImage,poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress); + + + // For each fixup block + while(pfb->dwPageRVA!=0) { + PIMAGE_FIXUP_ENTRY pfe; + int i,count; + + count=(pfb->dwBlockSize-sizeof(IMAGE_FIXUP_BLOCK))/sizeof(IMAGE_FIXUP_ENTRY); + pfe=(PIMAGE_FIXUP_ENTRY)((char *)pfb + sizeof(IMAGE_FIXUP_BLOCK)); + + // For each fixup entry + for(i=0;idwPageRVA + pfe->offset); + switch(pfe->type) { + case IMAGE_REL_BASED_ABSOLUTE: + break; + case IMAGE_REL_BASED_HIGH: + *((WORD *)fixaddr) += HIWORD(delta); + break; + case IMAGE_REL_BASED_LOW: + *((WORD *)fixaddr) += LOWORD(delta); + break; + case IMAGE_REL_BASED_HIGHLOW: + *((DWORD *)fixaddr) += delta; + break; + case IMAGE_REL_BASED_HIGHADJ: // This one's really fucked up. + adjust=((*((WORD *)fixaddr)) << 16) | (*(WORD *)(pfe+1)); + adjust += delta; + adjust += 0x00008000; + *((WORD *)fixaddr) = HIWORD(adjust); + pfe++; + break; + default: + return FALSE; + } + + pfe++; + } + + pfb=(PIMAGE_FIXUP_BLOCK)((char *)pfb + pfb->dwBlockSize); + } + } + + + + return TRUE; +} + +static BOOL ProtectDLLImage(void *pMemoryImage, BOOL bRWX) +{ + // Get Number of Sections + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + PIMAGE_OPTIONAL_HEADER poh; + DWORD hdrlen; + int i; + PIMAGE_SECTION_HEADER psh; + + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pMemoryImage); + nSectionCount=pfh->NumberOfSections; + + // Get PE Header Length + Section Header Length + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pMemoryImage); + hdrlen=poh->SizeOfHeaders; + + // Protect sections one by one + psh=(PIMAGE_SECTION_HEADER) SECHDROFFSET(pMemoryImage); + for(i=0;iVirtualAddress); + secLen = psh->SizeOfRawData; + + // Parse Characteristics and protect memory appropriately + bWrite = (psh->Characteristics & IMAGE_SCN_MEM_WRITE)?TRUE:FALSE; + bRead = (psh->Characteristics & IMAGE_SCN_MEM_READ)?TRUE:FALSE; + bExec = (psh->Characteristics & IMAGE_SCN_MEM_EXECUTE)?TRUE:FALSE; + bShared = (psh->Characteristics & IMAGE_SCN_MEM_SHARED)?TRUE:FALSE; + + if(bWrite && bRead && bExec && bShared) newProtect=PAGE_EXECUTE_READWRITE; + else if(bWrite && bRead && bExec) newProtect=PAGE_EXECUTE_WRITECOPY; + else if(bRead && bExec) newProtect=PAGE_EXECUTE_READ; + else if(bExec) newProtect=PAGE_EXECUTE; + else if(bWrite && bRead && bShared) newProtect=PAGE_READWRITE; + else if(bWrite && bRead) newProtect=PAGE_WRITECOPY; + else if(bRead) newProtect=PAGE_READONLY; + + if(bRWX) newProtect=PAGE_WRITECOPY; + + if(psh->Characteristics & IMAGE_SCN_MEM_NOT_CACHED) newProtect |= PAGE_NOCACHE; + + if(newProtect==0) return FALSE; + + VirtualProtect(secMemAddr,secLen,newProtect,&oldProtect); + + psh++; + } + + return TRUE; +} + + +BOOL MapDLLFromImage(void *pDLLFileImage, void *pMemoryImage) +{ + // Get Number of Sections + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + PIMAGE_OPTIONAL_HEADER poh; + DWORD hdrlen; + int i; + PIMAGE_SECTION_HEADER psh; + + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pDLLFileImage); + nSectionCount=pfh->NumberOfSections; + + // Get PE Header Length + Section Header Length + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pDLLFileImage); + hdrlen=poh->SizeOfHeaders; + + // Copy PE Header + Section Headers + memcpy(pMemoryImage,pDLLFileImage,hdrlen); + + // Copy Sections one by one + psh=(PIMAGE_SECTION_HEADER) SECHDROFFSET(pDLLFileImage); + for(i=0;iVirtualAddress; + secFileAddr = (char *)pDLLFileImage + psh->PointerToRawData; + secLen = psh->SizeOfRawData; + + memcpy(secMemAddr,secFileAddr,secLen); + + psh++; + } + + + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLLFromImage() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HMODULE LoadDLLFromImage(void *pDLLFileImage, char *svMappingName, DWORD dwFlags) +{ + // Examine DOS Header + PIMAGE_DOS_HEADER doshead; + PIMAGE_FILE_HEADER pfh; + int nSectionCount; + void *pPreferredImageBase; + DWORD dwImageSize; + void *pImageBase; + HANDLE hmapping; + PIMAGE_OPTIONAL_HEADER poh; + int dllaction; + + doshead=(PIMAGE_DOS_HEADER) pDLLFileImage; + if(doshead->e_magic!=IMAGE_DOS_SIGNATURE) return NULL; + + // Ensure our input is of good length + if(svMappingName!=NULL) { + if(lstrlen(svMappingName) >= MAX_PATH) return NULL; + } + + // Determine File Format + if(*(DWORD *)NTSIGNATURE(pDLLFileImage) != IMAGE_NT_SIGNATURE) return NULL; + + + // Get PE Header + pfh=(PIMAGE_FILE_HEADER) PEFHDROFFSET(pDLLFileImage); + + + // Ensure proper machine type + //if(pfh->Machine!=IMAGE_FILE_MACHINE_I386) return NULL; + // XXX Verify Characteristics + // XXX I don't bother to do this yet. + + + // Get Section Count + nSectionCount=pfh->NumberOfSections; + + + // Get PE Optional Header + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(pDLLFileImage); + + + // Ensure we are an executable image, not a rom image + if(poh->Magic!=0x010B) return NULL; + + + // Get preferred image base and image length + pPreferredImageBase=(void *)poh->ImageBase; + dwImageSize=poh->SizeOfImage; + + // Get base address of virtual image + hmapping=NULL; + + pImageBase=GetDLLHandle(svMappingName); + if(pImageBase==NULL) { + BOOL bCreated=FALSE; + BOOL bRebased=FALSE; + // If not mapped into this process, then we should map it now + +// Esto es para windows nt, de momento se quita + + if(g_bIsWinNT) { + // === Windows NT DLL Loading (supports shared sections) === + if(svMappingName!=NULL) { + hmapping=OpenFileMapping(FILE_MAP_WRITE,TRUE,svMappingName); + bCreated=FALSE; + } + if(hmapping==NULL) { + hmapping=CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE,0,dwImageSize+SIZE_OF_PARAMETER_BLOCK,svMappingName); + if(hmapping==NULL) return NULL; + bCreated=TRUE; + } + + // Try to load file mapping view at preferred image base (not gonna happen in Win9x..sigh) + + pImageBase=MapViewOfFileEx(hmapping,FILE_MAP_WRITE,0,0,0,pPreferredImageBase); + if(pImageBase==NULL) { + pImageBase=MapViewOfFileEx(hmapping,FILE_MAP_WRITE,0,0,0,NULL); + } + CloseHandle(hmapping); + if(pImageBase==NULL) return NULL; + } else { + // === Windows 9x DLL Loading (does not support shared sections) === + pImageBase=VirtualAlloc(pPreferredImageBase,dwImageSize,MEM_COMMIT|MEM_RESERVE,PAGE_READWRITE); + if(pImageBase==NULL) { + pImageBase=VirtualAlloc(NULL,dwImageSize,MEM_COMMIT|MEM_RESERVE,PAGE_READWRITE); + if(pImageBase==NULL) return NULL; + } + + bCreated=TRUE; + } + + // Now map DLL from file image into appropriate memory image (if just created) + // Also remap if DLL is being rebased as well (gotta fix relocations) + + if(bCreated || (pImageBase!=pPreferredImageBase)) { + if(!MapDLLFromImage(pDLLFileImage,pImageBase)) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + + // Prepare DLL image (handle relocations/import/export/etc) + + if(!(dwFlags & LOAD_LIBRARY_AS_DATAFILE)) { + if(!PrepareDLLImage(pImageBase, dwImageSize, (dwFlags & DONT_RESOLVE_DLL_REFERENCES)?FALSE:TRUE,(dwFlags & REBIND_IMAGE_IMPORTS)?TRUE:FALSE)) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + + // Resolve DLL references + + if(!(dwFlags & DONT_RESOLVE_DLL_REFERENCES)) { + BOOL bRet; + bRet=RunDLLMain(pImageBase,dwImageSize,DLL_ATTACH); + if(!bRet) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + + + // Apply appropriate protections + + if(!ProtectDLLImage(pImageBase, (dwFlags & RWX_PERMISSIONS)?TRUE:FALSE) ){ + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + return NULL; + } + } + } + + + // Add to DLL table/increase reference count + + dllaction=AddDLLReference(pImageBase,svMappingName,dwFlags); + if(dllaction==-1) { + if(hmapping!=NULL) { + if(g_bIsWinNT) UnmapViewOfFile(pImageBase); + else VirtualFree(pImageBase,0,MEM_RELEASE); + } + return NULL; + } + + return (HMODULE) pImageBase; +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLLEx() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + +HMODULE LoadDLLEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags) +{ + char svPath[MAX_PATH+1]; + char *svFilePart; + int nPathLen; + HANDLE hfile; + HANDLE hmapping; + void *baseaddr; + HMODULE ret; + + // Find DLL File + if(dwFlags & LOAD_WITH_ALTERED_SEARCH_PATH) { + return NULL; + } else { + nPathLen=SearchPath(NULL,lpLibFileName,".dll",MAX_PATH,svPath,&svFilePart); + if(nPathLen==0) return NULL; + } + + // Open File + hfile=CreateFile(svPath,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,0,NULL); + if(hfile==INVALID_HANDLE_VALUE) return NULL; + + // Create a file mapping + hmapping=CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL); + + // Close file handle since we don't need it anymore + CloseHandle(hfile); + + // Map file mapping object to memory image + baseaddr=MapViewOfFile(hmapping,FILE_MAP_READ,0,0,0); + if(baseaddr==NULL) { + CloseHandle(hmapping); + return NULL; + } + + // Now pass off to LoadDLLFromImage + if(dwFlags & FORCE_LOAD_NEW_IMAGE) { + ret=LoadDLLFromImage(baseaddr, NULL, dwFlags & ~LOAD_WITH_ALTERED_SEARCH_PATH); + } else { + ret=LoadDLLFromImage(baseaddr, svFilePart, dwFlags & ~LOAD_WITH_ALTERED_SEARCH_PATH); + } + + + // Close file mapping + UnmapViewOfFile(baseaddr); + CloseHandle(hmapping); + + // Return base address as an instance handle + return (HMODULE) ret; +} + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LoadDLL() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +HMODULE LoadDLL(LPCTSTR lpLibFileName) +{ + return LoadDLLEx(lpLibFileName,NULL,0); +} + + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// FreeDLL() // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +BOOL FreeDLL(HMODULE hLibModule) +{ + PIMAGE_DOS_HEADER doshead; + PIMAGE_OPTIONAL_HEADER poh; + DWORD dwImageSize; + DWORD dwFlags; + char svName[MAX_PATH]; + int dllaction; + BOOL bRet; + + if(hLibModule==NULL) return FALSE; + + // Examine DOS Header + doshead=(PIMAGE_DOS_HEADER) hLibModule; + if(doshead->e_magic!=IMAGE_DOS_SIGNATURE) return FALSE; + + // Determine File Format + if(*(DWORD *)NTSIGNATURE(hLibModule) != IMAGE_NT_SIGNATURE) return FALSE; + + // Get PE Optional Header + poh=(PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET(hLibModule); + + // Ensure we are an executable image, not a rom image + if(poh->Magic!=0x010B) return FALSE; + + // Get image length + dwImageSize=poh->SizeOfImage; + + // Get from DLL table/decrease reference count + dllaction=RemoveDLLReference(hLibModule,svName,&dwFlags); + if(dllaction==-1) return (BOOL) NULL; + + // Call DllMain if necessary + bRet=TRUE; + + if(!(dwFlags & (LOAD_LIBRARY_AS_DATAFILE | DONT_RESOLVE_DLL_REFERENCES))) { + if(dllaction) { + RunDLLMain(hLibModule,dwImageSize,DLL_DETACH); + if(g_bIsWinNT) bRet=UnmapViewOfFile(hLibModule); + else bRet=VirtualFree(hLibModule,0,MEM_RELEASE); + } + } + + return bRet; +} diff --git a/ediv/src/stub/dll_load.h b/ediv/src/stub/dll_load.h new file mode 100644 index 0000000..b2e7b52 --- /dev/null +++ b/ediv/src/stub/dll_load.h @@ -0,0 +1,61 @@ +/* Back Orifice 2000 - Remote Administration Suite + Copyright (C) 1999, Cult Of The Dead Cow + + 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 + + The author of this program may be contacted at dildog@l0pht.com. */ + +#include + +#define NTSIGNATURE(ptr) ((LPVOID)((BYTE *)(ptr) + ((PIMAGE_DOS_HEADER)(ptr))->e_lfanew)) +#define SIZE_OF_NT_SIGNATURE (sizeof(DWORD)) +#define PEFHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE)) +#define OPTHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE+sizeof(IMAGE_FILE_HEADER))) +#define SECHDROFFSET(ptr) ((LPVOID)((BYTE *)(ptr)+((PIMAGE_DOS_HEADER)(ptr))->e_lfanew+SIZE_OF_NT_SIGNATURE+sizeof(IMAGE_FILE_HEADER)+sizeof(IMAGE_OPTIONAL_HEADER))) +#define RVATOVA(base,offset) ((LPVOID)((DWORD)(base)+(DWORD)(offset))) +#define VATORVA(base,offset) ((LPVOID)((DWORD)(offset)-(DWORD)(base))) + +#define SIZE_OF_PARAMETER_BLOCK 4096 +#define IMAGE_PARAMETER_MAGIC 0xCDC31337 +#define MAX_DLL_PROCESSES 256 +#define DLL_ATTACH 0 +#define DLL_DETACH 1 + +// NEW FLAGS +#define REBIND_IMAGE_IMPORTS 0x00000100 +#define RWX_PERMISSIONS 0x00000200 +#define FORCE_LOAD_NEW_IMAGE 0x00000400 + +// Internal functions +BOOL MapDLLFromImage(void *pDLLFileImage, void *pMemoryImage); +BOOL PrepareDLLImage(void *pMemoryImage, DWORD dwImageSize, BOOL bResolve, BOOL bRebind); + +// Primary functions +void InitializeDLLLoad(void); +void KillDLLLoad(void); +HMODULE GetDLLHandle(char *svName); +DWORD GetDLLFileName(HMODULE hModule, LPTSTR lpFileName, DWORD nSize); +FARPROC GetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName); +FARPROC SetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName, FARPROC fpAddr); +BOOL ResetDLLProcAddress(HMODULE hModule, LPCSTR lpProcName); +HMODULE LoadDLLFromImage(void *pDLLFileImage, char *svMappingName, DWORD dwFlags); +HMODULE LoadDLLEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags); +HMODULE LoadDLL(LPCTSTR lpLibFileName); +BOOL FreeDLL(HMODULE hLibModule); +void CheckWindowsVersion(void); + + + +//#endif \ No newline at end of file diff --git a/ediv/src/stub/ediv_export.c b/ediv/src/stub/ediv_export.c new file mode 100644 index 0000000..e0cf564 --- /dev/null +++ b/ediv/src/stub/ediv_export.c @@ -0,0 +1,818 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifdef _WIN32 +# include +#endif + +#include +#include +#include +#include +#include +#include + +#include "main.h" +#include "extern.h" +#include "parser.h" +#include "compiler.h" +#include "varindex.h" + +#include "language.h" + +//int len,ret,cod; +int len; +/*struct objeto * ob; +struct objeto * ob2;*/ + +int creaobj; + +byte decl_struct=0; // 1 si se está declarando un struct + +byte slocal=0; // para las structs. 0=global, 1=local +int nregs; +int offset; + +// no creo que haga falta (sólo serviría para comprobar errores en las dll) +// -> nos ahorramos la tabla de objetos + +/*int crea_objeto(byte * nombre) +{ + struct objeto * * ptr_o; + byte ** ptr, * _ivnom, h; + + _ivnom=ivnom.b; *ivnom.p++=0; *ivnom.p++=0; h=0; + while (*ivnom.b=lower[*nombre++]) h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + ivnom.b++; if (ivnom.b-vnom>max_obj*long_med_id) return 1; // error "sobrepasado buffer de nombres de objeto" + ptr=&vhash[h]; + while (*ptr && strcmp((char *)(ptr+2),(char *)_ivnom+8)) ptr=(byte**)*ptr; + if (!strcmp((byte *)(ptr+2),_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + return 2; // genera un error "el nombre no es nuevo" + } else { + *ptr=_ivnom; ptr_o=(void*)(_ivnom+4); *ptr_o=o=iobj++; // id nuevo + (*o).name=(byte*)_ivnom+8; + (*o).member=member; + if (num_obj++==max_obj) return 3; // error "demasiados objetos" + } + + (*o).dll=numdlls; +// (*o).usado_dll=0; + + return 0; +}*/ + + +// Errores específicos en la ejecución de una DLL + +void dll_error(int error, ...) +{ + va_list opparam; + char mensaje[256]; + + va_start(opparam,error); + + sprintf(mensaje,translate(3), fichdll); + vsprintf(mensaje,translate_dll_error(error),opparam); + + #ifdef _WIN32 + MessageBox(0,mensaje,translate(4),MB_ICONERROR); + #else + printf("%s\n",mensaje); + #endif + + /*printf("\n"); + n_errors++;*/ + + exit(-1); +} + + + +int EDIV_Export(char* cadena, int nparam, void* hfuncion) +{ + if(decl_struct) { + dll_error(6,cadena); + return 0; + } + +// creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_function:\t-- ID FUNCION: %d\n" + "export_function:\tCadena exportada: %s\n" + "export_function:\tN. parametros: %d\n" + "export_function:\tOffset de la funcion: 0x%X\n",n_externs,cadena,nparam,(unsigned int)hfuncion); + #endif + +/* if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob=o; + + if ((*ob).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + (*ob).tipo=tfext; + (*ob).fext.codigo=n_externs; + (*ob).fext.num_par=nparam; // es necesario?*/ + + extfuncs[n_externs]=hfuncion; + +/* for(i=0;i0xFFFFF) { + dll_error(8,cadena); + return 0; + } + + mem[imem]=0xDAD00000|(*ob2).cglo.totalen; + len+=1+((*ob2).cglo.totalen+5)/4; + mem[imem+1]=0; + imem+=1+((*ob2).cglo.totalen+5)/4; + (*ob).sglo.len_item+=1+((*ob2).cglo.totalen+5)/4; + + return (*ob2).cglo.offset; + } + else { // string miembro de struct local + + (*ob2).tipo=tcloc; + (*ob2).cloc.offset=len+1; + + if (((*ob2).cloc.totalen=tamano)<0) { + dll_error(8,cadena); + return 0; + } + if ((*ob2).cloc.totalen>0xFFFFF) { + dll_error(8,cadena); + return 0; + } + + loc[iloc]=0xDAD00000|(*ob2).cloc.totalen; + len+=1+((*ob2).cloc.totalen+5)/4; + loc[iloc+1]=0; + iloc+=1+((*ob2).cloc.totalen+5)/4; + (*ob).sloc.len_item+=1+((*ob2).cloc.totalen+5)/4; + + return (*ob2).cloc.offset; + }*/ + + offset=len; + len+=tamano; + + return offset; + +} + + +int EDIV_Export_Member_Tab(char* cadena, int numregs) +{ + if(!decl_struct) { + dll_error(7,cadena); + return 0; + } + +/* creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_member_tab:\t-- ID OBJETO: %d\n" + "export_member_tab:\tCadena exportada: %s\n" + "export_member_tab:\tN.regs: %d\n" + "export_member_tab:\tOffset del objeto: 0x%X\n",num_obj-1,cadena,numregs,(unsigned int)o); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob2=o; + + if ((*ob2).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + if((*ob).tipo==tsglo) { // array miembro de struct global + (*ob2).tipo=ttglo; + (*ob2).tglo.offset=len; + (*ob2).tglo.len1=numregs; + (*ob2).tglo.len2=-1; + (*ob2).tglo.len3=-1; + (*ob2).tglo.totalen=numregs+1; + len+=numregs+1; + memset(&mem[imem],0,(numregs+1)*4); + imem+=numregs+1; + (*ob).sglo.len_item+=numregs+1; + + return (*ob2).tglo.offset; + } + else { // array miembro de struct local + (*ob2).tipo=ttloc; + (*ob2).tloc.offset=len; + (*ob2).tloc.len1=numregs; + (*ob2).tloc.len2=-1; + (*ob2).tloc.len3=-1; + (*ob2).tloc.totalen=numregs+1; + len+=numregs+1; + memset(&loc[iloc],0,(numregs+1)*4); + iloc+=numregs+1; + (*ob).sloc.len_item+=numregs+1; + + return (*ob2).tloc.offset; + }*/ + + offset=len; + len+=numregs; + return offset; +} + + +int EDIV_Export_EndStruct() +{ + if(!decl_struct) { + dll_error(9); + return 0; + } + +/* #ifdef DEBUG_DLL + printf("export_endstruct:\t--- estructura cerrada\n"); + #endif + + member=NULL; + + if((*ob).tipo==tsglo) { // cierra estructura global + if ((*ob).sglo.len_item==0) { + dll_error(10); + return 0; + } + if ((*ob).sglo.totalitems>1) { + len=((*ob).sglo.totalitems-1)*(*ob).sglo.len_item-1; + do { + mem[imem]=mem[imem-(*ob).sglo.len_item]; + imem++; + } while (len--); + } + } + else { // cierra estructura local + if ((*ob).sloc.len_item==0) { + dll_error(10); + return 0; + } + if ((*ob).sloc.totalitems>1) { + len=((*ob).sloc.totalitems-1)*(*ob).sloc.len_item-1; + do { + loc[iloc]=loc[iloc-(*ob).sloc.len_item]; + iloc++; + } while (len--); + } +// iloc+=(*ob).sloc.totalitems*(*ob).sloc.len_item; + } +*/ + if(len==0) dll_error(10); + + if(slocal) diloc+=len*nregs; + else dimem+=len*nregs; + + decl_struct=0; + + return 1; +} + + +int EDIV_Export_Local(char* cadena, int valor) +{ + if(decl_struct) { + dll_error(6,cadena); + return 0; + } + +/* creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_local:\t-- ID OBJETO: %d\n" + "export_local:\tCadena exportada: %s\n" + "export_local:\tValor: %d\n" + "export_local:\tOffset del objeto: 0x%X\n",num_obj-1,cadena,valor,(unsigned int)o); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob=o; + + if ((*ob).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + (*ob).tipo=tvloc; + (*ob).vloc.offset=iloc; + loc[iloc]=valor; +*/ + return diloc++; +} + + +int EDIV_Export_Local_Tab(char* cadena, int numregs) +{ + if(decl_struct) { + dll_error(6,cadena); + return 0; + } + +/* creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_local_tab:\t-- ID OBJETO: %d\n" + "export_local_tab:\tCadena exportada: %s\n" + "export_local_tab:\tN.regs: %d\n" + "export_local_tab:\tOffset del objeto: 0x%X\n",num_obj-1,cadena,numregs,(unsigned int)o); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob=o; + + if ((*ob).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + (*ob).tipo=ttloc; + (*ob).tloc.offset=iloc; + (*ob).tloc.len1=len=numregs; + (*ob).tloc.len2=-1; + (*ob).tloc.len3=-1; + (*ob).tloc.totalen=len+1; + + // Inicializamos la tabla a 0 + do { + loc[iloc++]=0; + } while (len--); + + return (*ob).tloc.offset;*/ + + offset=diloc; + diloc+=numregs; + return offset; +} + + +int EDIV_Export_Local_Struct(char* cadena, int numregs) +{ + if(decl_struct) { + dll_error(6,cadena); + return 0; + } + + nregs=numregs; + slocal=1; + +/* creaobj=crea_objeto((byte*)cadena); + + #ifdef DEBUG_DLL + printf("export_local_struct:\t-- ID OBJETO: %d\n" + "export_local_struct:\tCadena exportada: %s\n" + "export_local_struct:\tN.regs: %d\n" + "export_local_struct:\tOffset del objeto: 0x%X\n",num_obj-1,cadena,numregs,(unsigned int)o); + #endif + + if(creaobj) { + dll_error(creaobj,cadena); + return 0; + } + + ob=o; + + if ((*ob).tipo!=tnone) { + dll_error(5,cadena); + return 0; + } + + decl_struct=1; + + (*ob).tipo=tsloc; + (*ob).sloc.offset=iloc; + (*ob).sloc.items1=numregs; + (*ob).sloc.items2=(*ob).sloc.items3=-1; + (*ob).sloc.totalitems=numregs+1; + (*ob).sloc.len_item=0; + member=ob; + len=0; +*/ + decl_struct=1; + len=0; + return diloc; +} + + +//////////////// +/// Call_Entrypoint +////////////// + +int Call_Entrypoint(int ep, ...) +{ + va_list opparam; + int i,c=0; + for(i=0;i +#endif +#include "main.h" +#include "language.h" + +/* Error ( numero, parametros [...] ) + * + * Genera un error en tiempo de ejecución, no crítico (en debug se llama al trazador) + * ATENCIÓN: Ahora mismo está en forma de RELEASE, para la versión DEBUG del stub se deberá + * invocar al trazador (aún hay que decidir si el trazador estará metido en el propio stub o + * si estará integrado en el entorno Delphi. En este último caso será necesaria una DLL + * especial para poder enlazar los datos de un programa y otro). + * Otra nota: he puesto exactamente los mismos errores de DIV2, ya que tenemos que mantener + * la compatibilidad con el ignore_error... 100% compatible, recordad.. :P + */ + +void error(word num, ...) +{ + va_list opparam; + char mensaje[256]; + + va_start(opparam,num); + sprintf(mensaje,translate(0), num); + vsprintf(mensaje,translate_runtime_error(num-100),opparam); + + #ifdef _WIN32 + MessageBox(0,mensaje,translate(1),MB_ICONERROR); + #else + printf("%s\n",mensaje); + #endif + + exit(num); +} + + +/* critical_error ( numero, parametros [...] ) + * + * Interrumpe el programa con un mensaje de error. No es posible trazar. + * Esta función es igual para release que para debug, ya que no se puede trazar en el punto + * en que se produce un error de este tipo. + */ + +void critical_error(word num, ...) +{ + va_list opparam; + char mensaje[256]; + + + va_start(opparam,num); + sprintf(mensaje,translate(0), num); + vsprintf(mensaje,translate_critical_error(num),opparam); + + #ifdef WIN32 + MessageBox(0,mensaje,translate(2),MB_ICONERROR); + #else + printf("%s\n",mensaje); + #endif + + exit(num); +} + diff --git a/ediv/src/stub/inte.c b/ediv/src/stub/inte.c new file mode 100644 index 0000000..1937ecc --- /dev/null +++ b/ediv/src/stub/inte.c @@ -0,0 +1,445 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* + * Este fichero contien el codigo del interprete del eDiv + * by Riseven + * + */ + +#include +#include +#include + +#include + +#include "extern.h" +#include "edivfont.h" +#include "kernel.h" +#include "inte.h" +#include "main.h" +#include "dll.h" +#include "varindex.h" + + +int first_loaded ; + +int ini_interprete() +{ + int i ; + first_loaded = 1 ; + + pila_max = 1024 ; + if ((pila=(int*)malloc(4*pila_max))==NULL) + critical_error(4); // no se pudo reservar memoria para la pila + + sp = 0 ; //por si acaso + + + // Posicion de inicio del code + iloc=mem[2]; // Inicio de la imagen de las variables locales + iloc_len=mem[6]+mem[5]; // Longitud de las locales (p£blicas y privadas) + iloc_pub_len=mem[6]; // Longitud de las variables locales p£blicas + inicio_privadas=iloc_pub_len; + imem=mem[1]; // Principio del codigo +/* + for ( i = 0 ; i < 10 ; i++ ) + printf( " : %i \n" , mem[i] ) ; +*/ + + + procs_s[1].imem = imem ; + procs_s[1].tipo = 0 ; + lista_mete( 1 ) ; + + // Preparamos la estructura de parametros + fp.Call_Entrypoint = Call_Entrypoint ; + fp.mem = mem ; + fp.pila = pila ; + fp.procs_s = &procs_s ; + fp.sp = &sp ; + fp.varindex = varindex ; + fp.num_procs = &num_proc_orden ; + fp.proc_orden = proc_orden ; + fp.proceso_actual = &proceso_actual ; + fp.existe.regions = 0 ; + fp.existe.dibuja = 0 ; + + + return 1 ; +} + +int busca_proc_libre() +{ + int i ; + for ( i = 1 ; i < 4096 ; i++ ) + { + if ( procs_s[i].tipo == 0 ) + return i ; + } + + return -1 ; +} + +int lista_mete( int num ) +{ + // Esto esta mal, habra que buscar su posicion segun priority + procs_s[num].orden = num_proc_orden ; + proc_orden[ num_proc_orden++ ] = num ; + + + return num_proc_orden-1 ; +} + + +int lista_quita( int num ) +{ + int i ; + + for ( i = procs_s[num].orden+1 ; i < num_proc_orden ; i++ ) + { + procs_s[ proc_orden[ i ] ].orden-- ; + proc_orden[ i - 1 ] = proc_orden[ i ] ; + } + num_proc_orden-- ; + + return 1 ; + +} + + + +int interprete() +{ + + int i ; + + // PROVISIONAL. Se tendra que cambiar para k soporte frame(int) y prioritys + if ( num_proc_orden > 0 ) + { + for ( proceso_actual = 0 ; proceso_actual < num_proc_orden ; proceso_actual++ ) + { + proceso( proc_orden[ proceso_actual ] ) ; + } + Call_Entrypoint(EDIV_frame); + }else + { + stub_quit() ; + } + + + return 1 ; +} + + +int proceso( int num ) +{ + int v1 ; + int retcode = 0; + int no_devuelve = 0 ; + int (*externa)(struct _fun_params*); + int temp ; + + num_proc = num ; + imem = procs_s[num_proc].imem ; + + + + //assert(0); + + while( retcode == 0 ) + { + + //printf("imem: %i\tnum_proc: %i\tsp: %i\tpila[sp]: %i \n" , imem , num_proc , sp , pila[sp]) ; + + switch ( mem[ imem++ ] ) + { + case lnop://0 + break; + case lcar://1 + pila[++sp]=mem[imem++] ; + break; + case lasi://2 + mem[ pila[sp-1] ] = pila[sp--] ; + //printf("Cargado %i en %i\n" , pila[sp+1], pila[sp] ) ; + break ; + case lori://3 + pila[sp-1]|=pila[sp]; + sp--; + break; + case lxor://4 + pila[sp-1]^=pila[sp]; + sp--; + break; + case land://5 + pila[sp-1]&=pila[sp]; + sp--; + break; + case ligu://6 + pila[sp-1] = ( pila[sp-1] == pila[sp] ) ; + sp--; + break; + case ldis://7 + pila[sp-1] = ( pila[sp-1] != pila[sp] ) ; + sp--; + break; + case lmay://8 + pila[sp-1] = ( pila[sp-1] > pila[sp] ) ; + sp--; + break; + case lmen://9 + pila[sp-1] = ( pila[sp-1] < pila[sp] ) ; + sp--; + break; + case lmei://10 + pila[sp-1] = ( pila[sp-1] <= pila[sp] ) ; + sp--; + break; + case lmai://11 + pila[sp-1] = ( pila[sp-1] >= pila[sp] ) ; + sp--; + break; + case ladd://12 + pila[sp-1] += pila[sp] ; + sp--; + break; + case lsub://13 + pila[sp-1] -= pila[sp] ; + sp--; + break; + case lmul://14 + pila[sp-1] *= pila[sp] ; + sp--; + break; + case ldiv://15 + if(pila[sp]==0) error(145); // división entre cero + pila[sp-1] /= pila[sp] ; + sp--; + break; + case lmod://16 + if(pila[sp]==0) error(145); // división entre cero + pila[sp-1] %= pila[sp] ; + sp--; + break; + case lneg://17 + pila[sp] = -pila[sp] ; + break ; + case lptr://18 + pila[sp] = mem[ pila[sp] ] ; + break ; + case lnot://19 + pila[sp]^=-1; + break ; + case laid://20 + pila[sp]+= procs_s[num_proc].id ; + break ; + case lcid://21 + pila[++sp] = procs_s[num_proc].id ; + break ; + case lrng://22 + imem++; + break ; + case ljmp://23 + imem = mem[ imem ] ; + //printf("Nueva posicion: %i\n", imem ) ; + break ; + case ljpf://24 + if (!(pila[sp]&1)) + imem = mem[ imem ] ; + sp--; + break ; + case lfun://25 NO USADO + break ; + case lcal://26 + devolver++ ; + v1 = busca_proc_libre() ; + procs_s[v1].imem = mem[imem++] ; + temp = proceso_actual ; + proceso_actual = lista_mete(v1) ; + procs_s[num_proc].imem = imem ; + proceso(v1) ; + proceso_actual = temp ; + num_proc = num ; + imem = procs_s[num_proc].imem ; + break ; + case lret://27 + lista_quita(num_proc) ; + //printf("Ret: %i\n" , num_proc) ; + retcode = 1 ; + break ; + case lasp://28 + sp--; + break; + case lfrm://29 + procs_s[num_proc].imem = imem ; + if ( first_loaded ) + { + Call_Entrypoint(EDIV_first_load); + first_loaded = 0 ; + } + //printf("Frame en: %i\n" , imem ) ; + retcode = 1 ; + break ; + case lcbp://30 + mem[procs_s[num_proc].id+var(_res_parameters)]=mem[imem++]; + mem[procs_s[num_proc].id+var(_res_param_offset)]=sp-mem[procs_s[num_proc].id+var(_res_parameters)]+1; + /**/procs_s[num_proc].num_params = mem[ imem-1 ] ; + break; + case lcpa://31 POR HACER #-# + mem[pila[sp--]]=pila[mem[procs_s[num_proc].id+var(_res_param_offset)]++]; + break; + case ltyp://32 + procs_s[num_proc].id = mem[2] + ( num_proc * iloc_len ) ; + if ( procs_s[num_proc].tipo != 0 ) + critical_error(3); // redefinición del tipo de proceso + procs_s[num_proc].tipo = mem[ imem++ ] ; + mem[ procs_s[num_proc].id + varindex[_res_process_type] ] = procs_s[num_proc].tipo ; + inicio_privadas=mem[6]; + break ; + case lpri://33 POR HACER + memcpy(&mem[procs_s[num_proc].id+inicio_privadas],&mem[imem+1],(mem[imem]-imem-1)<<2); + inicio_privadas+=(mem[imem]-imem-1); imem=mem[imem]; + break ; + case lcse://34 + if ( pila[sp-1] == pila[sp] ) + imem++; + else + imem=mem[imem]; + sp--; + break ; + case lcsr://35 + if ( pila[sp-2] >= pila[sp-1] && pila[sp-2] <= pila[sp] ) + imem++ ; + else + imem = mem[imem]; + sp-=2; + break ; + case lshr://36 + pila[sp-1] >>= pila[sp] ; + sp-- ; + break ; + case lshl://37 + pila[sp-1] <<= pila[sp] ; + sp-- ; + break ; + case lipt://38 + pila[sp] = ++mem[ pila[sp] ] ; + break ; + case lpti://39 COMPORTAMIENTO EXTRAÑO SI SE PONE EN UNA LINEA + mem[ pila[sp] ]++; + pila[sp] = mem[ pila[sp] ]-1 ; + break ; + case ldpt://40 + pila[sp] = --mem[ pila[sp] ] ; + break ; + case lptd://41 COMPORTAMIENTO EXTRAÑO SI SE PONE EN UNA LINEA + mem[ pila[sp] ]--; + pila[sp] = mem[ pila[sp] ]+1 ; + break ; + case lada://42 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] += pila[sp] ; + sp--; + break; + case lsua://43 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] -= pila[sp] ; + sp--; + break; + case lmua://44 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] *= pila[sp] ; + sp--; + break; + case ldia://45 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] /= pila[sp] ; + sp--; + break; + case lmoa://46 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] %= pila[sp] ; + sp--; + break; + case lana://47 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] &= pila[sp] ; + sp--; + break; + case lora://48 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] |= pila[sp] ; + sp--; + break; + case lxoa://49 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] ^= pila[sp] ; + sp--; + break; + case lsra://50 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] >>= pila[sp] ; + sp--; + break; + case lsla://51 + pila[ sp-1 ] = mem[ pila[ sp-1 ] ] <<= pila[sp] ; + sp--; + break; + case lpar://52 POR HACER + //imem++; + inicio_privadas+=mem[imem++]; + break; + case lrtf://53 + lista_quita(num_proc) ; + no_devuelve = 1 ; + //printf("Return: %i\n" , num_proc) ; + retcode = 1 ; + break ; + case lclo://54 POR HACER + break ; + case lfrf://55 POR HACER + sp--; + break ; + case limp://56 + carga_dll((char*)&mem[mem[imem++]]); + break ; + case lext://57 + //assert(0); + externa=extfuncs[mem[imem++]]; + // corresponder con FUNCTION_PARAMS + //temp = externa(pila,&sp,mem,varindex,&procs_s,Call_Entrypoint); + temp = externa(&fp) ; + pila[++sp]= temp ; + break ; + case ldbg://58 + #ifdef DBG + //Call_Entrypoint(EDIV_debug,imem,nombreprg,lin,0); + #endif + break ; + } + #ifdef DBG + //Call_Entrypoint(EDIV_trace,imem,nombreprg,lin,0); + #endif + } + + if ( devolver > 0 && no_devuelve == 0 ) + { + pila[++sp] = 0 ;// AQUI SE DEBERA DEVOLVER EL ID + devolver-- ; + } + + Call_Entrypoint(EDIV_post_process); + + return 1 ; +} + + + diff --git a/ediv/src/stub/inte.h b/ediv/src/stub/inte.h new file mode 100644 index 0000000..6858c2d --- /dev/null +++ b/ediv/src/stub/inte.h @@ -0,0 +1,262 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __INTE_H +#define __INTE_H + +#include "main.h" + +//----------------------------------------------------------------------------- +// CANCELA LAS DEFINICIONES EXISTENTES EN WINBASE.H (Win32) +//----------------------------------------------------------------------------- +#ifdef _WIN32 + #undef lstrcpy + #undef lstrcat + #undef lstrlen +#endif /* _WIN32 */ + +//----------------------------------------------------------------------------- +// MNEMÓNICOS BYTECODE EML +//----------------------------------------------------------------------------- + +//Mnemónico-Códg.-Operandos (Generación de código EML, "*" = "aún no usado") + +#define lnop 0 // * No operación +#define lcar 1 // valor Carga una constante en pila +#define lasi 2 // Saca valor, offset y mete el valor en [offset] +#define lori 3 // Or lógico +#define lxor 4 // Xor, or exclusivo +#define land 5 // And lógico, operador sobre condiciones +#define ligu 6 // Igual, operador logico de comparación +#define ldis 7 // Distinto, true si los 2 valores son diferentes +#define lmay 8 // Mayor, comparación con signo +#define lmen 9 // Menor, idem +#define lmei 10 // Menor o igual +#define lmai 11 // Mayor o igual +#define ladd 12 // Suma dos constantes +#define lsub 13 // Resta, operación binaria +#define lmul 14 // Multiplicación +#define ldiv 15 // División de enteros +#define lmod 16 // Módulo, resto de la división +#define lneg 17 // Negación, cambia de signo una constante +#define lptr 18 // Pointer, saca offset y mete [offset] +#define lnot 19 // Negación binaria, bit a bit +#define laid 20 // Suma id a la constante de la pila +#define lcid 21 // Carga id en la pila +#define lrng 22 // rango Realiza una comparación de rango +#define ljmp 23 // offset Salta a una dirección de mem[] +#define ljpf 24 // offset Salta si un valor es falso a una dirección +#define lfun 25 // código Llamada a un proceso interno, ej. signal() +#define lcal 26 // offset Crea un nuevo proceso en el programa +#define lret 27 // Auto-eliminación del proceso +#define lasp 28 // Desecha un valor apilado +#define lfrm 29 // Detiene por este frame la ejecución del proceso +#define lcbp 30 // num_par Inicializa el puntero a los parámetros locales +#define lcpa 31 // Saca offset, lee parámetro [offset] y bp++ +#define ltyp 32 // bloque Define el tipo de proceso actual (colisiones) +#define lpri 33 // offset Salta a la dirección, y carga var. privadas +#define lcse 34 // offset Si switch <> expresión, salta al offset +#define lcsr 35 // offset Si switch no esta en el rango, salta al offset +#define lshr 36 // Rotacion a la derecha (modo C, >>) +#define lshl 37 // Rotacion a la izquierda (modo C, <<) +#define lipt 38 // Incremento y pointer +#define lpti 39 // Pointer e incremento +#define ldpt 40 // Decremento y pointer +#define lptd 41 // Pointer y decremento +#define lada 42 // Add-asignación +#define lsua 43 // Sub-asignación +#define lmua 44 // Mul-asignación +#define ldia 45 // Div-asignación +#define lmoa 46 // Mod-asignación +#define lana 47 // And-asignación +#define lora 48 // Or-asignación +#define lxoa 49 // Xor-asignación +#define lsra 50 // Shr-asignación +#define lsla 51 // Shl-asignación +#define lpar 52 // num_par_pri Define el número de parámetros privados +#define lrtf 53 // Auto-eliminación del proceso, devuelve un valor +#define lclo 54 // offset Crea un clon del proceso actual +#define lfrf 55 // Pseudo-Frame (frame a un porcentaje, frame(100)==frame) +#define limp 56 // offset text Importa una DLL externa +#define lext 57 // código Llama a una función externa +#define lchk 58 // Comprueba la validez de un identificador +#define ldbg 59 // Invoca al debugger + +// Instrucciones añadidas para la optimización (DIV 2.0) + +#define lcar2 60 +#define lcar3 61 +#define lcar4 62 +#define lasiasp 63 +#define lcaraid 64 +#define lcarptr 65 +#define laidptr 66 +#define lcaraidptr 67 +#define lcaraidcpa 68 +#define laddptr 69 +#define lfunasp 70 +#define lcaradd 71 +#define lcaraddptr 72 +#define lcarmul 73 +#define lcarmuladd 74 +#define lcarasiasp 75 +#define lcarsub 76 +#define lcardiv 77 + +// Instrucciones añadidas para el manejo de caracteres + +#define lptrchr 78 // Pointer, saca (index, offset) y mete [offset+byte index] +#define lasichr 79 // Saca (valor, index, offset) y mete el valor en [offset+byte index] +#define liptchr 80 // Incremento y pointer +#define lptichr 81 // Pointer e incremento +#define ldptchr 82 // Decremento y pointer +#define lptdchr 83 // Pointer y decremento +#define ladachr 84 // Add-asignación +#define lsuachr 85 // Sub-asignación +#define lmuachr 86 // Mul-asignación +#define ldiachr 87 // Div-asignación +#define lmoachr 88 // Mod-asignación +#define lanachr 89 // And-asignación +#define lorachr 90 // Or-asignación +#define lxoachr 91 // Xor-asignación +#define lsrachr 92 // Shr-asignación +#define lslachr 93 // Shl-asignación +#define lcpachr 94 // Saca offset, lee parámetro [offset] y bp++ + +// Instrucciones añadidas para el manejo de cadenas + +#define lstrcpy 95 // Saca si, di, y hace strcpy(mem[di],[si]) (deja di en pila) +#define lstrfix 96 // Amplia una cadena antes de meter un char en ella +#define lstrcat 97 // Concatena dos cadenas (opera como strcpy) +#define lstradd 98 // Suma dos strings "en el aire" y deja en pila el puntero al aire +#define lstrdec 99 // Añade o quita caracteres a una cadena +#define lstrsub 100 // Quita caracteres a una cadena (-=) +#define lstrlen 101 // Sustituye una cadena por su longitud +#define lstrigu 102 // Comparacion de igualdad de dos cadenas +#define lstrdis 103 // Cadenas distintas +#define lstrmay 104 // Cadena mayor +#define lstrmen 105 // Cadena menor +#define lstrmei 106 // Cadena mayor o igual +#define lstrmai 107 // Cadena menor o igual +#define lcpastr 108 // Carga un parámetro en una cadena + +// Instrucciones añadidas para el manejo de Words + +#define lptrwor 109 // Pointer, saca (index, offset) y mete [offset+byte index] +#define lasiwor 110 // Saca (valor, index, offset) y mete el valor en [offset+byte index] +#define liptwor 111 // Incremento y pointer +#define lptiwor 112 // Pointer e incremento +#define ldptwor 113 // Decremento y pointer +#define lptdwor 114 // Pointer y decremento +#define ladawor 115 // Add-asignación +#define lsuawor 116 // Sub-asignación +#define lmuawor 117 // Mul-asignación +#define ldiawor 118 // Div-asignación +#define lmoawor 119 // Mod-asignación +#define lanawor 120 // And-asignación +#define lorawor 121 // Or-asignación +#define lxoawor 122 // Xor-asignación +#define lsrawor 123 // Shr-asignación +#define lslawor 124 // Shl-asignación +#define lcpawor 125 // Saca offset, lee parámetro [offset] y bp++ + +// Miscelánea + +#define lnul 126 // Comprueba que un puntero no sea NULL + + + +//ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ +// Variables locales del sistema de sprites (las primeras no son p£blicas) +//ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ + +#define _Id 0 //Para comprobar validez de accesos externos +#define _IdScan 1 //Recorrido del resto de los procesos (p.ej.colisiones) +#define _Bloque 2 //Identificador del tipo de proceso (para colisiones) +#define _BlScan 3 //Ultimo tipo de proceso scaneado en el £ltimo recorrido +#define _Status 4 //Estado (0 dead, 1 killed, 2 alive, 3 sleept, 4 freezed) +#define _NumPar 5 //N£mero de par metros del proceso +#define _Param 6 //Puntero a los par metros pasados al proceso (en pila) +#define _IP 7 //Puntero de ejecuci¢n (la siguiente al frame anterior) +#define _SP 8 //Puntero de pila (stack pointer del proceso) +#define _Executed 9 //Indica para cada frame si el proceso ya se ejecut¢ +#define _Painted 10 //Indica si el proceso ya ha sido pintado + +// Las siguientes 2 variables son duales, segun el proceso sea de m7 o m8 + +#define _Dist1 11 //Distancia 1, para el modo 7 +#define _Dist2 12 //Distancia 2, para el modo 7 + +#define _M8_Object 11 //Objeto dentro del mundo m8 +#define _Old_Ctype 12 //Antiguo _Ctype + +#define _Frame 13 //Cuanto frame lleva el proceso (frame(n)) +#define _x0 14 //Caja ocupada por el sprite cada +#define _y0 15 // vez que se pinta para realizar +#define _x1 16 // volcado y restauraci¢n de fondo +#define _y1 17 // parcial (dump_type==0 y restore_background==0) +#define _FCount 18 //Cuenta de llamadas a funcion (para saltarse retornos en frame) +#define _Caller 19 //ID del proceso o funcion llamador (0 si ha sido el kernel) + +#define _Father 20 //Id del padre del proceso (0 si no existe) +#define _Son 21 //Id del £ltimo hijo que ha creado (0 sne) +#define _SmallBro 22 //Id del hermano menor del proceso (0 sne) +#define _BigBro 23 //Id del hermanos mayor (m s viejo) del proceso (0 sne) +#define _Priority 24 //Prioridad de proceso (positivo o negativo) +#define _Ctype 25 //Indica si es relativo a pantalla, parallax o mode 7 +#define _X 26 //Coordenada x (del centro gravitatorio del gr fico) +#define _Y 27 //Coordenada y (idem) +#define _Z 28 //Coordenada z (Prioridad para la impresi¢n) +#define _Graph 29 //C¢digo del gr fico (se corresponde con los ficheros) +#define _Flags 30 //Define espejados horizontales y verticales +#define _Size 31 //Tama¤o (%) del gr fico +#define _Angle 32 //Angulo de rotaci¢n del gr fico (0 gr fico normal) +#define _Region 33 //Regi¢n con la que hacer el clipping del gr fico +#define _File 34 //FPG que contiene los gr ficos del proceso +#define _XGraph 35 //Puntero a tabla: n§graficos,graf_angulo_0,... +#define _Height 36 //Altura de los procesos en el modo 7 (pix/4) +#define _Cnumber 37 //Indica en que scroll o m7 se ver  el gr fico +#define _Resolution 38 //Resoluci¢n de las coordenadas x,y para este proceso +#define _Radius 39 //Radio del objeto en m8 +#define _M8_Wall 40 //Pared con la que colisiona +#define _M8_Sector 41 //Sector en el que esta +#define _M8_NextSector 42 //Sector que esta detras de la pared con la que colisiona +#define _M8_Step 43 //Lo que puede subir el sprite en m8 (altura escalon) + + + +//---------------------------------------------------------------------- + + + +int proc_orden[ 4096 ] ; +int num_proc_orden ; + +int devolver; // Si se espera devolucion > 0 + +//---------------------------------------------------------------------- + +int ini_interprete() ; +int busca_proc_libre() ; +int lista_mete(int) ; +int interprete() ; +int proceso(int) ; + +#endif \ No newline at end of file diff --git a/ediv/src/stub/kernel.c b/ediv/src/stub/kernel.c new file mode 100644 index 0000000..dc367f3 --- /dev/null +++ b/ediv/src/stub/kernel.c @@ -0,0 +1,189 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +/* + * Este fichero contien el codigo del Kernel del eDiv + * by Riseven + * + */ + +#include +#include + +#ifdef WIN32 + #include +#endif + +#include + +#include "edivfont.h" +#include "kernel.h" +#include "inte.h" +#include "extern.h" +#include "main.h" + + + +struct _k_error_s k_error_s[50] ; + + +int ini_kernel() +{ + //FILE *fp ; // AHORA FP ES OTRA COSA MAS IMPORTANTE XDDD + FILE *im ; + char *pool ; + fpos_t pos ; + + + // EDIV NOID +/* + fp = fopen("fuente.fnt", "r" ) ; + im = fopen("tempo.bmp", "w" ) ; + printf( "\n%i\n" , ftell( fp ) ) ; + printf( "\nsizeof control:%i\n" , sizeof(fuente_control_s[0]) ) ; + //printf( "leido:%i\n" , (int)fread( &fuente_control_s[0] , 1 , sizeof(fuente_control_s[0]) , fp ) ) ; + printf( "leido:%i\n" , (int)fread( &fuente_control_s[0] , 1 , 1393 , fp ) ) ; + printf( "Sizeof imagen: %i" , fuente_control_s[0].size_imagen ) ; + if (!(pool = malloc(fuente_control_s[0].size_imagen + 1 ) ) ) + printf("Error: Memoria insuficiente" ) ; + + pos = fuente_control_s[0].offset_imagen + 10; + fsetpos(fp , &pos ) ; + printf( "\n%i\n%i\n" , ftell( fp ), fuente_control_s[0].offset_imagen ) ; + printf( "leido:%i\n" , fread( pool , 1 , fuente_control_s[0].size_imagen , fp ) ) ; + + //fwrite( &fuente_control_s , 1 , 2060 , fp ) ; + printf( "\n%i\n%i\n" , ftell( fp ), fuente_control_s[0].size_imagen ) ; + getchar() ; + + fwrite( pool , 1 , fuente_control_s[0].size_imagen , im ) ; + free( pool ) ; + fclose( im ) ; + fclose(fp) ; + + // Sacamos la fuente + fuente_control_s[0].imagen = SDL_LoadBMP("tempo.bmp") ; + + // Escribimos A + + textos_s[0].cadena = SDL_CreateRGBSurface(SDL_HWSURFACE, fuente_control_s[0].rect[173].w, fuente_control_s[0].rect[173].h, 24, 0xFF0000, 0x00FF00, 0x0000FF, 0x000000); + SDL_BlitSurface( fuente_control_s[0].imagen , &fuente_control_s[0].rect[173] , textos_s[0].cadena , NULL ) ; + textos_s[0].x = 20 ; + textos_s[0].y = 20 ; + textos_s[0].existe = 1 ; + + + imgs[0] = SDL_LoadBMP( "BG.bmp" ) ; + if ( imgs[0] == NULL ) + exit(0); + imgs[1] = SDL_LoadBMP( "bola.bmp" ) ; + if ( imgs[1] == NULL ) + exit(0); + imgs[2] = SDL_LoadBMP( "barra.bmp" ) ; + if ( imgs[2] == NULL ) + exit(0); +*/ + +/* + //Cargamos bola.bmp PROVISIONAL mientras se hace Load_BMP() + imgs[0] = SDL_LoadBMP( "bola.bmp" ) ; + if ( imgs[0] == NULL ) + exit(0) ; +*/ + + + strcpy( k_error_s[K_ERR_SDL_INIT].cadena , "NO SE PUDO INICIALIZAR LA SDL" ); + k_error_s[K_ERR_SDL_INIT].nivel = 1000 ; + strcpy( k_error_s[K_ERR_SDL_SET_VIDEO_MODE].cadena , "NO SE PUDO ESTABLECER EL MODO GRAFICO" ); + k_error_s[K_ERR_SDL_SET_VIDEO_MODE].nivel = 900 ; + strcpy( k_error_s[K_ERR_KERNEL].cadena , "ERROR DURANTE LA EJECUCION DEL KERNEL" ); + k_error_s[K_ERR_KERNEL].nivel = 400 ; + strcpy( k_error_s[K_ERR_INTERPRETE].cadena , "ERROR DURANTE LA EJECUCION DEL INTERPRETE" ); + k_error_s[K_ERR_INTERPRETE].nivel = 1000 ; + strcpy( k_error_s[K_ERR_INI_INTERPRETE].cadena , "ERROR DURANTE LA INICIALIZACION DEL INTERPRETE" ); + k_error_s[K_ERR_INI_INTERPRETE].nivel = 1000 ; + + return 0; +} + + +// KERNEL +// Se encarga de los procesos internos del stub +// by Riseven + +int kernel() +{ + int i ; +// SDL_Rect dst_rect; +// SDL_Rect src_rect ; + +/* + // Para el testeo + for ( i = 0 ; i < num_proc_orden ; i++ ) + { + lista_draw_proc_s[0].imagen = imgs[0] ; + lista_draw_proc_s[0].x = mem[procs_s[proc_orden[i]].id + _X -1 ] ; + lista_draw_proc_s[0].y = mem[procs_s[proc_orden[i]].id + _Y -1 ] ; + } + + num_draw_proc = i ; + + // Se dibujan los graficos que proceden de procesos + for ( i = 0 ; i < num_draw_proc ; i++ ) + { + dst_rect.x = lista_draw_proc_s[i].x ; + dst_rect.y = lista_draw_proc_s[i].y ; + dst_rect.w = lista_draw_proc_s[i].imagen->w ; + dst_rect.h = lista_draw_proc_s[i].imagen->h ; + SDL_BlitSurface( lista_draw_proc_s[i].imagen , NULL , screen , &dst_rect ) ; + } +*/ +/* + + // Se escriben los textos ( ESTO SE TENDRA K MEZCLAR CON LO ANTERIOR + for ( i = 0 ; i < 256 ; i++ ) + { + if ( textos_s[i].existe == 1 ) + { + dst_rect.x = textos_s[i].x ; + dst_rect.y = textos_s[i].y ; + dst_rect.w = textos_s[i].cadena->w ; + dst_rect.h = textos_s[i].cadena->h ; + SDL_BlitSurface( textos_s[i].cadena , NULL , screen , &dst_rect ) ; + } + } +*/ + + + + //SDL_Flip(screen) ; + + return 1 ; +} + +void k_error( int codigo ) +{ + fprintf(stdout, k_error_s[codigo].cadena ) ; + + if ( k_error_s[codigo].nivel >= K_ERROR_EXIT ) + exit(0) ; + +} + diff --git a/ediv/src/stub/kernel.h b/ediv/src/stub/kernel.h new file mode 100644 index 0000000..d250321 --- /dev/null +++ b/ediv/src/stub/kernel.h @@ -0,0 +1,58 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __KERNEL_H +#define __KERNEL_H + +// CODIGOS DE ERROR DEL KERNEL +#define K_ERR_SDL_INIT 0 +#define K_ERR_SDL_SET_VIDEO_MODE 1 +#define K_ERR_KERNEL 2 +#define K_ERR_INTERPRETE 3 +#define K_ERR_INI_INTERPRETE 4 + +// NIVEL CRITICO DE ERROR DEL KERNEL +#define K_ERROR_EXIT 500 + +struct _k_error_s { + char cadena[64]; + int nivel; +}; + +struct _lista_draw_proc_s{ + SDL_Surface *imagen; + int x,y; +} lista_draw_proc_s[512]; + + +int num_draw_proc; + +struct _textos_s { + SDL_Surface *cadena; + int x,y; + int existe; +} textos_s[256]; + + +int ini_kernel(); +int kernel(); +void k_error(int codigo); + +#endif /* __KERNEL_H */ \ No newline at end of file diff --git a/ediv/src/stub/language.c b/ediv/src/stub/language.c new file mode 100644 index 0000000..7e767ba --- /dev/null +++ b/ediv/src/stub/language.c @@ -0,0 +1,937 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + + +/**** ¡¡¡ OJO CON LAS COMAS !!! ****/ + + +#ifdef _WIN32 +# include +#else +# include +# include +#endif + +#include "shared.h" +#include "language.h" + + +int detecta_idioma_iso(char* lang) +{ + int i; + static char getid[NUM_LANGUAGES][3] = { + "es", // español + "it", // italiano + "pt", // portugués + "en", // inglés + "ca", // catalán + "eu" // euskera + }; + if(lang==NULL) return DEFAULT_LANGUAGE; + if(strlen(lang)>2) lang[2]=0; + strlwr(lang); + for(i=0;i + +#include "main.h" +#include "lower.h" // <- hacer un h con las declaraciones + +/* Tabla de conversión de caracteres MS-DOS a Windows */ + +int dos_chars=0; + +byte dos_to_win[256] = { + 0, 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, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, +201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163, 216, 215, 131, +225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187, +166, 166, 166, 166, 166, 193, 194, 192, 169, 166, 166, 43, 43, 162, 165, 43, + 43, 45, 45, 43, 45, 43, 227, 195, 43, 43, 45, 45, 166, 45, 43, 164, +240, 208, 202, 203, 200, 105, 205, 206, 207, 43, 43, 166, 95, 166, 204, 175, +211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180, +173, 177, 61, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 166, 160 +}; + +/* Tabla de conversión de caracteres Windows a MS-DOS */ + +byte win_to_dos[256] = +{ + 0, 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, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 159, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 255, 173, 189, 156, 207, 190, 254, 245, 249, 184, 166, 174, 170, 240, 169, 238, + 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168, + 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216, + 209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225, + 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139, + 208, 164, 149, 162, 147, 228, 148, 246, 155, 151, 163, 150, 129, 236, 231, 152 +}; + +byte lower[256]; + +byte c_convert (byte c) +{ + return dos_chars ? c : win_to_dos[c]; +} + + +void set_c_lower (const byte * from, const byte * to) +{ + if (dos_chars) + while (*from) lower[win_to_dos[*from++]] = win_to_dos[*to++] ; + else + while (*from) lower[*from++] = *to++ ; +} + +void inicializa_lower() +{ + + /* ¡Esto hay que revisarlo bastante! + */ + + memset (lower, 0, 256); // es necesario + + set_c_lower ("ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyz"); + set_c_lower ("abcdefghijklmnopqrstuvwxyz", + "abcdefghijklmnopqrstuvwxyz"); + +#ifdef RESPETAR_ACENTOS + set_c_lower ("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ", + "áéíóúñçàèìòùäëïöüýâêîôûæãåõ"); + set_c_lower("áéíóúñçàèìòùäëïöüýâêîôûæãåõ", + "áéíóúñçàèìòùäëïöüýâêîôûæãåõ"); +#else + set_c_lower ("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ", + "aeiouncaeiouaeiouyaeiouæaao"); + set_c_lower ("áéíóúñÑçÇàèìòùäëïöüýâêîôûæãåõÁÉÍÓÚ", + "aeiounnccaeiouaeiouyaeiouÆaaoaeiou"); +#endif + + set_c_lower("1234567890#$_ºª","1234567890#$_ºª"); +} diff --git a/ediv/src/stub/lower.h b/ediv/src/stub/lower.h new file mode 100644 index 0000000..93aca8b --- /dev/null +++ b/ediv/src/stub/lower.h @@ -0,0 +1,31 @@ +/* + * eDiv Compiler + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 "main.h" + +byte dos_to_win[256]; +byte win_to_dos[256]; + +byte lower[256]; + +byte c_convert(byte c); +void set_c_lower (const byte *from, const byte *to); +void inicializa_lower(); + diff --git a/ediv/src/stub/main.h b/ediv/src/stub/main.h new file mode 100644 index 0000000..3426817 --- /dev/null +++ b/ediv/src/stub/main.h @@ -0,0 +1,91 @@ +/* + * eDiv Executable Stub + * Copyleft (C) 2000-2002 Sion Entertainment + * http://www.sion-e.com + * + * 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 + */ + +#ifndef __MAIN_H +#define __MAIN_H + +#include +#include "shared.h" + +//#define DEBUG_DLL // para mostrar información al cargar las DLLs + +#define swap(a,b) {(a)^=(b);(b)^=(a);(a)^=(b);} + + +// +// GLOBALES DEL INTERPRETE +// + +int ignore_errors; // 1 = se ignoran los errores 'evitables' + +#ifdef DBG +int debug; // 1 = el programa esta compilado en modo debug +#endif + +int num_proc; // Numero de proceso activo ( indice procs_s[] ) + +int imem; // indice de mem +int imem_max; // máximo indice de mem + +int * mem; // Memoria principal de la máquina destino + +// iguales que mem pero de tipo word y byte +word * memw; +byte * memb; + +// igual pero para variables locales +int iloc, iloc_pub_len, iloc_len, inicio_privadas; + +//pila +int * pila ; +int pila_max ; //maximo indice de pila +int sp ; // indice de la pila ; +int proceso_actual ; // indice para proc_orden +//struct _fun_params fp ; +// +// SDL +// +SDL_Surface * screen; +SDL_Surface * screen1; +//SDL_Surface * imgs[255]; +SDL_Event event[0xFF]; + +Uint8 * keys; + + +// +// DEBUG +// + +#ifdef DBG +char* prog; +int* lin; +#endif + +/// +// PROTOTIPOS +/// + +void error(word num, ...); // Mensaje de error no crítico (trazable) +void critical_error(word num, ...); // Mensaje de error crítico +void stub_quit(); // Salir del stub +void* e_malloc(size_t size); // identico a malloc pero con errormsg utomático + +#endif /* __MAIN_H */ \ No newline at end of file diff --git a/ediv/src/stub/modulos.c b/ediv/src/stub/modulos.c new file mode 100644 index 0000000..4a2ed2d --- /dev/null +++ b/ediv/src/stub/modulos.c @@ -0,0 +1,266 @@ +/*************************************************************************** + modulos.c - description + ------------------- + begin : Sat Jun 23 2001 + copyright : (C) 2001 by Sion Entertainment + email : bugs@edivcentral.com + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifdef _WIN32 + #include "dll_load.h" + #include + HINSTANCE hDLL[999]; + int dll_n; +#else + #include + #include + #include +#endif + +#include +#include +#include "modulos.h" +#include "extern.h" + +int imem_temp; +int iloc_temp; +TYPEOF_ExportaFuncs *ExportaFuncs[100]; +int funciones; + + +void dll_func() // ke original, no? XD +{ + #ifdef WIN32 + int buscafich; + struct _finddata_t fichero_dll; // busqueda de DLLs + #else + int i; + DIR *directorio; + struct dirent *fichero_dll; + #endif + + numdlls=0; + + #ifdef WIN32 + // Inicializa la carga de DLLs + CheckWindowsVersion(); + InitializeDLLLoad(); + #endif + + #ifdef WIN32 + // Busca las DLLs que hay en el directorio + buscafich = _findfirst("dll\\*.dll", &fichero_dll); + if (buscafich==-1) { + printf("No se encuentra ninguna DLL"); + exit(1); + } + printf("DLL encontrada: %s\n",fichero_dll.name); + + // guarda el nombre de fichero en la tabla de DLLs + printf("\nGuardando el nombre de la dll..."); + dlls[0].nombre=(char*)e_malloc(strlen(fichero_dll.name)+1); + strcpy(dlls[0].nombre,fichero_dll.name); + printf("\nGuardado el nombre de la dll..."); + + // importa las funciones de la DLL + strcpy(fichdll,"dll\\"); + strcat(fichdll,fichero_dll.name); + leedll(); + + numdlls=1; + // hace lo mismo con el resto + while(1) { + if(_findnext(buscafich,&fichero_dll)==0) { + printf("DLL encontrada: %s\n",fichero_dll.name); + strcpy(fichdll,"dll\\"); + strcat(fichdll,fichero_dll.name); +// dlls[numdlls].nfuncs=0; + if(!leedll()) { + dlls[numdlls].nombre=(char*)e_malloc(strlen(fichero_dll.name)+1); + strcpy(dlls[numdlls].nombre,fichero_dll.name); + dlls[numdlls].usado=0; + numdlls++; + } + } + else + break; + } + + + + + +#else // si estamos en Linux + + directorio=opendir("so"); + if(!directorio) { + printf("Directorio so/ no encontrado\n"); + exit(1); + } + // Nos saltamos las dos primeras entradas "./" y "../" + for(i=0;i<2;i++) { + fichero_dll=readdir(directorio); + if(fichero_dll==0) { + printf("No se encuentra ninguna librería\n"); + exit(1); + } + } + // Busca las .so + while (1) { + fichero_dll=readdir(directorio); + if(fichero_dll==0) + break; + if(fichero_dll->d_type==DT_REG) { + printf("Librería encontrada: so/%s\n",fichero_dll->d_name); + strcpy(fichdll,"so/"); + strcat(fichdll,fichero_dll->d_name); +// dlls[numdlls].nfuncs=0; + if(!leedll()) { + dlls[numdlls].nombre=(char*)e_malloc(strlen(fichero_dll->d_name)+1); + strcpy(dlls[numdlls].nombre,fichero_dll->d_name); + dlls[numdlls].usado=0; + numdlls++; + } + } + } + if(numdlls==0) { + printf("No se encuentra ninguna librería\n"); + exit(1); + } + #endif +} + + +void dll_func2() +{ + int i; + + for(i=0;i +#include "main.h" +#include "parser.h" +#include "compiler.h" +#include "lower.h" +//#include "expresion.h" +#include "extern.h" + +// Para los objetos predefinidos (DLL) + +int crea_objeto(byte * nombre) +{ + struct objeto * * ptr_o; + byte ** ptr, * _ivnom, h; + + _ivnom=ivnom.b; *ivnom.p++=0; *ivnom.p++=0; h=0; + while (*ivnom.b=lower[*nombre++]) h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + ivnom.b++; if (ivnom.b-vnom>max_obj*long_med_id) return 1; // error "sobrepasado buffer de nombres de objeto" + ptr=&vhash[h]; + while (*ptr && strcmp((char *)(ptr+2),(char *)_ivnom+8)) ptr=(byte**)*ptr; + if (!strcmp((byte *)(ptr+2),_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + return 2; // genera un error "el nombre no es nuevo" + } else { + *ptr=_ivnom; ptr_o=(void*)(_ivnom+4); *ptr_o=o=iobj++; // id nuevo + (*o).name=(byte*)_ivnom+8; + (*o).member=member; + if (num_obj++==max_obj) return 3; // error "demasiados objetos" + } + + (*o).dll=numdlls; +// (*o).usado_dll=0; + + return 0; +} + + +//////////////////// +// PRECOMPILACIÓN // +//////////////////// + +void psintactico(void) +{ + byte * _ivnom=ivnom.b; + + longitud_textos=0; + source=prog; + + do { + plexico(); + } while (pieza!=p_ultima); + + ivnom.b=_ivnom; + source=prog; + _source=source; + coment=0; +} + +void plexico(void) +{ + byte ** ptr, * _ivnom, h, * _source=source; + struct lex_ele * e; + + if (!coment) { + old_linea=linea; + old_ierror=ierror; + old_ierror_end=ierror_end; + } + +lex_scan: + + ierror=_source; + + switch ((int)lex_case[*_source]) { // Puntero a un lex_ele o l_??? + + case l_err: + if (coment) { pieza=p_rem; _source++; } + else error(0,5); // carácter no reconocido + _source++; + break; + + case l_eof: + pieza=p_ultima; + if (coment) error(0,1); // llegó el final dentro de un comentario + break; + + case l_cr: + linea++; + if (*_source==cr && *(_source+1)==lf) _source+=2; + else _source++; + + ultima_linea=_source; + goto lex_scan; + + case l_id : + if (coment) { pieza=p_rem; _source++; break; } + + _ivnom=ivnom.b; + *ivnom.p++=0; + *ivnom.p++=0; + h=0; + + while (*ivnom.b=lower[*_source++]) + h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + + ivnom.b++; + _source--; + if (ivnom.b-vnom>max_obj*long_med_id) error(0,2); // Excedida la capacidad del vector de nombres + + ptr=&vhash[h]; + while (*ptr && strcmp((byte *)(ptr+2),_ivnom+8)) + ptr=(void*)*ptr; + + if (!strcmp((byte *)(ptr+2),_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + pieza=(int)*(ptr+1); + if (pieza<256 && pieza>=0) { // palabra reservada (token) + if (pieza==p_rem) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + } else { // objeto (id anterior) + pieza=p_id; + } + } + else { // id nuevo + ivnom.b=_ivnom; // lo saca de vnom + pieza=p_id; + } + + break; + + case l_spc: + while ((*++_source)==' '); + goto lex_scan; + + case l_lit: + if (coment) { pieza=p_rem; _source++; break; } + + pieza=p_lit; // Literal entre dos h + h=*_source; + _ivnom=ivnom.b; + + do { + _source++; + + if (*_source==cr || *_source==lf) { + error(0,3); // literal sin cerrar + break; + } + + if (*_source==h) { + if (*(_source+1)==h) *_ivnom=*++_source; + else *_ivnom=0; + } + else + *_ivnom=*_source; + + } while (*_ivnom++); + + _source++; + longitud_textos+=(strlen(ivnom.b)+4)/4; + ivnom.b=_ivnom; // lo saca de vnom + break; + + case l_num: + if (coment) { pieza=p_rem; _source++; break; } + + pieza=p_num; + pieza_num=0; + + if (*_source=='0' && lower[*(_source+1)]=='x') { + _source+=2; + while ((int)lex_case[*_source]==l_num || + (lower[*_source]>='a' && lower[*_source]<='f')) { + if ((int)lex_case[*_source]==l_num) + pieza_num=pieza_num*16+*_source++-0x30; + else + pieza_num=pieza_num*16+lower[*_source++]-'a'+10; + } + } + else + do { + pieza_num=pieza_num*10+*_source++-0x30; + } while ((int)lex_case[*_source]==l_num); + + break; + + default: // puntero a un lex_ele + e=lex_case[*_source++]; + _ivnom=_source; + pieza=(*e).token; + + while (e=(*e).siguiente) { + while (*_source!=(*e).caracter && (*e).alternativa) + e=(*e).alternativa; + + if (*_source++==(*e).caracter && (*e).token) { + pieza=(*e).token; + _ivnom=_source; + } + } + _source=_ivnom; + + if (pieza==p_rem && !coment) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + + if (pieza==p_ini_rem) { + coment++; + do { + source=_source; + plexico(); + _source=source; + } while (pieza!=p_end_rem); + coment--; + goto lex_scan; + } + + if (pieza==p_ultima) { + if (coment) error(0,1); // llegó el final dentro de un comentario + else error(0,4); // símbolo no reconocido (¡¡creo!!) + } + + break; + + } + + source=_source; + ierror_end=_source-1; +} + + +////////////////////////////////////// +// ANÁLISIS SINTÁCTICO DEL PROGRAMA // +////////////////////////////////////// + +void sintactico(void) +{ + struct objeto * ob, * member2; + int _imem,_imem_old,num_par,n; + byte *oimemptr; + int _itxt,dup; + byte * old_source,*nombre_dll; + char cWork[256]; + int num_extern; + + lexico(); + + // + // Opciones de compilacion + // + // p_compiler_options {opcion} {;} + // + + max_process=0; // Valores de las opciones por defecto + ignore_errors=0; + free_sintax=0; + extended_conditions=0; + simple_conditions=0; + comprueba_rango=1; + comprueba_id=1; + comprueba_null=1; + hacer_strfix=1; + optimizar=1; + + if (pieza==p_compiler_options) { + lexico(); + do { + if (pieza==p_ptocoma) { lexico(); break; } + if (pieza==p_coma) lexico(); + if (pieza==p_id && (*o).tipo==tcons) { + switch((*o).cons.valor) { + case 0: // _max_process + lexico(); + if (pieza!=p_asig) error(3,7); // se esperaba '=' + lexico(); + max_process=constante(); + if (max_process<0) max_process=0; + #ifdef _DEBUG + printf("dbg: max_process=%d\n",max_process); + #endif + break; + case 1: // _extended_conditions + lexico(); + extended_conditions=1; + break; + case 2: // _simple_conditions + lexico(); + simple_conditions=1; + break; + case 3: // _case_sensitive + lexico(); + memcpy(lower+129,"üéâäàåçêëèïîìäåéææôöòûùÿöü¢£¥áíóú",35); + memcpy(lower+'A',"ABCDEFGHIJKLMNOPQRSTUVWXYZ",26); + lower['Ñ']='Ñ'; + break; + case 4: // _ignore_errors + lexico(); + ignore_errors=1; + break; + case 5: // _free_sintax + lexico(); + free_sintax=1; + break; + case 6: // _no_check + lexico(); + comprueba_rango=0; + comprueba_id=0; + comprueba_null=0; + break; + case 7: // _no_strfix + lexico(); + hacer_strfix=0; + break; + case 8: // _no_optimization + lexico(); + optimizar=0; + break; + case 9: // _no_range_check + lexico(); + comprueba_rango=0; + break; + case 10: // _no_id_check + lexico(); + comprueba_id=0; + break; + case 11: // _no_null_check + lexico(); + comprueba_null=0; + break; + default: + error(0,8); // se esperaba una opción de compilación + break; + } + } else { + if (!free_sintax) { + if (pieza==p_program) { + error(3,9); // se esperaba ';' (¡creo!) + //lexico(); + break; + } + else { + error(0,8); // se esperaba una opción de compilación + //lexico(); + // puede ser peligroso + while(pieza!=p_coma && pieza!=p_ptocoma && pieza!=p_program) + lexico(); + } + } else break; + } + } while (1); + } + + // + // Cabecera + // + // p_program p_id {;} + // + + save_error(0); + if (pieza!=p_program && pieza!=p_setup_program) error(4,44); // esperando PROGRAM + + if (pieza==p_setup_program) + warning(1); // característica desfasada + + //if ((lins=fopen(cWork,"wb"))==NULL) c_error(0,0); // cWork="system\exec.ins" + + inicio_sentencia(); lexico(); + if (pieza!=p_id) error(1,45); // esperando el nombre del programa + + ob=o; + if ((*ob).tipo!=tnone) error(0,30); // el nombre no es nuevo + (*ob).tipo=tproc; + (*ob).proc.bloque=bloque_actual=ob; + (*ob).proc.offset=0; + (*ob).proc.num_par=0; + lexico(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + final_sentencia(); + + // + // Import (DESFASADO), se ignora + // + // {p_import p_lit {;}} + // + + while (pieza==p_import) { + warning(2); // sintaxis antigua + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(1,46); // se esperaba un literal + lexico(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + // + // Zona de constantes + // + // [ p_const {;} { p_id p_asig {; | ,} } ] + // + + if (pieza==p_const) { + pasa_ptocoma(); + while (pieza==p_id) { + ob=o; + if ((*ob).tipo!=tnone && (*ob).tipo!=tcons) error(0,30); // el nombre no es nuevo + (*ob).tipo=tcons; + lexico(); if (pieza!=p_asig) error(3,7); // esperando '=' + + lexico(); + if (pieza==p_lit || (pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + (*ob).cons.literal=1; + else + (*ob).cons.literal=0; + + (*ob).cons.valor=constante(); + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + } + + // + // Variables globales, pueden usarse en expresiones constantes + // + // := p_id [ p_asig ] {;} + // + // := p_id p_corab ( p_corce p_asig + // | p_corce [ p_asig ] ) {;} + // + // := ( | [ [p_dup] p_abrir p_cerrar ] ) + // [ p_coma ] + // + + if (pieza==p_global) { + pasa_ptocoma(); + while (pieza==p_id || pieza==p_int || pieza==p_pointer || pieza==p_struct || pieza==p_string || pieza==p_byte || pieza==p_word) { + + if (pieza==p_struct) { // Struct global + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + lexico(); if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + analiza_pointer_struct(tpsgl,imem,ob); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,imem++); + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; member=ob; lexico(); + + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsglo; (*ob).sglo.offset=_imem=imem; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sglo.items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sglo.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sglo.items3=constante())<0) error(4,43); // reidem + } else (*ob).sglo.items3=-1; + } else { (*ob).sglo.items2=-1; (*ob).sglo.items3=-1; } + member=member2; + (*ob).sglo.totalitems=(*ob).sglo.items1+1; + if ((*ob).sglo.items2>-1) (*ob).sglo.totalitems*=(*ob).sglo.items2+1; + if ((*ob).sglo.items3>-1) (*ob).sglo.totalitems*=(*ob).sglo.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // espernado ']' + } else { + (*ob).sglo.totalitems=1; + (*ob).sglo.items1=0; (*ob).sglo.items2=-1; (*ob).sglo.items3=-1; + } + if (((*ob).sglo.len_item=analiza_struct(_imem))==0) error(0,47); // estructua vacia + member=NULL; lexico(); + imem=(*ob).sglo.offset; dup=(*ob).sglo.totalitems+1; + if (dup>1) { + test_buffer(&mem,&imem_max,imem+(*ob).sglo.len_item*(*ob).sglo.totalitems); + test_buffer(&frm,&ifrm_max,imem+(*ob).sglo.len_item*(*ob).sglo.totalitems); + while (--dup) { + memcpy(&mem[imem],&mem[_imem],(*ob).sglo.len_item<<2); + memcpy(&frm[imem],&frm[_imem],(*ob).sglo.len_item<<2); + imem+=(*ob).sglo.len_item; + } + } imem=_imem; + if (pieza==p_asig) { + save_error(1); + lexico(); tglo_init(0); + if (imem-_imem-1>=(*ob).sglo.len_item*(*ob).sglo.totalitems) error(4,55); // demasiados valores para la estructura + } while (pieza==p_ptocoma) lexico(); + + imem=_imem+(*ob).sglo.len_item*(*ob).sglo.totalitems; + test_buffer(&mem,&imem_max,imem); + } + + } else if (pieza==p_string) { // Cadena global + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpcgl,imem); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcglo; + _imem=imem; + (*ob).cglo.offset=_imem+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cglo.totalen=255; + } else { + if (((*ob).cglo.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cglo.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cglo.totalen=255; + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cglo.totalen+1) + error(4,49); // literal demasiado largo + imem=_imem+1+((*ob).cglo.totalen+5)/4; // ej. c[32] -> c[0]..c[32],NUL + test_buffer(&mem,&imem_max,imem); + strcpy((char*)&mem[_imem+1],(char*)&mem[pieza_num]); + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + imem=_imem+1+((*ob).cglo.totalen+5)/4; + test_buffer(&mem,&imem_max,imem); + } mem[_imem]=0xDAD00000|(*ob).cglo.totalen; + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Tabla Byte global + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpbgl,imem); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbglo; (*ob).bglo.offset=_imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + (*ob).bglo.len1=imemptr-oimemptr-1; + (*ob).bglo.len2=-1; + (*ob).bglo.len3=-1; + (*ob).bglo.totalen=((*ob).bglo.len1+4)/4; + } else { + if (((*ob).bglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bglo.len3=constante())<0) error(4,40); // reidem + } else (*ob).bglo.len3=-1; + } else { (*ob).bglo.len2=-1; (*ob).bglo.len3=-1; } + + (*ob).bglo.totalen=(*ob).bglo.len1+1; + if ((*ob).bglo.len2>-1) (*ob).bglo.totalen*=(*ob).bglo.len2+1; + if ((*ob).bglo.len3>-1) (*ob).bglo.totalen*=(*ob).bglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + if (imemptr-oimemptr>(*ob).bglo.totalen) error(4,48); // demasiados valores para la tabla + } (*ob).bglo.totalen=((*ob).bglo.totalen+3)/4; + } + } else { // Byte global + (*ob).tipo=tbglo; (*ob).bglo.offset=imem; + (*ob).bglo.len1=0; + (*ob).bglo.len2=-1; + (*ob).bglo.len3=-1; + (*ob).bglo.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + mem[imem]=constante(); + if (mem[imem]<0 || mem[imem]>255) error(4,50); // valor byte fuera de rango + } + } imem=_imem+(*ob).bglo.totalen; test_buffer(&mem,&imem_max,imem); + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Tabla Word global + + lexico(); + + if (pieza==p_pointer) { // Puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwgl,imem); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twglo; (*ob).wglo.offset=_imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + (*ob).wglo.len1=(imemptr-oimemptr)/2-1; + (*ob).wglo.len2=-1; + (*ob).wglo.len3=-1; + (*ob).wglo.totalen=((*ob).wglo.len1+2)/2; + } else { + if (((*ob).wglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wglo.len3=constante())<0) error(4,40); // reidem + } else (*ob).wglo.len3=-1; + } else { (*ob).wglo.len2=-1; (*ob).wglo.len3=-1; } + + (*ob).wglo.totalen=(*ob).wglo.len1+1; + if ((*ob).wglo.len2>-1) (*ob).wglo.totalen*=(*ob).wglo.len2+1; + if ((*ob).wglo.len3>-1) (*ob).wglo.totalen*=(*ob).wglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + if (imemptr-oimemptr>(*ob).wglo.totalen*2) error(4,48); // demasiados valores para la tabla + } (*ob).wglo.totalen=((*ob).wglo.totalen+1)/2; + } + } else { // Word global + (*ob).tipo=twglo; (*ob).wglo.offset=imem; + (*ob).wglo.len1=0; + (*ob).wglo.len2=-1; + (*ob).wglo.len3=-1; + (*ob).wglo.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + mem[imem]=constante(); + if (mem[imem]<0 || mem[imem]>65535) error(4,51); // valor word fuera de rango + } + } imem=_imem+(*ob).wglo.totalen; test_buffer(&mem,&imem_max,imem); + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpigl,imem); + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { // Tabla global + lexico(); + (*ob).tipo=ttglo; (*ob).tglo.offset=_imem=imem; + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + tglo_init(3); + (*ob).tglo.len1=imem-_imem-1; + (*ob).tglo.len2=-1; + (*ob).tglo.len3=-1; + (*ob).tglo.totalen=imem-_imem; + } else { + if (((*ob).tglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tglo.len3=constante())<0) error(4,40); // reidem + } else (*ob).tglo.len3=-1; + } else { (*ob).tglo.len2=-1; (*ob).tglo.len3=-1; } + (*ob).tglo.totalen=(*ob).tglo.len1+1; + if ((*ob).tglo.len2>-1) (*ob).tglo.totalen*=(*ob).tglo.len2+1; + if ((*ob).tglo.len3>-1) (*ob).tglo.totalen*=(*ob).tglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); tglo_init(3); + if (imem-_imem>(*ob).tglo.totalen) error(4,48); // demasiados valores para la tabla + } + } + imem=_imem+(*ob).tglo.totalen; + test_buffer(&mem,&imem_max,imem); + + } else { // Variable global + + (*ob).tipo=tvglo; (*ob).vglo.offset=imem; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + } + } + + // + // Variables locales, no se pueden usar en expresiones constantes + // + // := p_id [ p_asig ] {;} + // + // := p_id p_corab ( p_corce p_asig + // | p_corce [ p_asig ] ) {;} + // + + if (pieza==p_local) { + pasa_ptocoma(); + while (pieza==p_id || pieza==p_int || pieza==p_pointer || pieza==p_struct || pieza==p_string || pieza==p_byte || pieza==p_word) { + + if (pieza==p_struct) { + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + lexico(); if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct_local: + analiza_pointer_struct(tpslo,iloc,ob); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,iloc++); + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct_local; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; member=ob; lexico(); + + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsloc; (*ob).sloc.offset=_imem=iloc; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sloc.items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items3=constante())<0) error(4,43); // reidem + } else (*ob).sloc.items3=-1; + } else { (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; } + member=member2; + (*ob).sloc.totalitems=(*ob).sloc.items1+1; + if ((*ob).sloc.items2>-1) (*ob).sloc.totalitems*=(*ob).sloc.items2+1; + if ((*ob).sloc.items3>-1) (*ob).sloc.totalitems*=(*ob).sloc.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sloc.totalitems=1; + (*ob).sloc.items1=0; (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; + } + if (((*ob).sloc.len_item=analiza_struct_local(_imem))==0) error(0,47); // estructura vacia + member=NULL; lexico(); + iloc=(*ob).sloc.offset; dup=(*ob).sloc.totalitems+1; + if (dup>1) { + test_buffer(&loc,&iloc_max,iloc+(*ob).sloc.len_item*(*ob).sloc.totalitems); + test_buffer(&frm,&ifrm_max,imem+(*ob).sloc.len_item*(*ob).sloc.totalitems); + while (--dup) { + memcpy(&loc[iloc],&loc[_imem],(*ob).sloc.len_item<<2); + memcpy(&frm[iloc],&frm[_imem],(*ob).sloc.len_item<<2); + iloc+=(*ob).sloc.len_item; + } + } iloc=_imem; + if (pieza==p_asig) { + save_error(1); lexico(); tloc_init(0); + if (iloc-_imem-1>=(*ob).sloc.len_item*(*ob).sloc.totalitems) error(4,55); // demasiados valores para la estructura + } while (pieza==p_ptocoma) lexico(); + iloc=_imem+(*ob).sloc.len_item*(*ob).sloc.totalitems; + test_buffer(&loc,&iloc_max,iloc); + } + + } else if (pieza==p_string) { // Cadena local + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero5: + ob=analiza_pointer(tpclo,iloc); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero5; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcloc; + _imem=iloc; + (*ob).cloc.offset=_imem+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cloc.totalen=255; + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cloc.totalen+1) + error(4,49); // literal demasiado largo + iloc=_imem+1+((*ob).cloc.totalen+5)/4; // ej. c[32] -> c[0]..c[32],NUL + test_buffer(&loc,&iloc_max,iloc); + strcpy((char*)&loc[_imem+1],(char*)&mem[pieza_num]); + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + iloc=_imem+1+((*ob).cloc.totalen+5)/4; + test_buffer(&loc,&iloc_max,iloc); + } loc[_imem]=0xDAD00000|(*ob).cloc.totalen; + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Tabla Byte local + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero6: + ob=analiza_pointer(tpblo,iloc); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero6; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbloc; (*ob).bloc.offset=_imem=iloc; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&loc[iloc]; + tloc_init(2); + (*ob).bloc.len1=imemptr-oimemptr-1; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=((*ob).bloc.len1+4)/4; + } else { + if (((*ob).bloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).bloc.len3=-1; + } else { (*ob).bloc.len2=-1; (*ob).bloc.len3=-1; } + + (*ob).bloc.totalen=(*ob).bloc.len1+1; + if ((*ob).bloc.len2>-1) (*ob).bloc.totalen*=(*ob).bloc.len2+1; + if ((*ob).bloc.len3>-1) (*ob).bloc.totalen*=(*ob).bloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&loc[iloc]; + tloc_init(2); + if (imemptr-oimemptr>(*ob).bloc.totalen) error(4,48); // demasiados valores para la tabla + } (*ob).bloc.totalen=((*ob).bloc.totalen+3)/4; + } + } else { // Byte local + (*ob).tipo=tbloc; (*ob).bloc.offset=iloc; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + loc[iloc]=constante(); + if (loc[iloc]<0 || loc[iloc]>255) error(4,50); // valor byte fuera de rango + } + } iloc=_imem+(*ob).bloc.totalen; test_buffer(&loc,&iloc_max,iloc); + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Tabla Word local + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero7: + ob=analiza_pointer(tpwlo,iloc); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero7; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twloc; (*ob).wloc.offset=_imem=iloc; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&loc[iloc]; + tloc_init(1); + (*ob).wloc.len1=(imemptr-oimemptr)/2-1; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=((*ob).wloc.len1+2)/2; + } else { + if (((*ob).wloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).wloc.len3=-1; + } else { (*ob).wloc.len2=-1; (*ob).wloc.len3=-1; } + + (*ob).wloc.totalen=(*ob).wloc.len1+1; + if ((*ob).wloc.len2>-1) (*ob).wloc.totalen*=(*ob).wloc.len2+1; + if ((*ob).wloc.len3>-1) (*ob).wloc.totalen*=(*ob).wloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&loc[iloc]; + tloc_init(1); + if (imemptr-oimemptr>(*ob).wloc.totalen*2) error(4,48); // demasiados valores para la tabla + } (*ob).wloc.totalen=((*ob).wloc.totalen+1)/2; + } + } else { // Word local + (*ob).tipo=twloc; (*ob).wloc.offset=iloc; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + loc[iloc]=constante(); + if (loc[iloc]<0 || loc[iloc]>65535) error(4,51); // valor word fuera de rango + } + } iloc=_imem+(*ob).wloc.totalen; test_buffer(&loc,&iloc_max,iloc); + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero8: + ob=analiza_pointer(tpilo,iloc); + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero8; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { // Tabla local + lexico(); + (*ob).tipo=ttloc; (*ob).tloc.offset=_imem=iloc; + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + tloc_init(3); + (*ob).tloc.len1=iloc-_imem-1; + (*ob).tloc.len2=-1; + (*ob).tloc.len3=-1; + (*ob).tloc.totalen=iloc-_imem; + } else { + if (((*ob).tloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).tloc.len3=-1; + } else { (*ob).tloc.len2=-1; (*ob).tloc.len3=-1; } + (*ob).tloc.totalen=(*ob).tloc.len1+1; + if ((*ob).tloc.len2>-1) (*ob).tloc.totalen*=(*ob).tloc.len2+1; + if ((*ob).tloc.len3>-1) (*ob).tloc.totalen*=(*ob).tloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); tloc_init(3); + if (iloc-_imem>(*ob).tloc.totalen) error(4,48); } // demasiados valores para la tabla + } + iloc=_imem+(*ob).tloc.totalen; + test_buffer(&loc,&iloc_max,iloc); + + } else { // Variable local + + (*ob).tipo=tvloc; (*ob).vloc.offset=iloc; + if (pieza==p_asig) { lexico(); loc[iloc]=constante(); } + test_buffer(&loc,&iloc_max,++iloc); + + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + } + } + + // + // Código principal + // + + // Genera el salto al inicio del código (long_header) + + mem[0]=0; mem[1]=imem; iloc_len=iloc; + + g2(ltyp,(int)bloque_actual); + g2(lcbp,0); + inicio=0; final=imem-1; + grabar_sentencia(); + + // otra vez import... se ha usado sintaxis de DIV 1. + // de nuevo le decimos k se lo meta por las narices... + + if (pieza==p_import) { + warning(2); // sintaxis antigua + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(1,46); // se esperaba un literal + lexico(); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + // esta instrucción realiza un salto a la rutina donde están los limp + // (importación de DLLs). Como esta la colocaremos al final (porque, hasta + // que lleguemos al final no sabremos qué dlls hay que importar), dejamos + // el parámetro de ljmp de momento a 0 y guardamos el offset en + // salto_import, donde al final sustituiremos el 0 por el offset adecuado. + + salto_import=imem+1; + g2(ljmp,0); + + // El primer FRAME, y la carga de variables PRIVATE, se ejecutan + // conjuntamente en el BEGIN del programa principal. + + final=imem; + + parametros=-1; + bloque_lexico=bloque_actual; + n=iloc; + analiza_private(); + if (iloc>iloc_len) iloc_len=iloc; + iloc=n; + parametros=0; + + g1(lfrm); + + if (pieza!=p_begin) error(0,56); + inicio_sentencia(); inicio=final; + lexico(); final_sentencia(); grabar_sentencia(); + + sentencia(); + + if (pieza!=p_end) error(0,57); inicio_sentencia(); + g1(lret); + pasa_ptocoma(); final_sentencia(); grabar_sentencia(); + + + // + // Procesos + // + // p_process p_id p_abrir [ id { , id } ] p_cerrar { ; } p_begin ... p_end + // + + save_error(0); + while (pieza==p_process || pieza==p_function) { + n=pieza; inicio_sentencia(); lexico(); + if (pieza!=p_id) error(1,70); // esperando el nombre del proceso o funcion + ob=o; lexico(); + if ((*ob).tipo==tproc && (*ob).usado) { + num_par=(*ob).proc.num_par; bloque_lexico=bloque_actual=ob; + _imem=(*ob).proc.offset; while(_imem) { + _imem_old=mem[_imem]; mem[_imem]=imem; _imem=_imem_old; } + } else if ((*ob).tipo==tnone) { + (*ob).usado=0; (*ob).tipo=tproc; + (*ob).proc.bloque=bloque_lexico=bloque_actual=ob; + } else error(2,30); // el nombre no es nuevo + (*ob).proc.offset=imem; (*ob).proc.num_par=0; + + g2(ltyp,(int)bloque_actual); + if (n==p_function) g1(lnop); + g2(lcbp,0); _imem=imem-1; + if (pieza!=p_abrir) error(3,22); // esperando '(' + + parametros=1; n=iloc; lexico(); + + while (pieza!=p_cerrar) { + (*ob).proc.num_par++; expresion_cpa(); + if (pieza!=p_cerrar) if (pieza!=p_coma) error(3,35); // se esperaba una coma + else { lexico(); if (pieza==p_cerrar) error(3,36); } // se esperaba otro parámetro + } + if ((*ob).usado) { + if (num_par==(*ob).proc.num_par) (*ob).usado=0; else error(0,38); // nº de parametros incorrecto + } + pasa_ptocoma(); final_sentencia(); + + if (parametros>1) { + g2(lpar,parametros-1); + } + + parametros=-1; // Para que los parámetros se puedan repetir como PRIVATE + + num_par=mem[_imem]=(*ob).proc.num_par; + + analiza_private(); parametros=0; + + if (iloc>iloc_len) iloc_len=iloc; iloc=n; + + if (pieza!=p_begin) error(0,56); lexico(); // esperando BEGIN + final=imem-1; grabar_sentencia(); + sentencia(); + if (pieza!=p_end) error(0,57); // esperando END + inicio_sentencia(); + g1(lret); + pasa_ptocoma(); final_sentencia(); grabar_sentencia(); + + save_error(0); + } + + if (pieza!=p_ultima) error(4,71); // esperando PROCESS o FUNCTION + +} + +//----------------------------------------------------------------------------- +// Lexico (lee una nueva pieza del *source) +//----------------------------------------------------------------------------- + +void lexico(void) +{ + struct objeto * * ptr_o; + byte ** ptr, * _ivnom, h, * _source=source; + struct lex_ele * e; + + int n; + + if (!coment) { + old_linea=linea; + old_ierror=ierror; + old_ierror_end=ierror_end; + } + +lex_scan: + + ierror=_source; + + switch ((int)lex_case[*_source]) { // Puntero a un lex_ele o l_??? + + case l_err: + if (coment) { pieza=p_rem; _source++; } + else error(0,5); // carácter no reconocido + _source++; + break; + + case l_eof: + pieza=p_ultima; + break; + + case l_cr: + linea++; + if (*_source==cr && *(_source+1)==lf) _source+=2; + else _source++; + + ultima_linea=_source; + goto lex_scan; + + case l_id : + if (coment) { pieza=p_rem; _source++; break; } + + _ivnom=ivnom.b; + *ivnom.p++=0; + *ivnom.p++=0; + h=0; + + while (*ivnom.b=lower[*_source++]) + h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + + ivnom.b++; + _source--; + if (ivnom.b-vnom>max_obj*long_med_id) error(0,2); // Excedida la capacidad del vector de nombres + + ptr=&vhash[h]; + + while (*ptr && strcmp((char *)(ptr+2),(char *)_ivnom+8)) + ptr=(byte**)*ptr; + + if (!strcmp((byte *)(ptr+2),_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + pieza=(int)*(ptr+1); + + if (pieza<256 && pieza>=0) { // palabra reservada (token) + + if (pieza==p_rem) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + + } + else { // objeto (id anterior) + + ptr_o=(void*)(ptr+1); + o=*ptr_o; + pieza=p_id; + + while(o!=NULL && ( ((*o).bloque && bloque_lexico!=(*o).bloque) || + ((*o).member!=member) )) + o=(*o).anterior; + + if(o==NULL) { // No encontrado + o=iobj++; (*o).anterior=*ptr_o; *ptr_o=o; + (*o).name=(byte*)(ptr_o+1); + (*o).member=member; + (*o).param=0; + (*o).dll=-1; + if (parametros) (*o).bloque=bloque_actual; + if (num_obj++==max_obj) + error(0,6); // excedida la capacidad de la tabla de objetos + } + else { + //printf("->->-> %s\n",(char*)_ivnom+8); + if ((*o).tipo==tcons) + pieza_num=(*o).cons.valor; + if((*o).dll!=-1) + dlls[(*o).dll].usado=1; + } + } + } + else { // id nuevo + *ptr=_ivnom; + ptr_o=(void*)(_ivnom+4); + *ptr_o=o=iobj++; + pieza=p_id; + + (*o).name=(byte*)_ivnom+8; + (*o).member=member; + (*o).dll=-1; + if (parametros) (*o).bloque=bloque_actual; + if (num_obj++==max_obj) + error(0,6); // excedida la capacidad de la tabla de objetos + } + + break; + + case l_spc: + while ((*++_source)==' '); + goto lex_scan; + + case l_lit: + if (coment) { pieza=p_rem; _source++; break; } + + pieza=p_lit; // Literal entre dos h + h=*_source; + _ivnom=ivnom.b; + + do { + _source++; + if (*_source==cr || *_source==lf) { + error(0,3); // literal sin cerrar + break; + } + + if (*_source==h) { + if (*(_source+1)==h) *_ivnom=*++_source; + else *_ivnom=0; + } else *_ivnom=*_source; + + } while (*_ivnom++); + + _source++; + next_lexico(_source,0,0); + + while (next_pieza==p_lit) { + next_lexico(_source,0,linea); + linea=next_linea; + _source=next_source; + h=*_source; _ivnom--; + do { + _source++; + if (*_source==cr || *_source==lf) { + error(0,3); // literal sin cerrar + break; + } + + if (*_source==h) { + if (*(_source+1)==h) *_ivnom=*++_source; + else *_ivnom=0; + } else *_ivnom=*_source; + + } while (*_ivnom++); + + _source++; + next_lexico(_source,0,0); + } + + n=(strlen(ivnom.b)+4)/4; + memcpy(&mem_ory[itxt],ivnom.b,strlen(ivnom.b)+1); + + pieza_num=itxt; + itxt+=n; + + break; + + case l_num: + + if (coment) { pieza=p_rem; _source++; break; } + + pieza=p_num; + pieza_num=0; + + // Número hexadecimal + if (*_source=='0' && lower[*(_source+1)]=='x') { + _source+=2; + while ((int)lex_case[*_source]==l_num || + (lower[*_source]>='a' && lower[*_source]<='f')) { + if ((int)lex_case[*_source]==l_num) + pieza_num=pieza_num*16+*_source++-0x30; + else + pieza_num=pieza_num*16+lower[*_source++]-'a'+10; + } + } + else do { + pieza_num=pieza_num*10+*_source++-0x30; + } while ((int)lex_case[*_source]==l_num); + + break; + + default: // puntero a un lex_ele + + e=lex_case[*_source++]; + _ivnom=_source; + pieza=(*e).token; + + while (e=(*e).siguiente) { + + while (*_source!=(*e).caracter && (*e).alternativa) + e=(*e).alternativa; + + if (*_source++==(*e).caracter && (*e).token) { + pieza=(*e).token; + _ivnom=_source; + } + } + + _source=_ivnom; + + if (pieza==p_rem && !coment) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + + if (pieza==p_ini_rem) { + coment++; + do { + source=_source; + lexico(); + _source=source; + } while (pieza!=p_end_rem); + coment--; + goto lex_scan; + } + + if (pieza==p_ultima) { + if (coment) error(0,1); // llegó el final dentro de un comentario + else error(0,4); // símbolo no reconocido (¡¡creo!!) + } + + break; + + } + + source=_source; + ierror_end=_source-1; +} + + +//----------------------------------------------------------------------------- +// Adivina cual será la siguiente pieza lexica leida (y donde estará) +//----------------------------------------------------------------------------- + +// No genera nunca errores + +byte * next_lexico(byte * _source, int coment, int linea) +{ + byte ** ptr, * _ivnom, h; + struct lex_ele * e; + + if (!coment && linea) { + old_linea=linea; + old_ierror=ierror; + old_ierror_end=ierror_end; + } + +lex_scan: + + if (linea) ierror=_source; + next_source=_source; + + switch ((int)lex_case[*_source]) { + + case l_err: + if (coment) { _source++; goto lex_scan; } + next_pieza=0; + break; + + case l_cr : + if (linea) { + + linea++; + if (*_source==cr && *(_source+1)==lf) _source+=2; + else _source++; + + ultima_linea=_source; + goto lex_scan; + + } + else { + + if (*_source==cr && *(_source+1)==lf) _source+=2; + else _source++; + + goto lex_scan; + + } + + case l_eof: + next_pieza=0; + break; + + case l_id : + if (coment) { _source++; goto lex_scan; } + + _ivnom=ivnom.b; + *ivnom.p++=0; + *ivnom.p++=0; + h=0; + + while (*ivnom.b=lower[*_source++]) + h=((byte)(h<<1)+(h>>7))^(*ivnom.b++); + + ivnom.b++; + _source--; + ptr=&vhash[h]; + + while (*ptr && strcmp((char *)(ptr+2),(char *)_ivnom+8)) + ptr=(unsigned char **)*ptr; + + if (!strcmp((char *)(ptr+2),(char *)_ivnom+8)) { // id encontrado + ivnom.b=_ivnom; // lo saca de vnom + next_pieza=(int)*(ptr+1); + if (next_pieza<256 && next_pieza>=0) { // palabra reservada (token) + if (next_pieza==p_rem) { + while (*_source!=cr) _source++; + goto lex_scan; + } + } else { // objeto (id anterior) + next_pieza=p_id; + } + } else { + ivnom.b=_ivnom; // lo saca de vnom + next_pieza=p_id; // id nuevo + } + + break; + + case l_spc: + while ((*++_source)==' '); + goto lex_scan; + + case l_lit: + if (coment) { _source++; goto lex_scan; } + next_pieza=p_lit; + break; + + case l_num: + if (coment) { _source++; goto lex_scan; } + next_pieza=p_num; + break; + + default: // puntero a un lex_ele + e=lex_case[*_source++]; + next_pieza=(*e).token; + _ivnom=_source; + + while (e=(*e).siguiente) { + while (*_source!=(*e).caracter && (*e).alternativa) + e=(*e).alternativa; + + if (*_source++==(*e).caracter && (*e).token) { + next_pieza=(*e).token; + _ivnom=_source; + } + } + + _source=_ivnom; + + if (next_pieza==p_rem && !coment) { + while (*_source!=cr && *_source!=lf) _source++; + goto lex_scan; + } + + if (next_pieza==p_ini_rem) { + coment++; + do { + _source=next_lexico(_source,coment,linea); + linea=next_linea; + } while (next_pieza!=p_end_rem); + coment--; + goto lex_scan; + } + + break; + + } + + next_linea=linea; + return(_source); +} + + +//----------------------------------------------------------------------------- +// Pasa varias comas o puntos y coma seguidos +//----------------------------------------------------------------------------- + +void pasa_ptocoma(void) +{ + do { + lexico(); + } while (pieza==p_ptocoma); +} + + + // + // Analiza las variables privadas de un bloque, como las locales + // + + // *** OJO *** No se debe permitir #id.tvpri + // pues fallaría a no ser que #id fuera del mismo tipo que el + // proceso actual (hermano) + +void analiza_private(void) { + struct objeto * ob, * member2; + int _imem,_imem_old,_itxt,dup; + byte *oimemptr; + + if (pieza==p_private) { + pasa_ptocoma(); + + g2(lpri,0); _imem_old=imem-1; + + while (pieza==p_id || pieza==p_int || pieza==p_pointer || pieza==p_struct || pieza==p_string || pieza==p_byte || pieza==p_word) { + + if (pieza==p_struct) { + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + lexico(); if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + if (analiza_pointer_struct(tpslo,iloc,ob)==1) { + iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + } + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; member=ob; lexico(); + + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsloc; (*ob).sloc.offset=_imem=imem; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sloc.items1=constante())<0) error(4,43); // estructura de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items3=constante())<0) error(4,43); // reidem + } else (*ob).sloc.items3=-1; + } else { (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; } + member=member2; + (*ob).sloc.totalitems=(*ob).sloc.items1+1; + if ((*ob).sloc.items2>-1) (*ob).sloc.totalitems*=(*ob).sloc.items2+1; + if ((*ob).sloc.items3>-1) (*ob).sloc.totalitems*=(*ob).sloc.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sloc.totalitems=1; + (*ob).sloc.items1=0; (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; + } + if (((*ob).sloc.len_item=analiza_struct_private(_imem))==0) error(0,47); // estructura vacia + + member=NULL; lexico(); + + imem=(*ob).sloc.offset; dup=(*ob).sloc.totalitems+1; + if (dup>1) { + test_buffer(&mem,&imem_max,imem+(*ob).sloc.len_item*(*ob).sloc.totalitems); + test_buffer(&frm,&ifrm_max,imem+(*ob).sloc.len_item*(*ob).sloc.totalitems); + while (--dup) { + memcpy(&mem[imem],&mem[_imem],(*ob).sloc.len_item<<2); + memcpy(&frm[imem],&frm[_imem],(*ob).sloc.len_item<<2); + imem+=(*ob).sloc.len_item; + } + } imem=_imem; + + if (pieza==p_asig) { + save_error(1); lexico(); tglo_init(0); + if (imem-_imem-1>=(*ob).sloc.len_item*(*ob).sloc.totalitems) error(4,55); // demasiados valores para la estructura + } while (pieza==p_ptocoma) lexico(); + + imem=_imem+(*ob).sloc.len_item*(*ob).sloc.totalitems; + (*ob).sloc.offset=iloc; iloc+=(*ob).sloc.len_item*(*ob).sloc.totalitems; + test_buffer(&mem,&imem_max,imem); + } + + } else if (pieza==p_string) { // Cadena privada + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpclo,iloc); + if (ob==NULL) continue; else iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) { // Mira si se repite un parámetro ... + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tcloc) { // Se repite un string + save_error(0); + lexico(); + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + dup=255; + } else { + dup=constante(); + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else dup=255; + if (dup!=(*ob).cloc.totalen) error(4,41); // la longitud no coincide con la declaración anterior + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + (*ob).param++; + continue; + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + + (*ob).tipo=tcloc; + _imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cloc.totalen=255; + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cloc.totalen+1) + error(4,49); // literal demasiado largo + imem=_imem+1+((*ob).cloc.totalen+5)/4; // ej. c[32] -> c[0]..c[32],NUL + test_buffer(&mem,&imem_max,imem); + strcpy((char*)&mem[_imem+1],(char*)&mem[pieza_num]); + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + imem=_imem+1+((*ob).cloc.totalen+5)/4; + test_buffer(&mem,&imem_max,imem); + } mem[_imem]=0xDAD00000|(*ob).cloc.totalen; + (*ob).cloc.offset=iloc+1; + iloc+=1+((*ob).cloc.totalen+5)/4; + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Tabla Byte privado + + lexico(); + + if (pieza==p_pointer) { // Puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpblo,iloc); + if (ob==NULL) continue; else iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tbloc) { // Se repite un byte parámetro + lexico(); + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parámetro + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) { + lexico(); + } + (*ob).param++; + continue; + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + + (*ob).tipo=tbloc; _imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + (*ob).bloc.len1=imemptr-oimemptr-1; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=((*ob).bloc.len1+4)/4; + } else { + if (((*ob).bloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).bloc.len3=-1; + } else { (*ob).bloc.len2=-1; (*ob).bloc.len3=-1; } + + (*ob).bloc.totalen=(*ob).bloc.len1+1; + if ((*ob).bloc.len2>-1) (*ob).bloc.totalen*=(*ob).bloc.len2+1; + if ((*ob).bloc.len3>-1) (*ob).bloc.totalen*=(*ob).bloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + if (imemptr-oimemptr>(*ob).bloc.totalen) error(4,48); // demasiados valores para la tabla + } (*ob).bloc.totalen=((*ob).bloc.totalen+3)/4; + } + } else { // Byte privado + (*ob).tipo=tbloc; (*ob).bloc.offset=imem; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + mem[imem]=constante(); + if (mem[imem]<0 || mem[imem]>255) error(4,50); // valor byte fuera de rango + } + } + imem=_imem+(*ob).bloc.totalen; test_buffer(&mem,&imem_max,imem); + (*ob).bloc.offset=iloc; iloc+=(*ob).bloc.totalen; + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Tabla Word privada + + lexico(); + + if (pieza==p_pointer) { // Puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwlo,iloc); + if (ob==NULL) continue; else iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==twloc) { // Se repite un word parámetro + lexico(); + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parámetro + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) { + lexico(); + } + (*ob).param++; + continue; + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + + (*ob).tipo=twloc; _imem=imem; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + (*ob).wloc.len1=(imemptr-oimemptr)/2-1; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=((*ob).wloc.len1+2)/2; + } else { + if (((*ob).wloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).wloc.len3=-1; + } else { (*ob).wloc.len2=-1; (*ob).wloc.len3=-1; } + + (*ob).wloc.totalen=(*ob).wloc.len1+1; + if ((*ob).wloc.len2>-1) (*ob).wloc.totalen*=(*ob).wloc.len2+1; + if ((*ob).wloc.len3>-1) (*ob).wloc.totalen*=(*ob).wloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); + lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + if (imemptr-oimemptr>(*ob).wloc.totalen*2) error(4,48); // demasiados valores para la tabla + } (*ob).wloc.totalen=((*ob).wloc.totalen+1)/2; + } + } else { // Word privado + (*ob).tipo=twloc; (*ob).wloc.offset=imem; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; // 1 int + if (pieza==p_asig) { + save_error(1); + lexico(); + mem[imem]=constante(); + if (mem[imem]<0 || mem[imem]>65535) error(4,51); // valor word fuera de rango + } + } + imem=_imem+(*ob).wloc.totalen; test_buffer(&mem,&imem_max,imem); + (*ob).wloc.offset=iloc; iloc+=(*ob).wloc.totalen; + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpilo,iloc); + if (ob==NULL) continue; else iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + // Si el objeto no es tnone, se repite un parámetro o bien es un error + + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tvloc) { // Se repite una variable local + lexico(); + if (pieza==p_corab) error(2,33); // no se puede pasar una tabla como parámetro + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) { + lexico(); + } + (*ob).param++; + continue; + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + + if (pieza==p_corab) { // Tabla privada + lexico(); + (*ob).tipo=ttloc; _imem=imem; + if (pieza==p_corce) { + lexico(); if (pieza!=p_asig) error(3,7); lexico(); // esperando '=' + tglo_init(3); + (*ob).tloc.len1=imem-_imem-1; + (*ob).tloc.len2=-1; + (*ob).tloc.len3=-1; + (*ob).tloc.totalen=imem-_imem; + } else { + if (((*ob).tloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).tloc.len3=-1; + } else { (*ob).tloc.len2=-1; (*ob).tloc.len3=-1; } + (*ob).tloc.totalen=(*ob).tloc.len1+1; + if ((*ob).tloc.len2>-1) (*ob).tloc.totalen*=(*ob).tloc.len2+1; + if ((*ob).tloc.len3>-1) (*ob).tloc.totalen*=(*ob).tloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + if (pieza==p_asig) { + save_error(1); lexico(); tglo_init(3); + if (imem-_imem>(*ob).tloc.totalen) error(4,48); } // demasiados valores para la tabla + } + imem=_imem+(*ob).tloc.totalen; + test_buffer(&mem,&imem_max,imem); + (*ob).tloc.offset=iloc; iloc+=(*ob).tloc.totalen; + + } else { // Variable privada + + (*ob).tipo=tvloc; (*ob).vloc.offset=iloc++; + if (pieza==p_asig) { lexico(); mem[imem]=constante(); } + test_buffer(&mem,&imem_max,++imem); + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } (*ob).bloque=bloque_actual; + } + + mem[_imem_old]=imem; + + }; + +} + +//----------------------------------------------------------------------------- +// Análisis de una declaración pointer (int, word o byte) +//----------------------------------------------------------------------------- + +struct objeto * analiza_pointer(int tipo, int offset) +{ + struct objeto * ob; + int len1,len2,len3; + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tipo) { // Se repite un pointer parámetro como private + save_error(0); lexico(); + len1=-1; len2=-1; len3=-1; + if (pieza==p_corab) { lexico(); + if ((len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if ((len2=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if ((len3=constante())<0) error(4,40); // tabla de longitud negativa + } + } if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } + if (len1!=(*ob).pilo.len1 || len2!=(*ob).pilo.len2 || len3!=(*ob).pilo.len3) error(4,41); // la longitud no coincide con la declaración anterior + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + (*ob).param++; // No permite volver a redeclararlo + return(NULL); + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + if (parametros==-1) (*ob).bloque=bloque_actual; + (*ob).pilo.len1=-1; (*ob).pilo.len2=-1; (*ob).pilo.len3=-1; + if (pieza==p_corab) { lexico(); + if (((*ob).pilo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).pilo.len2=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).pilo.len3=constante())<0) error(4,40); // tabla de longitud negativa + } + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } (*ob).pilo.totalen=0; + if ((*ob).pilo.len1>-1) (*ob).pilo.totalen=(*ob).pilo.len1+1; + if ((*ob).pilo.len2>-1) (*ob).pilo.totalen*=(*ob).pilo.len2+1; + if ((*ob).pilo.len3>-1) (*ob).pilo.totalen*=(*ob).pilo.len3+1; + + (*ob).tipo=tipo; (*ob).pilo.offset=offset; + + return(ob); +} + +//----------------------------------------------------------------------------- + +int analiza_struct(int offstruct) { // tras " struct id [ ] " // idðmember + int len=0,dup,i,_itxt,_imem; + struct objeto * ob; + struct objeto * old_member,* member2; + byte * oimemptr; + + while (pieza==p_ptocoma) lexico(); + + while (pieza!=p_end) { + + if (pieza==p_struct) { // Miembro struct + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + old_member=member; member=NULL; lexico(); member=old_member; + if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + analiza_pointer_struct(tpsgl,len,ob); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; + old_member=member; member=ob; lexico(); + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsglo; (*ob).sglo.offset=len; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sglo.items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sglo.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sglo.items3=constante())<0) error(4,43); // reidem + } else (*ob).sglo.items3=-1; + } else { (*ob).sglo.items2=-1; (*ob).sglo.items3=-1; } + member=member2; + (*ob).sglo.totalitems=(*ob).sglo.items1+1; + if ((*ob).sglo.items2>-1) (*ob).sglo.totalitems*=(*ob).sglo.items2+1; + if ((*ob).sglo.items3>-1) (*ob).sglo.totalitems*=(*ob).sglo.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sglo.totalitems=1; + (*ob).sglo.items1=0; (*ob).sglo.items2=-1; (*ob).sglo.items3=-1; + } + if (((*ob).sglo.len_item=analiza_struct(offstruct+len))==0) error(0,47); // estructura vacia + i=offstruct+len; dup=(*ob).sglo.totalitems+1; + if (dup>1) { + test_buffer(&mem,&imem_max,i+(*ob).sglo.len_item*(*ob).sglo.totalitems); + test_buffer(&frm,&ifrm_max,i+(*ob).sglo.len_item*(*ob).sglo.totalitems); + while (--dup) { + memcpy(&mem[i],&mem[offstruct+len],(*ob).sglo.len_item<<2); + memcpy(&frm[i],&frm[offstruct+len],(*ob).sglo.len_item<<2); + i+=(*ob).sglo.len_item; + } + } + len+=(*ob).sglo.len_item*(*ob).sglo.totalitems; + member=old_member; lexico(); + while (pieza==p_ptocoma) lexico(); + } + } else if (pieza==p_string) { // Miembro cadena + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpcgl,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcglo; (*ob).cglo.offset=len+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cglo.totalen=255; + } else { + if (((*ob).cglo.totalen=constante())<0) error(4,31); // cadena de longitud negativa + if ((*ob).cglo.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cglo.totalen=255; + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=0xDAD00000; + + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cglo.totalen+1) + error(4,49); // literal demasiado largo + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=0xDAD00000|(*ob).cglo.totalen; + strcpy((char*)&mem[offstruct+len+1],(char*)&mem[pieza_num]); + len+=1+((*ob).cglo.totalen+5)/4; + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=0xDAD00000|(*ob).cglo.totalen; + len+=1+((*ob).cglo.totalen+5)/4; + } + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Miembro byte + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpbgl,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbglo; (*ob).bglo.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).bglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bglo.len3=constante())<0) error(4,40); // reidem + } else (*ob).bglo.len3=-1; + } else { (*ob).bglo.len2=-1; (*ob).bglo.len3=-1; } + (*ob).bglo.totalen=(*ob).bglo.len1+1; + if ((*ob).bglo.len2>-1) (*ob).bglo.totalen*=(*ob).bglo.len2+1; + if ((*ob).bglo.len3>-1) (*ob).bglo.totalen*=(*ob).bglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + test_buffer(&mem,&imem_max,offstruct+len+((*ob).bglo.totalen+3)/4); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).bglo.totalen+3)/4); + memset(&frm[offstruct+len],2,(*ob).bglo.totalen); + + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + if (imemptr-oimemptr>(*ob).bglo.totalen) error(4,48); // demasiados valores para la tabla + imem=_imem; + } (*ob).bglo.totalen=((*ob).bglo.totalen+3)/4; + } else { + (*ob).tipo=tbglo; (*ob).bglo.offset=len; + (*ob).bglo.len1=0; + (*ob).bglo.len2=-1; + (*ob).bglo.len3=-1; + (*ob).bglo.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=2; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=constante(); + if (mem[offstruct+len]<0 || mem[offstruct+len]>255) error(4,50); // valor byte fuera de rango + } + } len+=(*ob).bglo.totalen; + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Miembro word + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwgl,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twglo; (*ob).wglo.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).wglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wglo.len3=constante())<0) error(4,40); // idem + } else (*ob).wglo.len3=-1; + } else { (*ob).wglo.len2=-1; (*ob).wglo.len3=-1; } + (*ob).wglo.totalen=(*ob).wglo.len1+1; + if ((*ob).wglo.len2>-1) (*ob).wglo.totalen*=(*ob).wglo.len2+1; + if ((*ob).wglo.len3>-1) (*ob).wglo.totalen*=(*ob).wglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + test_buffer(&mem,&imem_max,offstruct+len+((*ob).wglo.totalen+1)/2); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).wglo.totalen+1)/2); + memset(&frm[offstruct+len],1,(*ob).wglo.totalen*2); + + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + if (imemptr-oimemptr>(*ob).wglo.totalen*2) error(4,48); // demasiados valores para la tabla + imem=_imem; + } (*ob).wglo.totalen=((*ob).wglo.totalen+1)/2; + } else { + (*ob).tipo=twglo; (*ob).wglo.offset=len; + (*ob).wglo.len1=0; + (*ob).wglo.len2=-1; + (*ob).wglo.len3=-1; + (*ob).wglo.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=1; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=constante(); + if (mem[offstruct+len]<0 || mem[offstruct+len]>65535) error(4,51); // valor word fuera de rango + } + } len+=(*ob).wglo.totalen; + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpigl,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { lexico(); // Miembro tabla + (*ob).tipo=ttglo; (*ob).tglo.offset=len; + if (((*ob).tglo.len1=constante())<0) error(4,40); // tabla de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tglo.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tglo.len3=constante())<0) error(4,40); // idem + } else (*ob).tglo.len3=-1; + } else { (*ob).tglo.len2=-1; (*ob).tglo.len3=-1; } + (*ob).tglo.totalen=(*ob).tglo.len1+1; + if ((*ob).tglo.len2>-1) (*ob).tglo.totalen*=(*ob).tglo.len2+1; + if ((*ob).tglo.len3>-1) (*ob).tglo.totalen*=(*ob).tglo.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&mem,&imem_max,offstruct+len+(*ob).tglo.totalen); + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); tglo_init(0); + if (imem-(offstruct+len)>(*ob).tglo.totalen) error(4,48); // demasiados valores para la tabla + imem=_imem; + } len+=(*ob).tglo.totalen; + + } else { // Miembro variable + + (*ob).tipo=tvglo; (*ob).vglo.offset=len; + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } else { error(0,39); do lexico(); while (pieza==p_ptocoma); } // esperando un elemento de la estructura + } return(len); +} + +// + +int analiza_struct_local(int offstruct) { // tras " struct id [ ] " // idðmember + int len=0,dup,i,_itxt,_iloc; + struct objeto * ob; + struct objeto * old_member,* member2; + byte * oimemptr; + + while (pieza==p_ptocoma) lexico(); + + while (pieza!=p_end) { + + if (pieza==p_struct) { // Miembro struct + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + old_member=member; member=NULL; lexico(); member=old_member; + if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + analiza_pointer_struct(tpslo,len,ob); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; + + old_member=member; member=ob; lexico(); + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsloc; (*ob).sloc.offset=len; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sloc.items1=constante())<0) error(4,43); // estructura de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items3=constante())<0) error(4,43); // reidem + } else (*ob).sloc.items3=-1; + } else { (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; } + member=member2; + (*ob).sloc.totalitems=(*ob).sloc.items1+1; + if ((*ob).sloc.items2>-1) (*ob).sloc.totalitems*=(*ob).sloc.items2+1; + if ((*ob).sloc.items3>-1) (*ob).sloc.totalitems*=(*ob).sloc.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sloc.totalitems=1; + (*ob).sloc.items1=0; (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; + } + if (((*ob).sloc.len_item=analiza_struct_local(offstruct+len))==0) error(0,47); // estructura vacia + i=offstruct+len; dup=(*ob).sloc.totalitems+1; + if (dup>1) { + test_buffer(&loc,&iloc_max,i+(*ob).sloc.len_item*(*ob).sloc.totalitems); + test_buffer(&frm,&ifrm_max,i+(*ob).sloc.len_item*(*ob).sloc.totalitems); + while (--dup) { + memcpy(&loc[i],&loc[offstruct+len],(*ob).sloc.len_item<<2); + memcpy(&frm[i],&frm[offstruct+len],(*ob).sloc.len_item<<2); + i+=(*ob).sloc.len_item; + } + } + len+=(*ob).sloc.len_item*(*ob).sloc.totalitems; + member=old_member; lexico(); + while (pieza==p_ptocoma) lexico(); + } + + } else if (pieza==p_string) { // Miembro cadena + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpclo,len); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,29); // esperando el nombre de la cadena + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcloc; (*ob).cloc.offset=len+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cloc.totalen=255; + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=0xDAD00000; + + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cloc.totalen+1) + error(4,49); // literal demasiado largo + test_buffer(&loc,&iloc_max,offstruct+len); + loc[offstruct+len]=0xDAD00000|(*ob).cloc.totalen; + strcpy((char*)&loc[offstruct+len+1],(char*)&mem[pieza_num]); + len+=1+((*ob).cloc.totalen+5)/4; + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + test_buffer(&loc,&iloc_max,offstruct+len); + loc[offstruct+len]=0xDAD00000|(*ob).cloc.totalen; + len+=1+((*ob).cloc.totalen+5)/4; + } + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Miembro byte + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpblo,len); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbloc; (*ob).bloc.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).bloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).bloc.len3=-1; + } else { (*ob).bloc.len2=-1; (*ob).bloc.len3=-1; } + (*ob).bloc.totalen=(*ob).bloc.len1+1; + if ((*ob).bloc.len2>-1) (*ob).bloc.totalen*=(*ob).bloc.len2+1; + if ((*ob).bloc.len3>-1) (*ob).bloc.totalen*=(*ob).bloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&loc,&iloc_max,offstruct+len+((*ob).bloc.totalen+3)/4); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).bloc.totalen+3)/4); + memset(&frm[offstruct+len],2,(*ob).bloc.totalen); + + if (pieza==p_asig) { + _iloc=iloc; iloc=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&loc[iloc]; + tloc_init(2); + if (imemptr-oimemptr>(*ob).bloc.totalen) error(4,48); // demasiados valores para la tabla + iloc=_iloc; + } (*ob).bloc.totalen=((*ob).bloc.totalen+3)/4; + } else { + (*ob).tipo=tbloc; (*ob).bloc.offset=len; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=2; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&loc,&iloc_max,offstruct+len); + loc[offstruct+len]=constante(); + if (loc[offstruct+len]<0 || loc[offstruct+len]>255) error(4,51); // valor byte fuera de rango + } + } len+=(*ob).bloc.totalen; + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ; + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Miembro word + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwlo,len); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twloc; (*ob).wloc.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).wloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).wloc.len3=-1; + } else { (*ob).wloc.len2=-1; (*ob).wloc.len3=-1; } + (*ob).wloc.totalen=(*ob).wloc.len1+1; + if ((*ob).wloc.len2>-1) (*ob).wloc.totalen*=(*ob).wloc.len2+1; + if ((*ob).wloc.len3>-1) (*ob).wloc.totalen*=(*ob).wloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&loc,&iloc_max,offstruct+len+((*ob).wloc.totalen+1)/2); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).wloc.totalen+1)/2); + memset(&frm[offstruct+len],1,(*ob).wloc.totalen*2); + + if (pieza==p_asig) { + _iloc=iloc; iloc=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&loc[iloc]; + tloc_init(1); + if (imemptr-oimemptr>(*ob).wloc.totalen*2) error(4,48); // demasiados valores para la tabla + iloc=_iloc; + } (*ob).wloc.totalen=((*ob).wloc.totalen+1)/2; + } else { + (*ob).tipo=twloc; (*ob).wloc.offset=len; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=1; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&loc,&iloc_max,offstruct+len); + loc[offstruct+len]=constante(); + if (loc[offstruct+len]<0 || loc[offstruct+len]>65535) error(4,51); // valor word fuera de rango + } + } len+=(*ob).wloc.totalen; + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpilo,len); + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { lexico(); // Miembro tabla + (*ob).tipo=ttloc; (*ob).tloc.offset=len; + if (((*ob).tloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).tloc.len3=-1; + } else { (*ob).tloc.len2=-1; (*ob).tloc.len3=-1; } + (*ob).tloc.totalen=(*ob).tloc.len1+1; + if ((*ob).tloc.len2>-1) (*ob).tloc.totalen*=(*ob).tloc.len2+1; + if ((*ob).tloc.len3>-1) (*ob).tloc.totalen*=(*ob).tloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&loc,&iloc_max,offstruct+len+(*ob).tloc.totalen); + if (pieza==p_asig) { + _iloc=iloc; iloc=offstruct+len; + save_error(1); lexico(); tloc_init(0); + if (iloc-(offstruct+len)>(*ob).tloc.totalen) error(4,48); // demasiados valores para la tabla + iloc=_iloc; + } len+=(*ob).tloc.totalen; + + } else { // Miembro variable + + (*ob).tipo=tvloc; (*ob).vloc.offset=len; + test_buffer(&loc,&iloc_max,offstruct+len); + if (pieza==p_asig) { + lexico(); loc[offstruct+len]=constante(); + } len+=1; + + } + } + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } else { error(0,39); do lexico(); while (pieza==p_ptocoma); } // esperando un elemento de la estructura + (*ob).bloque=bloque_lexico; + } return(len); +} + + +// + +int analiza_struct_private(int offstruct) { // tras " struct id [ ] " // idðmember + int len=0,dup,i,_itxt,_imem; + struct objeto * ob; + struct objeto * old_member,* member2; + byte * oimemptr; + + while (pieza==p_ptocoma) lexico(); + + while (pieza!=p_end) { + + if (pieza==p_struct) { // Miembro struct + + lexico(); + + if (pieza==p_pointer) { // Se define un puntero a struct + + old_member=member; member=NULL; lexico(); member=old_member; + if (pieza!=p_id) error(1,27); ob=o; // esperando el nombre de la estructura + + if ((*ob).tipo==tnone) error(0,28); // No se define el pointer así + if ((*ob).tipo!=tsglo && (*ob).tipo!=tsloc) error(0,28); + lexico(); + puntero_a_struct: + analiza_pointer_struct(tpslo,len,ob); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + if (pieza==p_coma) { + lexico(); + if (pieza==p_pointer) lexico(); + goto puntero_a_struct; + } else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else { + + if (pieza!=p_id) error(1,27); // esperando el nombre de la estructura + ob=o; + + old_member=member; member=ob; lexico(); + if ((*ob).tipo!=tnone) error(2,30); // el nombre no es nuevo + + (*ob).tipo=tsloc; (*ob).sloc.offset=len; + if (pieza==p_corab) { + member2=member; member=NULL; lexico(); + if (((*ob).sloc.items1=constante())<0) error(4,43); // estructura de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items2=constante())<0) error(4,43); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).sloc.items3=constante())<0) error(4,43); // reidem + } else (*ob).sloc.items3=-1; + } else { (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; } + member=member2; + (*ob).sloc.totalitems=(*ob).sloc.items1+1; + if ((*ob).sloc.items2>-1) (*ob).sloc.totalitems*=(*ob).sloc.items2+1; + if ((*ob).sloc.items3>-1) (*ob).sloc.totalitems*=(*ob).sloc.items3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } else { + (*ob).sloc.totalitems=1; + (*ob).sloc.items1=0; (*ob).sloc.items2=-1; (*ob).sloc.items3=-1; + } + if (((*ob).sloc.len_item=analiza_struct_private(offstruct+len))==0) error(0,55); // demasiados valores para la estructura + i=offstruct+len; dup=(*ob).sloc.totalitems+1; + if (dup>1) { + test_buffer(&mem,&imem_max,i+(*ob).sloc.len_item*(*ob).sloc.totalitems); + test_buffer(&frm,&ifrm_max,i+(*ob).sloc.len_item*(*ob).sloc.totalitems); + while (--dup) { + memcpy(&mem[i],&mem[offstruct+len],(*ob).sloc.len_item<<2); + memcpy(&frm[i],&frm[offstruct+len],(*ob).sloc.len_item<<2); + i+=(*ob).sloc.len_item; + } + } + len+=(*ob).sloc.len_item*(*ob).sloc.totalitems; + member=old_member; lexico(); + while (pieza==p_ptocoma) lexico(); + } + + } else if (pieza==p_string) { // Miembro cadena + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero1: + ob=analiza_pointer(tpclo,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero1; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tcloc; (*ob).cloc.offset=len+1; + if (pieza==p_corab) { + lexico(); + if (pieza==p_corce) { + lexico(); + (*ob).cloc.totalen=255; + } else { + if (((*ob).cloc.totalen=constante())<0) error(4,31); // cadena de long. negativa + if ((*ob).cloc.totalen>0xFFFFF) error(4,32); // cadena demasiado larga + if (pieza!=p_corce) error(3,19); // esperando ']' + lexico(); + } + } else (*ob).cloc.totalen=255; + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=0xDAD00000; + + if (pieza==p_asig) { + save_error(1); + _itxt=itxt; + lexico(); + if (pieza!=p_lit && !(pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) + error(3,46); // se esperaba un literal + if (strlen((char*)&mem[pieza_num])>(*ob).cloc.totalen+1) + error(4,49); // literal demasiado largo + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=0xDAD00000|(*ob).cloc.totalen; + strcpy((char*)&mem[offstruct+len+1],(char*)&mem[pieza_num]); + len+=1+((*ob).cloc.totalen+5)/4; + itxt=_itxt; // Saca la cadena del segmento de textos + lexico(); + } else { + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=0xDAD00000|(*ob).cloc.totalen; + len+=1+((*ob).cloc.totalen+5)/4; + } + } + + if (pieza==p_coma) pieza=p_string; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_byte) { // Miembro byte + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a byte + + lexico(); puntero2: + ob=analiza_pointer(tpblo,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero2; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=tbloc; (*ob).bloc.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).bloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).bloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).bloc.len3=-1; + } else { (*ob).bloc.len2=-1; (*ob).bloc.len3=-1; } + (*ob).bloc.totalen=(*ob).bloc.len1+1; + if ((*ob).bloc.len2>-1) (*ob).bloc.totalen*=(*ob).bloc.len2+1; + if ((*ob).bloc.len3>-1) (*ob).bloc.totalen*=(*ob).bloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + test_buffer(&mem,&imem_max,offstruct+len+((*ob).bloc.totalen+3)/4); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).bloc.totalen+3)/4); + memset(&frm[offstruct+len],2,(*ob).bloc.totalen); + + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(2); + if (imemptr-oimemptr>(*ob).bloc.totalen) error(4,48); // demasiados valores para la tabla + imem=_imem; + } (*ob).bloc.totalen=((*ob).bloc.totalen+3)/4; + } else { + (*ob).tipo=tbloc; (*ob).bloc.offset=len; + (*ob).bloc.len1=0; + (*ob).bloc.len2=-1; + (*ob).bloc.len3=-1; + (*ob).bloc.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=2; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=constante(); + if (mem[offstruct+len]<0 || mem[offstruct+len]>255) error(4,50); // valor byte fuera de rango + } + } len+=(*ob).bloc.totalen; + } + + if (pieza==p_coma) pieza=p_byte; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_word) { // Miembro word + + lexico(); + + if (pieza==p_pointer) { // Miembro puntero a word + + lexico(); puntero3: + ob=analiza_pointer(tpwlo,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero3; + } + + } else { + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + (*ob).tipo=twloc; (*ob).wloc.offset=len; + if (pieza==p_corab) { lexico(); + if (((*ob).wloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).wloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).wloc.len3=-1; + } else { (*ob).wloc.len2=-1; (*ob).wloc.len3=-1; } + (*ob).wloc.totalen=(*ob).wloc.len1+1; + if ((*ob).wloc.len2>-1) (*ob).wloc.totalen*=(*ob).wloc.len2+1; + if ((*ob).wloc.len3>-1) (*ob).wloc.totalen*=(*ob).wloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + test_buffer(&mem,&imem_max,offstruct+len+((*ob).wloc.totalen+1)/2); + + test_buffer(&frm,&ifrm_max,offstruct+len+((*ob).wloc.totalen+1)/2); + memset(&frm[offstruct+len],1,(*ob).wloc.totalen*2); + + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); + oimemptr=(byte*)&mem[imem]; + tglo_init(1); + if (imemptr-oimemptr>(*ob).wloc.totalen*2) error(4,48); // demasiados valores para la tabla + imem=_imem; + } (*ob).wloc.totalen=((*ob).wloc.totalen+1)/2; + } else { + (*ob).tipo=twloc; (*ob).wloc.offset=len; + (*ob).wloc.len1=0; + (*ob).wloc.len2=-1; + (*ob).wloc.len3=-1; + (*ob).wloc.totalen=1; // 1 int + + test_buffer(&frm,&ifrm_max,offstruct+len); + frm[offstruct+len]=1; + + if (pieza==p_asig) { + save_error(1); + lexico(); + test_buffer(&mem,&imem_max,offstruct+len); + mem[offstruct+len]=constante(); + if (mem[offstruct+len]<0 || mem[offstruct+len]>65535) error(4,51); // valor word fuera de rango + } + } len+=(*ob).wloc.totalen; + } + + if (pieza==p_coma) pieza=p_word; else { + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + } + + } else if (pieza==p_int || pieza==p_id || pieza==p_pointer) { + + if (pieza==p_int) { + lexico(); + if (pieza!=p_id && pieza!=p_pointer) error(1,23); // esperando un nombre + } + + if (pieza==p_pointer) { // Miembro puntero a int + + lexico(); puntero4: + ob=analiza_pointer(tpilo,len); + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + if (pieza==p_coma) { + lexico(); if (pieza==p_pointer) lexico(); + goto puntero4; + } + + } else { + + ob=o; if ((*ob).tipo!=tnone) error(0,30); lexico(); // el nombre no es nuevo + if (pieza==p_corab) { lexico(); // Miembro tabla + (*ob).tipo=ttloc; (*ob).tloc.offset=len; + if (((*ob).tloc.len1=constante())<0) error(4,40); // tabla de long. negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len2=constante())<0) error(4,40); // idem + if (pieza==p_coma) { + lexico(); + if (((*ob).tloc.len3=constante())<0) error(4,40); // reidem + } else (*ob).tloc.len3=-1; + } else { (*ob).tloc.len2=-1; (*ob).tloc.len3=-1; } + (*ob).tloc.totalen=(*ob).tloc.len1+1; + if ((*ob).tloc.len2>-1) (*ob).tloc.totalen*=(*ob).tloc.len2+1; + if ((*ob).tloc.len3>-1) (*ob).tloc.totalen*=(*ob).tloc.len3+1; + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + + test_buffer(&mem,&imem_max,offstruct+len+(*ob).tloc.totalen); + if (pieza==p_asig) { + _imem=imem; imem=offstruct+len; + save_error(1); lexico(); tglo_init(0); + if (imem-(offstruct+len)>(*ob).tloc.totalen) error(4,48); // demasiados valores para la tabla + imem=_imem; + } len+=(*ob).tloc.totalen; + + } else { // Miembro variable + + (*ob).tipo=tvloc; (*ob).vloc.offset=len; + + test_buffer(&mem,&imem_max,offstruct+len); + if (pieza==p_asig) { + lexico(); mem[offstruct+len]=constante(); + } len+=1; + + } + } + + if (!free_sintax) if (pieza!=p_ptocoma && pieza!=p_coma) error(3,9); // esperando ';' + while (pieza==p_ptocoma || pieza==p_coma) lexico(); + + } else { error(0,39); do lexico(); while (pieza==p_ptocoma); } // esperando un elemento de la estructura + (*ob).bloque=bloque_lexico; + } return(len); +} + + +// + +int analiza_pointer_struct(int tipo, int offset, struct objeto * estructura) +{ + struct objeto * ob; + int items1,items2,items3; + + if (pieza!=p_id) error(1,23); // esperando un nombre + ob=o; if ((*ob).tipo!=tnone) { + if (parametros==-1 && (*ob).param==1 && (*ob).bloque==bloque_actual) { + if ((*ob).tipo==tipo) { // Se repite un pointer parámetro como private + save_error(0); lexico(); + items1=-1; items2=-1; items3=-1; + if (pieza==p_corab) { lexico(); + if ((items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if ((items2=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if ((items3=constante())<0) error(4,43); // estructura de longitud negativa + } + } if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } + if (items1!=(*ob).psgl.items1 || items2!=(*ob).psgl.items2 || items3!=(*ob).psgl.items3) error(4,41); // la longitud no coincide con la declaración anterior + else if (pieza==p_asig) error(0,42); // no se puede inicializar un parámetro + else { + (*ob).param++; return(0); // No permite volver a redeclararlo + } + } else error(0,30); // el nombre no es nuevo + } else error(0,30); + } else lexico(); + if (parametros==-1) (*ob).bloque=bloque_actual; + (*ob).psgl.items1=-1; (*ob).psgl.items2=-1; (*ob).psgl.items3=-1; + if (pieza==p_corab) { lexico(); + if (((*ob).psgl.items1=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).psgl.items2=constante())<0) error(4,43); // estructura de longitud negativa + if (pieza==p_coma) { + lexico(); + if (((*ob).psgl.items3=constante())<0) error(4,43); // estructura de longitud negativa + } + } + if (pieza!=p_corce) error(3,19); lexico(); // esperando ']' + } (*ob).psgl.totalitems=0; + if ((*ob).psgl.items1>-1) (*ob).psgl.totalitems=(*ob).psgl.items1+1; + if ((*ob).psgl.items2>-1) (*ob).psgl.totalitems*=(*ob).psgl.items2+1; + if ((*ob).psgl.items3>-1) (*ob).psgl.totalitems*=(*ob).psgl.items3+1; + + (*ob).tipo=tipo; // tpsgl o tpslo + (*ob).psgl.offset=offset; // del pointer + (*ob).psgl.ostruct=estructura; // struct original + + // (*ob).psgl.len_item ð (*((*ob).psgl.ostruct)).len_item; + + return(1); +} + + // + // Inicialización de tablas (a mem[imem++]) + // + // := ( | [ [p_dup] p_abrir p_cerrar ] ) + // [ p_coma ] + // + + +void tglo_init(int tipo) { // Tipo: 0-Int o variado (struct), 1-Word, 2-Byte + if (tipo==3) { memset(frm,0,ifrm_max*sizeof(int)); tipo=0; } + imemptr=(byte*)&mem[imem]; + tglo_init2(tipo); + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' +} + +void tloc_init(int tipo) { + int * ptr; + + if (tipo==3) { memset(frm,0,ifrm_max*sizeof(int)); tipo=0; } + + ptr=mem; mem=loc; loc=ptr; + swap(imem,iloc); swap(imem_max,iloc_max); + + imemptr=(byte*)&mem[imem]; + tglo_init2(tipo); + + ptr=mem; mem=loc; loc=ptr; + swap(imem,iloc); swap(imem_max,iloc_max); + + if (!free_sintax) if (pieza!=p_ptocoma) error(3,9); // esperando ';' +} + +// OJO!!! tglo_init no puede llamar a test_buffer !!! + +void tglo_init2(int tipo) { + int valor,dup,_imem,len,n; + byte *oimemptr; + + while (1) { + + // Mira si finaliza la inicialización de datos + + if (pieza==p_cerrar || pieza==p_ptocoma) { + if (*(imemptr-(int)mem+(int)frm)==1 || tipo==1) { + imemptr+=2; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=1 && tipo!=1) imemptr=(byte*)&mem[imem]; + } else if (*(imemptr-(int)mem+(int)frm)==2 || tipo==2) { + imemptr++; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=2 && tipo!=2) imemptr=(byte*)&mem[imem]; + } else { + imemptr+=4; + imem=((int)imemptr-(int)mem+3)/4; + } +// test_buffer(&mem,&imem_max,imem); + return; + } + + // Una coma sola, como "3,,4", avanza una posición (y define un 0) + + if (pieza==p_coma) { + if (*(imemptr-(int)mem+(int)frm)==1 || tipo==1) { + (*(word*)imemptr)=0; + imemptr+=2; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=1 && tipo!=1) imemptr=(byte*)&mem[imem]; + } else if (*(imemptr-(int)mem+(int)frm)==2 || tipo==2) { + *imemptr++=0; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=2 && tipo!=2) imemptr=(byte*)&mem[imem]; + } else { + imemptr+=4; + imem=((int)imemptr-(int)mem+3)/4; + } +// test_buffer(&mem,&imem_max,imem); + lexico(); continue; + } + + if (pieza==p_abrir) { // Dup x 1 + + dup=1; + + } else if (pieza==p_dup) { // Dup x 2 + + dup=2; lexico(); + if (pieza!=p_abrir) error(3,22); // esperando '(' + + } else if (pieza==p_lit || (pieza==p_id && (*o).tipo==tcons && (*o).cons.literal)) { + + valor=pieza_num; lexico(); + if (pieza==p_abrir || pieza==p_dup) error(2,52); // no se puede duplicar 0 o menos veces (se ha indicado un literal como número de veces) + + // Mete un literal en un dato de tipo string + + if ((((int)imemptr-(int)mem)%4)==0) { + imem=((int)imemptr-(int)mem+3)/4; + if (frm[imem]==0xdad00000) { + if (strlen((char*)&mem_ory[valor])>(mem[imem]&0xFFFFF)+1) error(2,49); // literal demasiado largo + _imem=imem; + imem+=1+((mem[imem]&0xFFFFF)+5)/4; +// test_buffer(&mem,&imem_max,imem); + imemptr=(byte*)&mem[imem]; + strcpy((char*)&mem[_imem+1],(char*)&mem_ory[valor]); + if (pieza!=p_coma) return; + lexico(); continue; + } + } + + // Mete un valor literal en otro tipo de dato (en lugar de un string) + + if (*(imemptr-(int)mem+(int)frm)==1 || tipo==1) { // Un string en words (el puntero short) + + imemptr=(byte*)(((int)imemptr+1)&-2); // Lo hace par + *((word*)imemptr)=valor; + imemptr+=2; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=1 && tipo!=1) imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } else if (*(imemptr-(int)mem+(int)frm)==2 || tipo==2) { // Un string en bytes + + oimemptr=imemptr; + while (*(oimemptr-(int)mem+(int)frm)==2) oimemptr++; + if (tipo==0) if (strlen((char*)&mem_ory[valor])>(int)(oimemptr-imemptr)) error(2,48); // demasiados valores para la tabla + strcpy(imemptr,(char*)&mem_ory[valor]); + imemptr+=strlen(imemptr); + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=2 && tipo!=2) imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } else { // Un string en un int (el puntero long, como en DIV 1) + + imem=((int)imemptr-(int)mem+3)/4; + mem[imem++]=valor; +// test_buffer(&mem,&imem_max,imem); + imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } + + } else { + valor=constante(); + if (pieza!=p_abrir) { + if (pieza!=p_dup) { + + if ((((int)imemptr-(int)mem)%4)==0) { + imem=((int)imemptr-(int)mem+3)/4; + if (frm[imem]==0xdad00000) error(2,46); // se esperaba un literal + } + + // Mete un valor numérico en la memoria + + if (*(imemptr-(int)mem+(int)frm)==1 || tipo==1) { // En un word + + if (valor<0 || valor>65535) error(2,51); // valor word fuera de rango + imemptr=(byte*)(((int)imemptr+1)&-2); // Lo hace par + *((word*)imemptr)=valor; + imemptr+=2; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=1 && tipo!=1) imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } else if (*(imemptr-(int)mem+(int)frm)==2 || tipo==2) { // En un byte + + if (valor<0 || valor>255) error(2,50); // valor byte fuera de rango + *imemptr++=valor; + imem=((int)imemptr-(int)mem+3)/4; + if (*(imemptr-(int)mem+(int)frm)!=2 && tipo!=2) imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } else { // En un int (lo normal en DIV 1) + + imem=((int)imemptr-(int)mem+3)/4; + mem[imem++]=valor; +// test_buffer(&mem,&imem_max,imem); + imemptr=(byte*)&mem[imem]; + if (pieza!=p_coma) return; + lexico(); continue; + + } + + } else { + dup=valor; lexico(); + if (pieza!=p_abrir) error(3,22); // esperando '(' + } + } else dup=valor; + } + + // Duplica una secuencia de valores + + if (dup<1) error(2,52); // no se puede duplicar 0 o menos veces + lexico(); + + // Analiza la secuencia como otra inicialización ... + + oimemptr=imemptr; + tglo_init2(tipo); + if (pieza!=p_cerrar) error(3,18); // esperando ')' + + // Y la duplica el número de veces indicado + + if (dup>1) { + len=imemptr-oimemptr; +// test_buffer(&mem,&imem_max,(((int)oimemptr-(int)mem)+len*dup+3)/4); + while (--dup) { + for (n=0;n + +#include +#include +#include +#include +#include + +#include +#include + +#include "extern.h" +#include "main.h" +#include "kernel.h" +#include "inte.h" +#include "varindex.h" + +#define long_header 9 // Longitud de la cabecera al inicio de los programas + + + +/* Main ( argc, argv ) + * + * Rutina principal. Lee el bytecode del ejecutable, lo descomprime y lo carga en memoria + * (La mayoría de las variables y buffers se mantienen con el mismo nombre que en el compilador: + * mem, imem_max, etc) + */ + +int main(int argc, char* argv[]) +{ + //FILE *f; + int f , i; + int stub_size; + int mimem[10]; + Uint32 tiempo[100] , tiempo_i ; + FILE *file_tiempo ; + byte * ptr; + unsigned long len,len_descomp; +#ifdef DBG + int start_lin; + int linsize; + int comp_size; + int descomp_size; + char* progcomp; +#endif + numdlls=0; + n_externs=0; + + for ( i = 0 ; i < 100 ; i++ ) + tiempo[ i ] = 0 ; + tiempo_i = 0 ; + + file_tiempo = fopen( "time.txt" , "w+" ) ; + + + + #ifdef _WIN32 + f=strlen(argv[0]); + if(argv[0][f-4]!='.' || (argv[0][f-3]!='e' && argv[0][f-3]!='E') + || (argv[0][f-2]!='x' && argv[0][f-2]!='X') || (argv[0][f-1]!='e' && argv[0][f-1]!='E')) { + strcat(argv[0],".exe"); + } + #endif +// assert(0) ; + if((f=open(argv[0],O_RDONLY | O_BINARY))==-1) { + /*#ifdef WIN32 + strcat(argv[0],".exe"); + printf("%s\n",argv[0]); + if((f=open(argv[0],O_RDONLY | O_BINARY))==-1) + #endif*/ + critical_error(1); // error leyendo el código del programa + } + + lseek(f,-4,SEEK_END); + read(f,&stub_size,4); + printf("STUB_SIZE: %d\n",stub_size); + lseek(f,stub_size,SEEK_SET); + read(f,mimem,4*10); + read(f,&len,4); + + iloc_len=(mimem[5]+mimem[6]); + if (iloc_len&1) iloc_len++; + + if (mimem[3]>0) { + imem_max=mimem[8]+mimem[3]*(iloc_len)+iloc_len+2; + } else { + imem_max=mimem[8]+128*(iloc_len)+iloc_len+2; + if (imem_max<256*1024) imem_max=256*1024; + if (imem_max>512*1024) imem_max=512*1024; + } + + + if ((mem=(int*)malloc(4*imem_max+1032*5+16*1025+3))!=NULL){ + + mem=(int*)((((int)mem+3)/4)*4); + + //filenames=(char*)&mem[imem_max+258*5]; // Buffer de 16*1025 para dirinfo[].name + + memset(mem,0,4*imem_max+1032*5); + // Para sumar cadenas "en el aire" +/* nullstring[0]=imem_max+1+258*0; mem[nullstring[0]-1]=0xDAD00402; + nullstring[1]=imem_max+1+258*1; mem[nullstring[1]-1]=0xDAD00402; + nullstring[2]=imem_max+1+258*2; mem[nullstring[2]-1]=0xDAD00402; + nullstring[3]=imem_max+1+258*3; mem[nullstring[3]-1]=0xDAD00402;*/ + memcpy(mem,mimem,40); + + if ((ptr=(byte*)malloc(len))!=NULL) { + + read(f,ptr,len); + + len_descomp=mem[9]; + + if (!uncompress((unsigned char *)&mem[9],&len_descomp,ptr,len)) { + + free(ptr); + + #ifdef DBG + if ((mem[0]&64)==64) { debug=1; mem[0]-=64; } + #endif + + if ((mem[0]&512)==512) { ignore_errors=1; mem[0]-=512; } + + /*i=imem_max+258*4; + if ((_argc=argc-1)>10) _argc=10; + for (n=0;n<_argc && n 99 ) tiempo_i = 0 ; + tiempo[ tiempo_i ] = SDL_GetTicks() ; + + if ( tiempo_i == 99 ) + fp.mem[ fp.varindex[_glo_fps] ] = 100000 / (tiempo[99] - tiempo[0]) ; + else + if ( tiempo[tiempo_i] - tiempo[tiempo_i+1] != 0 ) + fp.mem[ fp.varindex[_glo_fps] ] = 100000 / (tiempo[tiempo_i] - tiempo[tiempo_i+1] ) ; + + + + //SDL_BlitSurface( imagen1 , NULL , screen , NULL ) ; + //SDL_Flip(screen); + } + + exit(0); // fin del programa + + } else { + close(f); + free(ptr); + critical_error(1); // error leyendo el código del programa + } + + } else { + close(f); + critical_error(1); // error leyendo el código del programa + } + + } else { close(f); error(1); } // error leyendo el código del programa + + return 0; +} + + +void stub_quit() +{ + exit(0) ; +} + + +// idéntico a malloc, pero con errormsg utomático +void* e_malloc(size_t size) +{ + void* ret; + + if(!(ret = malloc(size))) { + printf("memoria insuficiente\n"); // memoria insuficiente + exit(1); + } + + return ret; +} + diff --git a/ediv/src/visual c 6/doku/doku.dsp b/ediv/src/visual c 6/doku/doku.dsp new file mode 100644 index 0000000..daa076c --- /dev/null +++ b/ediv/src/visual c 6/doku/doku.dsp @@ -0,0 +1,106 @@ +# Microsoft Developer Studio Project File - Name="doku" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=doku - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "doku.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "doku.mak" CFG="doku - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "doku - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "doku - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "doku - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../../../doc/doku.exe" + +!ELSEIF "$(CFG)" == "doku - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../doc/doku.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "doku - Win32 Release" +# Name "doku - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\doku\doku.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\doku\template.txt +# End Source File +# End Target +# End Project diff --git a/ediv/src/visual c 6/doku/doku.plg b/ediv/src/visual c 6/doku/doku.plg new file mode 100644 index 0000000..7e2b235 --- /dev/null +++ b/ediv/src/visual c 6/doku/doku.plg @@ -0,0 +1,33 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: doku - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "D:\DOCUME~1\ER_MAK~1\CONFIG~1\Temp\RSP162.tmp" with contents +[ +/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/doku.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"d:\ediv\src\doku\doku.c" +] +Creating command line "cl.exe @D:\DOCUME~1\ER_MAK~1\CONFIG~1\Temp\RSP162.tmp" +Creating temporary file "D:\DOCUME~1\ER_MAK~1\CONFIG~1\Temp\RSP163.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/doku.pdb" /debug /machine:I386 /out:"../../../doc/doku.exe" /pdbtype:sept +".\Debug\doku.obj" +] +Creating command line "link.exe @D:\DOCUME~1\ER_MAK~1\CONFIG~1\Temp\RSP163.tmp" +

    Output Window

    +Compiling... +doku.c +d:\ediv\src\doku\doku.c(68) : warning C4018: '<' : signed/unsigned mismatch +Linking... + + + +

    Results

    +doku.exe - 0 error(s), 1 warning(s) +
    + + diff --git a/ediv/src/visual c 6/doku/doku.vcproj b/ediv/src/visual c 6/doku/doku.vcproj new file mode 100644 index 0000000..1460cb3 --- /dev/null +++ b/ediv/src/visual c 6/doku/doku.vcproj @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/visual c 6/ediv/ediv.dsp b/ediv/src/visual c 6/ediv/ediv.dsp new file mode 100644 index 0000000..1755fa5 --- /dev/null +++ b/ediv/src/visual c 6/ediv/ediv.dsp @@ -0,0 +1,243 @@ +# Microsoft Developer Studio Project File - Name="ediv" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ediv - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ediv.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ediv.mak" CFG="ediv - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ediv - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ediv - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ediv - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib zlib.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"..\..\..\bin\ediv.exe" /libpath:"..\..\..\lib" + +!ELSEIF "$(CFG)" == "ediv - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /GB /ML /W3 /Gm /GX /ZI /Od /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\bin\ediv.exe" /pdbtype:sept /libpath:"..\..\..\lib" +# SUBTRACT LINK32 /pdb:none /nodefaultlib + +!ENDIF + +# Begin Target + +# Name "ediv - Win32 Release" +# Name "ediv - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "edivcfg" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\dictionary.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\dictionary.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\e_error.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\e_error.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\edivcfg.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\iniparser.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\mainparse.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\strlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\edivcfg\strlib.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\ediv\compiler.c +# End Source File +# Begin Source File + +SOURCE=..\..\shared\dll_load.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\ediv.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\ediv_export.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\encrypt.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\expresion.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\language.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\listados.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\lower.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\ltlex.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\modulos.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\parser.c +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\varindex.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\ediv\compiler.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\dll_load.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\encrypt.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\expresion.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\extern.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\language.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\listados.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\lower.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\main.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\modulos.h +# End Source File +# Begin Source File + +SOURCE=..\..\ediv\parser.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\shared.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\varindex.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ediv/src/visual c 6/ediv/ediv.plg b/ediv/src/visual c 6/ediv/ediv.plg new file mode 100644 index 0000000..3df7b58 --- /dev/null +++ b/ediv/src/visual c 6/ediv/ediv.plg @@ -0,0 +1,121 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: ediv - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSPB5.tmp" with contents +[ +/nologo /G5 /ML /W3 /Gm /GX /ZI /Od /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/ediv.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\ediv\src\ediv\edivcfg\dictionary.c" +"D:\ediv\src\ediv\edivcfg\e_error.c" +"D:\ediv\src\ediv\edivcfg\edivcfg.c" +"D:\ediv\src\ediv\edivcfg\mainparse.c" +"D:\ediv\src\ediv\edivcfg\strlib.c" +"D:\ediv\src\ediv\compiler.c" +"D:\ediv\src\shared\dll_load.c" +"D:\ediv\src\ediv\ediv.c" +"D:\ediv\src\ediv\ediv_export.c" +"D:\ediv\src\ediv\encrypt.c" +"D:\ediv\src\ediv\expresion.c" +"D:\ediv\src\ediv\language.c" +"D:\ediv\src\ediv\listados.c" +"D:\ediv\src\ediv\lower.c" +"D:\ediv\src\ediv\ltlex.c" +"D:\ediv\src\ediv\modulos.c" +"D:\ediv\src\ediv\parser.c" +"D:\ediv\src\ediv\varindex.c" +] +Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSPB5.tmp" +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSPB6.tmp" with contents +[ +zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib ws2_32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/ediv.pdb" /debug /machine:I386 /out:"..\..\..\bin\ediv.exe" /pdbtype:sept /libpath:"..\..\..\lib" +".\Debug\dictionary.obj" +".\Debug\e_error.obj" +".\Debug\edivcfg.obj" +".\Debug\mainparse.obj" +".\Debug\strlib.obj" +".\Debug\compiler.obj" +".\Debug\dll_load.obj" +".\Debug\ediv.obj" +".\Debug\ediv_export.obj" +".\Debug\encrypt.obj" +".\Debug\expresion.obj" +".\Debug\language.obj" +".\Debug\listados.obj" +".\Debug\lower.obj" +".\Debug\ltlex.obj" +".\Debug\modulos.obj" +".\Debug\parser.obj" +".\Debug\varindex.obj" +] +Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSPB6.tmp" +

    Output Window

    +Compiling... +dictionary.c +e_error.c +edivcfg.c +mainparse.c +d:\ediv\src\ediv\edivcfg\mainparse.c(304) : warning C4018: '==' : signed/unsigned mismatch +strlib.c +compiler.c +dll_load.c +ediv.c +d:\ediv\src\ediv\ediv.c(211) : warning C4018: '<=' : signed/unsigned mismatch +ediv_export.c +encrypt.c +expresion.c +language.c +listados.c +lower.c +ltlex.c +modulos.c +parser.c +varindex.c +Linking... +msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBC.lib(crt0dat.obj) +msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBC.lib(strncpy.obj) +msvcrt.lib(MSVCRT.dll) : error LNK2005: _strrchr already defined in LIBC.lib(strrchr.obj) +msvcrt.lib(MSVCRT.dll) : error LNK2005: _fprintf already defined in LIBC.lib(fprintf.obj) +msvcrt.lib(MSVCRT.dll) : error LNK2005: _remove already defined in LIBC.lib(unlink.obj) +msvcrt.lib(MSVCRT.dll) : error LNK2005: _fgetc already defined in LIBC.lib(fgetc.obj) +msvcrt.lib(MSVCRT.dll) : error LNK2005: _fopen already defined in LIBC.lib(fopen.obj) +msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBC.lib(fclose.obj) +msvcrt.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in LIBC.lib(isctype.obj) +LIBC.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library +..\..\..\bin\ediv.exe : fatal error LNK1169: one or more multiply defined symbols found +Error executing link.exe. +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSPB8.tmp" with contents +[ +/nologo /o"Debug/ediv.bsc" +".\Debug\dictionary.sbr" +".\Debug\e_error.sbr" +".\Debug\edivcfg.sbr" +".\Debug\mainparse.sbr" +".\Debug\strlib.sbr" +".\Debug\compiler.sbr" +".\Debug\dll_load.sbr" +".\Debug\ediv.sbr" +".\Debug\ediv_export.sbr" +".\Debug\encrypt.sbr" +".\Debug\expresion.sbr" +".\Debug\language.sbr" +".\Debug\listados.sbr" +".\Debug\lower.sbr" +".\Debug\ltlex.sbr" +".\Debug\modulos.sbr" +".\Debug\parser.sbr" +".\Debug\varindex.sbr"] +Creating command line "bscmake.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSPB8.tmp" +Creating browse info file... +

    Output Window

    + + + +

    Results

    +ediv.exe - 10 error(s), 3 warning(s) +
    + + diff --git a/ediv/src/visual c 6/ediv/ediv.vcproj b/ediv/src/visual c 6/ediv/ediv.vcproj new file mode 100644 index 0000000..f199d3f --- /dev/null +++ b/ediv/src/visual c 6/ediv/ediv.vcproj @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/visual c 6/ediv_ws.dsw b/ediv/src/visual c 6/ediv_ws.dsw new file mode 100644 index 0000000..11d4a95 --- /dev/null +++ b/ediv/src/visual c 6/ediv_ws.dsw @@ -0,0 +1,77 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "b2f"="..\bmp2fnt\b2f.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "doku"=".\doku\doku.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ediv"=".\ediv\ediv.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "encrypt"=".\encrypt\encrypt.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "stub"=".\stub\stub.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ediv/src/visual c 6/ediv_ws.sln b/ediv/src/visual c 6/ediv_ws.sln new file mode 100644 index 0000000..f2b0d63 --- /dev/null +++ b/ediv/src/visual c 6/ediv_ws.sln @@ -0,0 +1,67 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "b2f", "..\bmp2fnt\b2f.vcproj", "{EBA9C0C6-5748-4480-A478-8F5C213BB1CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doku", "doku\doku.vcproj", "{AA5E597A-79DB-4A5E-8656-9E34C815D71E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ediv", "ediv\ediv.vcproj", "{A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encrypt", "encrypt\encrypt.vcproj", "{77065768-F682-4204-B28D-33B4C223B86A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stub", "stub\stub.vcproj", "{031F4A82-8932-473D-8B8E-58117559261C}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Debug con trazador + ConfigName.2 = Release + ConfigName.3 = Release con trazador + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Debug.ActiveCfg = Debug|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Debug.Build.0 = Debug|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Debug con trazador.ActiveCfg = Debug|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Debug con trazador.Build.0 = Debug|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Release.ActiveCfg = Release|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Release.Build.0 = Release|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Release con trazador.ActiveCfg = Release|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Release con trazador.Build.0 = Release|Win32 + {AA5E597A-79DB-4A5E-8656-9E34C815D71E}.Debug.ActiveCfg = Debug|Win32 + {AA5E597A-79DB-4A5E-8656-9E34C815D71E}.Debug.Build.0 = Debug|Win32 + {AA5E597A-79DB-4A5E-8656-9E34C815D71E}.Debug con trazador.ActiveCfg = Debug|Win32 + {AA5E597A-79DB-4A5E-8656-9E34C815D71E}.Debug con trazador.Build.0 = Debug|Win32 + {AA5E597A-79DB-4A5E-8656-9E34C815D71E}.Release.ActiveCfg = Release|Win32 + {AA5E597A-79DB-4A5E-8656-9E34C815D71E}.Release.Build.0 = Release|Win32 + {AA5E597A-79DB-4A5E-8656-9E34C815D71E}.Release con trazador.ActiveCfg = Release|Win32 + {AA5E597A-79DB-4A5E-8656-9E34C815D71E}.Release con trazador.Build.0 = Release|Win32 + {A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}.Debug.ActiveCfg = Debug|Win32 + {A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}.Debug.Build.0 = Debug|Win32 + {A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}.Debug con trazador.ActiveCfg = Debug|Win32 + {A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}.Debug con trazador.Build.0 = Debug|Win32 + {A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}.Release.ActiveCfg = Release|Win32 + {A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}.Release.Build.0 = Release|Win32 + {A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}.Release con trazador.ActiveCfg = Release|Win32 + {A530BB09-EFC3-408C-B2C7-CD2ABE4D6A5F}.Release con trazador.Build.0 = Release|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Debug.ActiveCfg = Debug|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Debug.Build.0 = Debug|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Debug con trazador.ActiveCfg = Debug|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Debug con trazador.Build.0 = Debug|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Release.ActiveCfg = Release|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Release.Build.0 = Release|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Release con trazador.ActiveCfg = Release|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Release con trazador.Build.0 = Release|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Debug.ActiveCfg = Debug|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Debug.Build.0 = Debug|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Debug con trazador.ActiveCfg = Debug con trazador|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Debug con trazador.Build.0 = Debug con trazador|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Release.ActiveCfg = Release|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Release.Build.0 = Release|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Release con trazador.ActiveCfg = Release con trazador|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Release con trazador.Build.0 = Release con trazador|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/visual c 6/ediv_ws.suo b/ediv/src/visual c 6/ediv_ws.suo new file mode 100644 index 0000000..8d8c138 Binary files /dev/null and b/ediv/src/visual c 6/ediv_ws.suo differ diff --git a/ediv/src/visual c 6/encrypt/encrypt.dsp b/ediv/src/visual c 6/encrypt/encrypt.dsp new file mode 100644 index 0000000..da6cfd2 --- /dev/null +++ b/ediv/src/visual c 6/encrypt/encrypt.dsp @@ -0,0 +1,105 @@ +# Microsoft Developer Studio Project File - Name="encrypt" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=encrypt - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "encrypt.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "encrypt.mak" CFG="encrypt - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "encrypt - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "encrypt - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "encrypt - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib zlib.lib /nologo /subsystem:console /machine:I386 /out:"..\..\..\bin\encrypt.exe" /libpath:"..\..\..\lib" + +!ELSEIF "$(CFG)" == "encrypt - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\bin\encrypt.exe" /pdbtype:sept /libpath:"..\..\..\lib" + +!ENDIF + +# Begin Target + +# Name "encrypt - Win32 Release" +# Name "encrypt - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\encrypt\encrypt.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\shared\shared.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ediv/src/visual c 6/encrypt/encrypt.plg b/ediv/src/visual c 6/encrypt/encrypt.plg new file mode 100644 index 0000000..545c903 --- /dev/null +++ b/ediv/src/visual c 6/encrypt/encrypt.plg @@ -0,0 +1,32 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: encrypt - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP3F.tmp" with contents +[ +/nologo /MLd /W3 /Gm /GX /ZI /Od /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/encrypt.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\ediv\src\encrypt\encrypt.c" +] +Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP3F.tmp" +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP40.tmp" with contents +[ +zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/encrypt.pdb" /debug /machine:I386 /out:"..\..\..\bin\encrypt.exe" /pdbtype:sept /libpath:"..\..\..\lib" +".\Debug\encrypt.obj" +] +Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP40.tmp" +

    Output Window

    +Compiling... +encrypt.c +Linking... + + + +

    Results

    +encrypt.exe - 0 error(s), 0 warning(s) +
    + + diff --git a/ediv/src/visual c 6/encrypt/encrypt.vcproj b/ediv/src/visual c 6/encrypt/encrypt.vcproj new file mode 100644 index 0000000..9775089 --- /dev/null +++ b/ediv/src/visual c 6/encrypt/encrypt.vcproj @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/visual c 6/stub/stub.dsp b/ediv/src/visual c 6/stub/stub.dsp new file mode 100644 index 0000000..ebfa8eb --- /dev/null +++ b/ediv/src/visual c 6/stub/stub.dsp @@ -0,0 +1,250 @@ +# Microsoft Developer Studio Project File - Name="stub" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=stub - Win32 Debug con trazador +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "stub.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "stub.mak" CFG="stub - Win32 Debug con trazador" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "stub - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "stub - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "stub - Win32 Debug con trazador" (based on "Win32 (x86) Application") +!MESSAGE "stub - Win32 Release con trazador" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "stub - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 sdlmain.lib sdl.lib zlib.lib msvcrt.lib user32.lib /nologo /subsystem:windows /machine:I386 /out:"..\..\..\bin\stub.exe" /libpath:"..\..\..\lib" +# SUBTRACT LINK32 /nodefaultlib +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=cd ..\..\..\bin makelib win32.rel +# End Special Build Tool + +!ELSEIF "$(CFG)" == "stub - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 sdlmain.lib sdl.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\bin\stub.exe" /pdbtype:sept /libpath:"..\..\..\lib" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=cd ..\..\..\bin makelib win32.rel +# End Special Build Tool + +!ELSEIF "$(CFG)" == "stub - Win32 Debug con trazador" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "stub___Win32_Debug_con_trazador" +# PROP BASE Intermediate_Dir "stub___Win32_Debug_con_trazador" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "stub___Win32_Debug_con_trazador" +# PROP Intermediate_Dir "stub___Win32_Debug_con_trazador" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\inc" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "DBG" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib /nologo /subsystem:windows /debug /machine:I386 /out:"..\..\..\bin\stub.exe" /pdbtype:sept /libpath:"..\..\..\lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib zlib.lib /nologo /subsystem:windows /debug /machine:I386 /out:"..\..\..\bin\stub.exe" /pdbtype:sept /libpath:"..\..\..\lib" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=cd ..\..\..\bin makelib win32.dbg +# End Special Build Tool + +!ELSEIF "$(CFG)" == "stub - Win32 Release con trazador" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "stub___Win32_Release_con_trazador" +# PROP BASE Intermediate_Dir "stub___Win32_Release_con_trazador" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "stub___Win32_Release_con_trazador" +# PROP Intermediate_Dir "stub___Win32_Release_con_trazador" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\inc" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "DBG" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib /nologo /subsystem:windows /machine:I386 /out:"..\..\..\bin\stub.exe" /libpath:"..\..\..\lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdlmain.lib sdl.lib zlib.lib /nologo /subsystem:windows /machine:I386 /out:"..\..\..\bin\stub.exe" /libpath:"..\..\..\lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=cd ..\..\..\bin makelib win32.dbg +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "stub - Win32 Release" +# Name "stub - Win32 Debug" +# Name "stub - Win32 Debug con trazador" +# Name "stub - Win32 Release con trazador" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\stub\dll.c +# End Source File +# Begin Source File + +SOURCE=..\..\shared\dll_load.c +# End Source File +# Begin Source File + +SOURCE=..\..\stub\ediv_export.c +# End Source File +# Begin Source File + +SOURCE=..\..\stub\error.c +# End Source File +# Begin Source File + +SOURCE=..\..\stub\inte.c +# End Source File +# Begin Source File + +SOURCE=..\..\stub\kernel.c +# End Source File +# Begin Source File + +SOURCE=..\..\stub\language.c +# End Source File +# Begin Source File + +SOURCE=..\..\stub\stub.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\stub\dll.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\dll_load.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\edivfont.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\extern.h +# End Source File +# Begin Source File + +SOURCE=..\..\stub\inte.h +# End Source File +# Begin Source File + +SOURCE=..\..\stub\kernel.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\language.h +# End Source File +# Begin Source File + +SOURCE=..\..\stub\main.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\shared.h +# End Source File +# Begin Source File + +SOURCE=..\..\shared\varindex.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ediv/src/visual c 6/stub/stub.plg b/ediv/src/visual c 6/stub/stub.plg new file mode 100644 index 0000000..e8ddf65 --- /dev/null +++ b/ediv/src/visual c 6/stub/stub.plg @@ -0,0 +1,55 @@ + + +
    +

    Build Log

    +

    +--------------------Configuration: stub - Win32 Debug-------------------- +

    +

    Command Lines

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP47.tmp" with contents +[ +/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\inc" /I "..\..\shared" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR"Debug/" /Fp"Debug/stub.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\ediv\src\stub\stub.c" +] +Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP47.tmp" +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP48.tmp" with contents +[ +sdlmain.lib sdl.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/stub.pdb" /debug /machine:I386 /out:"..\..\..\bin\stub.exe" /pdbtype:sept /libpath:"..\..\..\lib" +".\Debug\dll.obj" +".\Debug\dll_load.obj" +".\Debug\ediv_export.obj" +".\Debug\error.obj" +".\Debug\inte.obj" +".\Debug\kernel.obj" +".\Debug\language.obj" +".\Debug\stub.obj" +] +Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP48.tmp" +

    Output Window

    +Compiling... +stub.c +D:\ediv\src\stub\stub.c(159) : warning C4018: '<' : signed/unsigned mismatch +Linking... +LINK : LNK6004: ..\..\..\bin\stub.exe not found or not built by the last incremental link; performing full link +LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library +MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library +Creating command line "bscmake.exe /nologo /o"Debug/stub.bsc" ".\Debug\dll.sbr" ".\Debug\dll_load.sbr" ".\Debug\ediv_export.sbr" ".\Debug\error.sbr" ".\Debug\inte.sbr" ".\Debug\kernel.sbr" ".\Debug\language.sbr" ".\Debug\stub.sbr"" +Creating browse info file... +

    Output Window

    +Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4A.bat" with contents +[ +@echo off +cd ..\..\..\bin +makelib win32.rel +] +Creating command line "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4A.bat" + +STUB_SIZE: 172089 + + + +

    Results

    +stub.exe - 0 error(s), 3 warning(s) +
    + + diff --git a/ediv/src/visual c 6/stub/stub.vcproj b/ediv/src/visual c 6/stub/stub.vcproj new file mode 100644 index 0000000..b8b3d47 --- /dev/null +++ b/ediv/src/visual c 6/stub/stub.vcproj @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/visual c/dlls/dlls.sln b/ediv/src/visual c/dlls/dlls.sln new file mode 100644 index 0000000..040edc7 --- /dev/null +++ b/ediv/src/visual c/dlls/dlls.sln @@ -0,0 +1,74 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\dlls\graphics\graphics.vcproj", "{AAF7A53C-05B1-40E4-B029-ED2B0C76E125}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prueba", "..\..\dlls\prueba\prueba.vcproj", "{5B0D1941-3294-4444-BBE4-9041FC8D8F1C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample", "..\..\dlls\sample\sample.vcproj", "{E313700D-F9A5-494E-B02E-7B3F351A15AD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strings", "..\..\dlls\strings\strings.vcproj", "{F83A4960-9687-42C4-B722-14A028A9C393}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "edivstd", "..\..\dlls\edivstd\edivstd.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}" +EndProject +Global + GlobalSection(SourceCodeControl) = preSolution + SccNumberOfProjects = 6 + SccProjectName0 = \u0022$/dlls\u0022,\u0020YCAAAAAA + SccLocalPath0 = ..\\.. + SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe + CanCheckoutShared = false + SccProjectFilePathRelativizedFromConnection0 = visual\u0020c\\dlls\\ + SolutionUniqueID = {1E2B0B4F-2887-423C-BBAA-825EDCAD7A64} + SccProjectUniqueName1 = ..\\..\\dlls\\edivstd\\edivstd.vcproj + SccLocalPath1 = ..\\.. + CanCheckoutShared = false + SccProjectFilePathRelativizedFromConnection1 = dlls\\edivstd\\ + SccProjectUniqueName2 = ..\\..\\dlls\\graphics\\graphics.vcproj + SccLocalPath2 = ..\\.. + CanCheckoutShared = false + SccProjectFilePathRelativizedFromConnection2 = dlls\\graphics\\ + SccProjectUniqueName3 = ..\\..\\dlls\\prueba\\prueba.vcproj + SccLocalPath3 = ..\\.. + CanCheckoutShared = false + SccProjectFilePathRelativizedFromConnection3 = dlls\\prueba\\ + SccProjectUniqueName4 = ..\\..\\dlls\\sample\\sample.vcproj + SccLocalPath4 = ..\\.. + CanCheckoutShared = false + SccProjectFilePathRelativizedFromConnection4 = dlls\\sample\\ + SccProjectUniqueName5 = ..\\..\\dlls\\strings\\strings.vcproj + SccLocalPath5 = ..\\.. + CanCheckoutShared = false + SccProjectFilePathRelativizedFromConnection5 = dlls\\strings\\ + EndGlobalSection + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {AAF7A53C-05B1-40E4-B029-ED2B0C76E125}.Debug.ActiveCfg = Debug|Win32 + {AAF7A53C-05B1-40E4-B029-ED2B0C76E125}.Debug.Build.0 = Debug|Win32 + {AAF7A53C-05B1-40E4-B029-ED2B0C76E125}.Release.ActiveCfg = Release|Win32 + {AAF7A53C-05B1-40E4-B029-ED2B0C76E125}.Release.Build.0 = Release|Win32 + {5B0D1941-3294-4444-BBE4-9041FC8D8F1C}.Debug.ActiveCfg = Debug|Win32 + {5B0D1941-3294-4444-BBE4-9041FC8D8F1C}.Debug.Build.0 = Debug|Win32 + {5B0D1941-3294-4444-BBE4-9041FC8D8F1C}.Release.ActiveCfg = Release|Win32 + {5B0D1941-3294-4444-BBE4-9041FC8D8F1C}.Release.Build.0 = Release|Win32 + {E313700D-F9A5-494E-B02E-7B3F351A15AD}.Debug.ActiveCfg = Debug|Win32 + {E313700D-F9A5-494E-B02E-7B3F351A15AD}.Debug.Build.0 = Debug|Win32 + {E313700D-F9A5-494E-B02E-7B3F351A15AD}.Release.ActiveCfg = Release|Win32 + {E313700D-F9A5-494E-B02E-7B3F351A15AD}.Release.Build.0 = Release|Win32 + {F83A4960-9687-42C4-B722-14A028A9C393}.Debug.ActiveCfg = Debug|Win32 + {F83A4960-9687-42C4-B722-14A028A9C393}.Debug.Build.0 = Debug|Win32 + {F83A4960-9687-42C4-B722-14A028A9C393}.Release.ActiveCfg = Release|Win32 + {F83A4960-9687-42C4-B722-14A028A9C393}.Release.Build.0 = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32 + {6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/visual c/dlls/dlls.suo b/ediv/src/visual c/dlls/dlls.suo new file mode 100644 index 0000000..eac58ce Binary files /dev/null and b/ediv/src/visual c/dlls/dlls.suo differ diff --git a/ediv/src/visual c/dlls/dlls.vssscc b/ediv/src/visual c/dlls/dlls.vssscc new file mode 100644 index 0000000..cde82f3 --- /dev/null +++ b/ediv/src/visual c/dlls/dlls.vssscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:visual c\\dlls" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/ediv/src/visual c/ediv.sln b/ediv/src/visual c/ediv.sln new file mode 100644 index 0000000..d341127 --- /dev/null +++ b/ediv/src/visual c/ediv.sln @@ -0,0 +1,47 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ediv", "ediv.vcproj", "{71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encrypt", "encrypt\encrypt.vcproj", "{06AD5956-F8F6-458E-B514-117CB12CEBDE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stub", "stub\stub.vcproj", "{D8C297FE-5A3C-4023-B089-7C4387DA7840}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Debug con trazador + ConfigName.2 = Release + ConfigName.3 = Release con trazador + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Debug.ActiveCfg = Debug|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Debug.Build.0 = Debug|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Debug con trazador.ActiveCfg = Debug|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Debug con trazador.Build.0 = Debug|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Release.ActiveCfg = Release|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Release.Build.0 = Release|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Release con trazador.ActiveCfg = Release|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Release con trazador.Build.0 = Release|Win32 + {06AD5956-F8F6-458E-B514-117CB12CEBDE}.Debug.ActiveCfg = Debug|Win32 + {06AD5956-F8F6-458E-B514-117CB12CEBDE}.Debug.Build.0 = Debug|Win32 + {06AD5956-F8F6-458E-B514-117CB12CEBDE}.Debug con trazador.ActiveCfg = Debug|Win32 + {06AD5956-F8F6-458E-B514-117CB12CEBDE}.Debug con trazador.Build.0 = Debug|Win32 + {06AD5956-F8F6-458E-B514-117CB12CEBDE}.Release.ActiveCfg = Release|Win32 + {06AD5956-F8F6-458E-B514-117CB12CEBDE}.Release.Build.0 = Release|Win32 + {06AD5956-F8F6-458E-B514-117CB12CEBDE}.Release con trazador.ActiveCfg = Release|Win32 + {06AD5956-F8F6-458E-B514-117CB12CEBDE}.Release con trazador.Build.0 = Release|Win32 + {D8C297FE-5A3C-4023-B089-7C4387DA7840}.Debug.ActiveCfg = Debug|Win32 + {D8C297FE-5A3C-4023-B089-7C4387DA7840}.Debug.Build.0 = Debug|Win32 + {D8C297FE-5A3C-4023-B089-7C4387DA7840}.Debug con trazador.ActiveCfg = Debug con trazador|Win32 + {D8C297FE-5A3C-4023-B089-7C4387DA7840}.Debug con trazador.Build.0 = Debug con trazador|Win32 + {D8C297FE-5A3C-4023-B089-7C4387DA7840}.Release.ActiveCfg = Release|Win32 + {D8C297FE-5A3C-4023-B089-7C4387DA7840}.Release.Build.0 = Release|Win32 + {D8C297FE-5A3C-4023-B089-7C4387DA7840}.Release con trazador.ActiveCfg = Release con trazador|Win32 + {D8C297FE-5A3C-4023-B089-7C4387DA7840}.Release con trazador.Build.0 = Release con trazador|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/visual c/ediv.suo b/ediv/src/visual c/ediv.suo new file mode 100644 index 0000000..0322b45 Binary files /dev/null and b/ediv/src/visual c/ediv.suo differ diff --git a/ediv/src/visual c/ediv.vcproj b/ediv/src/visual c/ediv.vcproj new file mode 100644 index 0000000..e1363dd --- /dev/null +++ b/ediv/src/visual c/ediv.vcproj @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/visual c/ediv.vcproj.vspscc b/ediv/src/visual c/ediv.vcproj.vspscc new file mode 100644 index 0000000..cd2ec3c --- /dev/null +++ b/ediv/src/visual c/ediv.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:visual c" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/ediv/src/visual c/ediv_ws.dsw b/ediv/src/visual c/ediv_ws.dsw new file mode 100644 index 0000000..11d4a95 --- /dev/null +++ b/ediv/src/visual c/ediv_ws.dsw @@ -0,0 +1,77 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "b2f"="..\bmp2fnt\b2f.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "doku"=".\doku\doku.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ediv"=".\ediv\ediv.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "encrypt"=".\encrypt\encrypt.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "stub"=".\stub\stub.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ediv/src/visual c/ediv_ws.sln b/ediv/src/visual c/ediv_ws.sln new file mode 100644 index 0000000..1d6d3db --- /dev/null +++ b/ediv/src/visual c/ediv_ws.sln @@ -0,0 +1,57 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "b2f", "..\bmp2fnt\b2f.vcproj", "{EBA9C0C6-5748-4480-A478-8F5C213BB1CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encrypt", "encrypt\encrypt.vcproj", "{77065768-F682-4204-B28D-33B4C223B86A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stub", "stub\stub.vcproj", "{031F4A82-8932-473D-8B8E-58117559261C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ediv", "ediv.vcproj", "{71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Debug con trazador + ConfigName.2 = Release + ConfigName.3 = Release con trazador + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Debug.ActiveCfg = Debug|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Debug.Build.0 = Debug|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Debug con trazador.ActiveCfg = Debug|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Debug con trazador.Build.0 = Debug|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Release.ActiveCfg = Release|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Release.Build.0 = Release|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Release con trazador.ActiveCfg = Release|Win32 + {EBA9C0C6-5748-4480-A478-8F5C213BB1CE}.Release con trazador.Build.0 = Release|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Debug.ActiveCfg = Debug|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Debug.Build.0 = Debug|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Debug con trazador.ActiveCfg = Debug|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Debug con trazador.Build.0 = Debug|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Release.ActiveCfg = Release|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Release.Build.0 = Release|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Release con trazador.ActiveCfg = Release|Win32 + {77065768-F682-4204-B28D-33B4C223B86A}.Release con trazador.Build.0 = Release|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Debug.ActiveCfg = Debug|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Debug.Build.0 = Debug|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Debug con trazador.ActiveCfg = Debug con trazador|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Debug con trazador.Build.0 = Debug con trazador|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Release.ActiveCfg = Release|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Release.Build.0 = Release|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Release con trazador.ActiveCfg = Release con trazador|Win32 + {031F4A82-8932-473D-8B8E-58117559261C}.Release con trazador.Build.0 = Release con trazador|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Debug.ActiveCfg = Debug|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Debug.Build.0 = Debug|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Debug con trazador.ActiveCfg = Debug|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Debug con trazador.Build.0 = Debug|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Release.ActiveCfg = Release|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Release.Build.0 = Release|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Release con trazador.ActiveCfg = Release|Win32 + {71FE365F-FF4F-4DC2-ABB6-E6F8173DBA40}.Release con trazador.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/ediv/src/visual c/ediv_ws.suo b/ediv/src/visual c/ediv_ws.suo new file mode 100644 index 0000000..c1bef42 Binary files /dev/null and b/ediv/src/visual c/ediv_ws.suo differ diff --git a/ediv/src/visual c/ediv_ws.vssscc b/ediv/src/visual c/ediv_ws.vssscc new file mode 100644 index 0000000..cd2ec3c --- /dev/null +++ b/ediv/src/visual c/ediv_ws.vssscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:visual c" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/ediv/src/visual c/encrypt/encrypt.vcproj b/ediv/src/visual c/encrypt/encrypt.vcproj new file mode 100644 index 0000000..2a18c11 --- /dev/null +++ b/ediv/src/visual c/encrypt/encrypt.vcproj @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/visual c/encrypt/encrypt.vcproj.vspscc b/ediv/src/visual c/encrypt/encrypt.vcproj.vspscc new file mode 100644 index 0000000..ffd1e21 --- /dev/null +++ b/ediv/src/visual c/encrypt/encrypt.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:visual c\\encrypt" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/ediv/src/visual c/stub/stub.vcproj b/ediv/src/visual c/stub/stub.vcproj new file mode 100644 index 0000000..7edd89b --- /dev/null +++ b/ediv/src/visual c/stub/stub.vcproj @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ediv/src/visual c/stub/stub.vcproj.vspscc b/ediv/src/visual c/stub/stub.vcproj.vspscc new file mode 100644 index 0000000..65b6317 --- /dev/null +++ b/ediv/src/visual c/stub/stub.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:visual c\\stub" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/ediv/todo.txt b/ediv/todo.txt new file mode 100644 index 0000000..6879db0 --- /dev/null +++ b/ediv/todo.txt @@ -0,0 +1,65 @@ +yo me lio con estos ficheros todo, asi k pongo mi propia seccion todo ( Riseven ) xDD +- cambiar el trasparency (255-0) a (0-255) +- valores por defecto de las variables locales +- indexado de estructuras +- variables privadas +- nuevo valor de flags ( +8 -> modo 50% / Trasparency ) + + +Cosas por hacer cuanto antes: + +- Añadir mnemónicos al kernel del stub (acabar los normales y añadir los + optimizados, y los de byte, word y string) +- Al compilar con --debug, añadir el codigo fuente comprimido al exe, en + lugar de la ruta absoluta hacia el .prg (ya que si no el trazador daria + problemas si modificamos el prg despues de haber creado el exe) +- Hacer desaparecer la tabla procs_s y sustituirla por variables indexadas +- Revisar muchísimo el kernel del stub (compilar cosas, debugear...) +- Entender el stub ke no me empano de na xD y limpiarlo un pokito de paso +- Actualizar los makefiles y proyectos de KDevelop, y comprobar que rule + bien bajo Linux +- Hacer unos msgbox decentes para Linux, con X11 a pelo o con una libreria + pekeñita (ver error.c del stub) +- Adaptar la rutina de MOTD a Linux +- Documentarlo todo, ahora tenemos el DOKU, kien no lo tenga ke se lo pida + a Er_Makina :) +- A la hora de implementar la funcion qsort(), hay que introducir una nueva + función a ediv_export y modificar la toma y compilación de parámetros en + expresion.c + + +Cosas a implementar a medio plazo: +- Compilar para otros sistemas, como MacOS X (sourceforge rlz) + lo dificil será encontrar gente pa testear :P +- Trazador +- Macroinstrucciones EML? + (nota: si se hacen, SE AÑADEN a los opcodes que ya hay, podriamos hacer + un "nivel 2 de compilacion". de lo ke paso totalmente es de sustituir los + opcodes actuales, lo que supondria reescribir el compilador y el stub) + +- Tablas de strings: + + string str[3,4][20] <-- inicializa una tabla de strings de 3x4 registros + de 20 caracteres cada uno + +- Tipos definidos por usuario, como en Fenix <- ¿? + + +Cosas ya hechas: + +- Archivos de configuracion, ediv.cfg (opciones de compilacion, server de + MOTD, etc) y priority.cfg (prioridades de DLLs) +- Depurar bestialmente ediv_export y cosas relacionadas (y añadir funciones + autoejecutables estilo post_process_buffer) +- Al final todo el asunto de los graficos lo gestionará la graphics.dll, ten- + drá prioridad 512 (máxima) y utilizará el sistema de entrypoints +- Meter en el STUB las rutinas de |RooT| y Riseven +- Rediseñar el sistema de stubs para dar cabida a versiones con y sin debugger: + + Win32.dbg + Win32.rel + Linux.dbg + Linux.rel + + Indicar al compilador a qué sistema compilar usando el parámetro -s, --system + (compilación cruzada), por defecto el sistema actual