[Bf-committers] Patch to clean up persptoetsen in toets.c

Tom Musgrove bf-committers@blender.org
Thu, 27 May 2004 04:16:48 +0000


This is a multi-part message in MIME format.

------=_NextPart_000_4987_31b1_256a
Content-Type: text/plain; format=flowed

Okay this is a patch to clean up persptoetsen of toets.c,

I've made the functions obvious about what they do (with the exception of 
the PAD0 related functions, which still need to be seperated out.), 
eliminated code duplication, etc.

I've tested it, and as far as I can tell all of the functions are working 
the same as before.

Tom M.
LetterRip

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page  FREE 
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/

------=_NextPart_000_4987_31b1_256a
Content-Type: application/octet-stream; name="toets.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="toets.patch"

SW5kZXg6IHNvdXJjZS9ibGVuZGVyL3NyYy90b2V0cy5jDQo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2N2c3Jvb3QvYmYtYmxlbmRlci9i
bGVuZGVyL3NvdXJjZS9ibGVuZGVyL3NyYy90b2V0cy5jLHYNCnJldHJpZXZp
bmcgcmV2aXNpb24gMS4yNw0KZGlmZiAtdSAtcjEuMjcgdG9ldHMuYw0KLS0t
IHNvdXJjZS9ibGVuZGVyL3NyYy90b2V0cy5jCTIwIEFwciAyMDA0IDIyOjAw
OjMzIC0wMDAwCTEuMjcNCisrKyBzb3VyY2UvYmxlbmRlci9zcmMvdG9ldHMu
YwkyNyBNYXkgMjAwNCAwNDowNToyOSAtMDAwMA0KQEAgLTI0OSwxMzMgKzI0
OSwyOTAgQEANCiB2b2lkIHBlcnNwdG9ldHNlbih1bnNpZ25lZCBzaG9ydCBl
dmVudCkNCiB7DQogCXN0YXRpYyBPYmplY3QgKm9sZGNhbWVyYT0wOw0KLQlm
bG9hdCBwaGksIHNpLCBxMVs0XSwgdmVjWzNdOw0KKwlmbG9hdCBwa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