#!/usr/bin/perl -w

use strict;

while (<>) {
	# FIXME: this won't work in case of Pxx a, b;
        s/(\W|^)PULONG(\W)/$1guint32 *$2/g;
        s/(\W|^)PUSHORT(\W)/$1guint16 *$2/g;
        s/(\W|^)PUCHAR(\W)/$1guint8 *$2/g;
        s/(\W|^)PUINT(\W)/$1guint *$2/g;
        s/(\W|^)PBOOL(\W)/$1gboolean *$2/g;
        s/(\W|^)PCHAR(\W)/$1gchar *$2/g;
        s/(\W|^)PVOID(\W)/$1void *$2/g;
        s/(\W|^)PBYTE(\W)/$1guint8 *$2/g;

        s/(\W|^)ULONG(\W)/$1guint32$2/g;
        s/(\W|^)USHORT(\W)/$1guint16$2/g;
        s/(\W|^)UCHAR(\W)/$1guint8$2/g;
        s/(\W|^)UINT(\W)/$1guint$2/g;
        s/(\W|^)BOOL(\W)/$1gboolean$2/g;
        s/(\W|^)CHAR(\W)/$1gchar$2/g;
        s/(\W|^)VOID(\W)/$1void$2/g;
        s/(\W|^)BYTE(\W)/$1guint8$2/g;

	s/(\W|^)HANDLE(\W)/$1void *$2/g;
	s/(\W|^)HMODULE(\W)/$1void *$2/g;

        print;
}

__END__

bla

