/* Note:Your choice is C IDE */
/*航班信息的查询与检索(链式基数排序)*/
//1.数据类型定义(type8.)
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
//void display(sllist l,int i);//申明,后要用到
#define maxspace 100
#define keylen 6
#define randix_n 10
#define randix_c 26
typedef char keytype;
typedef struct
{char start[6],end[6];//起/终点
char sche[6];//班期
char time1[4],time2[4];//起飞/到达时间
char model[3];//机型
int price[4];//票价
}infotype;
typedef struct
{keytype keys[keylen];//航班号
infotype others;
int next;
}slnode;
typedef struct
{slnode s1[maxspace];//静态链表,s1[0]为头结点
int keynum;//记录当前关键字字符个数
int length;//当前表长
}sllist;
typedef int arrtype_n[randix_n];//十进制数字指针数组
typedef int arrtype_c[randix_c];//26 个字母指针数组
//2.链式基数排序(jspx.c)
//一趟数字字符的分配函数
void distribute(slnode *s1,int i,arrtype_n f,arrtype_n e)
{int j,p;
for(j=0;j<randix_n;j++)
f[j]=e[j]=0;
for(p=s1[0].next;p;p=s1[p].next)
{j=s1[p].keys[i]%48;/*数字字符.数值型*/
if(!f[j]) f[j]=p;