"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "ocre-0.029/ocre/src/artefactos.c" of archive ocre_v0_029.tgz:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1
2 #include "glifos.h"
3 #include "imag0.h"
4 #include "imag.h"
5 #include "lista.h"
6
7 void quitadeArboles (tglifo glifo)
8 {
9 tvent ventana = glifo->venDeGlifo;
10 // tvent ventanaBase = ventana->venBase;
11 tvent ventanaBase ;
12 tglifo glifoBase = glifo->glifBase;
13 // ventana = glifo->venDeGlifo;
14 // ventanaBase = ventana->venBase;
15 // glifoBase = glifo->glifBase;
16 //
17 // quita glifo de glifoBase
18 eliminaNGlifodelista(glifoBase->listaGlifos, nodolglifoDeGlifo(glifo));
19 // quita ventana de ventanaBase
20 if (ventana != 0L) {
21 ventanaBase = ventana->venBase;
22 // eliminaItemdelista (ventanaBase->lvint, (tpgen) ventana);
23 }
24 // se puede aņadir glifo a lista de artefactos de glifo_columna
25 // se puede aņadir ventana a lista de artefactos de ventana_columna
26 }
27
28 void quitaUnArtefacto (tglifo glifo)
29 {
30 tvent ventana;
31 // tglifo glifoBase;
32 if (glifo->tipo == glifArtf) {
33 // printf ("==>1\n");
34 ventana = glifo->venDeGlifo;
35 if (ventana->tx * ventana->ty == 0) {
36 // describeGlifo(glifo,0);
37 // glifoBase = glifo->glifBase;
38 // describeGlifo(glifoBase,1);
39 // describeVentana(glifoBase->venDeGlifo,1);
40 quitadeArboles (glifo); // y ventana, y ...
41 }
42 }
43 }
44
45 void quitaUnaPalabraVacia (tglifo glifo)
46 {
47 if (glifo->tipo == glifCompPal) {
48 if (listadglifoVacia (glifo->listaGlifos))
49 quitadeArboles (glifo); // ... glifo_palabra si no hay mas
50 }
51 }
52
53 void quitaEspaciosBlancosdeSobra (tglifo glifo)
54 {
55 tglifo glPrimero, glAnteultimo;
56 if (glifo->tipo == glifCompLin) {
57 glPrimero = glifo->listaGlifos->primero->aglifo;
58 if (glPrimero->tipo == glifBlan)
59 eliminaNGlifodelista(glifo->listaGlifos, glifo->listaGlifos->primero);
60 if (glifo->listaGlifos->ultimo->anterior != 0L) {
61 glAnteultimo = glifo->listaGlifos->ultimo->anterior->aglifo;
62 if (glAnteultimo->tipo == glifBlan)
63 eliminaNGlifodelista(glifo->listaGlifos,
64 glifo->listaGlifos->ultimo->anterior);
65 }
66 }
67 }
68
69 void quitaLineaVacia (tglifo glifo)
70 {
71 tglifo glPrimero;
72 if (glifo->tipo == glifCompLin) {
73 glPrimero = glifo->listaGlifos->primero->aglifo;
74 if (glPrimero->tipo == glifClin){
75 eliminaNGlifodelista(glifo->listaGlifos, glifo->listaGlifos->primero);
76 quitadeArboles (glifo);
77 }
78 }
79 }
80
81 void quitaArtefactos (tglifo glifoColumnaP)
82 {
83 aplicaGtRFn (glifoColumnaP, glifArtf, quitaUnArtefacto);
84 aplicaGtRFn (glifoColumnaP, glifCompPal, quitaUnaPalabraVacia);
85 aplicaGtRFn (glifoColumnaP, glifCompLin, quitaEspaciosBlancosdeSobra);
86 aplicaGtRFn (glifoColumnaP, glifCompLin, quitaLineaVacia);
87 }
88