mirror of
https://github.com/ksherlock/rlint.git
synced 2025-01-02 11:31:27 +00:00
rAlertString / rErrorString - custom rIcon check
This commit is contained in:
parent
dc658f8533
commit
a6bac0886c
@ -1,16 +1,17 @@
|
||||
|
||||
OBJ = o/rlint.a o/menu.a o/control.a o/bundle.a
|
||||
OBJ = o/rlint.a o/menu.a o/control.a o/bundle.a o/alert.a
|
||||
|
||||
|
||||
rlint : $(OBJ)
|
||||
$(RM) o/menu.root o/control.root o/bundle.root
|
||||
iix link o/rlint o/menu o/control o/bundle keep=$@
|
||||
$(RM) o/menu.root o/control.root o/bundle.root o/alert.root
|
||||
iix link o/rlint o/menu o/control o/bundle o/alert keep=$@
|
||||
|
||||
|
||||
o/rlint.a : rlint.c rlint.h
|
||||
o/menu.a : menu.c rlint.h
|
||||
o/control.a : control.c rlint.h
|
||||
o/bundle.a : bundle.c rlint.h
|
||||
o/alert.a : alert.c rlint.h
|
||||
|
||||
o :
|
||||
mkdir $@
|
||||
|
18
alert.c
Normal file
18
alert.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include "rlint.h"
|
||||
|
||||
void check_rAlertString(Handle h) {
|
||||
/* if there's a custom icon, assume it's a resource ref */
|
||||
|
||||
unsigned char *ptr = *(unsigned char **)h;
|
||||
unsigned x;
|
||||
unsigned offset = 0;
|
||||
|
||||
x = ptr[offset++];
|
||||
if (x == '0') offset += 8; /* skip past custom size rect */
|
||||
x = ptr[offset++];
|
||||
if (x == '1') {
|
||||
/* custom icon */
|
||||
unsigned long ref = *(unsigned long *)(ptr + offset);
|
||||
if (ref) check(rIcon, ref);
|
||||
}
|
||||
}
|
6
rlint.c
6
rlint.c
@ -209,6 +209,10 @@ void check(ResType type, ResID id) {
|
||||
case rWindParam1: callback = check_rWindParam1; break;
|
||||
case rStringList: callback = check_rStringList; break;
|
||||
case rBundle: callback = check_rBundle; break;
|
||||
case rAlertString:
|
||||
case rErrorString:
|
||||
callback = check_rAlertString;
|
||||
break;
|
||||
default: callback = 0;
|
||||
}
|
||||
|
||||
@ -292,6 +296,8 @@ void one_file(const char *name) {
|
||||
case rWindParam1:
|
||||
case rStringList:
|
||||
case rBundle:
|
||||
case rAlertString:
|
||||
case rErrorString:
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user