Commit 234710e8 authored by Alexandre Julliard's avatar Alexandre Julliard

wrc: Remove resource dumping support.

winedump can be used to debug resource contents. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 51d33693
......@@ -2,7 +2,6 @@ PROGRAMS = wrc
EXTRALIBS = $(GETTEXTPO_LIBS)
C_SRCS = \
dumpres.c \
genres.c \
newstruc.c \
po.c \
......
/*
* Dump resource prototypes
*
* Copyright 1998 Bertho A. Stultiens (BS)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WRC_DUMPRES_H
#define __WRC_DUMPRES_H
#include "wrctypes.h"
const char *get_typename(const resource_t* r);
void dump_resources(const resource_t *top);
const char *get_nameid_str(const name_id_t *n);
#endif
......@@ -134,7 +134,6 @@
#include "wrc.h"
#include "utils.h"
#include "newstruc.h"
#include "dumpres.h"
#include "wpp_private.h"
#include "parser.h"
#include "windef.h"
......@@ -455,7 +454,6 @@ resource
$$->name = new_name_id();
$$->name->type = name_ord;
$$->name->name.i_name = $1;
chat("Got %s (%d)\n", get_typename($3), $$->name->name.i_name);
}
}
| tIDENT usrcvt resource_definition {
......@@ -465,7 +463,6 @@ resource
$$->name = new_name_id();
$$->name->type = name_str;
$$->name->name.s_name = $1;
chat("Got %s (%s)\n", get_typename($3), $$->name->name.s_name->str.cstr);
}
}
| stringtable {
......
......@@ -508,6 +508,16 @@ done:
return 0;
}
const char *get_nameid_str(const name_id_t *n)
{
int len;
if (!n) return "<none>";
if (n->type == name_ord) return strmake( "%u", n->name.i_name );
if (n->name.s_name->type == str_char) return n->name.s_name->str.cstr;
return unicode_to_utf8( n->name.s_name->str.wstr, n->name.s_name->size, &len );
}
struct lang2cp
{
......
......@@ -33,6 +33,7 @@ void warning(const char *s, ...) __attribute__((format (printf, 1, 2)));
void chat(const char *s, ...) __attribute__((format (printf, 1, 2)));
int compare_name_id(const name_id_t *n1, const name_id_t *n2);
const char *get_nameid_str(const name_id_t *n);
string_t *convert_string_unicode( const string_t *str, int codepage );
char *convert_string_utf8( const string_t *str, int codepage );
void free_string( string_t *str );
......
......@@ -36,7 +36,6 @@
#include "../tools.h"
#include "wrc.h"
#include "utils.h"
#include "dumpres.h"
#include "newstruc.h"
#include "parser.h"
#include "wpp_private.h"
......@@ -489,9 +488,6 @@ int main(int argc,char *argv[])
/* stdin special case. NULL means "stdin" for wpp. */
if (input_files.count == 0 && load_file( NULL, output_name )) exit(1);
if(debuglevel & DEBUGLEVEL_DUMP)
dump_resources(resource_top);
if (!po_mode && output_name)
{
if (strendswith( output_name, ".po" )) po_mode = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment