void convert_man_nonmotormd (char *binaryFilesDirectory, char *tppFilesDirectory, char *tppFileName) {

    void combineBinaryTablesInTpplusFile (char **binaryFileNames, char *tppFileName, int ntables);


	int i;
	int nTables = 1;
	char **binaryFileNames;
	char fileName[1024];

	strcpy (fileName, tppFilesDirectory);
	strcat (fileName, tppFileName);


	binaryFileNames = (char **) calloc (nTables, sizeof(char *));
	for (i=0; i < nTables; i++)
		binaryFileNames[i] = (char *) calloc (1024, sizeof(char));



	strcpy (binaryFileNames[0], binaryFilesDirectory);
	strcat (binaryFileNames[0], "\\man_nonmotor_md.binary");


	combineBinaryTablesInTpplusFile (binaryFileNames, fileName, nTables);


	for (i=0; i < nTables; i++)
		free (binaryFileNames[i]);
	free (binaryFileNames);

}
示例#2
0
void main(int argc, char *argv[]) {
	char *tpplus;
	char **binary;

	if (argc < 3) {
		printf("usage: covertBinaryTpplus <tpplus matrix file> <binary file1>...\n");
		fflush(stdout);
		exit(-2);
	}

	tpplus = argv[1];
	binary = argv;
	printf("binary %s\n", *binary);
	printf("binary %s\n", *(++binary));
	printf("binary %s\n", *(++binary));

	tppInitDllNative();
	combineBinaryTablesInTpplusFile(binary, tpplus, argc - 2);
}