| 150 | } |
| 151 | |
| 152 | inline UCHAR put_vax_long(UCHAR* p, SLONG value) |
| 153 | { |
| 154 | /************************************** |
| 155 | * |
| 156 | * p u t _ v a x _ l o n g |
| 157 | * |
| 158 | ************************************** |
| 159 | * |
| 160 | * Functional description |
| 161 | * Store one signed long int as |
| 162 | * four chars in VAX format |
| 163 | * |
| 164 | **************************************/ |
| 165 | #ifndef WORDS_BIGENDIAN |
| 166 | // little-endian |
| 167 | memcpy(p, &value, sizeof(SLONG)); |
| 168 | #else |
| 169 | // big-endian |
| 170 | union |
| 171 | { |
| 172 | SLONG n; |
| 173 | UCHAR c[4]; |
| 174 | } temp; |
| 175 | |
| 176 | temp.n = value; |
| 177 | |
| 178 | p[0] = temp.c[3]; |
| 179 | p[1] = temp.c[2]; |
| 180 | p[2] = temp.c[1]; |
| 181 | p[3] = temp.c[0]; |
| 182 | #endif |
| 183 | |
| 184 | return sizeof(value); |
| 185 | } |
| 186 | |
| 187 | inline UCHAR put_vax_int64(UCHAR* p, SINT64 value) |
| 188 | { |
no outgoing calls
no test coverage detected