Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 2009 15:29:23 +0800
From:      Edward King <zhangsc@neusoft.com>
To:        freebsd-questions@freebsd.org
Subject:   why printf() don't work?
Message-ID:  <022201c96f07$553b65a0$3f83a8c0@user863c0bf569>

next in thread | raw e-mail | index | archive | help
SSB1c2UgRnJlZUJTRDcuMCxhbmQgdXNlIHNpZ25hbCxsaWtlIGZvbGxvd3M6CnNpZ25hbChTSUdI
VVAsc2lnX2h1cCk7CnNpZ25hbChTSUdJTyxzaWdfaW8pOwoKd2hlbiBJIHJ1biBjYWxsIGZvbGxv
d2luZyBjb2RlLGl0IGNhbiBydW4sYnV0IEkgZmluZCBhIHB1enpsZWQgcXVlc3Rpb24saXQgc2hv
dWxkIHByaW50IHNvbWUgaW5mb3JtYXRpb24sc3VjaCBhcyBwcmludGYoImV4ZWN1dGUgbWFpbigp
Iikgd2lsbCBwcmludCBleGVjdXRlIG1haW4oKSxidXQgaW4gZmFjdCxwcmludGYgZnVjdGlvbiBw
cmludCBub25lISEhIFdoeSBwcmludGYgZnVuY3Rpb24gZG8gbm90IGdvIHdvcms/CgpteSBjb2Rl
IGlzIGZvbGxvd3M6CgojaW5jbHVkZSAic3lzL2lvY3RsLmgiCiNpbmNsdWRlICJ1bnAuaCIKc3Rh
dGljIGludCBzb2NrZmQ7CiNkZWZpbmUgUVNJWkUgOAojZGVmaW5lIE1BWERHIDQwOTYKdHlwZWRl
ZiBzdHJ1Y3R7CiAgdm9pZCAqZGdfZGF0YTsKICBzaXplX3QgZGdfbGVuOwogIHN0cnVjdCBzb2Nr
YWRkciAqZGdfc2E7CiAgc29ja2xlbl90IGRnX3NhbGVuOwp9REc7CnN0YXRpYyBERyBkZ1tRU0la
RV07CnN0YXRpYyBsb25nIGNudHJlYWRbUVNJWkUrMV07CnN0YXRpYyBpbnQgaWdldDsKc3RhdGlj
IGludCBpcHV0OwpzdGF0aWMgaW50IG5xdWV1ZTsKc3RhdGljIHNvY2tsZW5fdCB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