summaryrefslogtreecommitdiff
path: root/src/Resources.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-02-02 22:42:13 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-02-04 22:28:39 -0800
commit21c1cc98d8210a3ce2a4bf62ecee9168fdd99dcb (patch)
tree2861ef12bd47afbb0f63d42fc4850a3cbeaaf00c /src/Resources.c
parent19538f2b4553221b35831e13ec70ed9db436dd32 (diff)
downloadxorg-lib-libXt-21c1cc98d8210a3ce2a4bf62ecee9168fdd99dcb.tar.gz
Remove unused #ifdef UNALIGNED version of Xt macros & functions
Trying to outsmart the compiler and libc is a losing battle, but since UNALIGNED was never defined, we weren't even trying. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/Resources.c')
-rw-r--r--src/Resources.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/Resources.c b/src/Resources.c
index 67d6860..304d3d5 100644
--- a/src/Resources.c
+++ b/src/Resources.c
@@ -109,92 +109,6 @@ void _XtCopyFromParent(
} /* _XtCopyFromParent */
-/* If the alignment characteristics of your machine are right, these may be
- faster */
-
-#ifdef UNALIGNED
-
-void _XtCopyFromArg(
- XtArgVal src,
- char* dst,
- register unsigned int size)
-{
- if (size == sizeof(long)) *(long *)dst = (long)src;
- else if (size == sizeof(short)) *(short *)dst = (short)src;
- else if (size == sizeof(char)) *(char *)dst = (char)src;
- else if (size == sizeof(XtPointer)) *(XtPointer *)dst = (XtPointer)src;
- else if (size == sizeof(char*)) *(char **)dst = (char*)src;
- else if (size == sizeof(XtArgVal)) *(XtArgVal *)dst = src;
- else if (size > sizeof(XtArgVal))
- (void) memmove((char *) dst, (char *) src, (int) size);
- else
- (void) memmove((char *) dst, (char *) &src, (int) size);
-} /* _XtCopyFromArg */
-
-void _XtCopyToArg(
- char* src,
- XtArgVal *dst,
- register unsigned int size)
-{
- if (! (*dst)) {
-#ifdef GETVALUES_BUG
- /* old GetValues semantics (storing directly into arglists) are bad,
- * but preserve for compatibility as long as arglist contains NULL.
- */
- if (size == sizeof(long)) *dst = (XtArgVal)*(long*)src;
- else if (size == sizeof(short)) *dst = (XtArgVal)*(short*)src;
- else if (size == sizeof(char)) *dst = (XtArgVal)*(char*)src;
- else if (size == sizeof(XtPointer)) *dst = (XtArgVal)*(XtPointer*)src;
- else if (size == sizeof(char*)) *dst = (XtArgVal)*(char**)src;
- else if (size == sizeof(XtArgVal)) *dst = *(XtArgVal*)src;
- else (void) memmove((char*)dst, (char*)src, (int)size);
-#else
- XtErrorMsg("invalidGetValues", "xtGetValues", XtCXtToolkitError,
- "NULL ArgVal in XtGetValues", (String*) NULL, (Cardinal*) NULL);
-#endif
- }
- else {
- /* proper GetValues semantics: argval is pointer to destination */
- if (size == sizeof(long)) *((long*)*dst) = *(long*)src;
- else if (size == sizeof(short)) *((short*)*dst) = *(short*)src;
- else if (size == sizeof(char)) *((char*)*dst) = *(char*)src;
- else if (size == sizeof(XtPointer)) *((XtPointer*)*dst) = *(XtPointer*)src;
- else if (size == sizeof(char*)) *((char**)*dst) = *(char**)src;
- else if (size == sizeof(XtArgVal)) *((XtArgVal*)*dst)= *(XtArgVal*)src;
- else (void) memmove((char*)*dst, (char*)src, (int)size);
- }
-} /* _XtCopyToArg */
-
-static void CopyToArg(
- char* src,
- XtArgVal *dst,
- register unsigned int size)
-{
- if (! (*dst)) {
- /* old GetValues semantics (storing directly into arglists) are bad,
- * but preserve for compatibility as long as arglist contains NULL.
- */
- if (size == sizeof(long)) *dst = (XtArgVal)*(long*)src;
- else if (size == sizeof(short)) *dst = (XtArgVal)*(short*)src;
- else if (size == sizeof(char)) *dst = (XtArgVal)*(char*)src;
- else if (size == sizeof(XtPointer)) *dst = (XtArgVal)*(XtPointer*)src;
- else if (size == sizeof(char*)) *dst = (XtArgVal)*(char**)src;
- else if (size == sizeof(XtArgVal)) *dst = *(XtArgVal*)src;
- else (void) memmove((char*)dst, (char*)src, (int)size);
- }
- else {
- /* proper GetValues semantics: argval is pointer to destination */
- if (size == sizeof(long)) *((long*)*dst) = *(long*)src;
- else if (size == sizeof(short)) *((short*)*dst) = *(short*)src;
- else if (size == sizeof(char)) *((char*)*dst) = *(char*)src;
- else if (size == sizeof(XtPointer)) *((XtPointer*)*dst) = *(XtPointer*)src;
- else if (size == sizeof(char*)) *((char**)*dst) = *(char**)src;
- else if (size == sizeof(XtArgVal)) *((XtArgVal*)*dst)= *(XtArgVal*)src;
- else (void) memmove((char*)*dst, (char*)src, (int)size);
- }
-} /* CopyToArg */
-
-#else
void _XtCopyFromArg(
XtArgVal src,
char* dst,
@@ -313,7 +227,6 @@ static void CopyToArg(
}
} /* CopyToArg */
-#endif
static Cardinal CountTreeDepth(
Widget w)