#include <exec/types.h>

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <proto/dlg.h>

extern struct Library *DLGBase;

void LToX(ULONG num, char *rc)
{
	char t[10];
//   int i;
	int z;

	strcpy(rc,"00000000");
	strcpy(t,"");

// printf("Input is %ld\n",num);
	
	z = stcl_h(t,num);

// printf("Result is %s, %d chars long\n",t,z);

//   for(i=0;i<(8-z);i++);
//      rc[i] = 'i';
//   strnset(rc,48,8-z);

	rc[(8-z)] = '\0';
	
// printf("Appending %s to %s\n",t,rc);

	strcat(rc,t);   
	Upper(rc);
		
// printf("Final return is %s\n",rc);
		
	return;
}
