# HG changeset patch # User Yoshiki Yazawa # Date 1234838366 -32400 # Node ID d898fd27547fa538b728db4b12c36f7eafe31e64 # Parent 97fd2315114eebc281a50b7bf2fc714d45aafa6a cleanups diff -r 97fd2315114e -r d898fd27547f recpt1/recpt1.c --- a/recpt1/recpt1.c Tue Feb 17 05:58:36 2009 +0900 +++ b/recpt1/recpt1.c Tue Feb 17 11:39:26 2009 +0900 @@ -24,14 +24,15 @@ int fd; } thread_data; -// 周波数テーブル変換 +/* lookup frequency conversion table*/ ISDB_T_FREQ_CONV_TABLE * searchrecoff(char *channel) { int lp; for(lp = 0; isdb_t_conv_table[lp].parm_freq != NULL; lp++){ - // 文字列&長さ一致したら周波数テーブル番号を返却する + /* return entry number in the table when strings match and + * lengths are same. */ if((memcmp(isdb_t_conv_table[lp].parm_freq, channel, strlen(channel)) == 0) && (strlen(channel) == strlen(isdb_t_conv_table[lp].parm_freq))){ @@ -116,7 +117,7 @@ /* take buffer address */ buffer = p_queue->buffer[p_queue->out]; - // 次にデータを取り出す場所をインクリメント + /* move location marker to next position */ p_queue->out++; p_queue->out %= p_queue->size; @@ -131,7 +132,7 @@ return buffer; } -/* this function will be a writing thread */ +/* this function will be reader thread */ void * write_func(void *p) { @@ -371,7 +372,7 @@ /* close tuner */ close(fd); - /* wait reading thread */ + /* wait reader thread */ pthread_join(dequeue_threads, NULL); destroy_queue(p_queue); diff -r 97fd2315114e -r d898fd27547f recpt1/recpt1.h --- a/recpt1/recpt1.h Tue Feb 17 05:58:36 2009 +0900 +++ b/recpt1/recpt1.h Tue Feb 17 11:39:26 2009 +0900 @@ -19,7 +19,7 @@ #define FALSE 0 typedef struct _BUFSZ { - int size ; + int size; u_char buffer[MAX_READ_SIZE]; } BUFSZ; @@ -36,10 +36,10 @@ } QUEUE_T; typedef struct _ISDB_T_FREQ_CONV_TABLE { - int set_freq ; // 実際にioctl()を行う値 - int type ; // チャンネルタイプ - int add_freq ; // 追加する周波数(BS/CSの場合はスロット番号) - char *parm_freq ; // パラメータで受ける値 + int set_freq; // 実際にioctl()を行う値 + int type; // チャンネルタイプ + int add_freq; // 追加する周波数(BS/CSの場合はスロット番号) + char *parm_freq; // パラメータで受ける値 } ISDB_T_FREQ_CONV_TABLE; // 変換テーブル(ISDB-T用)