1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
/**
* performance.c
*
* Copyright (c) 2013
* libchewing Core Team.
*
* See the file "COPYING" for information on usage and redistribution
* of this file.
*/
#include <stdio.h>
#include <stdlib.h>
#include "chewing.h"
int main()
{
ChewingContext *ctx;
int ch;
/* Initialize libchewing */
putenv("CHEWING_PATH=" CHEWING_DATA_PREFIX);
/* for the sake of testing, we should not change existing hash data */
putenv("CHEWING_USER_PATH=" TEST_HASH_DIR);
ctx = chewing_new();
while ((ch = getchar()) != EOF) {
chewing_handle_Default(ctx, ch);
}
chewing_delete(ctx);
return 0;
}
|