- /* generate skew table */ /*{{{*/
- if (( d->skewtab = malloc(d->sectrk*sizeof(int))) == (int*)0)
- {
- fprintf(stderr,"%s: can not allocate memory for skew sector table\n",cmd);
- exit(1);
- }
- if (strcmp(format,"apple-do")==0)
- {
- static int skew[]={0,6,12,3,9,15,14,5,11,2,8,7,13,4,10,1};
- memcpy(d->skewtab,skew,d->sectrk*sizeof(int));
- }
- else if (strcmp(format,"apple-po")==0)
- {
- static int skew[]={0,9,3,12,6,15,1,10,4,13,7,8,2,11,5,14};
- memcpy(d->skewtab,skew,d->sectrk*sizeof(int));
- }
- else