~ubuntu-branches/ubuntu/lucid/tidy/lucid

« back to all changes in this revision

Viewing changes to src/entities.c

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080120214603-poklofici9og61tx
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* entities.c -- recognize HTML ISO entities
2
2
 
3
 
  (c) 1998-2004 (W3C) MIT, ERCIM, Keio University
 
3
  (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
4
4
  See tidy.h for the copyright notice.
5
5
 
6
6
  CVS Info :
7
7
 
8
 
    $Author: terry_teague $ 
9
 
    $Date: 2004/08/02 02:25:13 $ 
10
 
    $Revision: 1.15 $ 
 
8
    $Author: arnaud02 $ 
 
9
    $Date: 2006/11/30 17:09:20 $ 
 
10
    $Revision: 1.18 $ 
11
11
 
12
12
  Entity handling can be static because there are no config or
13
13
  document-specific values.  Lookup table is 100% defined at 
301
301
    { "lsaquo",   VERS_FROM40,  8249 },
302
302
    { "rsaquo",   VERS_FROM40,  8250 },
303
303
    { "euro",     VERS_FROM40,  8364 },
304
 
    { NULL,       0,               0 }
 
304
    { NULL,       VERS_UNKNOWN, 0 }
305
305
};
306
306
 
307
307
 
316
316
    tmbchar ch = (tmbchar)( s ? *s : 0 );
317
317
    const entity *np;
318
318
    for ( np = entities; ch && np && np->name; ++np )
319
 
        if ( ch == *np->name && tmbstrcmp(s, np->name) == 0 )
 
319
        if ( ch == *np->name && TY_(tmbstrcmp)(s, np->name) == 0 )
320
320
            return np;
321
321
    return NULL;
322
322
}
323
323
 
 
324
#if 0
324
325
/* entity starting with "&" returns zero on error */
325
326
uint EntityCode( ctmbstr name, uint versions )
326
327
{
352
353
 
353
354
    return 0;   /* zero signifies unknown entity name */
354
355
}
 
356
#endif
355
357
 
356
 
Bool EntityInfo( ctmbstr name, Bool isXml, uint* code, uint* versions )
 
358
Bool TY_(EntityInfo)( ctmbstr name, Bool isXml, uint* code, uint* versions )
357
359
{
358
360
    const entity* np;
359
361
    assert( name && name[0] == '&' );
390
392
}
391
393
 
392
394
 
393
 
ctmbstr EntityName( uint ch, uint versions )
 
395
ctmbstr TY_(EntityName)( uint ch, uint versions )
394
396
{
395
397
    ctmbstr entnam = NULL;
396
398
    const entity *ep;
406
408
    }
407
409
    return entnam;
408
410
}
 
411
 
 
412
/*
 
413
 * local variables:
 
414
 * mode: c
 
415
 * indent-tabs-mode: nil
 
416
 * c-basic-offset: 4
 
417
 * eval: (c-set-offset 'substatement-open 0)
 
418
 * end:
 
419
 */