I'd like to fix a few warnings but I want to double check the cast.

The warnings come from creating object hex names from pointers. sys_vgui() doesn't trigger this warning, but sprintf() does. For example:

../src/x_text.c:101:31: warning: format specifies type 'unsigned long' but the argument has type 't_textbuf *' (aka 'struct _textbuf *') [-Wformat]
        sprintf(buf, ".x%lx", x);

Would it be safe to do a cast to (unsigned long)?

sprintf(buf, ".x%lx", (unsigned long)x);

--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com