Commit c60dc45b authored by gauthier's avatar gauthier

Changed uX, uX_t sX, sX_t to uinX_t

Cleaned some PDCP/driver code

types parameters and vars

Please see openair2/COMMON/platform_types.h for simple coding rules.

please declare prototypes of functions in .h and include .h files in where the function is used and where it is implemented.



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5096 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 3ea520f7
#ifndef _OBJ_HASH_TABLE_H_
#define _OBJ_HASH_TABLE_H_
#ifndef _UTILS_COLLECTION_OBJ_HASH_TABLE_H_
#define _UTILS_COLLECTION_OBJ_HASH_TABLE_H_
#include<stdlib.h>
#include <stdint.h>
#include <stddef.h>
#include "hashtable.h"
typedef size_t hash_size_t;
#include "collection/hashtable/hashtable.h"
typedef struct obj_hash_node_s {
int key_size;
......@@ -34,7 +31,5 @@ hashtable_rc_t obj_hashtable_get (obj_hash_table_t *hashtblP, const voi
hashtable_rc_t obj_hashtable_get_keys(obj_hash_table_t *hashtblP, void ** keysP, unsigned int *sizeP);
hashtable_rc_t obj_hashtable_resize (obj_hash_table_t *hashtblP, hash_size_t sizeP);
#endif
......@@ -24,7 +24,7 @@ pointer to the macphy_scheduler() routine*/
void dummy_macphy_scheduler(u8 last_slot)
void dummy_macphy_scheduler(uint8_t last_slot)
{
//if (last_slot == 0)
// mac_xface->frame++;
......@@ -47,7 +47,7 @@ void dummy_macphy_init(void )
msg("[OPENAIR][MAC XFACE] dummy_macphy_init(): no MAC registered!\n");
}
MAC_xface *mac_register(void macphy_scheduler(u8 last_slot), void macphy_setparams(void *),void macphy_init(void ),void mrbch_phy_sync_failure(unsigned char,unsigned char),void chbch_phy_sync_success(unsigned char,unsigned char)) {
MAC_xface *mac_register(void macphy_scheduler(uint8_t last_slot), void macphy_setparams(void *),void macphy_init(void ),void mrbch_phy_sync_failure(unsigned char,unsigned char),void chbch_phy_sync_success(unsigned char,unsigned char)) {
if (openair_daq_vars.mac_registered == 0) {
......
......@@ -891,9 +891,9 @@ unsigned char phy_threegpplte_turbo_decoder_scalar(llr_t *y,
oldcrc&=0x00ffffff;
crc = crc24a(&decoded_bytes[F>>3],
n-24-F)>>8;
temp=((u8 *)&crc)[2];
((u8 *)&crc)[2] = ((u8 *)&crc)[0];
((u8 *)&crc)[0] = temp;
temp=((uint8_t *)&crc)[2];
((uint8_t *)&crc)[2] = ((uint8_t *)&crc)[0];
((uint8_t *)&crc)[0] = temp;
// msg("CRC24_A = %x, oldcrc = %x (F %d)\n",crc,oldcrc,F);
......@@ -902,9 +902,9 @@ unsigned char phy_threegpplte_turbo_decoder_scalar(llr_t *y,
oldcrc&=0x00ffffff;
crc = crc24b(decoded_bytes,
n-24)>>8;
temp=((u8 *)&crc)[2];
((u8 *)&crc)[2] = ((u8 *)&crc)[0];
((u8 *)&crc)[0] = temp;
temp=((uint8_t *)&crc)[2];
((uint8_t *)&crc)[2] = ((uint8_t *)&crc)[0];
((uint8_t *)&crc)[0] = temp;
// msg("CRC24_B = %x, oldcrc = %x\n",crc,oldcrc);
......
......@@ -1961,7 +1961,7 @@ unsigned char phy_threegpplte_turbo_decoder(short *y,
unsigned int i,j,iind;//,pi;
unsigned char iteration_cnt=0;
unsigned int crc,oldcrc,crc_len;
u8 temp;
uint8_t temp;
__m128i tmp128[(n+8)>>3];
__m128i tmp, zeros=_mm_setzero_si128();
......@@ -2341,7 +2341,7 @@ unsigned char phy_threegpplte_turbo_decoder(short *y,
}
#else
pi5_p=pi5tab[iind];
u16 decoded_bytes_interl[6144/16];
uint16_t decoded_bytes_interl[6144/16];
for (i=0;i<(n2>>4);i++) {
tmp=_mm_insert_epi8(tmp,ext2[*pi5_p++],0);
......@@ -2360,7 +2360,7 @@ unsigned char phy_threegpplte_turbo_decoder(short *y,
tmp=_mm_insert_epi8(tmp,ext2[*pi5_p++],13);
tmp=_mm_insert_epi8(tmp,ext2[*pi5_p++],14);
tmp=_mm_insert_epi8(tmp,ext2[*pi5_p++],15);
//decoded_bytes_interl[i]=(u16) _mm_movemask_epi8(_mm_cmpgt_epi8(tmp,zeros));
//decoded_bytes_interl[i]=(uint16_t) _mm_movemask_epi8(_mm_cmpgt_epi8(tmp,zeros));
tmp128[i] = _mm_adds_epi8(((__m128i *)ext2)[i],((__m128i *)systematic2)[i]);
((__m128i *)systematic1)[i] = _mm_adds_epi8(_mm_subs_epi8(tmp,((__m128i*)ext)[i]),((__m128i *)systematic0)[i]);
......@@ -2381,14 +2381,14 @@ unsigned char phy_threegpplte_turbo_decoder(short *y,
tmp2=_mm_and_si128(tmp,mask);
tmp2=_mm_cmpeq_epi16(tmp2,mask);
decoded_bytes[n_128*0+i]=(u8) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
decoded_bytes[n_128*0+i]=(uint8_t) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
int j;
for (j=1; j<16; j++) {
mask=_mm_slli_epi16(mask,1);
tmp2=_mm_and_si128(tmp,mask);
tmp2=_mm_cmpeq_epi16(tmp2,mask);
decoded_bytes[n_128*j +i]=(u8) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
decoded_bytes[n_128*j +i]=(uint8_t) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
}
}
}
......@@ -2430,17 +2430,17 @@ unsigned char phy_threegpplte_turbo_decoder(short *y,
oldcrc&=0x00ffffff;
crc = crc24a(&decoded_bytes[F>>3],
n-24-F)>>8;
temp=((u8 *)&crc)[2];
((u8 *)&crc)[2] = ((u8 *)&crc)[0];
((u8 *)&crc)[0] = temp;
temp=((uint8_t *)&crc)[2];
((uint8_t *)&crc)[2] = ((uint8_t *)&crc)[0];
((uint8_t *)&crc)[0] = temp;
break;
case CRC24_B:
oldcrc&=0x00ffffff;
crc = crc24b(decoded_bytes,
n-24)>>8;
temp=((u8 *)&crc)[2];
((u8 *)&crc)[2] = ((u8 *)&crc)[0];
((u8 *)&crc)[0] = temp;
temp=((uint8_t *)&crc)[2];
((uint8_t *)&crc)[2] = ((uint8_t *)&crc)[0];
((uint8_t *)&crc)[0] = temp;
break;
case CRC16:
oldcrc&=0x0000ffff;
......
......@@ -658,7 +658,7 @@ unsigned char phy_threegpplte_turbo_decoder16(short *y,
unsigned int i,j,iind;//,pi;
unsigned char iteration_cnt=0;
unsigned int crc,oldcrc,crc_len;
u8 temp;
uint8_t temp;
__m128i tmp, zeros=_mm_setzero_si128();
......@@ -875,17 +875,17 @@ unsigned char phy_threegpplte_turbo_decoder16(short *y,
oldcrc&=0x00ffffff;
crc = crc24a(&decoded_bytes[F>>3],
n-24-F)>>8;
temp=((u8 *)&crc)[2];
((u8 *)&crc)[2] = ((u8 *)&crc)[0];
((u8 *)&crc)[0] = temp;
temp=((uint8_t *)&crc)[2];
((uint8_t *)&crc)[2] = ((uint8_t *)&crc)[0];
((uint8_t *)&crc)[0] = temp;
break;
case CRC24_B:
oldcrc&=0x00ffffff;
crc = crc24b(decoded_bytes,
n-24)>>8;
temp=((u8 *)&crc)[2];
((u8 *)&crc)[2] = ((u8 *)&crc)[0];
((u8 *)&crc)[0] = temp;
temp=((uint8_t *)&crc)[2];
((uint8_t *)&crc)[2] = ((uint8_t *)&crc)[0];
((uint8_t *)&crc)[0] = temp;
break;
case CRC16:
oldcrc&=0x0000ffff;
......
......@@ -605,7 +605,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
unsigned int i,j,iind;//,pi;
unsigned char iteration_cnt=0;
unsigned int crc,oldcrc,crc_len;
u8 temp;
uint8_t temp;
__m128i tmp128[(n+8)>>3];
__m128i tmp, zeros=_mm_setzero_si128();
......@@ -873,7 +873,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
pi5_p=pi5tab8[iind];
u16 decoded_bytes_interl[6144/16] __attribute__((aligned(16)));
uint16_t decoded_bytes_interl[6144/16] __attribute__((aligned(16)));
if ((n2&0x7f) == 0) { // n2 is a multiple of 128 bits
for (i=0;i<(n2>>4);i++) {
tmp=_mm_insert_epi8(tmp,ext2[*pi5_p++],0);
......@@ -892,7 +892,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
tmp=_mm_insert_epi8(tmp,ext2[*pi5_p++],13);
tmp=_mm_insert_epi8(tmp,ext2[*pi5_p++],14);
tmp=_mm_insert_epi8(tmp,ext2[*pi5_p++],15);
decoded_bytes_interl[i]=(u16) _mm_movemask_epi8(_mm_cmpgt_epi8(tmp,zeros));
decoded_bytes_interl[i]=(uint16_t) _mm_movemask_epi8(_mm_cmpgt_epi8(tmp,zeros));
((__m128i *)systematic1)[i] = _mm_adds_epi8(_mm_subs_epi8(tmp,((__m128i*)ext)[i]),((__m128i *)systematic0)[i]);
}
}
......@@ -939,14 +939,14 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
tmp2=_mm_and_si128(tmp,mask);
tmp2=_mm_cmpeq_epi16(tmp2,mask);
decoded_bytes[n_128*0+i]=(u8) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
decoded_bytes[n_128*0+i]=(uint8_t) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
int j;
for (j=1; j<16; j++) {
mask=_mm_slli_epi16(mask,1);
tmp2=_mm_and_si128(tmp,mask);
tmp2=_mm_cmpeq_epi16(tmp2,mask);
decoded_bytes[n_128*j +i]=(u8) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
decoded_bytes[n_128*j +i]=(uint8_t) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
}
}
}
......@@ -981,17 +981,17 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
oldcrc&=0x00ffffff;
crc = crc24a(&decoded_bytes[F>>3],
n-24-F)>>8;
temp=((u8 *)&crc)[2];
((u8 *)&crc)[2] = ((u8 *)&crc)[0];
((u8 *)&crc)[0] = temp;
temp=((uint8_t *)&crc)[2];
((uint8_t *)&crc)[2] = ((uint8_t *)&crc)[0];
((uint8_t *)&crc)[0] = temp;
break;
case CRC24_B:
oldcrc&=0x00ffffff;
crc = crc24b(decoded_bytes,
n-24)>>8;
temp=((u8 *)&crc)[2];
((u8 *)&crc)[2] = ((u8 *)&crc)[0];
((u8 *)&crc)[0] = temp;
temp=((uint8_t *)&crc)[2];
((uint8_t *)&crc)[2] = ((uint8_t *)&crc)[0];
((uint8_t *)&crc)[0] = temp;
break;
case CRC16:
oldcrc&=0x0000ffff;
......
......@@ -41,7 +41,7 @@ PHY_VARS_UE *PHY_vars_UE;
DCI2_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2;
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,u16 Nid_cell,u8 tdd_config) {
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t tdd_config) {
unsigned int ind;
LTE_DL_FRAME_PARMS *lte_frame_parms;
......
......@@ -12,12 +12,6 @@
#include "PHY/defs.h"
#else
#include "PHY/TOOLS/time_meas.h"
#define u32 uint32_t
#define s32 int32_t
#define u16 uint16_t
#define s16 int16_t
#define u8 uint8_t
#define s8 int8_t
#endif
#define CRC24_A 0
......@@ -379,7 +373,7 @@ void phy_viterbi_dot11_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n);
@param decoded_bytes Pointer to decoded output
@param n Length of input/trellis depth in bits*/
//void phy_viterbi_lte_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n);
void phy_viterbi_lte_sse2(s8 *y,u8 *decoded_bytes,u16 n);
void phy_viterbi_lte_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n);
/*!\fn void phy_generate_viterbi_tables(void)
\brief This routine initializes metric tables for the optimized Viterbi decoder.
......
......@@ -11,8 +11,8 @@
//#define cmin(a,b) ((a)<(b) ? (a) : (b))
static u32 bitrev[32] = {0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31};
static u32 bitrev_x3[32] = {0,48,24,72,12,60,36,84,6,54,30,78,18,66,42,90,3,51,27,75,15,63,39,87,9,57,33,81,21,69,45,93};
static uint32_t bitrev[32] = {0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31};
static uint32_t bitrev_x3[32] = {0,48,24,72,12,60,36,84,6,54,30,78,18,66,42,90,3,51,27,75,15,63,39,87,9,57,33,81,21,69,45,93};
static uint32_t bitrev_cc[32] = {1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31,0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30};
//#define RM_DEBUG_TX 1
......@@ -323,7 +323,7 @@ uint32_t generate_dummy_w_cc(uint32_t D, uint8_t *w){
uint32_t RCC = (D>>5), ND;
uint32_t col,Kpi,index;
s32 k;
int32_t k;
#ifdef RM_DEBUG_CC
uint32_t nulled=0;
#endif
......@@ -562,14 +562,14 @@ printf("threed %d\n",threed);
uint32_t lte_rate_matching_cc(uint32_t RCC,
u16 E,
uint16_t E,
uint8_t *w,
uint8_t *e) {
uint32_t ind=0,k;
u16 Kw = 3*(RCC<<5);
uint16_t Kw = 3*(RCC<<5);
#ifdef RM_DEBUG_CC
uint32_t nulled=0;
......@@ -627,7 +627,7 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
uint32_t Nir,Ncb,Gp,GpmodC,E,Ncbmod,ind,k;
int16_t *soft_input2;
// s32 w_tmp;
// int32_t w_tmp;
#ifdef RM_DEBUG
int nulled=0;
#endif
......@@ -745,7 +745,7 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
void lte_rate_matching_cc_rx(uint32_t RCC,
u16 E,
uint16_t E,
int8_t *w,
uint8_t *dummy_w,
int8_t *soft_input) {
......@@ -753,7 +753,7 @@ void lte_rate_matching_cc_rx(uint32_t RCC,
uint32_t ind=0,k;
u16 Kw = 3*(RCC<<5);
uint16_t Kw = 3*(RCC<<5);
uint32_t acc=1;
int16_t w16[Kw];
#ifdef RM_DEBUG_CC
......
......@@ -125,9 +125,9 @@ int lte_segmentation(unsigned char *input_buffer,
if (*C > 1) { // add CRC
crc = crc24b(output_buffers[r],Kr-24)>>8;
output_buffers[r][(Kr-24)>>3] = ((u8*)&crc)[2];
output_buffers[r][1+((Kr-24)>>3)] = ((u8*)&crc)[1];
output_buffers[r][2+((Kr-24)>>3)] = ((u8*)&crc)[0];
output_buffers[r][(Kr-24)>>3] = ((uint8_t*)&crc)[2];
output_buffers[r][1+((Kr-24)>>3)] = ((uint8_t*)&crc)[1];
output_buffers[r][2+((Kr-24)>>3)] = ((uint8_t*)&crc)[0];
#ifdef DEBUG_SEGMENTATION
printf("Segment %d : CRC %x\n",r,crc);
#endif
......
......@@ -25,7 +25,7 @@
#include "emmintrin.h"
#endif //EXPRESSMIMO_TARGET
extern u8 ccodelte_table[128],ccodelte_table_rev[128];
extern uint8_t ccodelte_table[128],ccodelte_table_rev[128];
......@@ -36,15 +36,15 @@ extern u8 ccodelte_table[128],ccodelte_table_rev[128];
#ifndef EXPRESSMIMO_TARGET
static s8 m0_table[64*16*16*16] __attribute__ ((aligned(16)));
static s8 m1_table[64*16*16*16] __attribute__ ((aligned(16)));
static int8_t m0_table[64*16*16*16] __attribute__ ((aligned(16)));
static int8_t m1_table[64*16*16*16] __attribute__ ((aligned(16)));
// Set up Viterbi tables for SSE2 implementation
void phy_generate_viterbi_tables_lte() {
s8 w[8],in0,in1,in2;
u8 state,index0,index1;
int8_t w[8],in0,in1,in2;
uint8_t state,index0,index1;
for (in0 = -8; in0 <8 ; in0++) { // use 4-bit quantization
for (in1 = -8; in1 <8 ;in1++) {
......@@ -91,7 +91,7 @@ void phy_generate_viterbi_tables_lte() {
#ifdef DEBUG_VITERBI
void print_bytes(char *s,__m128i *x) {
u8 *tempb = (u8 *)x;
uint8_t *tempb = (uint8_t *)x;
printf("%s : %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",s,
tempb[0],tempb[1],tempb[2],tempb[3],tempb[4],tempb[5],tempb[6],tempb[7],
......@@ -102,7 +102,7 @@ void print_bytes(char *s,__m128i *x) {
/*
void print_shorts(__m128i x,char *s) {
s16 *tempb = (s16 *)&x;
int16_t *tempb = (int16_t *)&x;
printf("%s : %d,%d,%d,%d,%d,%d,%d,%d\n",s,
tempb[0],tempb[1],tempb[2],tempb[3],tempb[4],tempb[5],tempb[6],tempb[7]
......@@ -119,18 +119,18 @@ static __m128i metrics0_15,metrics16_31,metrics32_47,metrics48_63,even0_30a,even
static __m128i min_state,min_state2;// __attribute__((aligned(16)));
void phy_viterbi_lte_sse2(s8 *y,u8 *decoded_bytes,u16 n) {
void phy_viterbi_lte_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n) {
static __m128i *m0_ptr,*m1_ptr,*TB_ptr = &TB[0];
s8 *in = y;
u8 prev_state0,maxm,s;
static u8 *TB_ptr2;
u32 table_offset;
u8 iter;
s16 position;
int8_t *in = y;
uint8_t prev_state0,maxm,s;
static uint8_t *TB_ptr2;
uint32_t table_offset;
uint8_t iter;
int16_t position;
// set initial metrics
//debug_msg("Doing viterbi\n");
......@@ -334,31 +334,31 @@ void phy_viterbi_lte_sse2(s8 *y,u8 *decoded_bytes,u16 n) {
maxm = 0;
for (s=0;s<16;s++)
if (((u8 *)&metrics0_15)[s] > maxm) {
maxm = ((u8 *)&metrics0_15)[s];
if (((uint8_t *)&metrics0_15)[s] > maxm) {
maxm = ((uint8_t *)&metrics0_15)[s];
prev_state0 = s;
}
for (s=0;s<16;s++)
if (((u8 *)&metrics16_31)[s] > maxm) {
maxm = ((u8 *)&metrics16_31)[s];
if (((uint8_t *)&metrics16_31)[s] > maxm) {
maxm = ((uint8_t *)&metrics16_31)[s];
prev_state0 = s+16;
}
for (s=0;s<16;s++)
if (((u8 *)&metrics32_47)[s] > maxm) {
maxm = ((u8 *)&metrics32_47)[s];
if (((uint8_t *)&metrics32_47)[s] > maxm) {
maxm = ((uint8_t *)&metrics32_47)[s];
prev_state0 = s+32;
}
for (s=0;s<16;s++)
if (((u8 *)&metrics48_63)[s] > maxm) {
maxm = ((u8 *)&metrics48_63)[s];
if (((uint8_t *)&metrics48_63)[s] > maxm) {
maxm = ((uint8_t *)&metrics48_63)[s];
prev_state0 = s+48;
}
// printf("Max state %d\n",prev_state0);
TB_ptr2 = (u8 *)&TB[(n-1)*4];
TB_ptr2 = (uint8_t *)&TB[(n-1)*4];
for (position = n-1 ; position>-1; position--) {
// if ((position%8) == 0)
......@@ -383,15 +383,15 @@ void phy_viterbi_lte_sse2(s8 *y,u8 *decoded_bytes,u16 n) {
#else //EXPRESSMIMO_TARGET
void phy_viterbi_lte(s8 *y,u8 *decoded_bytes,u16 n) {
void phy_viterbi_lte(int8_t *y,uint8_t *decoded_bytes,uint16_t n) {
}
#endif //EXPRESSMIMO_TARGET
/*
void print_bytes(__m128i x,s8 *s) {
void print_bytes(__m128i x,int8_t *s) {
u8 *tempb = (u8 *)&x;
uint8_t *tempb = (uint8_t *)&x;
printf("%s : %u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u\n",s,
tempb[0],tempb[1],tempb[2],tempb[3],tempb[4],tempb[5],tempb[6],tempb[7],
......@@ -401,15 +401,15 @@ void print_bytes(__m128i x,s8 *s) {
*/
#ifdef TEST_DEBUG
int test_viterbi(u8 dabflag)
int test_viterbi(uint8_t dabflag)
{
u8 test[8];
//_declspec(align(16)) s8 channel_output[512];
//_declspec(align(16)) u8 output[512],decoded_output[16], *inPtr, *outPtr;
uint8_t test[8];
//_declspec(align(16)) int8_t channel_output[512];
//_declspec(align(16)) uint8_t output[512],decoded_output[16], *inPtr, *outPtr;
s8 channel_output[512];
u8 output[512],decoded_output[16], *inPtr, *outPtr;
u32 i;
int8_t channel_output[512];
uint8_t output[512],decoded_output[16], *inPtr, *outPtr;
uint32_t i;
test[0] = 7;
......@@ -456,7 +456,7 @@ int test_viterbi(u8 dabflag)
int main(int argc, char **argv) {
char c;
u8 dabflag=0;
uint8_t dabflag=0;
while ((c = getopt (argc, argv, "d")) != -1) {
if (c=='d')
......
This diff is collapsed.