elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


  Mostrar Mensajes
Páginas: [1]
1  Programación / Programación C/C++ / Re: Error en comentarios // en: 2 Junio 2011, 06:48 am
Existiría la posibilidad si dependiera de mi esa elección, pero es mandato de la universidad.

Aun así por simple curiosidad, y aunque no conocía codeblocks, supongo que buscando con San Google encontraré rápidamente de donde bajarlo.

Aqui tienes el codigo del log de errores:


Código
  1. Compilador: Default compiler
  2. Building Makefile: "C:\Users\...........\Documents\...............\Makefile.win"
  3. Ejecutando  make clean
  4. rm -f inout.o marnet.o prac.o prac3_private.res prac3.exe
  5. gcc.exe -D__DEBUG__ -c inout.c -o inout.o -I"C:/Dev-Cpp/include"    -ansi -O2 -pg -g3
  6. gcc.exe -D__DEBUG__ -c marnet.c -o marnet.o -I"C:/Dev-Cpp/include"    -ansi -O2 -pg -g3
  7. marnet.c: In function `sup_del_furniture':
  8. marnet.c:399: error: syntax error before '/' token
  9. marnet.c:399: error: missing terminating ' character
  10. marnet.c:404: error: `current' undeclared (first use in this function)
  11. marnet.c:404: error: (Each undeclared identifier is reported only once
  12. marnet.c:404: error: for each function it appears in.)
  13. marnet.c:409: error: syntax error before '/' token
  14. marnet.c:413: error: missing terminating ' character
  15. marnet.c: At top level:
  16. marnet.c:418: error: missing terminating ' character
  17. marnet.c:425: error: missing terminating ' character
  18. marnet.c:430: error: missing terminating ' character
  19. marnet.c: In function `sup_set_profitMargin':
  20. marnet.c:453: error: syntax error before '/' token
  21. marnet.c: At top level:
  22. marnet.c:465: error: syntax error before '/' token
  23. marnet.c:471: error: syntax error before '/' token
  24. marnet.c:473: error: `aux' undeclared here (not in a function)
  25. marnet.c:473: error: initializer element is not constant
  26. marnet.c:473: warning: data definition has no type or storage class
  27. marnet.c:475: error: syntax error before "return"
  28. marnet.c: In function `supOrder_create':
  29. marnet.c:483: error: syntax error before '/' token
  30. marnet.c:489: error: syntax error before '/' token
  31. marnet.c:496: error: syntax error before '/' token
  32. marnet.c: At top level:
  33. marnet.c:510: error: syntax error before "else"
  34. marnet.c:515: error: invalid type argument of `->'
  35. marnet.c:515: warning: data definition has no type or storage class
  36. marnet.c:516: error: syntax error before '->' token
  37. marnet.c:518: error: syntax error before '&' token
  38. marnet.c:518: error: conflicting types for 'get_current_date'
  39. marnet.c:28: error: previous definition of 'get_current_date' was here
  40. marnet.c:518: warning: data definition has no type or storage class
  41. marnet.c:519: error: syntax error before '->' token
  42. marnet.c:524: error: invalid type argument of `->'
  43. marnet.c:524: warning: data definition has no type or storage class
  44. marnet.c:525: error: syntax error before '}' token
  45. marnet.c: In function `get_furniture':
  46. marnet.c:538: error: syntax error before '/' token
  47. marnet.c:548: error: syntax error before '/' token
  48. marnet.c:552: error: syntax error before '/' token
  49. marnet.c: In function `delivery_time':
  50. marnet.c:569: error: syntax error before '/' token
  51. marnet.c:573: error: syntax error before '/' token
  52. marnet.c:577: error: syntax error before '/' token
  53. marnet.c: In function `warehouse_stock':
  54. marnet.c:600: error: syntax error before '/' token
  55. marnet.c: At top level:
  56. marnet.c:610: error: syntax error before '}' token
  57. marnet.c: In function `sort_supOrder':
  58. marnet.c:691: error: syntax error before '/' token
  59. marnet.c:699: error: syntax error before '/' token
  60. marnet.c:705: error: `supOrders' undeclared (first use in this function)
  61. marnet.c:711: error: syntax error before '/' token
  62. marnet.c:715: error: syntax error before '/' token
  63. marnet.c:716: error: syntax error before ')' token
  64. marnet.c: At top level:
  65. marnet.c:727: error: invalid type argument of `->'
  66. marnet.c:727: warning: data definition has no type or storage class
  67. marnet.c:728: error: syntax error before '}' token
  68. marnet.c:729: error: conflicting types for 'aux'
  69. marnet.c:727: error: previous definition of 'aux' was here
  70. marnet.c:729: error: conflicting types for 'aux'
  71. marnet.c:727: error: previous definition of 'aux' was here
  72. marnet.c:729: error: `supOrders' undeclared here (not in a function)
  73. marnet.c:729: error: `i' undeclared here (not in a function)
  74. marnet.c:729: warning: data definition has no type or storage class
  75. marnet.c:730: error: syntax error before '->' token
  76. make.exe: *** [marnet.o] Error 1
  77. Ejecución Terminada
  78.  
2  Programación / Programación C/C++ / Re: Error en comentarios // en: 31 Mayo 2011, 19:02 pm
En el archivo de cabecera solo vienen las predeclaraciones de las funciones, y alli no da ningun error. Todos los errores los da en este archivo.
3  Programación / Programación C/C++ / Re: Error en comentarios // en: 31 Mayo 2011, 13:31 pm
Este es el código que da error en todos los comentarios con doble barra, y en los comentarios con barra y asterisco no da error. ¿Porque ocurre esto?

Código
  1. /*****************************************************************************
  2.          PRAC3
  3. ******************************************************************************/
  4.  
  5. /****************************************************************************
  6.          Includes
  7. ******************************************************************************/
  8. #include <stdlib.h>
  9. #include <stdio.h>
  10. #include <string.h>
  11. #include <time.h>
  12. #include "marnet.h"
  13.  
  14. /******************************************************************************
  15.          Funcions bàsiques
  16. ******************************************************************************/
  17.  
  18. void init_date (tDate *d)
  19. {
  20.     d->minutes =0;
  21.     d->hour = 0;
  22.     d->day = 0;
  23.     d->month = 0;
  24.     d->year = 0;
  25. }
  26.  
  27. void get_current_date(tDate *d)
  28. {
  29.      time_t now;
  30.      struct tm *tm;
  31.  
  32.      now = time(0);
  33.      tm = localtime(&now);
  34.  
  35.      d->year = tm->tm_year+1900;
  36.      d->month = tm->tm_mon+1;
  37.      d->day = tm->tm_mday;
  38.      d->hour =  tm->tm_hour+1;
  39.      d->minutes = tm->tm_min+1;
  40. }
  41.  
  42. /*****
  43.          Funcions bàsiques tSupplier
  44. ******/
  45. tSupplier newSupplier()
  46. {
  47.      int i;
  48.      tSupplier sup;
  49.  
  50.      sup.idSupplier = 0;
  51.      sup.name[0] = '\0';
  52.      sup.addr[0] = '\0';
  53.      for( i = 0; i < MAX_PHONE; i++ )
  54.           sup.phone[i] = 0;
  55.      sup.firstFur = NULL;
  56.      sup.currFur = NULL;          
  57.      sup.profitMargin = 0.0;
  58.  
  59.      return sup;
  60. }
  61.  
  62. int sup_get_id( tSupplier s )
  63. {
  64.    return s.idSupplier;
  65. }
  66.  
  67. void sup_set_id( tSupplier *s, int i )
  68. {
  69.    s->idSupplier = i;
  70. }
  71. void sup_get_name( tSupplier s, tString *st )
  72. {
  73.    strcpy( *st, s.name );
  74. }
  75. void sup_set_name( tSupplier *s, tString n )
  76. {    
  77.    strcpy( s->name, n );
  78. }
  79. void sup_get_addr( tSupplier s, tString *st )
  80. {
  81.     strcpy( *st, s.addr );
  82. }
  83. void sup_set_add( tSupplier *s, tString n )
  84. {    
  85.    strcpy( s->addr, n );
  86. }
  87. void sup_get_phone( tSupplier s, int phone[MAX_PHONE] )
  88. {
  89.     int i;
  90.     for( i = 0; i < MAX_PHONE; i++ )
  91.           phone[i] = s.phone[i];
  92. }
  93. void sup_set_phone( tSupplier *s, int phone[MAX_PHONE] )
  94. {    
  95.      int i;
  96.      for( i = 0; i < MAX_PHONE; i++ )
  97.           s->phone[i] = phone[i];
  98. }
  99.  
  100. /*****
  101.          Funcions bàsiques tFurniture
  102. *****/
  103. tFurniture newFurniture()
  104. {
  105.    int i;
  106.    tFurniture fur;
  107.  
  108.    fur.idFurniture = 0;
  109.    fur.idSup = 0;
  110.    fur.nameFur[0] = '\0';
  111.    for( i = 0; i < MAX_SIZES; i++ )
  112.       fur.sizes[i] = 0.0;
  113.    fur.typeFur[0] = '\0';
  114.    fur.color = white;
  115.    fur.costPrice = 0.0;
  116.    fur.retailPrice = 0.0;
  117.    fur.deliveryTime = 0;
  118.    fur.prevFur = NULL;
  119.    fur.nextFur = NULL;
  120.    fur.prevFurType = NULL;
  121.    fur.nextFurType = NULL;
  122.  
  123.    return fur;
  124. }
  125.  
  126. int fur_get_id( tFurniture f )
  127. {
  128.    return f.idFurniture;
  129. }
  130. void fur_set_id( tFurniture *f, int i )
  131. {
  132.    f->idFurniture = i;
  133. }
  134. int fur_get_idSupplier( tFurniture f )
  135. {
  136.    return f.idSup;
  137. }
  138. void fur_set_idSupplier( tFurniture *f, int i )
  139. {
  140.    f->idSup = i;
  141. }
  142. void fur_get_name( tFurniture f, tString *st )
  143. {
  144.    strcpy( *st, f.nameFur );
  145. }
  146. void fur_set_name( tFurniture *f, tString n )
  147. {    
  148.    strcpy( f->nameFur, n );
  149. }
  150. void fur_get_sizes( tFurniture f, float r[MAX_SIZES] )
  151. {
  152.     int i;
  153.     for( i = 0; i < MAX_SIZES; i++ )
  154.           r[i] = f.sizes[i];
  155. }
  156. void fur_set_sizes( tFurniture *f, float r[MAX_SIZES] )
  157. {    
  158.      int i;
  159.      for( i = 0; i < MAX_SIZES; i++ )
  160.           f->sizes[i] = r[i];
  161. }
  162. void fur_get_type( tFurniture f, tString *st )
  163. {
  164.    strcpy( *st, f.typeFur );
  165. }
  166. void fur_set_type( tFurniture *f, tString n )
  167. {    
  168.    strcpy( f->typeFur, n );
  169. }
  170. tColor fur_get_color( tFurniture f )
  171. {
  172.    return f.color;
  173. }
  174. void fur_set_color( tFurniture *f, tColor c )
  175. {
  176.    f->color = c;
  177. }
  178. float fur_get_costPrice( tFurniture f )
  179. {
  180.    return f.costPrice;
  181. }
  182. void fur_set_costPrice( tFurniture *f, float r )
  183. {
  184.    f->costPrice = r;
  185. }
  186. float fur_get_retailPrice( tFurniture f )
  187. {
  188.    return f.retailPrice;
  189. }
  190. void fur_set_retailPrice( tFurniture *f, float r )
  191. {
  192.    f->retailPrice = r;
  193. }
  194. int fur_get_deliveryTime( tFurniture f )
  195. {
  196.    return f.deliveryTime;
  197. }
  198. void fur_set_deliveryTime( tFurniture *f, int i )
  199. {
  200.    f->deliveryTime = i;
  201. }
  202.  
  203. /*****
  204.          Funcions bàsiques tCustomerOrder
  205. *****/
  206. tCustomerOrder newCustOrder()
  207. {
  208.    int i;
  209.    tCustomerOrder co;
  210.  
  211.    co.idOrder = 0;
  212.    co.nameCust[0] = '\0';
  213.    co.addrCust[0] = '\0';
  214.    for( i = 0; i < MAX_PHONE; i++ )
  215.        co.phoneCust[i] = 0;
  216.    init_date(&co.createdDate);
  217.    co.state = cPending;
  218.    co.firstItem = NULL;
  219.    co.currItem = NULL;
  220.    co. nextCustOrder = NULL;
  221.  
  222.    return co;
  223. }
  224.  
  225. int custOrd_get_id( tCustomerOrder co )
  226. {
  227.    return co.idOrder;
  228. }
  229. void custOrd_set_id( tCustomerOrder *co, int i )
  230. {
  231.    co->idOrder = i;
  232. }
  233. void custOrd_get_name( tCustomerOrder co, tString *st )
  234. {
  235.    strcpy( *st, co.nameCust );
  236. }
  237. void custOrd_set_name( tCustomerOrder *co, tString n )
  238. {    
  239.    strcpy( co->nameCust, n );
  240. }
  241. void custOrd_get_addr( tCustomerOrder co, tString *st )
  242. {
  243.    strcpy( *st, co.addrCust );
  244. }
  245. void custOrd_set_addr( tCustomerOrder *co, tString n )
  246. {    
  247.    strcpy( co->addrCust, n );
  248. }
  249. void custOrd_get_phone( tCustomerOrder co, int phone[MAX_PHONE] )
  250. {
  251.     int i;
  252.     for( i = 0; i < MAX_PHONE; i++ )
  253.           phone[i] = co.phoneCust[i];
  254. }
  255. void custOrd_set_phone( tCustomerOrder *co, int phone[MAX_PHONE] )
  256. {    
  257.      int i;
  258.      for( i = 0; i < MAX_PHONE; i++ )
  259.           co->phoneCust[i] = phone[i];
  260. }
  261. tDate custOrd_get_createdDate( tCustomerOrder co )
  262. {
  263.    return co.createdDate;
  264. }
  265. void custOrd_set_createdDate( tCustomerOrder *co, tDate td )
  266. {    
  267.    co->createdDate = td;
  268. }
  269. tCustState custOrd_get_state( tCustomerOrder co )
  270. {
  271.    return co.state;
  272. }
  273. void custOrd_set_state( tCustomerOrder *co, tCustState st )
  274. {    
  275.    co->state = st;
  276. }
  277.  
  278.  
  279. /*****
  280.          Funcions bàsiques tOrderRow
  281. *****/
  282. int orderRow_get_idProv( tOrderRow o )
  283. {
  284.    return o.idProv;
  285. }
  286. void orderRow_set_idProv( tOrderRow *o, int i )
  287. {
  288.    o->idProv = i;
  289. }
  290. int orderRow_get_idFur( tOrderRow o )
  291. {
  292.    return o.idFur;
  293. }
  294. void orderRow_set_idFur( tOrderRow *o, int i )
  295. {
  296.    o->idFur = i;
  297. }
  298. int orderRow_get_unit( tOrderRow o )
  299. {
  300.    return o.unit;
  301. }
  302. void orderRow_set_unit( tOrderRow *o, int i )
  303. {
  304.    o->unit = i;
  305. }
  306. float orderRow_get_unitCostPrice( tOrderRow o )
  307. {
  308.    return o.unitCostPrice;
  309. }
  310. void orderRow_set_unitCostPrice( tOrderRow *o, float i )
  311. {
  312.    o->unitCostPrice = i;
  313. }
  314. float orderRow_get_profitMargin( tOrderRow o )
  315. {
  316.    return o.profitMargin;
  317. }
  318. void orderRow_set_profitMargin( tOrderRow *o, float i )
  319. {
  320.    o->profitMargin = i;
  321. }
  322.  
  323. /*****
  324.          Funcions bàsiques tSupplierOrder
  325. *****/
  326. tSupplierOrder *newSupplierOrder()
  327. {
  328.      int i;
  329.      tSupplierOrder *supOrd;
  330.  
  331.      supOrd = malloc(sizeof(tSupplierOrder));
  332.  
  333.      supOrd->idOrder = 0;
  334.      supOrd->idSupplier = 0;
  335.      init_date(&supOrd->createdDate);
  336.      init_date(&supOrd->receivedDate);
  337.      supOrd->state = sPending;
  338.      supOrd->firstItem = NULL;
  339.      supOrd->currItem = NULL;
  340.      supOrd->totalPrice = 0;
  341.      supOrd->nextSupOrder = NULL;
  342.  
  343.      return supOrd;
  344. }
  345. int supOrd_get_id( tSupplierOrder so )
  346. {
  347.    return so.idOrder;
  348. }
  349. void supOrd_set_id( tSupplierOrder *so, int i )
  350. {
  351.    so->idOrder = i;
  352. }
  353. int supOrd_get_idSupplier( tSupplierOrder so )
  354. {
  355.    return so.idSupplier;
  356. }
  357. void supOrd_set_idSupplier( tSupplierOrder *so, int i )
  358. {
  359.    so->idSupplier = i;
  360. }
  361. tDate supOrd_get_createdDate( tSupplierOrder so )
  362. {
  363.    return so.createdDate;
  364. }
  365. void supOrd_set_createdDate( tSupplierOrder *so, tDate td )
  366. {    
  367.    so->createdDate = td;
  368. }
  369. tDate supOrd_get_receivedDate( tSupplierOrder so )
  370. {
  371.    return so.receivedDate;
  372. }
  373. void supOrd_set_receivedDate( tSupplierOrder *so, tDate td )
  374. {    
  375.    so->receivedDate = td;
  376. }
  377. tSupState supOrd_get_state( tSupplierOrder so )
  378. {
  379.    return so.state;
  380. }
  381. void supOrd_set_state( tSupplierOrder *so, tSupState st )
  382. {
  383.    so->state = st;
  384. }
  385. float supOrd_get_totalPrice( tSupplierOrder so )
  386. {
  387.    return so.totalPrice;
  388. }
  389. void supOrd_set_totalPrice( tSupplierOrder *so, float r )
  390. {
  391.    so->totalPrice = r;
  392. }
  393.  
  394. /*****
  395.          Funcions basiques: Esborrar moble del cataleg d'un proveidor
  396. *****/
  397. void sup_del_furniture (tSupplier *s, tFurniture f)
  398. {
  399.     // recuperem la llista de tFurniture's del supplier
  400.     tFurniture *current;
  401.  
  402.     // Busquem el moble a esborrar
  403.     current = s->firstFur;
  404.     while( (current != NULL) && (current->idFurniture != f.idFurniture))
  405.     {
  406.            current = current->nextFur;
  407.     }
  408.  
  409.     // Si hem trobat el moble: actualitzem apuntadors de les llistes doblement encadenades a les queal pentany
  410.     if( current->idFurniture == f.idFurniture )
  411.     {
  412.         // Llista de mobles de tSupplier
  413.         // Actualitzem apuntador seguent de prevFur a l'element seguent al que estem esborrant
  414.         if( current->prevFur )
  415.         {
  416.             current->prevFur->nextFur = current->nextFur;
  417.         }
  418.         // Actualitzem apuntador anterior de nextFur a l'element anterio al que estem esborrant
  419.         if( current->nextFur )
  420.         {
  421.             current->nextFur->prevFur = current->prevFur;
  422.         }
  423.  
  424.         // Llista de mobles de tType
  425.         // Actualitzem apuntador seguent de prevFurType a l'element seguent al que estem esborrant
  426.         if( current->prevFurType )
  427.         {
  428.             current->prevFurType->nextFurType = current->nextFurType;
  429.         }
  430.         // Actualitzem apuntador anterior de nextFurType a l'element anterio al que estem esborrant
  431.         if( current->nextFurType )
  432.         {
  433.             current->nextFurType->prevFurType = current->prevFurType;
  434.         }
  435.     }
  436. }
  437.  
  438.  
  439. /*****
  440.          Funcions basiques: Crear/Consultar/Modificar el percentatge de beneficis a un preu de cost
  441. *****/
  442. float sup_get_profitMargin (tSupplier s)
  443. {
  444.      return s.profitMargin;
  445. }
  446.  
  447. void sup_set_profitMargin (tSupplier *s, float r)
  448. {
  449.     tFurniture *furAux;
  450.  
  451.     s->profitMargin = r;
  452.  
  453.     // Hem de recorrer tot el cataleg de mobles per actualitzar el PVP amb el nou percentatge de beneficis
  454.     furAux = s->firstFur;
  455.     while(furAux != NULL)
  456.     {
  457.        furAux->retailPrice = furAux->costPrice + (furAux->costPrice * r / 100);
  458.        furAux = furAux->nextFur;
  459.     }
  460. }
  461. /*****
  462.          Funcions basiques: Crear comanda a proveïdors a partir de la comanda del client
  463. *****/
  464.  
  465. // Afegim funcio auxiliar getNewSupIdOrder que ens retorna un nou id de comanda proveidors
  466. int getNewSupIdOrder(int idCustOrder, int idSupplier)
  467. {
  468.    tString aux;
  469.    int newID;
  470.  
  471.    // Per crear un nou idSupplier per a la comanda a proveidors concatenem id comanda client amb id proveidor
  472.    sprintf(aux, "%d%d", idCustOrder, idSupplier);
  473.    newID = atoi(aux);
  474.  
  475.    return newID;
  476. }
  477.  
  478. tSupplierOrder *supOrder_create(tCustomerOrder co)
  479. {
  480.     tOrderRow *rowCus;
  481.     tSupplierOrder *supOrd, *firstSupOrd, *currentSupOrd, *auxSupOrd;
  482.  
  483.     // Inicialitzem la llista
  484.     supOrd = malloc(sizeof(tSupplierOrder));
  485.     // so = NULL;
  486.     firstSupOrd = supOrd;
  487.     currentSupOrd = supOrd;
  488.  
  489.     // Creem un tSupplierOrder per a cadascun dels diferents proveidors que tenim en la comanda de client
  490.  
  491.     // Buscar primer tOrderRow (firstItem) i recorrer tota llista
  492.     rowCus = co.firstItem;
  493.     while(rowCus != NULL)
  494.     {
  495.          auxSupOrd = firstSupOrd;
  496.          // Comprovem si ja tenim inicialitzada una comanda a proveidor
  497.          while((auxSupOrd != NULL) && (rowCus->idProv != auxSupOrd->idSupplier))
  498.          {
  499.                    auxSupOrd = auxSupOrd->nextSupOrder;              
  500.          }
  501.          // Comprovem si hem trobat comanda a proveidor ja inicialitzada
  502.          if(rowCus->idProv == auxSupOrd->idSupplier)
  503.          {
  504.                        //Afegim un nou tOrderRow a la comanda a proveidor
  505.                        rowCus->nextOrderRowSup = NULL;
  506.                        auxSupOrd->currItem->nextOrderRowSup = rowCus;
  507.                        auxSupOrd->currItem = auxSupOrd->currItem->nextOrderRowSup;
  508.                        auxSupOrd->totalPrice += rowCus->unit * rowCus->unitCostPrice;
  509.          }
  510.          else
  511.          {
  512.              // No hem trobat el proveidor a la llista, hem de crear una nova comanda
  513.              currentSupOrd->nextSupOrder = malloc(sizeof(tSupplierOrder));
  514.              currentSupOrd->nextSupOrder = newSupplierOrder();
  515.              currentSupOrd = currentSupOrd->nextSupOrder;
  516.              currentSupOrd->idOrder = getNewSupIdOrder(co.idOrder, currentSupOrd->idSupplier);
  517.              currentSupOrd->idSupplier = rowCus->idProv;
  518.              get_current_date(&currentSupOrd->createdDate);
  519.              rowCus->nextOrderRowSup = NULL;
  520.              currentSupOrd->firstItem = rowCus;
  521.              currentSupOrd->currItem = rowCus;
  522.              currentSupOrd->totalPrice = rowCus->unit * rowCus->unitCostPrice;
  523.          }
  524.          rowCus = rowCus->nextOrderRow;
  525.     }
  526. }
  527.  
  528.  
  529. /*****************************************************************************
  530.          Operacions especials delivery_time i warehouse_stock.
  531. ******************************************************************************/
  532. tFurniture *get_furniture( tShop ts, int idSup, int idFur)
  533. {
  534.           tSupplier sup;
  535.           tFurniture *fur;
  536.           int i;
  537.  
  538.           fur = NULL; //Important per si no trobem proveidor o moble
  539.           i = 0;
  540.  
  541.           // Busquem el proveidor
  542.           while ((i<MAX_SUPPLIERS) && (ts.suppliers[i].idSupplier != idSup))
  543.                 i++;
  544.  
  545.           if(ts.suppliers[i].idSupplier == idSup)
  546.           {
  547.                sup = ts.suppliers[i];
  548.                // Busquem el moble
  549.                fur = sup.firstFur;
  550.                while((fur != NULL) && (fur->idFurniture !=idFur))
  551.                           fur = fur->nextFur;
  552.                // Quan sortim del bucle while o hem trobat el moble o estem al final de la llista
  553.           }
  554.  
  555.           return fur;
  556. }
  557.  
  558. /*****
  559.         delivery_time: Calcula el termini d'entrega d'una comanda client.
  560.         Depèn del màxim termini entrega (per part dels proveïdors) de tota la comanda
  561. ******/
  562. int delivery_time(tShop ts, tCustomerOrder co)
  563. {
  564.    int maxDays;
  565.    tOrderRow *row;
  566.    tFurniture *fur;
  567.  
  568.    maxDays = 0;
  569.    // Per a cada moble en la comanda de client busquem el corresponent tFurniture
  570.    row = co.firstItem;
  571.    while (row != NULL)
  572.    {
  573.          // Busquem moble
  574.          fur = get_furniture(ts, row->idProv, row->idFur);
  575.          if(fur!=NULL)
  576.          {
  577.               // Si el termini entrega es major que el maxim, actualitzem el maxim
  578.               if(maxDays < fur->deliveryTime)
  579.                    maxDays = fur->deliveryTime;
  580.          }
  581.          // Busquem seguent moble
  582.          row = row->nextOrderRow;
  583.    }
  584.  
  585.    return maxDays;
  586. }
  587.  
  588. /*****
  589.         warehouse_stock: Estoc del magatzem, és a dir, llistat de comandes rebudes i pendents d'entregar al client.
  590.         Entenem que llistats surten per pantalla
  591. *****/
  592. void warehouse_stock(tShop ts)
  593. {
  594.     tCustomerOrder *custOrder;
  595.  
  596.     printf("WAREHOUSE STOCK:\n\n");    
  597.     custOrder = ts.firstCustOrder;
  598.     while(custOrder != NULL)
  599.     {
  600.          // Imprimim per pantalla la comanda
  601.          if(custOrder->state == inWarehouse)
  602.          {
  603.               printf("ID:%d\tCUSTOMER:%s\tDATE:%d/%d/%d\tSTATE:%s\n",
  604.                    custOrder->idOrder, custOrder->nameCust,
  605.                    custOrder->createdDate.day, custOrder->createdDate.month,
  606.                    custOrder->createdDate.year, custOrder->state);
  607.          }
  608.          custOrder = custOrder->nextCustOrder;
  609.     }
  610. }
  611.  
  612.  
  613. /*****************************************************************************
  614.          funció sort_supOrder que ordena la llista de comandes a proveïdors
  615.          de manera descendent, segons el preu total de la comanda.
  616.          Per a la ordenació utilitza el mètode de classificació Merge Sort.
  617. ******************************************************************************/
  618.  
  619. /*****
  620.       combine: funcio auxiliar que combina dues llistes de manera ordenada
  621. *****/
  622. void combine (tSupplierOrder out[], int left, int middle, int right, int size)
  623. {
  624.  int r, i, j;
  625.  tSupplierOrder outAux[size];
  626.  
  627.  r = left;
  628.  i = left;
  629.  j = middle + 1;
  630.  
  631.  while ((i <= middle) && (j <= right) && (j < size))
  632.  {
  633.     if(out[i].totalPrice > out[j].totalPrice)
  634.     {
  635.        outAux[r] = out[i];
  636.        i++;
  637.        r++;
  638.     }
  639.     else
  640.     {
  641.          outAux[r] = out[j];
  642.          j++;
  643.          r++;
  644.     }
  645.  }
  646.  
  647.  while(i <= middle)
  648.  {
  649.          outAux[r] = out[i];
  650.          i++;
  651.          r++;
  652.  }
  653.  
  654.  while(j <= right)
  655.  {
  656.          outAux[r] = out[j];
  657.          j++;
  658.          r++;
  659.  }
  660.  
  661.  
  662.  for(i=left; i<=right; i++)
  663.          out[i] = outAux[i];
  664. }
  665.  
  666. /*****
  667.       merge_sort: funcio auxiliar recursiva que aplica el metode Merge Sort
  668. *****/
  669. void merge_sort (tSupplierOrder s[], int left, int right, int size)
  670. {
  671.   int middle;
  672.   tSupplierOrder *listLeft, *listRight;
  673.  
  674.   if (left < right)
  675.   {
  676.      middle = (left + right) / 2;
  677.      merge_sort(s, left, middle, size);
  678.      merge_sort(s, middle+1, right, size);
  679.      combine(s, left, middle, right, size);
  680.   }
  681. }
  682.  
  683. void sort_supOrder(tShop *t)
  684. {
  685.     int left, right, i, rightAux;
  686.     tSupplierOrder *aux, *aux2;
  687.  
  688.     left = 0;
  689.     right = 0;
  690.  
  691.     // Calculem el numero de comandes de proveidors que tenim i ho desem right (limit dret)
  692.     aux = t->firstSupOrder;
  693.     while(aux != NULL)
  694.     {
  695.               right++;
  696.               aux = aux->nextSupOrder;
  697.     }
  698.  
  699.     // Creem una copia de la llista en el vector i anem esborrant i alliberant memoria
  700.     tSupplierOrder supOrders[right];
  701.  
  702.     aux = t->firstSupOrder;
  703.     for(i=0; i<right; i++)
  704.     {
  705.              supOrders[i] = *aux;
  706.              aux2 = aux;
  707.              aux = aux->nextSupOrder;
  708.              free(aux2);
  709.     }
  710.  
  711.     // Cridem a la funcio merge_sort amb el nou vector i els limits Esquerre i Dret
  712.     rightAux = right;
  713.     merge_sort(supOrders, left, right-1, right);
  714.  
  715.     // Mostrem resultats per pantalla
  716.     for(i=0; i<right; i++)
  717.     {
  718.              printf("idOrder:%d\ttotalPrice:%f\n", supOrders[i].idOrder, supOrders[i].totalPrice);
  719.     }
  720.     // Restaurem llista i actualitzem apuntadors
  721.     aux = malloc(sizeof(tSupplierOrder));
  722.     t->firstSupOrder = aux;
  723.     for(i=0; i<right-1; i++)
  724.     {
  725.              *aux = supOrders[i];
  726.              aux->nextSupOrder = malloc(sizeof(tSupplierOrder));
  727.              aux = aux->nextSupOrder;
  728.     }
  729.     *aux = supOrders[i];
  730.     aux->nextSupOrder = NULL;
  731. }
  732.  
  733.  
  734.  
4  Programación / Programación C/C++ / Error en comentarios // en: 31 Mayo 2011, 09:44 am
Hola a todos.

Esta es una cuestión simple para expertos como vosotros.

¿por que me da error el compilador al compilar un programa en todos los comentarios con la doble barra? Es como si no reconociese ese tipo de comentarios.

Y no encuentro el lugar donde indicarle al DEV-C++ para que los reconozca.

Saludos.
Jose.
5  Programación / Programación C/C++ / Problema con punteros. Urgente: por favor. en: 28 Mayo 2011, 20:16 pm
Tengo un problema con un puntero que me esta volviendo loco, hace lo que le da la gana, reserve o no memoria para el. Aqui dejo la estructura:

Código
  1. /*****************************************************************************
  2.          PRAC3
  3. ******************************************************************************/
  4.  
  5. #ifndef MARNET_H
  6. #define MARNET_H
  7.  
  8. /*****************************************************************************
  9.          Constants
  10. ******************************************************************************/
  11. #define MAX_SUPPLIERS   20
  12. #define MAX_CATEGORIES  5
  13. #define MAX_NAME        300
  14. #define MAX_PHONE       9
  15. #define MAX_SIZES       3
  16.  
  17.  
  18. /*****************************************************************************
  19.          TADs
  20. ******************************************************************************/
  21. typedef enum{white, pine, cherryTree, black} tColor;
  22. typedef enum{hall, dinningRoom, bedroom, ofice, kitchen, washroom} tCategoryName;
  23. typedef enum{cPending, inWarehouse, deliveredToClient} tCustState;
  24. typedef enum{sPending, received } tSupState;
  25.  
  26. typedef char tString[MAX_NAME+1];
  27.  
  28. typedef enum { FALSE, TRUE } bool;
  29.  
  30. typedef struct
  31. {
  32.        int day, month, year;
  33.        int hour, minutes;
  34. }tDate;
  35.  
  36. typedef struct tFurniture
  37. {
  38.        int idFurniture;
  39.        int idSup;
  40.        tString nameFur;
  41.        float sizes[MAX_SIZES];
  42.        tString typeFur;
  43.        tColor color;
  44.        float costPrice;
  45.        float retailPrice;
  46.        int deliveryTime;
  47.        struct tFurniture *prevFur, *nextFur;
  48.        struct tFurniture *prevFurType, *nextFurType;
  49. }tFurniture;
  50.  
  51. typedef struct tType
  52. {
  53.        tString typeName;
  54.        tFurniture *firstFur, *currFur;
  55.        struct tType *prevType, *nextType;
  56. } tType;
  57.  
  58. typedef struct
  59. {
  60.      tCategoryName catName;
  61.      tType *primType, *currType;
  62. } tCategory;
  63.  
  64. typedef struct
  65. {
  66.        int idSupplier;
  67.        tString name;
  68.        tString addr;
  69.        int phone[MAX_PHONE];
  70.        tFurniture *firstFur, *currFur;
  71.        float profitMargin;
  72. }tSupplier;
  73.  
  74. typedef struct tOrderRow
  75. {
  76.        int idProv;
  77.        int idFur;
  78.        int unit;
  79.        float unitCostPrice;
  80.        float profitMargin;
  81.        struct tOrderRow *nextOrderRow, *nextOrderRowSup;
  82. }tOrderRow;
  83.  
  84. typedef struct tCustomerOrder
  85. {
  86.        int idOrder;
  87.        tString nameCust;
  88.        tString addrCust;
  89.        int phoneCust[MAX_PHONE];
  90.        tDate createdDate;
  91.        tCustState state;
  92.        tOrderRow *firstItem, *currItem;
  93.        struct tCustomerOrder *nextCustOrder;
  94. }tCustomerOrder;
  95.  
  96. typedef struct tSupplierOrder
  97. {
  98.        int idOrder;
  99.        int idSupplier;
  100.        tDate createdDate;
  101.        tDate receivedDate;
  102.        tSupState state;
  103.        tOrderRow *firstItem, *currItem;
  104.        float totalPrice;
  105.        struct tSupplierOrder *nextSupOrder;                  
  106. }tSupplierOrder;
  107.  
  108. typedef struct
  109. {
  110.        tSupplier suppliers[MAX_SUPPLIERS];
  111.        int currSupplier, numSupplier;
  112.        tCategory categories[MAX_CATEGORIES];
  113.        tCustomerOrder *firstCustOrder, *currCustOrder;
  114.        tSupplierOrder *firstSupOrder, *currSupOrder;
  115. }tShop;
  116.  

Estas son las llamadas que me estan volviendo loco:

Código
  1. void cat_add_furniture (tCategory *c, tFurniture *f )
  2. {
  3.     tType *typeAux, *typeAux2;
  4.     tFurniture *furAux;
  5.  
  6.     typeAux = (tType*) malloc (sizeof(tType));
  7.     if (typeAux == NULL)
  8.     {
  9.                 printf("ERROR cat_add_furniture: not enough memory\n");
  10.                 f = NULL;
  11.                 return;
  12.     }
  13.  
  14.     furAux = (tFurniture*) malloc (sizeof(tFurniture));
  15.     if (furAux == NULL)
  16.     {
  17.                 printf("ERROR cat_add_furniture: not enough memory\n");
  18.                 f = NULL;
  19.                 return;
  20.     }
  21.  
  22.  
  23.   /* Buscamos en la lista tType bajo tCategory*/
  24.     typeAux = c->primType;
  25.  
  26.     while( (typeAux->nextType != NULL) && (typeAux->typeName != f->typeFur))
  27.     {
  28.            typeAux = typeAux->nextType;
  29.     }
  30.     /* Comprobamos si ya tenemos el tType en la lista, sino hemos de añadir un nuevo tType*/
  31.     if( typeAux->typeName == f->typeFur)
  32.     {
  33.         /* Ya tenemos el tipo en la lista, buscamos la posición donde insertar el nuevo mueble.
  34.          También comprobamos que el mueble no haya sido ya insertado.*/
  35.         furAux = typeAux->firstFur;
  36.         while(((furAux->nextFurType != NULL) && (f->idFurniture!=furAux->idFurniture)) || (f->retailPrice > furAux->retailPrice))
  37.         {                    
  38.                furAux = furAux->nextFurType;
  39.         }
  40.         if ( (furAux->idFurniture != f->idFurniture) || (f->retailPrice > furAux->retailPrice) )
  41.         {
  42.            /* Tenemos a furAux apuntando a la ultima posición de la lista o al mueble siguiente
  43.              ordenado por PVP. Añadimos el nuevo mueble, si no existe ya en la lista */
  44.            f->nextFurType = furAux->nextFurType;
  45.            f->prevFurType = furAux->prevFurType;
  46.            furAux->nextFurType = f;
  47.         }
  48.     }
  49.     else
  50.     {
  51.         /* No hemos encontrado el tipo y typeAux esta posicionado al final de la lista. Añadimos el nuevo tipo */
  52.         typeAux2 = (tType*) malloc (sizeof(tType));
  53.         if(typeAux2==NULL)
  54.         {
  55.             printf("ERROR cat_add_furniture: not enough memory\n");
  56.             f = NULL;
  57.             return;
  58.         }
  59.         typeAux->nextType = typeAux2;
  60.         strcpy(typeAux->typeName, f->typeFur);
  61.         typeAux2->prevType = typeAux;
  62.         typeAux2->nextType = NULL;
  63.         typeAux2->firstFur = f;
  64.         typeAux2->currFur = f;
  65.         f->nextFurType = NULL;
  66.         f->prevFurType = NULL;
  67.     }
  68.     free (typeAux);
  69.     free (typeAux2);
  70.     free (furAux);
  71. }
  72.  
  73. int sup_add_furniture(tShop *t)
  74. {
  75.    int i,idSup,idFur,delivery_time,numCat;
  76.    float margin,cost,retail_price,s[MAX_SIZES];
  77.    bool found;
  78.    tString name,type;
  79.    tColor color;
  80.  
  81.    margin = 0.0;
  82.  
  83.    /* Leemos los datos del mueble a añadir */
  84.    printf ("\nSupplier : ");
  85.    idSup = read_integer ();
  86.    idSup = idSup - 1;
  87.  
  88.    printf("\nFurniture id : ");
  89.    idFur = read_integer ();
  90.  
  91.    printf("\nFurniture Name : ");
  92.    read_string (name);
  93.  
  94.    printf("\nFurniture Type : ");
  95.    read_string (type);
  96.  
  97.    printf("\nFurniture width : ");
  98.    s[0]= read_real ();
  99.  
  100.    printf("\nFurniture Height : ");
  101.    s[1] = read_real ();
  102.  
  103.    printf("\nFurniture Depth : ");
  104.    s[2] = read_real ();
  105.  
  106.    printf("\nFurniture Colour : ");
  107.    color = read_colour ();
  108.  
  109.    printf("\nFurniture cost price : ");
  110.    cost = read_real();
  111.  
  112.    printf("\nFurniture Delivery time : ");
  113.    delivery_time = read_integer ();
  114.  
  115.    printf("\nHow many categories? ");
  116.    numCat = read_integer ();
  117.  
  118.    if (numCat>MAX_CATEGORIES)
  119.       numCat = MAX_CATEGORIES;
  120.  
  121.    tCategory cat[numCat];
  122.  
  123.    for (i=0;i<numCat;i++)
  124.    {
  125.        cat[i].catName = hall;
  126.        cat[i].primType = NULL;
  127.        cat[i].currType = NULL;
  128.    }
  129.  
  130.    for (i=0;i<numCat;i++)
  131.    {
  132.        printf("\nEnter a new Category (H:Hall D:diningroom  O:office K:Kitchen B:Bedroom W:Washroom): ");
  133.        cat[i].catName = read_category();
  134.        if (cat[i].catName == -1)
  135.        {
  136.              error ("sup_add_furniture: undefined category");
  137.              return cat[i].catName;              
  138.        }
  139.    }
  140.  
  141.    /* Buscar proveedor al cual tenemos que añadir el mueble. Si no existe acaba el programa con un mensaje de error */
  142.    if (search_supplier (*t,idSup) == -1)
  143.    {
  144.         error (ERROR_SUPPL_NOT_FOUND);
  145.         idSup = -1;
  146.         return idSup;
  147.    }
  148.  
  149.    /* Crear el objeto */
  150.    tFurniture *newFur = (tFurniture*) malloc (sizeof(tFurniture));
  151.    if(newFur==NULL)
  152.         {
  153.             printf("ERROR sup_add_furniture: not enough memory\n");
  154.             idSup= -1;
  155.             return idSup;
  156.         }
  157.    *newFur = newFurniture ();
  158.  
  159.    /* Actualizamos campos del objeto */
  160.    fur_set_idSupplier( newFur, idSup );
  161.    fur_set_id( newFur, idFur );
  162.    fur_set_name( newFur, name );
  163.    fur_set_color( newFur, color );
  164.    fur_set_costPrice( newFur, cost );
  165.    fur_set_deliveryTime(newFur, delivery_time );
  166.    fur_set_sizes( newFur, s );
  167.    fur_set_type( newFur, type );
  168.  
  169.    /* Calcular PVP del mueble : precio de coste + margen de beneficio del proveedor */
  170.  
  171.    if (idSup > -1) margin = sup_get_profitMargin (t->suppliers[idSup]);
  172.    margin = 1 + (margin / 100);
  173.    retail_price = cost * margin;
  174.    fur_set_retailPrice( newFur, retail_price );  
  175.  
  176.    /* Añadir el mueble, dentro de la estructura tShop, a las categorias y tipos correspondientes */
  177.  
  178.    for (i=0;i<numCat;i++)
  179.        cat_add_furniture (&cat[i], newFur );
  180.    if (newFur != NULL)
  181.       idSup = newFur->idSup;
  182.    else
  183.         idSup = -1;
  184.  
  185.    free (newFur);
  186.    return idSup;
  187. }
  188.  

En concreto en la funcion cat_add_furniture, a partir de las lineas donde esta el comentario, /* Buscamos en la lista tType bajo tCategory*/, parece como que no asigna el valor de c->primType a typeAux. Y he probado reservandole memoria y sin reservasela. El resultado siempre es el mismo, entra en el bucle del siguiente while aunque sea el primer registro que graba, y no debería ser así.

Alguien puede aportarme algo de luz al caso.

Gracias.

Saludos.
Chema.
6  Programación / Programación C/C++ / Re: Problema con accceso a estructuras. en: 7 Mayo 2011, 18:57 pm
Hola  Akai.

Gracias por tus consejos y ayudas.

Al final lo resolvi, creandome un tFurniture auxiliar y asignandole el valor del tFurniture original que deseaba enviar a la funcion y no me dejaba, asi se lo pase correctamente. Quedo así la cosa:

Código
  1. void sup_set_profitMargin (tSupplier *s, float r)
  2. {
  3.     tString name;
  4.     float price;
  5.     tFurniture *pf,f;
  6.  
  7.     s->profitMargin = r;
  8.  
  9.     sup_firstFur (s, pf);
  10.  
  11.     if (pf!=NULL)
  12.        {
  13.             sup_get_name(*s,name);
  14.             printf("-----------------------------------------------------------------");
  15.             printf("Supplier: %s \n",name);
  16.  
  17.             if (s->idSupplier == s->currFur->idSup)
  18.                       s->currFur->retailPrice = s->profitMargin * s->currFur->costPrice;
  19.             while (s->currFur!=NULL)
  20.                   {
  21.                        f=*s->currFur;    
  22.                        fur_get_name(f,name);
  23.                        printf("Furniture: %s \t",name);
  24.  
  25.                        price=fur_get_retailPrice(f);
  26.                        printf("Old retail price: %d \t", price);
  27.  
  28.                        s->currFur->retailPrice = s->profitMargin * s->currFur->costPrice;
  29.  
  30.                        f=*s->currFur;
  31.                        price=fur_get_retailPrice(f);
  32.                        printf("New retail price: %d \n", price);
  33.  
  34.                        sup_next_Fur (s,pf);
  35.                   }
  36.             printf("-----------------------------------------------------------------");
  37.        }
  38. }
  39.  

Gracias a todos los que han respondido o me han intentado ayudar, al final salio bien la cosa.

Muchas gracias.

Saludos.
Chema.
7  Programación / Programación C/C++ / Re: Problema con accceso a estructuras. en: 6 Mayo 2011, 20:39 pm
Ya sabia eso acemax, de todas formas gracias por tu aportacion, el caso es como transformo ese parametro en un tFurniture en vez de un puntero, que es lo que ahora mismo tengo, ya que el encabezado de la funcion no lo puedo modificar, y estoy un pelin verde en el tema de pasos por valor o por referencia.

Entiendo cuando debo pasarlos por valor o por referencia pero en C se me resiste como indicarselo para que lo compile correctamente y no de errores. Entonces siempre voy tanteando si le pongo el asterisco, el punto o el ->.

Alguna ayudita con el dichoso puntero?????

Gracias.

Saludos.
Chema.
8  Programación / Programación C/C++ / Re: Problema con accceso a estructuras. en: 6 Mayo 2011, 20:09 pm
Si, perdon, se me olvido colocar el  nombre de la estructura, y parece que al hacerlo ya no me da el fallo de dereferencing, a veces es una tonteria pero cuando te ciegas, es que no hay manera de resolverlo.

Sigo sufriendo el otro fallo de incompatible tipo de argumento, que me sigue dando en la linea que marque con el comentario correspondiente...Alguna sugerencia??????

Gracias por la ayuda Akai.

Saludos.
Chema.
9  Programación / Programación C/C++ / Problema con accceso a estructuras. en: 6 Mayo 2011, 15:07 pm
Hola a todos.

Estoy muy agobiado con una practica de programacion que debo entregar pronto y no se como resolver un problema leve que me ha surgido que me tiene muy atrancado, a ver si me podeis echar un cable y ayudarme. Esta es la funcion y la definicion de la estructura:

Código
  1.  
  2. typedef struct tSupplier{
  3. int idSupplier;
  4.    tString name;
  5.    tString addr;
  6.    int phone[MAX_PHONE];
  7.    struct tFurniture *firstFur,*currFur;                              
  8.    float profitMargin;
  9. } tSupplier;
  10.  
  11. typedef struct {
  12. int idFurniture;
  13. int idSup;
  14. tString nameFur;
  15. float sizes[MAX_SIZES];
  16. tString typeFur;
  17. tColor color;
  18. float costPrice;
  19. float retailPrice;
  20. int deliveryTime;
  21. struct tFurniture *prevFur, *nextFur;                              
  22. struct tFurniture *prevFurType, *nextFurType;
  23. } tFurniture;
  24.  
  25. ........
  26.  
  27. void fur_get_name (tFurniture f, tString n)
  28. {
  29.     strcpy (n,f.nameFur);        
  30. }
  31.  
  32. .......
  33.  
  34. void sup_set_profitMargin (tSupplier *s, float r)
  35. {
  36.     tString name;
  37.     float price;
  38.  
  39.     s->profitMargin = r;
  40.  
  41.     s->currFur=s->firstFur;
  42.     if (s->currFur!=NULL)
  43.        {
  44.             sup_get_name(*s,name);
  45.             printf("-----------------------------------------------------------------");
  46.             printf("Supplier: %s \n",name);
  47.  
  48.             if (s->idSupplier == s->currFur->idSup) /* Aqui me da el primer error de dereferencing  */
  49.                       s->currFur->retailPrice = s->profitMargin * s->currFur->costPrice;
  50.             while (s->currFur!=NULL)
  51.                   {
  52.                        fur_get_name(s->currFur,name); /* Aqui me da el error de incompatible tipo de argumento en parametro 1*/
  53.                        printf("Furniture: %s \t",name);
  54.  
  55.                        price=fur_get_retailPrice(s->currFur);
  56.                        printf("Old retail price: %d \t", price);
  57.  
  58.                        s->currFur->retailPrice = s->profitMargin * s->currFur->costPrice;
  59.  
  60.  
  61.                        price=fur_get_retailPrice(s->currFur);
  62.                        printf("New retail price: %d \n", price);
  63.  
  64.                        s->currFur=s.currFur->nextFur;
  65.                   }
  66.             printf("-----------------------------------------------------------------");
  67.        }
  68. }

El caso es que me da el derreferencing ese tipico de las estructuras mal leidas pero es que he probado de todo y no se como solucinarlo. Si alguien me guiara en como acceder a la estructura, en las líneas marcadas con los comentarios, solo hay dos, le estaría enormemente agradecido. El resto ya las resolvería yo, por que son iguales.

Gracias.

Saludos.
Chema.
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines