fprintf: preserve conf_fprintf pointer in tag__ptr_name
This fixes the use of classes_as_structs and probably other options, when
fprintf meets a pointer/reference type.
There is simple example I took from my own C++ library:
https://github.com/FWGS/mainui_cpp/blob/master/EngineCallback.cpp. It
implements GUI in a game engine written in C.
I compiled pahole with this patch and without, and ran with
--classes_as_struct flag, as this patch fixes this case in the first
place:
```
$ ./pahole-pre-patch EngineCallback.cpp.1.o > pre-patch.h
$ ./pahole-post-patch EngineCallback.cpp.1.o > post-patch.h
$ diff -u pre-patch.h post-patch.h | tail -n 20
- void Update(class CWindowStack *);
+ void Update(struct CWindowStack *);
- void KeyUpEvent(class CWindowStack *, int);
+ void KeyUpEvent(struct CWindowStack *, int);
- void KeyDownEvent(class CWindowStack *, int);
+ void KeyDownEvent(struct CWindowStack *, int);
- void CharEvent(class CWindowStack *, int);
+ void CharEvent(struct CWindowStack *, int);
- void MouseEvent(class CWindowStack *, int, int);
+ void MouseEvent(struct CWindowStack *, int, int);
- void InputMethodResized(class CWindowStack *);
+ void InputMethodResized(struct CWindowStack *);
struct CUtlLinkedList<CMenuBaseWindow*, int> stack; /* 0 56 */
int active; /* 56 4 */
```
I uploaded the diff in the attachments, if you want to look closely.
[diff.txt](https://github.com/acmel/dwarves/files/8540596/diff.txt)
Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
1 file changed