 |
Changeset 5249
- Timestamp:
- 11/29/09 12:57:32
(2 years ago)
- Author:
- larsivi
- Message:
Change C style arrays to D style, thanks to Christian Kamm
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r5182 |
r5249 |
|
| 131 | 131 | int l_sysid; |
|---|
| 132 | 132 | pid_t l_pid; |
|---|
| 133 | | c_long l_pad[4]; /* reserve area */ |
|---|
| | 133 | c_long[4] l_pad; /* reserve area */ |
|---|
| 134 | 134 | } |
|---|
| 135 | 135 | |
|---|
| r4539 |
r5249 |
|
| 312 | 312 | |
|---|
| 313 | 313 | struct _pthread_cleanup_buffer { |
|---|
| 314 | | uintptr_t pthread_cleanup_pad[4]; |
|---|
| | 314 | uintptr_t[4] pthread_cleanup_pad; |
|---|
| 315 | 315 | } |
|---|
| 316 | 316 | |
|---|
| r4728 |
r5249 |
|
| 360 | 360 | union _sifields_t |
|---|
| 361 | 361 | { |
|---|
| 362 | | int _pad[__SI_PAD_SIZE]; |
|---|
| | 362 | int[__SI_PAD_SIZE] _pad; |
|---|
| 363 | 363 | |
|---|
| 364 | 364 | // kill() |
|---|
| … | … | |
| 466 | 466 | sigval si_value; |
|---|
| 467 | 467 | int si_band; |
|---|
| 468 | | uint pad[7]; |
|---|
| | 468 | uint[7] pad; |
|---|
| 469 | 469 | } |
|---|
| 470 | 470 | |
|---|
| … | … | |
| 491 | 491 | struct sigset_t |
|---|
| 492 | 492 | { |
|---|
| 493 | | uint __bits[4]; |
|---|
| | 493 | uint[4] __bits; |
|---|
| 494 | 494 | } |
|---|
| 495 | 495 | |
|---|
| … | … | |
| 598 | 598 | union __data |
|---|
| 599 | 599 | { |
|---|
| 600 | | int __pad[SI_PAD]; /* for future growth */ |
|---|
| | 600 | int[SI_PAD] __pad; /* for future growth */ |
|---|
| 601 | 601 | |
|---|
| 602 | 602 | struct __proc /* kill(), SIGCLD, siqqueue() */ |
|---|
| … | … | |
| 640 | 640 | char __nsysarg; /* number of arguments */ |
|---|
| 641 | 641 | char __fault; /* last fault type */ |
|---|
| 642 | | long __sysarg[8]; /* syscall arguments */ |
|---|
| 643 | | int __mstate[10]; /* see <sys/msacct.h> */ |
|---|
| | 642 | long[8] __sysarg; /* syscall arguments */ |
|---|
| | 643 | int[10] __mstate; /* see <sys/msacct.h> */ |
|---|
| 644 | 644 | } |
|---|
| 645 | 645 | |
|---|
| r4378 |
r5249 |
|
| 134 | 134 | struct fd_set |
|---|
| 135 | 135 | { |
|---|
| 136 | | int fds_bits[(((FD_SETSIZE) + ((__DARWIN_NFDBITS) - 1)) / (__DARWIN_NFDBITS))]; |
|---|
| | 136 | int[(((FD_SETSIZE) + ((__DARWIN_NFDBITS) - 1)) / (__DARWIN_NFDBITS))] fds_bits; |
|---|
| 137 | 137 | } |
|---|
| 138 | 138 | } |
|---|
| … | … | |
| 146 | 146 | struct fd_set |
|---|
| 147 | 147 | { |
|---|
| 148 | | c_ulong fds_bits[((FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS)]; |
|---|
| | 148 | c_ulong[((FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS)] fds_bits; |
|---|
| 149 | 149 | } |
|---|
| 150 | 150 | } |
|---|
| r4535 |
r5249 |
|
| 214 | 214 | uint st_gen; |
|---|
| 215 | 215 | int st_lspare; |
|---|
| 216 | | long st_qspare[2]; |
|---|
| | 216 | long[2] st_qspare; |
|---|
| 217 | 217 | } |
|---|
| 218 | 218 | |
|---|
| r4638 |
r5249 |
|
| 444 | 444 | union __pthread_mutex_lock { |
|---|
| 445 | 445 | struct __pthread_mutex_lock64 { |
|---|
| 446 | | uint8_t __pthread_mutex_pad[8]; |
|---|
| | 446 | uint8_t[8] __pthread_mutex_pad; |
|---|
| 447 | 447 | } |
|---|
| 448 | 448 | struct __pthread_mutex_lock32 { |
|---|
| r3703 |
r5249 |
|
| 144 | 144 | char* p = toStringz("foo"); |
|---|
| 145 | 145 | assert(strlenz(p) == 3); |
|---|
| 146 | | char foo[] = "abbzxyzzy"; |
|---|
| | 146 | char[] foo = "abbzxyzzy"; |
|---|
| 147 | 147 | p = toStringz(foo[3..5]); |
|---|
| 148 | 148 | assert(strlenz(p) == 2); |
|---|
| r5137 |
r5249 |
|
| 200 | 200 | else |
|---|
| 201 | 201 | { |
|---|
| 202 | | char tmp0[128] = void; |
|---|
| 203 | | char tmp1[128] = void; |
|---|
| | 202 | char[128] tmp0 = void; |
|---|
| | 203 | char[128] tmp1 = void; |
|---|
| 204 | 204 | return Utf.fromString8(format(tmp0, dateTime, Utf.toString(fmt, tmp1)), output); |
|---|
| 205 | 205 | } |
|---|
| r5248 |
r5249 |
|
| 746 | 746 | { |
|---|
| 747 | 747 | // TODO: this needs to be cleaned up |
|---|
| 748 | | char tmp0[128] = void; |
|---|
| 749 | | char tmp1[128] = void; |
|---|
| | 748 | char[128] tmp0 = void; |
|---|
| | 749 | char[128] tmp1 = void; |
|---|
| 750 | 750 | return Utf.fromString8(dateTime.format(tmp0, *cast(Time*) p, Utf.toString(format, tmp1)), result); |
|---|
| 751 | 751 | } |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2012 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic