elftc_demangle.c (840e70929b3bc0bfdbccfd8d8626d6e2f29ddbcf) elftc_demangle.c (cf781b2e16c26535788abe648f5917f4db09c123)
1/*-
2 * Copyright (c) 2009 Kai Wang
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28
29#include <sys/param.h>
30#include <assert.h>
31#include <errno.h>
1/*-
2 * Copyright (c) 2009 Kai Wang
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28
29#include <sys/param.h>
30#include <assert.h>
31#include <errno.h>
32#include <libelf.h>
33#include <libelftc.h>
34#include <stdlib.h>
35#include <string.h>
36
37#include "_libelftc.h"
38
32#include <libelftc.h>
33#include <stdlib.h>
34#include <string.h>
35
36#include "_libelftc.h"
37
39ELFTC_VCSID("$Id: elftc_demangle.c 2065 2011-10-26 15:24:47Z jkoshy $");
38ELFTC_VCSID("$Id: elftc_demangle.c 3030 2014-05-01 06:30:48Z kaiwang27 $");
40
41static int
42is_mangled(const char *s, int style)
43{
44
45 switch (style) {
46 case ELFTC_DEM_ARM: return (is_cpp_mangled_ARM(s) ? style : 0);
47 case ELFTC_DEM_GNU2: return (is_cpp_mangled_gnu2(s) ? style : 0);

--- 63 unchanged lines hidden ---
39
40static int
41is_mangled(const char *s, int style)
42{
43
44 switch (style) {
45 case ELFTC_DEM_ARM: return (is_cpp_mangled_ARM(s) ? style : 0);
46 case ELFTC_DEM_GNU2: return (is_cpp_mangled_gnu2(s) ? style : 0);

--- 63 unchanged lines hidden ---