scmxx-0.9.0/0002755000175000017500000000000010401301642012505 5ustar hendrikhendrikscmxx-0.9.0/src/0002755000175000017500000000000010401301641013273 5ustar hendrikhendrikscmxx-0.9.0/src/helper/0002755000175000017500000000000010401301573014556 5ustar hendrikhendrikscmxx-0.9.0/src/helper/console.c0000644000175000017500000000657110401277557016411 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #if ! ( defined(OS2_API) || defined(WINDOWS_API) ) #define UNIX_API 1 #endif #if defined(UNIX_API) #include #include static long console_width_sys (int fd) { struct winsize wsize; #if defined(TIOCGWINSZ) if (ioctl(fd,TIOCGWINSZ,&wsize) == 0) return wsize.ws_col; #endif return 0; } #else #if defined(WINDOWS_API) #include static long console_width_sys (int fd) { HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO i; if (GetConsoleScreenBufferInfo(h,&i)) /* Window command window jumps to a new line before * recognizing the character is a newline character. * So we must use 79 for a width of 80. */ return i.dwSize.X-1; return 0; } #else static long console_width_sys (int fd) { return 0; } #endif #endif long console_width(int fd) { char* cols = getenv("COLUMNS"); long width = console_width_sys(fd); char* temp = NULL; if (!width && cols) width = strtol(cols,&temp,10); return (width)? width : 78; } void console_print_status (int fd, const char* text, size_t textlen, const unsigned long* current, const unsigned long* total, unsigned int fcount) { size_t width = console_width(fd); size_t w = 0; size_t barlen = width; unsigned int c = 0; size_t i = 0; size_t k = 0; char numout[6+1]; unsigned long lcurrent, ltotal; if (current == NULL || total == NULL || fcount == 0) return; write(fd,"\r",1); if (str_len(text) && textlen) { write(fd,text,textlen); i = strn_width(text,textlen); barlen -= i; w += i; } write(fd," ",1); barlen -= 1 - (i+1)%fcount; w += 1; barlen = (barlen/fcount)-(sizeof(numout)-1)-2; for (; c < fcount; ++c) { lcurrent = current[c]; ltotal = total[c]; if (ltotal == 0) { if (lcurrent == 0) lcurrent = 1; ltotal = lcurrent; } /* print status bar */ write(fd,"[",1); w += 1; k = 0; for (i = 0; i < barlen; ++i) { if (lcurrent != 0) { if (k < ((lcurrent*barlen)/ltotal)) { write(fd,"=",1); } else if (k == ((lcurrent*barlen)/ltotal)) { if (lcurrent == ltotal) write(fd,"=",1); else write(fd,">",1); } else { write(fd," ",1); } ++k; } else { write(fd," ",1); } } w += barlen; write(fd,"]",1); w += 1; /* status in numbers */ snprintf(numout,sizeof(numout)," %3lu%% ",(100*lcurrent)/ltotal); write(fd,numout,strlen(numout)); w += strlen(numout); } while (w++ < width) write(fd," ",1); write(fd,"\r",1); } scmxx-0.9.0/src/helper/output.c0000644000175000017500000000027610342315020016261 0ustar hendrikhendrik #include static int verbosity; void helper_init () { verbosity = 0; } int verbosity_get () { return verbosity; } void verbosity_set (int level) { verbosity = level; } scmxx-0.9.0/src/helper/mem.c0000644000175000017500000000442210343322015015477 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include #include /* #include */ #include #include #include void* mem_realloc (void* oldpointer, size_t size) { void* retval; if ((retval=realloc(oldpointer,size))==NULL && size>0) { fprintf(stderr,"%s\n",_("Memory allocation failure")); exit(EXIT_FAILURE); } return retval; } void* mem_alloc (size_t size, short zero_it) { void* retval; retval=mem_realloc(NULL,size); if (zero_it) { memset(retval,0,size); } return retval; } int mem_map(char* file, struct mmapped_file* fs) { struct stat s; int fd; off_t counter = 0; ssize_t status = 0; if ((fd = open (file, O_RDONLY)) < 0) return -1; if (fstat(fd,&s) < 0) return -1; fs->size = s.st_size; /* fs->ptr = mmap(NULL,fs->size,PROT_READ,MAP_PRIVATE,fd,0); */ /* if (fs->ptr == MAP_FAILED) return -1; */ fs->ptr = mem_alloc(fs->size,1); do { status = read(fd,((uint8_t*)fs->ptr)+counter,fs->size); if (status == -1 && errno != EAGAIN && errno != EINTR) { fs->ptr = mem_realloc(fs->ptr,0); return -1; } counter += status; } while (counter < fs->size); if (close(fd) < 0) return -1; return 0; } void mem_unmap (struct mmapped_file* fs) { /* if (munmap(fs->ptr,fs->size) < 0) { */ /* fprintf(stderr,"%s: %s\n","Error",strerror(errno)); */ /* exit(EXIT_FAILURE); */ /* } */ fs->ptr = mem_realloc(fs->ptr,(fs->size=0)); } scmxx-0.9.0/src/helper/file.c0000644000175000017500000000552310342315020015640 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include #include #include #include #include void file_close (int filedes) { if (filedes > 2) close(filedes); } int file_accessible_ro (char* file) { int myfd; myfd = open(file,O_RDONLY); file_close(myfd); if (myfd == -1) return 0; else return 1; } int file_open_input (char* file) { int myfd; if (str_len(file) && strcmp(file,"-")) { myfd = open(file,O_RDONLY); if (myfd == -1) { errexit(_("Could not access %s: %s\n"),file, strerror(errno)); } } else { myfd = STDIN_FILENO; file = "stdin"; } print_verbose(1,_("Accessing %s\n"),file); if (isatty(myfd)) { print_verbose(0,"%s:\n",_("Please input the data and finish with Ctrl-D on an empty line")); } return(myfd); } int file_open_output (char* file) { int myfd; if (str_len(file) && strcmp(file,"-")) { myfd=open(file ,O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR|S_IRGRP); if (myfd==-1){ file_close(myfd); errexit(_("%s could not be created: %s\n"),file, strerror(errno)); } else { print_verbose(1,_("%s created.\n"),file); } }else{ myfd=STDOUT_FILENO; } return(myfd); } #define FILE_READ_SIZE 175 unsigned int file_read_binary (char* file, char** buffer) { int myfd = file_open_input(file); size_t bsize = FILE_READ_SIZE; char* b = mem_alloc(bsize*sizeof(*b),0); unsigned int count = 0; int status = 1; while (status > 0) { if (count >= bsize) { bsize += FILE_READ_SIZE; b = mem_realloc(b,bsize*sizeof(*b)); } while (status > 0 && count < bsize) { status = read(myfd,b+count,bsize-count); if (status > 0) count += status; else if (status < 0) { /* FIXME: check for harmless errors */ print_error("%s\n", strerror(errno)); mem_realloc(b,0); file_close(myfd); return 0; } } } file_close(myfd); *buffer = b; print_verbose(1,ngettext("%s has %d byte.\n", "%s has %d bytes.\n", count), file,count); return count; } scmxx-0.9.0/src/helper/num.c0000644000175000017500000000656110367440070015536 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include /* requires to link with -lm * does not work with Cygwin (log10l() not implemented) */ #include #if defined(HAVE_MATH_H) && defined(HAVE_LOG10) && defined(HAVE_LABS) #include unsigned int numlen (long num) { unsigned int a = 1; if (num == 0) return 1; else if (num < 0) ++a; return (unsigned int)(log10((double)labs(num))+a); } #else unsigned int numlen (long num) { int retval = 1; if (num < 0) { ++retval; num *= -1; } while (num >= 10) { ++retval; num /= 10; } return retval; } #endif unsigned int hexstr2int (char *hexstring, unsigned int length) { unsigned int i = 0; unsigned int intvalue = 0; unsigned int shift; if (str_len(hexstring) < length) length = str_len(hexstring); shift = 4*(length-1); for (;i < length; ++i) { switch (hexstring[i]) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': intvalue += ((hexstring[i] - '0') << shift); default: break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': intvalue += ((hexstring[i] - 'A' + 10) << shift); break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': intvalue += ((hexstring[i] - 'a' + 10) << shift); break; } shift -= 4; //multiplicator: <<4* = *16^ } return intvalue; } int is_number(const char* s) { unsigned int i = 0; if (str_len(s) == 0) return 0; for (; i < strlen(s); ++i) if (isdigit((int)s[i]) == 0) return 0; return 1; } int is_telephone_number (const char* s) { if (str_len(s) == 0) return 0; if (s[0] == '+') ++s; return is_number(s); } uint16_t letohs (uint16_t i) { uint8_t* k = (uint8_t*)&i; return (uint16_t)(k[0]|(k[1]<<8)); } uint32_t letohl (uint32_t i) { uint8_t* k = (uint8_t*)&i; return (uint32_t)(k[0]|(k[1]<<8)|(k[2]<<16)|(k[3]<<24)); } #include uint16_t htoles (uint16_t i) { union { struct __attribute__((packed)) { uint8_t low; uint8_t high; } s; uint16_t n; } u; assert(sizeof(u) == sizeof(uint16_t)); u.s.low = i&0xFF; u.s.high = (i>>8)&0xFF; return u.n; } uint32_t htolel (uint32_t i) { union { struct __attribute__((packed)) { uint8_t lowest; uint8_t low; uint8_t high; uint8_t highest; } s; uint32_t n; } u; assert(sizeof(u) == sizeof(uint32_t)); u.s.lowest = i&0xFF; u.s.low = (i>>8)&0xFF; u.s.high = (i>>16)&0xFF; u.s.highest = (i>>24)&0xFF; return (uint32_t)u.n; } scmxx-0.9.0/src/helper/str_array.c0000644000175000017500000000500710375735027016747 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "helper.h" #include #include #include str_array_t* str_split (char* str, char* split, unsigned long count) { unsigned int i = 0; char* temp = str; char* temp2 = str; char** retval = NULL; size_t len = str_len(split); while (temp2 != NULL) { ++i; temp2 = strstr(temp,split); if (temp2 != NULL) temp = temp2 + len; } if (count == 0 || i < count) count = i; retval = mem_alloc((count+1)*sizeof(*retval),0); retval[count] = NULL; for (i = 0; i < count; ++i) { retval[i] = str; str = strstr(retval[i],split); if (str != NULL) { memset(str,0,len); str += len; } } return retval; } void str_array_uniq (str_array_t* array) { size_t i = 0, k = 0, l = 0; while (array[i] != NULL) ++i; for (; k < i; ++k) if (array[k] != NULL) for (l = k+1; l < i; ++l) if (array[l] != NULL && strcmp(array[l],array[k]) == 0) array[l] = NULL; l = 0; for (k = 0; k < i; ++k) { if (array[k] == NULL) { if (l <= k) l = k+1; while (array[l] == NULL && l < i) ++l; if (l == i) break; array[k] = array[l]; array[l++] = NULL; } } } str_array_t* str_array_append (str_array_t* array1, size_t size1, str_array_t* array2, size_t size2) { if (size2 > 0) { array1 = mem_realloc(array1,(size1+size2+1)*sizeof(array1)); array1[size1+size2] = NULL; do { --size2; array1[size1+size2] = array2[size2]; } while (size2 > 0); } return array1; } static int str_array_qsort_cb (const void* a, const void* b) { return strcmp((const char*)a,(const char*)b); } void str_array_sort (str_array_t* array) { size_t i = 0; while(array[i] != NULL) ++i; qsort((void*)array[0],i,sizeof(*array),str_array_qsort_cb); } scmxx-0.9.0/src/helper/str_list.c0000644000175000017500000000260210375735027016602 0ustar hendrikhendrik#include #include void str_list_init (struct str_list* this) { this->data = NULL; this->prev = NULL; this->next = NULL; } struct str_list* str_list_create (char* data) { struct str_list* retval = malloc(sizeof(*retval)); if (retval == NULL) return NULL; str_list_init(retval); retval->data = data; return retval; } void str_list_destroy (struct str_list* this) { if (this) free(this); } void str_list_insert (struct str_list* entry, struct str_list* tail) { struct str_list* old_next = entry->next; tail = str_list_rewind(tail); if (entry) entry->next = tail; if (tail) tail->prev = entry; if (old_next) { while (tail->next != NULL) tail = tail->next; tail->next = old_next; old_next->prev = tail; } } struct str_list* str_list_append (struct str_list* list, struct str_list* tail) { if (list == NULL) return tail; if (tail == NULL) return list; while (list->next != NULL) list = list->next; str_list_insert(list,tail); return tail; } struct str_list* str_list_remove (struct str_list* element) { if (element == NULL) return NULL; if (element->next) element->next->prev = element->prev; if (element->prev) element->prev->next = element->next; return element; } struct str_list* str_list_rewind (struct str_list* list) { if (list == NULL) return NULL; while (list->prev != NULL) list = list->prev; return list; } scmxx-0.9.0/src/helper/gsmnum.c0000644000175000017500000001003610346675223016244 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include uint8_t numtype (const char* number) { //see ETSI 23.040, Ch. 9.1.2.5 if (str_len(number) == 0 || *number != '+') { return 0x81; } else { return 0x91; } } void gsm_number_init (struct gsm_number* s) { if (s == NULL) return; s->toa.type = GSM_NUMBER_TYPE_UNKNOWN; s->toa.plan = GSM_NUMBER_PLAN_UNKNOWN; memset(s->digits,0,GSM_NUMBER_DIGITS_LEN); s->text = NULL; } void gsm_number_delete (struct gsm_number* s) { if (s == NULL) return; mem_realloc(s->text,0); } int gsm_number_compare (const struct gsm_number* s1, const struct gsm_number* s2) { if (s1->toa.type == s2->toa.type && (str_len(s1->digits) != 0 || str_len(s2->digits) != 0 || strcmp(s1->digits,s2->digits) == 0) && ucs4cmp(s1->text,s2->text) == 0) { return 1; } else { return 0; } } uint8_t gsm_number_get_toa (const struct gsm_number* this) { if (this == NULL) return 0x80; else return (0x80+(this->toa.type<<4)+this->toa.plan); } void gsm_number_set_toa (struct gsm_number* this, uint8_t toa) { if (this == NULL) return; this->toa.type = ((toa>>4)&0x7); this->toa.plan = toa&0xF; } void gsm_number_set_semioctets (struct gsm_number* this, uint8_t toa, uint8_t* semioctets, size_t len) { char* map = "0123456789*#+??\0"; uint8_t i = 0; if (this == NULL || (semioctets == NULL && len)) return; gsm_number_set_toa(this,toa); if (2*len > GSM_NUMBER_DIGITS_LEN) len = GSM_NUMBER_DIGITS_LEN/2; for (; i < len; ++i) { this->digits[2*i] = map[semioctets[i]&0xF]; if (((semioctets[i]>>4)&0xF) != 0xF) this->digits[2*i+1] = map[(semioctets[i]>>4)&0xF]; } } size_t gsm_number_get_semioctets (struct gsm_number* this, uint8_t* out) { size_t len = strlen(this->digits); unsigned int i = 0; char* map = "0123456789*#+?"; char* m; int off = 0; memset(out,0,strlen(this->digits)); for (;i < len; ++i) { m = strchr(map,(int)this->digits[i]); if (m == NULL) { break; } else out[i/2] |= (m-map)< 0) { if (number[len-1] == '"') --len; if (number[off] == '"') ++off; if (len < off) return; if (number[off] == '+') { this->toa.type = GSM_NUMBER_TYPE_INTERNAT; ++off; } len -= off; if (len > GSM_NUMBER_DIGITS_LEN) len = GSM_NUMBER_DIGITS_LEN; memset(this->digits,0,sizeof(this->digits)); strncpy(this->digits,number+off,len); if (is_number(this->digits) == 0) memset(this->digits,0,sizeof(this->digits)); } } char* gsm_number_get (const struct gsm_number* this) { char* retval = NULL; unsigned int length; if (this == NULL) return NULL; length = str_len(this->digits); if (length == 0) return NULL; if (this->toa.type == GSM_NUMBER_TYPE_TEXT) return NULL; if (this->toa.type == GSM_NUMBER_TYPE_INTERNAT) ++length; retval = mem_alloc(length+1,1); snprintf(retval,length+1,"%s%s", (this->toa.type == GSM_NUMBER_TYPE_INTERNAT)? "+" : "", this->digits); return retval; } scmxx-0.9.0/src/helper/Makefile0000644000175000017500000000004610251112171016211 0ustar hendrikhendrikSUBDIR=helper include ../Makefile.sub scmxx-0.9.0/src/helper/str.c0000644000175000017500000000436210375735027015554 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "helper.h" #include #include #include inline size_t str_len (const char* s) { if (s != NULL) return strlen(s); else return 0; } char* strn_dup (const char* input, size_t insize) { void* retval = NULL; if (input != NULL) { retval = mem_alloc(insize+1,1); strncpy(retval,input,insize); } return retval; } char* str_dup (const char* input) { return strn_dup(input,str_len(input)); } size_t strn_width (const char* s, size_t len) { size_t i = 0; size_t result = 0; i = str_len(s); if (i < len) len = i; if (MB_CUR_MAX != 6) return (len/MB_CUR_MAX); else { /* assume UTF-8 */ for (i = 0; i < len; ++i) if ((s[i]&0xC0) != 0x80) ++result; return result; } } size_t str_width (const char* s) { return strn_width(s,str_len(s)); } int strn_valid (const char* s, size_t len) { size_t i = 0; unsigned char size = 0; unsigned char zero = 0; if (MB_CUR_MAX == 6) { /* assume UTF-8 */ for (; i < len; ++i) if ((s[i]&0xC0) != 0x80) { if (size != 0) return 0; zero = 0x40; if (s[i]&0x40) { ++size; zero >>= 1; } if (s[i]&0x20) { ++size; zero >>= 1; } if (s[i]&0x10) { ++size; zero >>= 1; } if (s[i]&0x08) { ++size; zero >>= 1; } if (s[i]&0x04) { ++size; zero >>= 1; } if (s[1]&zero) return 0; } else { if (size == 0) return 0; else --size; } return (size == 0); } else { return ((len%MB_CUR_MAX) == 0); } } int str_valid (const char* s) { return strn_valid(s,str_len(s)); } scmxx-0.9.0/src/adr2vcf/0002755000175000017500000000000010401301574014627 5ustar hendrikhendrikscmxx-0.9.0/src/adr2vcf/adr2vcf.h0000644000175000017500000000121610350060527016330 0ustar hendrikhendrik #include //number of fields /* SL42, SL45 and probably SL45i use version 2 * ME45 and S45 and version 2 or 3 */ #define FILE_VERSION_2 19 #define FILE_VERSION_3 20 /* S55 uses version 7 */ #define FILE_VERSION_7 28 /* SL55 uses version 8 */ #define FILE_VERSION_8 29 uint16_t known_fsizes[] = { FILE_VERSION_2, FILE_VERSION_3, FILE_VERSION_7, FILE_VERSION_8, 0 //last entry }; enum field_spec_type { FTYPE_INT_8BIT = 0x0, FTYPE_SEMIOCTET = 0x1, FTYPE_STRING_8BIT = 0x2, FTYPE_STRING_16BIT = 0x3, FTYPE_INT_16BIT = 0x4, FTYPE_DATE = 0x5 }; struct field_spec { uint16_t size; enum field_spec_type type; }; scmxx-0.9.0/src/adr2vcf/Makefile0000644000175000017500000000004710350060527016271 0ustar hendrikhendrikSUBDIR=adr2vcf include ../Makefile.sub scmxx-0.9.0/src/adr2vcf/opt.c0000644000175000017500000000416210371707040015602 0ustar hendrikhendrik#include #include "opt.h" #include #include #include #include #include static struct args_t args; #include "config.h" void args_init () { args.system_charset = NULL; args.encoding = ENC_EIGHTBIT; args.charset = "UTF-8"; args.vcard_version = VCARD_VERSION_21; args.help = 0; args.version = 0; } static void arg_fill (int short_opt, const char* long_opt, char* argument) { switch (short_opt) { case 'h': args.help=1; break; case 'V': args.version=1; break; case 0: if (str_len(long_opt)) { if (!strcmp(long_opt,"system-charset")) { args.system_charset = argument; } else if (!strcmp(long_opt,"7bit")) { args.encoding = ENC_SEVENBIT; } else if (!strcmp(long_opt,"8bit")) { args.encoding = ENC_EIGHTBIT; } else if (!strcmp(long_opt,"base64")) { args.encoding = ENC_BASE64; } else if (!strcmp(long_opt,"quoted-printable")) { args.encoding = ENC_QUOTEDPRINTABLE; } else if (!strcmp(long_opt,"vcard3")) { args.vcard_version = VCARD_VERSION_30; } } break; } } //gettext workaround #ifdef _ #undef _ #endif #define _(s) s struct args_def_type args_type_list[] = { { 0, _("options"), 0 }, ARGS_DEF_TYPE_LAST }; struct args_def args_list[] = { {"7bit",0,NULL,ARGS_PARAM_NONE,NULL,0, "select 7 bit encoding"}, {"8bit",0,NULL,ARGS_PARAM_NONE,NULL,0, "select 8 bit encoding (default)"}, {"base64",0,NULL,ARGS_PARAM_NONE,NULL,0, "select base64 encoding"}, {"help",'h',NULL,ARGS_PARAM_NONE,NULL,0, "print this message"}, {"quoted-printable",0,NULL,ARGS_PARAM_NONE,NULL,0, "select quoted-printable encoding"}, {"system-charset",0,NULL,ARGS_PARAM_REQ,_("charset"),0, "use charset for output (default: UTF-8)"}, {"vcard3",0,NULL,ARGS_PARAM_NONE,NULL,0, "output vCard-3.0 instead of vCard-2.1"}, {"version",'V',NULL,ARGS_PARAM_NONE,NULL,0, "print the version number"}, ARGS_DEF_LAST }; char** adr2vcf_args_parse (int argc, char** argv) { return args_parse(argc,argv,args_list,arg_fill); } struct args_t* adr2vcf_get_args () { return &args; } scmxx-0.9.0/src/adr2vcf/opt.h0000644000175000017500000000240710371707040015607 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2003 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SCMXX_OPT_H #define SCMXX_OPT_H #include #include extern struct args_def_type args_type_list[]; extern struct args_def args_list[]; struct args_t { char* system_charset; enum encoding_value encoding; char* charset; enum vcard_version vcard_version; unsigned int help :1; unsigned int version :1; }; /* a function to init the variables in the struct */ void args_init (); char** adr2vcf_args_parse (int argc, char** argv); struct args_t* adr2vcf_get_args (); #endif scmxx-0.9.0/src/adr2vcf/adr2vcf.c0000644000175000017500000003762710377326433016354 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "adr2vcf.h" #include "opt.h" #include #include #include #include #include #include #include #include "intincl.h" #include #include #include #include #include #define PROGRAM_NAME "adr2vcf" #define PROGRAM_VERSION "1.0rc1" #include int qsort_int32_callback (const void* a, const void* b) { return (int)((*(uint32_t*)a)-(*(uint32_t*)b)); } /* return entrysize if entry seems to be valid * or 0 if entry is invalid */ uint32_t verify_offset (void* ptr, uint16_t fields, struct field_spec* specs) { uint32_t retval = 0; uint16_t k = 0; uint16_t fieldsize; for (; k < fields; ++k) { fieldsize = letohs(((uint16_t*)ptr)[k]); if (fieldsize > specs[k].size || fieldsize == 0) { //detected a broken entry return 0; } retval += fieldsize; } return retval; } /* return a list of valid offsets or return NULL on error * returned value must be free()d */ uint32_t* get_verify_offsets (uint16_t fields, struct field_spec* specs, struct mmapped_file* file5, char* file) { struct mmapped_file file7; uint32_t* ptrlist; uint8_t* i; unsigned int counter = 0; uint32_t entrysize; /* map the offset file here and put all values into a list */ if (mem_map(file,&file7) < 0) { fprintf(stderr,"%s: %s\n",file,strerror(errno)); return NULL; } ptrlist = mem_alloc(file7.size + sizeof(uint32_t),0); if (ptrlist == NULL) { mem_unmap(&file7); return NULL; } for (i = file7.ptr; i < ((uint8_t*)file7.ptr)+file7.size; i += sizeof(uint32_t)) { ptrlist[counter] = letohl(*(uint32_t*)i); //do not include deleted entries (MSB is 1) #ifdef DEBUG fprintf(DEBUG,"Checking verification offset 0x%08lx\n", (unsigned long)ptrlist[counter]); #endif if ((ptrlist[counter]&0x80000000) == 0 && ptrlist[counter]+(fields*sizeof(uint16_t)) < (uint32_t)file5->size) { entrysize = verify_offset(((uint8_t*)file5->ptr)+ptrlist[counter],fields,specs); if (entrysize > 0 && ptrlist[counter]+(fields*sizeof(uint16_t))+entrysize <= (uint32_t)file5->size) { #if DEBUG fprintf(DEBUG,"offset 0x%08x added to pointer list\n",ptrlist[counter]); #endif ++counter; } else { fprintf(stderr,"Warning: " "Detected broken verification entry at offset 0x%08lx: " "field size out of range.\n", (unsigned long)ptrlist[counter]); } } } if (counter == 0) { fprintf(stderr,"Warning: " "Verification list empty, probably the wrong file\n"); mem_realloc(ptrlist,0); return NULL; } //sorting the list qsort(ptrlist,counter,sizeof(uint32_t),&qsort_int32_callback); ptrlist[counter] = 0; mem_unmap(&file7); return ptrlist; } /* return a list of valid offsets or return NULL on error * returned value must be free()d */ uint32_t* get_offsets (uint16_t fields, struct field_spec* specs, uint16_t entrycount, struct mmapped_file* file) { uint8_t* i; uint32_t* ptrlist = NULL; unsigned int counter = 0; uint32_t entrysize; if (file == NULL) { return NULL; } ptrlist = (uint32_t*)mem_alloc((entrycount+1)*sizeof(uint32_t),0); //jump over file header i = (uint8_t*)(((uint16_t*)file->ptr) + 5 + fields); //do not go beyond entrycount or mmap'd area while (counter < entrycount && i < ((uint8_t*)file->ptr)+file->size) { //ignore all leading 0xdd while (*i == 0xdd) ++i; if (*i == 0xee) { ++i; //just ignore it, 0xdd case takes care of the rest } else { //found one if (i+(fields*sizeof(uint16_t)) < ((uint8_t*)file->ptr)+file->size) { entrysize = verify_offset(i,fields,specs); } else { entrysize = 0; } if (entrysize == 0 || i+(fields*sizeof(uint16_t))+entrysize > ((uint8_t*)file->ptr)+file->size) { //what to do on broken entry? fprintf(stderr,"Warning: " "Detected broken entry at offset 0x%08lx: " "field size out of range.\n", ((unsigned long)i-(unsigned long)file->ptr)); fprintf(stderr,"Warning: Aborting offset scan\n"); break; } else { ptrlist[counter++] = (uint32_t)((unsigned long)i-(unsigned long)file->ptr); } i += (fields*sizeof(uint16_t))+entrysize; } } ptrlist[counter] = 0; return ptrlist; } struct gsm_number* decode_telnum (uint8_t* field, uint8_t type) { struct gsm_number* s; size_t len = 0; s = mem_alloc(sizeof(*s),0); gsm_number_init(s); while (field[len] < 0xfe) ++len; gsm_number_set_semioctets(s,type,field,len); return s; } void print_telnum_field (void* h, uint8_t ptype, void* address1, uint32_t ttype) { struct gsm_number* num = decode_telnum((uint8_t*)address1,ptype); versit_out_number(h,num,ttype); mem_realloc(num,0); } void print_name_field (void* h, uint16_t size1, void* address1, uint16_t size2, void* address2) { ucs4char_t* first = convert_to_internal("UCS-2LE",(char*)address1,size1); ucs4char_t* last = convert_to_internal("UCS-2LE",(char*)address2,size2); versit_out_name(h,first,last); mem_realloc(first,0); mem_realloc(last,0); } void print_organization_field (void*h, uint16_t size1, void* address1) { ucs4char_t* org = convert_to_internal("UCS-2LE",(char*)address1,size1); versit_out_org(h,org); mem_realloc(org,0); } void print_address_field (void* h, uint16_t street_s, void* street, uint16_t town_s, void* town, uint16_t country_s, void* country, uint16_t postal_s, void* postal) { ucs4char_t* s = convert_to_internal("UCS-2LE",(char*)street,street_s); ucs4char_t* t = convert_to_internal("UCS-2LE",(char*)town,town_s); ucs4char_t* c = convert_to_internal("UCS-2LE",(char*)country,country_s); ucs4char_t* p = convert_to_internal("ISO-8859-1",(char*)postal,postal_s); versit_out_address(h,s,t,c,p); mem_realloc(s,0); mem_realloc(t,0); mem_realloc(c,0); mem_realloc(p,0); } void print_email_field (void* h, uint16_t size1, void* address1) { ucs4char_t* p = convert_to_internal("ISO-8859-1",(char*)address1,size1); versit_out_email(h,p); mem_realloc(p,0); } void print_url_field (void* h, uint16_t size1, void* address1) { ucs4char_t* p = convert_to_internal("ISO-8859-1",(char*)address1,size1); versit_out_url(h,p); mem_realloc(p,0); } void print_revision_field (void* h, uint16_t size1, void* address1) { ucs4char_t* p = convert_to_internal("ISO-8859-1",(char*)address1,size1); versit_out_revision(h,p); mem_realloc(p,0); } void print_birthday_field (void* h, uint16_t size1, void* address1) { uint16_t day; uint16_t month; uint16_t year; if (size1 < 6) return; day = letohs(((uint16_t*)address1)[0]); month = letohs(((uint16_t*)address1)[1]); year = letohs(((uint16_t*)address1)[2]); versit_out_birthday(h,year,month,day); } void process_data (FILE* fp, const uint16_t fields, const void* address, struct args_t* args) { unsigned int i = 0; uint16_t* sizes = (uint16_t*)address; void** adr; void* h; adr = mem_alloc(fields*sizeof(*adr),1); adr[0] = ((uint16_t*)address) + fields; for (i = 1; i < fields; ++i) { adr[i] = ((uint8_t*)adr[i-1]) + letohs(sizes[i-1]); } h = versit_out_open(fp,args->system_charset,args->encoding,args->vcard_version); //modification time / revision switch (fields) { case FILE_VERSION_2: case FILE_VERSION_3: print_revision_field(h,letohs(sizes[18]),adr[18]); break; case FILE_VERSION_7: case FILE_VERSION_8: print_revision_field(h,letohs(sizes[22]),adr[22]); break; } //both parts of the name print_name_field(h,letohs(sizes[0]),adr[0],letohs(sizes[1]),adr[1]); //organization/company print_organization_field(h,letohs(sizes[2]),adr[2]); //address switch (fields) { case FILE_VERSION_2: case FILE_VERSION_3: print_address_field(h,letohs(sizes[3]),adr[3],letohs(sizes[4]),adr[4], letohs(sizes[5]),adr[5],letohs(sizes[9]),adr[9]); break; case FILE_VERSION_7: case FILE_VERSION_8: print_address_field(h,letohs(sizes[3]),adr[3],letohs(sizes[4]),adr[4], letohs(sizes[5]),adr[5],letohs(sizes[11]),adr[11]); break; } //electronic mail switch (fields) { case FILE_VERSION_2: case FILE_VERSION_3: print_email_field(h,letohs(sizes[7]),adr[7]); break; case FILE_VERSION_7: case FILE_VERSION_8: print_email_field(h,letohs(sizes[8]),adr[8]); print_email_field(h,letohs(sizes[9]),adr[9]); break; } //home page switch (fields) { case FILE_VERSION_2: case FILE_VERSION_3: print_url_field(h,letohs(sizes[8]),adr[8]); break; case FILE_VERSION_7: case FILE_VERSION_8: print_url_field(h,letohs(sizes[10]),adr[10]); break; } //telephone numbers switch (fields) { case FILE_VERSION_2: case FILE_VERSION_3: print_telnum_field(h,*((uint8_t*)adr[14]),adr[10],VERSIT_NUMBER_HOME); print_telnum_field(h,*((uint8_t*)adr[15]),adr[11],VERSIT_NUMBER_WORK); print_telnum_field(h,*((uint8_t*)adr[16]),adr[12],VERSIT_NUMBER_CELL); print_telnum_field(h,*((uint8_t*)adr[17]),adr[13],VERSIT_NUMBER_FAX); break; case FILE_VERSION_7: case FILE_VERSION_8: print_telnum_field(h,*((uint8_t*)adr[17]),adr[12],VERSIT_NUMBER_HOME); print_telnum_field(h,*((uint8_t*)adr[18]),adr[13],VERSIT_NUMBER_WORK); print_telnum_field(h,*((uint8_t*)adr[19]),adr[14],VERSIT_NUMBER_CELL); print_telnum_field(h,*((uint8_t*)adr[20]),adr[15],VERSIT_NUMBER_FAX); print_telnum_field(h,*((uint8_t*)adr[21]),adr[16],VERSIT_NUMBER_FAX); break; } //birthday switch(fields) { case FILE_VERSION_7: case FILE_VERSION_8: print_birthday_field(h,letohs(sizes[25]),adr[25]); break; } #ifdef DEBUG //unknown fields switch (fields) { case FILE_VERSION_3: fprintf(DEBUG,"Field 20 has unknown meaning: 0x%02x 0x%02x 0x%02x 0x%02x\n", ((uint8_t*)adr[19])[0],((uint8_t*)adr[19])[1],((uint8_t*)adr[19])[2],((uint8_t*)adr[19])[3]); case FILE_VERSION_2: break; case FILE_VERSION_8: case FILE_VERSION_7: fprintf(DEBUG,"Field 28 has unknown meaning: 0x%02x\n", ((uint8_t*)adr[27])[0]); fprintf(DEBUG,"Field 25 has unknown meaning: 0x%02x 0x%02x 0x%02x 0x%02x\n", ((uint8_t*)adr[24])[0],((uint8_t*)adr[24])[1],((uint8_t*)adr[24])[2],((uint8_t*)adr[24])[3]); fprintf(DEBUG,"Field 24 has unknown meaning: 0x%02x 0x%02x\n", ((uint8_t*)adr[23])[0],((uint8_t*)adr[23])[1]); break; } #endif versit_out_close(h); } void process_all_data (const uint16_t fields, const void* base, uint32_t* off, struct args_t* args) { unsigned int i = 0; while (known_fsizes[i] != fields && known_fsizes[i] != 0) ++i; if (known_fsizes[i] == 0) { fprintf(stderr,"Error: " "Number of fields (%d) is not registered. " "Unknown format, aborting.\n", fields); exit(EXIT_FAILURE); } for (i = 0; off[i] != 0; ++i) { if (i) fprintf(stdout,"\r\n"); #ifdef DEBUG fprintf(DEBUG,"Processing offset 0x%08lx\n",(unsigned long)off[i]); #endif process_data(stdout,fields,((uint8_t*)base)+off[i],args); } } uint16_t adr_data_get_fieldcount (void* i) { return letohs(PTR16(i)[0]); } struct field_spec* adr_data_get_fieldspecs (void* i, int count) { struct field_spec* specs = mem_alloc(count*sizeof(*specs),1); uint16_t k = 0; for (; k < count; ++k) { specs[k].size = letohs(PTR16(i)[k+5]); specs[k].type = specs[k].size&0x7; specs[k].size = (specs[k].size>>3)&0x1FFF; #ifdef DEBUG fprintf(DEBUG,"Field %2d: type=0x%x, maxsize=%d bytes\n", k+1,specs[k].type,specs[k].size); #endif } return specs; } uint16_t adr_data_get_entries (void* i) { uint16_t entries = letohs(PTR16(i)[1]); #ifdef DEBUG fprintf(DEBUG,"Number of entries: %d\n",entries); #endif return entries; } uint32_t* offset_list_merge (uint32_t* ptrlist5, uint16_t counter5, uint32_t* ptrlist7, uint16_t counter7) { /* merging both lists */ if (ptrlist7 != NULL) { //resize ptrlist7 = mem_realloc(ptrlist7,(counter5+counter7+1)*sizeof(*ptrlist7)); //merge for (counter5 = 0; ptrlist5[counter5] != 0; ++counter5) ptrlist7[counter7++] = ptrlist5[counter5]; ptrlist7[counter7] = 0; //sort qsort(ptrlist7,counter7,sizeof(*ptrlist7),&qsort_int32_callback); //copy back and omit duplicates ptrlist5 = mem_realloc(ptrlist5,(counter7+1)*sizeof(*ptrlist5)); counter5 = 0; for (counter7 = 0; ptrlist7[counter7] != 0; ++counter7) { if (ptrlist7[counter7+1] == 0) break; if (ptrlist7[counter7] != ptrlist7[counter7+1]) { ptrlist5[counter5++] = ptrlist7[counter7]; } } ptrlist5[counter5] = 0; mem_realloc(ptrlist7,0); } return ptrlist5; } int main (int argc, char** argv) { struct mmapped_file file5; uint32_t* ptrlist5 = NULL; uint32_t* ptrlist7 = NULL; uint16_t fields; //amount of fields struct field_spec* specs; uint16_t entries; /* what the data file headers says */ uint16_t counter5 = 0; /* what we count in the data file */ uint16_t counter7 = 0; /* what we count in the offset file */ char** files = NULL; struct args_t* args; int exit_code = EXIT_SUCCESS; //set program locale setlocale(LC_ALL,""); args_init(); files = adr2vcf_args_parse(argc,argv); args = adr2vcf_get_args(); if (args->version) { print_proginfo(PROGRAM_NAME,PROGRAM_VERSION); exit(exit_code); } else if (files == NULL || files[0] == NULL || (files[1] != NULL && files[2] != NULL)) { exit_code = EXIT_FAILURE; args->help = 1; } //sets the output charset charset_init(args->system_charset,1); if (args->help) { help(argv[0],args_type_list,args_list,"files..."); fprintf(stderr, "\n" "Known values for ?? are 02, 03, 07 and 08.\n" "The .adr files can be found in the \"/Address book/\" subdir of the flexmem memory.\n"); exit(exit_code); } print_disclaimer(); /* Now we have the offset list of probably valid entries * and can mmap the data file */ if (mem_map(files[0],&file5) < 0) { fprintf(stderr,"%s: %s\n",files[0],strerror(errno)); exit(EXIT_FAILURE); } /* extract the number of fields and their sizes */ fields = adr_data_get_fieldcount(file5.ptr); specs = adr_data_get_fieldspecs(file5.ptr,fields); entries = adr_data_get_entries(file5.ptr); /* get offset list from data file */ ptrlist5 = get_offsets(fields,specs,entries,&file5); while (ptrlist5[counter5] != 0) ++counter5; if (entries != counter5) { fprintf(stderr,"%s: Offset count (%d) does not match entry count field (%d)!\n", files[0],counter5,entries); } /* get verification offsets if two file names are present */ if (files[1] != NULL) { ptrlist7 = get_verify_offsets(fields,specs,&file5,files[1]); if (ptrlist7 == NULL) exit(EXIT_FAILURE); /* compare the number of entries of both files */ while (ptrlist7[counter7] != 0) ++counter7; if (entries != counter7) fprintf(stderr,"%s: Offset count (%d) does not match entry count field (%d) from file %s!\n", files[1],counter7,entries,files[0]); } else { if (entries != counter5) fprintf(stderr,"Hint: Try to use the 7F??.adr file for offset verification.\n"); } ptrlist5 = offset_list_merge(ptrlist5,counter5,ptrlist7,counter7); process_all_data(fields,file5.ptr,ptrlist5,args); exit(EXIT_SUCCESS); } scmxx-0.9.0/src/Makefile.in0000644000175000017500000000432610371707473015366 0ustar hendrikhendrikSHELL=@SHELL@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ mandir=@mandir@ CC=@CC@ CFLAGS= @CFLAGS@ LDFLAGS=@LDFLAGS@ LIBS=@LIBS@ BLUETOOTH_LIBS=@BLUETOOTH_LIBS@ INSTALL=@INSTALL@ OBJEXT=@OBJEXT@ EXEEXT=@EXEEXT@ PROGRAMS=scmxx apoconv adr2vcf smi SUBDIRS=$(PROGRAMS) atcommand charsets helper smspdu options versit OUTPREFIX=../ BINARIES=$(patsubst %,$(OUTPREFIX)%$(EXEEXT),$(PROGRAMS)) smspdu_dep=smspdu charsets helper scmxx_dep=scmxx atcommand $(smspdu_dep) options scmxx_libs=$(BLUETOOTH_LIBS) apoconv_dep=apoconv charsets helper adr2vcf_dep=adr2vcf charsets helper versit options smi_dep=smi $(smspdu_dep) options .PHONY: all all: $(BINARIES) $(OUTPREFIX)scmxx$(EXEEXT): $(patsubst %, %.$(OBJEXT), $(scmxx_dep)) $(OUTPREFIX)apoconv$(EXEEXT): $(patsubst %, %.$(OBJEXT), $(apoconv_dep)) $(OUTPREFIX)adr2vcf$(EXEEXT): $(patsubst %, %.$(OBJEXT), $(adr2vcf_dep)) $(OUTPREFIX)smi$(EXEEXT): $(patsubst %, %.$(OBJEXT), $(smi_dep)) #GNU make will automatically call the rule for the include #It will print a non-fatal error message, though but do not #worry about it. #If your make cannot do this and you cannot use GNU make, #change this from 'include' to 'sinclude' and run # make depend #before compiling. #ifneq ($(MAKECMDGOALS),clean) #ifneq ($(MAKECMDGOALS),distclean) #include .dependencies #endif #endif #.PHONY: depend #depend: .dependencies #.dependencies: $(DEP_SRC) $(DEP_HEADER) # $(CC) $(CFLAGS) -MM $(DEP_SRC) >.dependencies .PHONY: %-clean %-clean: @$(MAKE) -C $* clean .PHONY: clean clean: $(patsubst %,%-clean,$(SUBDIRS)) -rm -f $(BINARIES) .PHONY: %-distclean %-distclean: @$(MAKE) -C $* distclean .PHONY: distclean distclean: clean $(patsubst %,%-distclean,$(SUBDIRS)) -rm -f .dependencies .PHONY: install %-install install: $(patsubst %,%-install,$(BINARIES)) %-install: % $(INSTALL) -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 $* $(DESTDIR)$(bindir) .PHONY: uninstall %-uninstall uninstall: $(patsubst %,%-uninstall,$(BINARIES)) %-uninstall: % -rm -f $(DESTDIR)$(bindir)/$(notdir $*) %.$(OBJEXT): @$(MAKE) -C $* all $(BINARIES): $(CC) -o $@ $(patsubst %, %.$(OBJEXT), $($(notdir $(basename $@))_dep)) $(LDFLAGS) $($(notdir $(basename $@))_libs) $(LIBS) @if [ "$(EXEEXT)" != ".exe" ]; then chmod 755 $@; fi scmxx-0.9.0/src/options.h0000644000175000017500000000547510371707415015167 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2003 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef OPTIONS_H #define OPTIONS_H #include "intincl.h" struct args_def_type { int id; char* name; unsigned int required :1; }; #define ARGS_DEF_TYPE_LAST { -1, NULL, 0 } enum args_param_type { ARGS_PARAM_NONE = 0, //no parameter allowed ARGS_PARAM_OPT, //parameter is optional, does not work with libpopt ARGS_PARAM_REQ //parameter is required }; struct args_def { char* long_name; //long option name char short_name; //short option name, 0 for none char* env_var; //an environment variable to check enum args_param_type ptype; //parameter type /* for help output */ char* pname; //parameter name int type_id; //see args_def_type char* descr; //description }; #define ARGS_DEF_LAST { NULL, 0, NULL, ARGS_PARAM_NONE, NULL, -1, NULL } /* return full path of filename with * the configuration directory as base * return value needs to be freed */ char* configfile_get_path (char* package, char* filename); /* reads a config file located at filename * the config file must contain long-options only * seperator of option and arguments is '=' * comments have a '#' at beginning of line */ int configfile_parse (char* filepath, struct args_def* list, void (*arg_fill) (int short_opt, const char* long_opt, char* argument)); /* include environment variables */ void use_envvars (struct args_def* list, void (*arg_fill) (int short_opt, const char* long_opt, char* argument)); /* functions to fill the struct by parsing the command line * returns a NULL terminated list of files */ char** args_parse (int argc, char** argv, struct args_def* list, void (*arg_fill) (int short_opt, const char* long_opt, char* argument)); /** prints program syntax to stdout * @param me the program name (path is ignored) * @param types the list of global option types * @param params the list of parameters allowed * @param extra_args extra arguments representation */ void help (char* me, struct args_def_type* types, struct args_def* params, char* extra_args); #endif scmxx-0.9.0/src/smi/0002755000175000017500000000000010401301574014070 5ustar hendrikhendrikscmxx-0.9.0/src/smi/smifile.h0000644000175000017500000000146710366512262015707 0ustar hendrikhendrik#include #include struct smi_header { uint8_t magic[2]; uint8_t format; uint16_t headerlen; /* model specific fields */ } __attribute__ ((packed)); #define SMI_FORMAT_SL42 0x00 #define SMI_FORMAT_S55 0x02 struct smi_head_s55 { struct { uint8_t total; /* count of concatenated short message parts (total) */ uint8_t file; /* counts of parts in this file */ } parts __attribute__ ((packed)); uint16_t unknown1; uint8_t scts[7]; uint8_t unknown2; } __attribute__ ((packed)); #define SMI_DATA_SIZE 175 struct smi_entry { uint8_t status; uint8_t data[SMI_DATA_SIZE]; /* SMS TPDU data */ } __attribute__ ((packed)); #define SMI_READ 0x01 #define SMI_UNREAD 0x03 #define SMI_SENT 0x05 #define SMI_UNSENT 0x07 struct sms_slot_data** smifile_read (char* file); scmxx-0.9.0/src/smi/Makefile0000644000175000017500000000004310366512262015533 0ustar hendrikhendrikSUBDIR=smi include ../Makefile.sub scmxx-0.9.0/src/smi/opt.c0000644000175000017500000000313610371707152015047 0ustar hendrikhendrik#include #include "opt.h" #include #include #include #include #include static struct args_t args; #include "config.h" void args_init () { args.system_charset = NULL; args.output = OUTPUT_TEXT; args.help = 0; args.version = 0; } static void arg_fill (int short_opt, const char* long_opt, char* argument) { switch (short_opt) { case 'h': args.help=1; break; case 'V': args.version=1; break; case 0: if (str_len(long_opt)) { if (!strcmp(long_opt,"system-charset")) { args.system_charset = argument; } else if (!strcmp(long_opt,"text")) { args.output = OUTPUT_TEXT; } else if (!strcmp(long_opt,"csv")) { args.output = OUTPUT_CSV; } } break; } } //gettext workaround #ifdef _ #undef _ #endif #define _(s) s struct args_def_type args_type_list[] = { { 0, _("options"), 0 }, ARGS_DEF_TYPE_LAST }; struct args_def args_list[] = { {"csv",0,NULL,ARGS_PARAM_NONE,NULL,0, "output as PDU in CSV format"}, {"help",'h',NULL,ARGS_PARAM_NONE,NULL,0, "print this message"}, {"system-charset",0,NULL,ARGS_PARAM_REQ,_("charset"),0, "use charset for input/output from/to system"}, {"text",0,NULL,ARGS_PARAM_NONE,NULL,0, "output as text (default)"}, {"version",'V',NULL,ARGS_PARAM_NONE,NULL,0, "print the version number"}, ARGS_DEF_LAST }; void smi_use_envvars () { use_envvars(args_list,arg_fill); } char** smi_args_parse (int argc, char** argv) { return args_parse(argc,argv,args_list,arg_fill); } struct args_t* smi_get_args () { return &args; } scmxx-0.9.0/src/smi/opt.h0000644000175000017500000000235210371707152015053 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2003 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SCMXX_OPT_H #define SCMXX_OPT_H #include "options.h" extern struct args_def_type args_type_list[]; extern struct args_def args_list[]; #define OUTPUT_TEXT 0 #define OUTPUT_CSV 1 struct args_t { char* system_charset; int output; unsigned int help :1; unsigned int version :1; }; /* a function to init the variables in the struct */ void args_init (); void smi_use_envvars (); char** smi_args_parse (int argc, char** argv); struct args_t* smi_get_args (); #endif scmxx-0.9.0/src/smi/smi_dec.c0000644000175000017500000000674410371707152015660 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "smifile.h" #include #include "opt.h" #include #include #include #include #include #include #include #include #define PROGRAM_NAME "smi" #define PROGRAM_VERSION "0.3" void output_as_text (FILE* fp, struct sms** messages) { unsigned int i = 0; sms_statusreport_match(messages); sms_multipart_merge(messages); while (messages[i] != NULL) sms_pdu_print(fp,messages[i++],SMS_PRINT_ALL_HEADERS); } void output_as_csv (FILE* fp, struct sms** messages) { unsigned int i = 0; unsigned int k = 0; struct sms_pdu_raw* ptr = NULL; char pdu[(SMI_DATA_SIZE*2)+1]; for (; messages[k] != NULL; ++k) { ptr = &messages[k]->encoded[k]->tpdu; for (i = 0; i < SMI_DATA_SIZE && i < ptr->size; ++i) { snprintf(pdu+(2*i),3,"%02X",ptr->data[i]); } fprintf(fp,"%s\n",pdu); } } void process (FILE* fp, char** files) { struct sms_slot_data** encoded = NULL; struct sms_tpdu* decoded = NULL; struct sms** s = NULL; unsigned int i = 0; unsigned int k = 0; struct args_t* args = smi_get_args(); for (; files[i] != NULL; ++i) { encoded = smifile_read(files[i]); if (encoded) { for (k = 0; encoded[k] != NULL; ++k) {} s = mem_alloc((k+1)*sizeof(*s),1); for (k = 0; encoded[k] != NULL; ++k) { /* decode */ decoded = sms_pdu_decode(encoded[k]); s[k] = mem_alloc(sizeof(**s),0); sms_init(s[k],encoded[k],decoded); } mem_realloc(encoded,0); } if (args->output == OUTPUT_CSV) output_as_csv(fp,s); else { fprintf(fp,"Content source: file %s\n",files[i]); output_as_text(fp,s); } for (k = 0; s[k] != NULL; ++k) { sms_delete(s[k]); } s = mem_realloc(s,0); } } int main (int argc, char** argv) { FILE* fp = stdout; char** files = NULL; struct args_t* args; int exit_code = EXIT_SUCCESS; //set program locale setlocale(LC_ALL,""); args_init(); files = smi_args_parse(argc,argv); args = smi_get_args(); if (args->version) { print_proginfo(PROGRAM_NAME,PROGRAM_VERSION); exit(EXIT_SUCCESS); } else if (files == NULL || files[0] == NULL) { exit_code = EXIT_FAILURE; args->help = 1; } //init charset lib charset_init(args->system_charset,1); if (args->help) { help(argv[0],args_type_list,args_list,"5F??.adr [7F??.adr]"); fprintf(stderr, "\n" "Files are either .smi/.smo files or the SMS.dat file.\n" "The .smi/.smo files can be found in the /SMS/ flexmem directory.\n" "The SMS.dat file can be found in the /PersistentData/SMS/ flexmem directory.\n"); exit(exit_code); } else { print_disclaimer(); } process(fp,files); exit(EXIT_SUCCESS); } scmxx-0.9.0/src/smi/smifile.c0000644000175000017500000001074610366527625015713 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "smifile.h" #include #include #include #include #include #include #include #include static struct sms_slot_data* smifile_get_slot_data (const struct smi_entry* ptr) { struct sms_slot_data* encoded = NULL; encoded = mem_alloc(sizeof(*encoded),0); sms_slot_data_init(encoded); /* inpect the direction code */ switch (ptr->status) { case SMI_READ: case SMI_UNREAD: encoded->dir = SMS_INCOMING; break; case SMI_SENT: case SMI_UNSENT: encoded->dir = SMS_OUTGOING; break; default: return mem_realloc(encoded,0); } /* copy the PDU data */ memcpy(encoded->tpdu.data,ptr->data,SMI_DATA_SIZE); /* fix the size */ encoded->tpdu.size = SMI_DATA_SIZE; encoded->tpdu.size = sms_tpdu_len(encoded->dir,&encoded->tpdu); if (encoded->tpdu.size == 0) return encoded = mem_realloc(encoded,0); else encoded->tpdu.size += encoded->tpdu.data[0]+1; return encoded; } static struct sms_slot_data** smifile_get_all_slot_data (uint8_t* ptr, unsigned int headersize, unsigned int message_count, char* file) { struct sms_slot_data** messages = mem_alloc((message_count+1)*sizeof(*messages),0); unsigned int i = 0; unsigned int offset = 0; while(i+offset < message_count) { ptr += headersize; messages[i] = smifile_get_slot_data((struct smi_entry*)ptr); if (messages[i] == NULL) ++offset; else ++i; ptr += sizeof(struct smi_entry); } messages[i] = NULL; if (message_count > i) { fprintf(stderr,"%s: %s\n",file,"Warning: not all message were decoded due to errors"); } return messages; } struct sms_slot_data** smifile_read (char* file) { struct mmapped_file fs; struct smi_header* ptr; uint16_t headersize = 0; unsigned int extraheader = 0; //header before each entry (to skip) unsigned int message_count = 0; if (mem_map(file,&fs) < 0) { fprintf(stderr,"%s: %s\n",file,strerror(errno)); exit(EXIT_FAILURE); } ptr = (struct smi_header*)fs.ptr; //check the magic strings if (ptr->magic[0] == 0x0b && ptr->magic[1] == 0x0b) { /* This handles the .smi and .smo files that come from * the /SMS/ flexmem folder. */ headersize = sizeof(struct smi_header)+letohs(ptr->headerlen); fprintf(stderr,"This is a file from the following model: "); switch(ptr->format) { case SMI_FORMAT_SL42: fprintf(stderr,"SL42/SL45"); break; case SMI_FORMAT_S55: fprintf(stderr,"S55"); #ifdef DEBUG fprintf(stderr,"\nMessages (total): %d",((struct smi_head_s55*)(ptr+1))->parts.total); fprintf(stderr,"\nMessages (file): %d",((struct smi_head_s55*)(ptr+1))->parts.file); fprintf(stderr,"\nUnknown part: 0x%04x",((struct smi_head_s55*)(ptr+1))->unknown1); fprintf(stderr,"\nUnknown part: 0x%02x",((struct smi_head_s55*)(ptr+1))->unknown2); fprintf(stderr,"\nData starts at 0x%x",headersize); #endif break; } fprintf(stderr,"\n"); } else if (ptr->magic[0] == 0xff && ptr->magic[1] == 0xff) { /* This handles the SMS.dat file that comes from * the /PersistentData/SMS/ flexmem folder. */ headersize = 2; extraheader = 2; } else { fprintf(stderr,"%s: %s\n",file,"not a Siemens short message file"); exit(EXIT_FAILURE); } if (((fs.size - headersize)%(sizeof(struct smi_entry)+extraheader)) != 0) { fprintf(stderr,"%s: %s\n",file,"file size does not match expected size"); exit(EXIT_FAILURE); } else { message_count = (fs.size - headersize)/(sizeof(struct smi_entry)+extraheader); } if (message_count == 0) return NULL; return smifile_get_all_slot_data(((uint8_t*)fs.ptr)+headersize,extraheader,message_count,file); mem_unmap(&fs); } scmxx-0.9.0/src/options/0002755000175000017500000000000010401301574014773 5ustar hendrikhendrikscmxx-0.9.0/src/options/configfile.c0000644000175000017500000001113510357700457017260 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "helper.h" #include "config.h" #include "options.h" #include #include #include #include #include #include #include #include #include #if defined(WINDOWS_API) #define _WIN32_IE 0x0500 /* IE 5.0 is required, not sure why */ #include //link with -lshell32 or -lshfolder #include //also link with -lshlwapi #else #include #endif char* get_homedir () { #if defined(WINDOWS_API) static char* retval = NULL; HRESULT rc; if (retval == NULL) { retval = mem_alloc(MAX_PATH,1); rc = SHGetFolderPathA(NULL,CSIDL_APPDATA,NULL, SHGFP_TYPE_CURRENT,retval); if (rc == S_FALSE || rc == E_INVALIDARG) { mem_realloc(retval,0); retval = str_dup("."); } } return retval; #else static struct passwd* pwentry = NULL; pwentry = getpwuid(getuid()); if (pwentry != NULL) return str_dup(pwentry->pw_dir); return str_dup(getenv("HOME")); #endif } char* configfile_get_path (char* package, char* filename) { char* retval; char* homedir; if (str_len(package) == 0 || str_len(filename) == 0) return NULL; homedir = get_homedir(); if (str_len(homedir) > 0) { retval = mem_alloc(strlen(homedir)+2 +strlen(package)+1 +strlen(filename)+1,1); #if defined(WINDOWS_API) retval = str_dup(homedir); retval = mem_realloc(retval,MAX_PATH); PathAppendA(retval,package); PathAppendA(retval,filename); #else sprintf(retval,"%s%s.%s/%s", homedir, (homedir[strlen(homedir)] == '/') ? "" : "/", package, filename); #endif } else { retval = NULL; } mem_realloc(homedir,0); return retval; } int configfile_parse (char* filepath, struct args_def* list, void (*arg_fill) (int short_opt, const char* long_opt, char* argument)) { char** retval = NULL; int entrycount = 2; //not 0 because last entry must be NULL int current = 0; int status = -1; FILE* fd = NULL; struct stat fileinfo; char* line = NULL; char* left = NULL; char* right = NULL; char* temp = NULL; if (filepath == NULL) return -1; status = open(filepath,O_RDONLY); if (status == -1) return -1; if ((fd = fdopen(status,"r")) == NULL || fstat(status,&fileinfo) == -1) { fclose(fd); return -1; } if (fileinfo.st_size == 0) { fclose(fd); return 0; } retval = mem_realloc(retval,entrycount*sizeof(*retval)); retval[current++] = filepath; line = mem_alloc(fileinfo.st_size+1,1); do { //read a line from the configuration file if (fgets(line,fileinfo.st_size+1,fd) == NULL) break; if (*line != '#') { //remove end of line characters right = strchr(line,'\r'); if (right != NULL) *right=0; right = strchr(line,'\n'); if (right != NULL) *right=0; //skip possible spaces at beginning of line left = line; while (isspace((int)*left) != 0) ++left; if (str_len(left)) { ++entrycount; //find seperator right = strchr(left,'='); if (right != NULL) { temp = right; //find right part do { ++right; } while (isspace((int)*right) != 0); } else { temp = left+strlen(left); } //find right end of left part do { --temp; } while (isspace((int)*temp) != 0); *(++temp) = 0; retval = mem_realloc(retval,entrycount*sizeof(*retval)); retval[current] = mem_alloc((2+(temp-left)+1+str_len(right)+1)*sizeof(**retval),1); snprintf(retval[current],2+(temp-left)+1+str_len(right)+1,"--%s%s%s", left,(right!=NULL)?"=":"",(right!=NULL)?right:""); ++current; } } } while (1); mem_realloc(line,0); retval[current] = NULL; fclose(fd); mem_realloc(args_parse(current,retval,list,arg_fill),0); for (--current; current > 0; --current) { mem_realloc(retval[current],0); } mem_realloc(retval,0); return entrycount-2; } scmxx-0.9.0/src/options/getopt.c0000644000175000017500000000603710366527625016466 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2003 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include #include #if PARSELIB == 1 #ifdef HAVE_GETOPT_H # include #else # include #endif char** args_parse (int argc, char** argv, struct args_def* list, void (*arg_fill) (int short_opt, const char* long_opt, char* argument)) { int arg = -1; int option_index = 0; char** retval; int i = 0; struct option* myoptions; struct option listEnd = { 0, 0, 0, 0 }; char* myoptions_short; int short_count = 0; char* posixly_correct; int k = 0; while(list[i].long_name != NULL || list[i].short_name != 0) ++i; myoptions = mem_alloc((i+1)*sizeof(*myoptions),0); myoptions_short = mem_alloc((3*i*sizeof(*myoptions_short))+1,1); memcpy(&myoptions[i--],&listEnd,sizeof(listEnd)); for (; i >= 0; --i) { myoptions[i].name = list[i].long_name; myoptions[i].val = list[i].short_name; myoptions[i].flag = 0; switch (list[i].ptype) { case ARGS_PARAM_NONE: myoptions[i].has_arg = 0; break; case ARGS_PARAM_OPT: myoptions[i].has_arg = 2; break; case ARGS_PARAM_REQ: myoptions[i].has_arg = 1; break; } if (isalnum((int)list[i].short_name)) { myoptions_short[short_count++] = list[i].short_name; for (k = 0; k < myoptions[i].has_arg; ++k) { myoptions_short[short_count++] = ':'; } } } if ((posixly_correct=getenv("POSIXLY_CORRECT")) != NULL) { posixly_correct = str_dup(getenv("POSIXLY_CORRECT")); } setenv("POSIXLY_CORRECT","1",1); optind = 0; while ((arg = getopt_long(argc, argv, myoptions_short, myoptions, &option_index)) != -1) { if (arg==0) { arg_fill(arg,myoptions[option_index].name,optarg); } else { arg_fill(arg,NULL,optarg); } } if (posixly_correct == NULL) { unsetenv("POSIXLY_CORRECT"); } else { setenv("POSIXLY_CORRECT",posixly_correct,1); } if (optind >= argc) { retval = mem_alloc(sizeof(char*),0); i=0; } else { retval = mem_alloc((argc-optind+1)*sizeof(char*),0); for (i=0;optind+i < argc;++i) { retval[i] = argv[optind+i]; } } retval[i]=NULL; mem_realloc(myoptions,0); mem_realloc(myoptions_short,0); return retval; } #endif scmxx-0.9.0/src/options/popt.c0000644000175000017500000000473210366527625016146 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2003 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #if PARSELIB == 2 #include char** args_parse (int argc, char** argv, struct args_def* list, void (*arg_fill) (int short_opt, const char* long_opt, char* argument)) { int arg; poptContext pcon; int argcount = 0; char** temp; char** retval; int i = 0; struct poptOption* myoptions; struct poptOption listEnd = POPT_TABLEEND; while(list[i].long_name != NULL || list[i].short_name != 0) ++i; myoptions = mem_alloc((i+1)*sizeof(*myoptions),0); memcpy(&myoptions[i--],&listEnd,sizeof(listEnd)); for (; i >= 0; --i) { myoptions[i].longName = list[i].long_name; myoptions[i].shortName = list[i].short_name; if (list[i].ptype == ARGS_PARAM_NONE) myoptions[i].argInfo = POPT_ARG_NONE; else myoptions[i].argInfo = POPT_ARG_STRING; myoptions[i].arg = NULL; myoptions[i].val = i+1; myoptions[i].descrip = NULL; myoptions[i].argDescrip = NULL; } pcon = poptGetContext(NULL,argc,(const char **)argv, (const struct poptOption*)myoptions, POPT_CONTEXT_POSIXMEHARDER); while ((arg = poptGetNextOpt(pcon)) > 0) { arg_fill(myoptions[arg-1].shortName,myoptions[arg-1].longName, (char*)poptGetOptArg(pcon)); } if (arg < -1) { fprintf(stderr, "%s: %s\n", poptBadOption(pcon, POPT_BADOPTION_NOALIAS), poptStrerror(arg)); } temp = (char**) poptGetArgs(pcon); if (temp != NULL) { while (*temp != NULL) { ++argcount; } } retval = mem_alloc(argcount+1,0); for (i=0; i < argcount;++i) { retval[i] = temp[i]; } retval[i]=NULL; poptFreeContext(pcon); mem_realloc(myoptions,0); return retval; } #endif scmxx-0.9.0/src/options/common.c0000644000175000017500000001036610371707415016445 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2003-2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include #include #include #include void use_envvars (struct args_def* list, void (*arg_fill) (int short_opt, const char* long_opt, char* argument)) { char* temp; if (arg_fill == NULL) return; while (list != NULL && list->long_name != NULL && list->short_name != 0 && list->env_var != NULL) { if (list->env_var != NULL && (temp = getenv(list->env_var)) != NULL) arg_fill(list->short_name, list->long_name,temp); ++list; } } static void help_print_line_options (const char* longopt, const char* longopt_arg, size_t space, char shortoption) { char line[6*space+1]; size_t extraspace = 0; extraspace += (str_len(longopt)-str_width(longopt)); extraspace += (str_len(longopt_arg)-str_width(longopt_arg)); memset(line,0,sizeof(line)); //first line of an option if (longopt != NULL) { if (longopt_arg == NULL) snprintf(line,6*space," --%s",longopt); else snprintf(line,6*space," --%s <%s>",longopt,longopt_arg); } memset(line+strlen(line),' ',space+extraspace-strlen(line)); if (isalpha((int)shortoption)) { line[space+extraspace-4] = '-'; line[space+extraspace-3] = shortoption; } fprintf(stdout,"%*s",(int)space,line); } static char* help_print_line_text (const char* text, size_t space) { char* temp = NULL; size_t i = space; if (str_width(text) > i) { while (!isspace((int)text[i]) && i > 0) --i; if (!i) i = space; /* while (!strn_valid(text,i)) --i; */ /* if (!i) i = space; */ } temp = strn_dup(text,i); fprintf(stdout,"%s\n",temp); i = str_len(temp); mem_realloc(temp,0); return (char*)text+i; } static void help_print_line(const char* longopt, const char* longopt_arg, size_t longspace, char shortoption, const char* text) { long line_len = console_width(STDOUT_FILENO); size_t textspace; const char* temp = text; longspace += 6+4; help_print_line_options(longopt,longopt_arg,longspace,shortoption); textspace = line_len-longspace; do { temp = help_print_line_text(temp,textspace); if (str_len(temp)) fprintf(stdout,"%*s",(int)longspace," "); else break; while (isspace((int)*temp)) ++temp; } while (1); } #ifndef PATH_SEPARATOR #define PATH_SEPARATOR '/' #endif #include void help (char* me, struct args_def_type* types, struct args_def* params, char* extra_args) { char* name = strrchr(me,PATH_SEPARATOR); unsigned int i = 0, k; unsigned int total = 0; if (name == NULL) name = me; else ++name; print_disclaimer(); printf("%s: %s",_("Syntax"),name); for (; types[i].name != NULL; ++i) if (types[i].required) printf(" %s",_(types[i].name)); else printf(" [%s]",_(types[i].name)); if (extra_args) printf(" %s",extra_args); printf("\n"); /* printf(" [%s...]\n",_("files")); */ for (k = 0; params[k].long_name || params[k].short_name; ++k) { i = str_width(_(params[k].long_name)); if (params[k].pname) i += str_width(_(params[k].pname)); if (total < i) total = i; } for (i = 0; types[i].name; ++i) { name = _(types[i].name); printf("\n%c%s:\n",toupper((int)name[0]),name+1); for (k = 0; params[k].long_name || params[k].short_name; ++k) { if (types[i].id == params[k].type_id) help_print_line(params[k].long_name,_(params[k].pname),total, params[k].short_name,_(params[k].descr)); } } } scmxx-0.9.0/src/options/Makefile0000644000175000017500000000004710342342553016440 0ustar hendrikhendrikSUBDIR=options include ../Makefile.sub scmxx-0.9.0/src/disclaimer.h0000644000175000017500000000231510357517114015575 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "config.h" #include #define print_proginfo(name,version) { \ fprintf(stderr,"%s %s\n",name,version); \ } #define print_disclaimer() { \ fprintf(stderr,"author: %s\n",PACKAGE_BUGREPORT); \ fprintf(stderr,"This programs comes with NO WARRANTY, to the extent permitted by law.\n"); \ fprintf(stderr,"You may redistribute copies of this program under the terms of the GNU General Public License.\n"); \ fprintf(stderr,"\n"); \ } scmxx-0.9.0/src/smspdu.h0000644000175000017500000002342110362713036014772 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SMSPDU_H #define SMSPDU_H #include "charsets.h" #include "helper.h" #include "timeincl.h" #include "intincl.h" /* SMS time */ struct sms_pdu_time { enum { SMS_PDU_TIME_NONE = 0, /* ignore value */ SMS_PDU_TIME_RELATIVE, /* value is relative */ SMS_PDU_TIME_ABSOLUTE /* value is absolute(GMT) */ } format; time_t value; }; void sms_pdu_time_init (struct sms_pdu_time* s); int sms_pdu_time_fill (struct sms_pdu_time* this, const char* value, int tz); /* SMS PDU types */ enum sms_direction { SMS_INCOMING, SMS_OUTGOING }; enum sms_pdu_type { SMS_TYPE_DELIVER, /* incoming */ SMS_TYPE_SUBMIT_REPORT, /* incoming */ SMS_TYPE_STATUS_REPORT, /* incoming */ SMS_TYPE_DELIVER_REPORT, /* outgoing */ SMS_TYPE_SUBMIT, /* outgoing */ SMS_TYPE_COMMAND /* outgoing */ }; /* type is the full PDU type field but only the lowest two bits are really needed */ enum sms_pdu_type sms_pdu_type_get (enum sms_direction d, uint8_t type); char* sms_pdu_type_string (enum sms_pdu_type t); /* SMS PDU options */ struct sms_pdu_options_deliver { /* for SMS_TYPE_DELIVER */ unsigned int sr :1; /* status report indication */ unsigned int mms :1; /* more messages to send indication */ unsigned int rp :1; /* reply path indication */ }; struct sms_pdu_options_status { /* for SMS_TYPE_STATUS_REPORT */ unsigned int sr :1; /* status report qualifier */ unsigned int mms :1; /* more messages to send indication */ }; struct sms_pdu_options_submit { /* for SMS_TYPE_SUBMIT */ unsigned int sr :1; /* status report request */ unsigned int rd :1; /* reject duplicate request */ unsigned int rp :1; /* reply path request */ }; struct sms_pdu_options_command { /* for SMS_TYPE_COMMAND */ unsigned int sr :1; /* status report request */ }; struct sms_pdu_options { enum sms_pdu_type type; unsigned int udh_present :1; /* user data header indication, needed by sms_udh_fill() */ union { struct sms_pdu_options_deliver deliver; struct sms_pdu_options_status status; struct sms_pdu_options_submit submit; struct sms_pdu_options_command command; } u; }; void sms_pdu_options_init (struct sms_pdu_options* s); /* SMS Data Coding Scheme */ enum sms_pdu_dcs_type { SMS_DCS_TYPE_NORMAL, SMS_DCS_TYPE_IND, /* SMS_CHARSET_8BIT is not a valid choice for this type */ SMS_DCS_TYPE_NONE /* needed for SMS-STATUS-REPORT (DCS is optional) */ }; enum sms_pdu_class { SMS_CLASS_FLASH = 0, SMS_CLASS_ME = 1, SMS_CLASS_SIM = 2, SMS_CLASS_TE = 3, SMS_CLASS_NONE }; enum sms_encoding { SMS_CHARSET_GSM, SMS_CHARSET_UCS2, SMS_CHARSET_8BIT }; struct sms_pdu_dcs { enum sms_pdu_dcs_type type; enum sms_encoding encoding; union { struct { unsigned int autodel :1; /* 0:normal mode, 1:marked as auto-delete */ unsigned int compressed :1; /* 0:not compressed, 1:compressed (not supported, yet) */ enum sms_pdu_class class; /* default is SMS_CLASS_NONE */ } normal; struct { unsigned int sense :1; /* 0:inactive, 1:active */ enum { SMS_DCS_IND_STORE = 0, SMS_DCS_IND_DISCARD } group; enum { SMS_DCS_IND_OTHER = 0, SMS_DCS_IND_VOICE, SMS_DCS_IND_FAX, SMS_DCS_IND_EMAIL } type; } ind; } value; }; void sms_pdu_dcs_init (struct sms_pdu_dcs* s); /* SMS Status-Report addition */ struct sms_pdu_message_status { uint8_t status; struct sms_pdu_time time; struct sms_pdu_ud* message_parent; struct sms_pdu* status_parent; }; void sms_pdu_message_status_init(struct sms_pdu_message_status* s); /* SMS user data (with user data header) */ struct sms_pdu_ud_header { uint8_t type; uint8_t len; uint8_t data[137]; }; void sms_pdu_ud_header_init (struct sms_pdu_ud_header* s); struct sms_pdu_ud { /* a NULL terminated list */ struct sms_pdu_ud_header** header; /* the text in the message */ ucs4char_t* text; /* status of the message if a SMS-STATUS-REPORT can be matched * If the message type is SMS_STATUS_REPORT or no * SMS-STATUS-REPORT matches, this shall be NULL. * * Never free this pointer from here, except that * ack->status_parent is NULL */ struct sms_pdu_message_status* ack; }; void sms_pdu_ud_init (struct sms_pdu_ud* s); void sms_pdu_ud_delete (struct sms_pdu_ud* s); /* SMS Protocol Data Unit */ struct sms_pdu_extra_submit { /* message reference */ uint8_t mref; }; struct sms_pdu_extra_statusreport { /* message reference */ uint8_t mref; /* service center status of a previously sent message */ struct sms_pdu_message_status* status; }; struct sms_pdu { struct sms_pdu_options options; struct gsm_number address; uint8_t pid; /* protocol ID */ struct sms_pdu_dcs scheme; struct sms_pdu_time timedata; uint16_t multipart_id; /* multipart short message id */ uint8_t partnum; /* number of this part, count from 0 */ /* ud is a list of size (parts*sizeof(*ud)) * if parts is 0, ud should be NULL */ uint8_t parts; struct sms_pdu_ud* ud; union { struct sms_pdu_extra_submit submit; struct sms_pdu_extra_statusreport statusreport; } extra; }; void sms_pdu_init (struct sms_pdu* s); void sms_pdu_delete (struct sms_pdu* s); /* SMS transport PDU: TPDU = SCA + PDU */ struct sms_tpdu { struct gsm_number sca; //service center address struct sms_pdu* pdu; }; void sms_tpdu_init (struct sms_tpdu* s); void sms_tpdu_delete (struct sms_tpdu* s); /* Raw SMS PDU data */ #define SMS_PDU_SIZE_MAX 176 struct sms_pdu_raw { size_t size; uint8_t data[SMS_PDU_SIZE_MAX]; }; void sms_pdu_raw_init (struct sms_pdu_raw* this); void sms_pdu_raw_append (struct sms_pdu_raw* this, uint8_t* data, size_t len); void sms_pdu_raw_from_hexstring (struct sms_pdu_raw* this, char* hexstring); char* sms_pdu_raw_to_hexstring (struct sms_pdu_raw* this); /* Data as it may be present in a slot of a mobile phone */ #define SMS_SLOT_INVALID 0 struct sms_slot_data { unsigned int slot; /* != 0 for true values */ enum sms_direction dir; struct sms_pdu_raw tpdu; }; void sms_slot_data_init (struct sms_slot_data* this); /* Unification for encoded and decoded data * see below how to get one from the other */ struct sms { struct sms_slot_data** encoded; struct sms_tpdu* decoded; }; void sms_delete (struct sms* s); /*************************** * encoding short messages * ***************************/ /* create a new short message of type SMS_TYPE_SUBMIT * return value is a NULL-terminated array of TPDUs allocated with malloc */ #define SMS_CREATE_OPT_FLASH 0x01 /* set immediate display bit */ #define SMS_CREATE_OPT_REPORT 0x02 /* request a status report from the SMSC */ #define SMS_CREATE_OPT_AUTOCHAR 0x04 /* automatically select a proper character set */ #define SMS_CREATE_OPT_UNICODE 0x08 /* force use of UCS-2 instead of GSM charset */ struct sms_pdu_raw** sms_pdu_create_submit (char* text, char* number, unsigned long options); /* TODO: more generic interface: * sms_tpdu* sms_pdu_create_submit (char* text, char* number, unsigned long options); * sms_slot_data** sms_pdu_encode (sms_tpdu* sms); */ /* both return length of SMS-PDU (pdu is part of tpdu) * This is needed as parameter for the at command for sending * or for verification on a received PDU. */ unsigned int sms_tpdu_len (enum sms_direction d, struct sms_pdu_raw* raw); //for TPDU (means: with SMSC field) unsigned int sms_pdu_len (enum sms_direction d, struct sms_pdu_raw* raw); //for PDU /*************************** * decoding short messages * ***************************/ /* STEP 1: * decode sms which is of type type * return value allocated with malloc */ struct sms_tpdu* sms_pdu_decode (struct sms_slot_data* sms); /* STEP 2: * merge encoded and decoded into struct sms */ void sms_init (struct sms* s, struct sms_slot_data* encoded, struct sms_tpdu* decoded); /* STEP 3.1: * to match the status report messages to sent messages * This must be done BEFORE merging concatenated message, * otherwise not all can be matched. * * The number of elements in list does not change with this call. * * If you don't need or want this, just omit it. */ void sms_statusreport_match (struct sms** list); /* STEP 3.2: * to merge concatenated short messages * * The list may have less elements after this call * * If you don't need or want this, just omit it. */ int sms_multipart_merge (struct sms** list); /* STEP 3.3: * order can currently be "type", "slot" or "type,slot", * Concatenated messages (if merged before or after this step) * are assigned to the first slot that any part of it appears in. * * The number of elements in list does not change with this call. * This can be done at any time in STEP 3. * * If you don't need or want this, just omit it. */ void sms_pdu_sort (struct sms** list, const char* order); /* STEP 4: * print sms as text to fp * * flags defines what to print, the text (if present) is always printed */ #include #define SMS_PRINT_COMMON_HEADERS 0x01 #define SMS_PRINT_EXTENDED_HEADERS 0x02 #define SMS_PRINT_USERDATA_HEADERS 0x04 #define SMS_PRINT_ALL_HEADERS 0x07 void sms_pdu_print (FILE* fp, struct sms* sms, unsigned long flags); #endif scmxx-0.9.0/src/atcommand.h0000644000175000017500000003061410366726550015435 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef ATCOMMAND_H #define ATCOMMAND_H #include "intincl.h" #include "stdlib.h" #include struct at_hw_access { char* (*read) (int (*stop_condition)(const char*, const size_t)); int (*write) (const char* data, size_t count); }; /** MUST be run before any other at_* function is used * @param tty must not be NULL, specifies how to access the tty * @param pin may be NULL, PIN to use _once_ in automatic pin handling */ void at_init (struct at_hw_access* tty, char* pin); void at_set_tty(struct at_hw_access* tty); /** test if the vendor is supported and model not blacklisted */ int at_sie_supported (); /* useful wrapper around tty_read_line() that removes * echos, empty lines and does pin handling * use tty_read_line() if you don't need those things */ char* at_read_line (); /* used as callback for tty_read_line() */ int at_check_line_end (const char* input, const size_t len); /** may be used directly for simple commands of the form AT[=] * @param command must not be NULL * @param parmlist may be NULL, also see AT_READ_SUFFIX */ void at_command_send (const char* command, const char* parmlist); /** may be used by syntax/value requests of the form AT? * @param command must not be NULL */ void at_syntax_request (const char* command); /** may be used to send data, e.g. requested by an "> " prompt */ void at_data_send (const char* data, size_t size); /** evaluate a return value (a line returned by the phone) * @param reponse the reponse line * @param command may be NULL, needed to detect a command prefix * @param content if a prefix was detected and content is not NULL * *content is a pointer to the first character after * the command prefix in response. If no command prefix * was detectet, *content points to response */ enum return_code { AT_RET_ERROR = 0x01, //also mask for errors AT_RET_ERROR_CME = 0x03, AT_RET_ERROR_CMS = 0x05, AT_RET_OK = 0x00, AT_RET_ANSWER = 0x02, //answer line for a command AT_RET_OTHER = 0x04 //none of the above }; enum return_code at_line_type (const char* response, const char* command, char** content); /* comfort functions */ /* used by commands that expect only two lines in the response * - first line for the data * - second line for command status * This returns the data or NULL on any error. * A possible command prefix is removed from the data. * command may be NULL (avoids prefix removal) */ char* at_get_value (const char* command); /** parse an AT string list * @param a string list that looks like '("...","...",.....,"...")' * @return same format as str_split() */ char** at_parse_stringlist (char* stringlist); /* some shortcuts with caching */ char* at_get_vendor (void); char* at_get_model (void); /* end of comfort functions */ /** send a fragment of a binary file to the phone * if part or total is 0 (means deleting) the value of total is ignored * if part or total is negative, part and total are ignored * @param ftype file type, must not be NULL * @param slot must be a valid value for the chosen file type * @param part count, starting at 1, less or equal than total * @param total maximum part number */ char* at_sie_binary_write (const char* ftype, unsigned int slot, int part, int total); /** read binary files * @param ftype file type, must not be NULL * @param slot must be a valid value for the chosen file type */ char* at_sie_binary_read (const char* ftype, unsigned int slot); /** write a phonebook entry * If number or text are NULL, both are ignored. * @param slot where to write to * @param number number of the entry * @param numtype GSM number type of the entry * @param text text of the entry */ void at_gen_phonebook_write (unsigned int slot, const char* number, unsigned int numtype, const char* text); /** read phonebook with a defined range * @param slot_low start of the range * @param slot_high end of the range */ char* at_gen_phonebook_read (unsigned int slot_low, unsigned int slot_high); char* at_sie_phonebook_read_sorted (unsigned int slot_low, unsigned int slot_high); /** read address book slots like a phonebook * @param slot address book slot to access * @param type type of numbers: 0-3; ignored if <0 */ char* at_sie_phonebook_vcf_read (unsigned int slot, int type); /** select the phonebook memory to use for further action * @param mem must not be NULL * @return return the used command or NULL if mem is NULL */ char* at_gen_phonebook_select (const char* mem); char* at_sie_phonebook_select (const char* mem); /** delete slot from the previously selected phonebook memory */ void at_gen_sms_delete (unsigned int slot); /** send SMS from slot to number * @param number if NULL, it is ignored */ void at_gen_sms_slot_send (unsigned int slot, const char* number); /** send a SMS directly (not stored in the phone) * @param len PDU length (use the libsmspdu helper function!) */ void at_gen_sms_send (unsigned int len); /** store a SMS in the phone (not sent) * @param len PDU length (use the libsmspdu helper function!) */ void at_gen_sms_store (unsigned int len); /** select SMS storages * @param mem1 must not be NULL, * @param mem2 if NULL, mem2 and mem3 are ignored, * @param mem3 if NULL, mem3 is ignored */ void at_gen_sms_mem (const char* mem1, const char* mem2, const char* mem3); char* at_gen_sms_slot_read (unsigned int slot); char* at_sie_sms_slot_read (unsigned int slot); char* at_gen_sms_list_read (unsigned int list_id); char* at_sie_sms_list_read (unsigned int list_id); void at_gen_charset (const char* charset); void at_gen_smsc (const char* number); void at_gen_pin (const char* pin); char* at_gen_lock (const char* lock, int mode, const char* password, uint8_t class); char* at_sie_lock (const char* lock, int mode, const char* password, uint8_t class); char* at_gen_password (const char* lock, const char* oldpin, const char* newpin); char* at_sie_password (const char* lock, const char* oldpin, const char* newpin); /* those functions are for direct SMS receive mode * see Siemens manual for L55, S45 or S35i for details */ void at_gen_sms_phase (int enable); void at_gen_msg_direct (int mode, int mt, int bm, int ds); /* Returns NULL if all keys from keylist were processed * else returns a pointer in keylist to the first unprocessed key. * This is normal, just recall it again with the new pointer * (after you read the response to the issued command). */ char* at_gen_keypad (char* keylist, uint8_t duration, uint8_t pause); /* common strings */ #define AT_PREFIX "AT" #define AT_GENERIC_PREFIX "+C" #define AT_SIEMENS_PREFIX "^S" #define AT_READ_SUFFIX "?" #define AT_REPLY_SEPERATOR ": " #define AT_WRITE_DELIM "=" /* often, commands are prefixed to a reply * or the following status messages appear */ #define AT_OK "OK" #define AT_ERROR "ERROR" #define AT_REPLY_PREFIX(s) s""AT_REPLY_SEPERATOR #define AT_ERROR_CME AT_REPLY_PREFIX("+CME ERROR") #define AT_ERROR_CMS AT_REPLY_PREFIX("+CMS ERROR") /* generic commands * those may work for phones from all vendors */ //those have no parameters at all #define AT_GEN_INIT "Z" // init the phone to defaults #define AT_GEN_VENDOR "+CGMI" // get vendor #define AT_GEN_MODEL "+CGMM" // get model #define AT_GEN_REVISION "+CGMR" // get model revision #define AT_GEN_IMSI "+CGSN" // get international mobile subcriber identity ????? #define AT_GEN_IMEI "+CIMI" // get international mobile entity identity #define AT_GEN_BATTERY "+CBC" // get battery status #define AT_GEN_SIGNAL "+CSQ" // get signal strength/ber #define AT_GEN_HANGUP "+CHUP" // terminate a call #define AT_GEN_CALLINFO "+CLCC" // list current calls //these ones may use the parameter scheme ?/=?/=<...> #define AT_GEN_ECHO_ENABLE "E1" // enable echo response #define AT_GEN_ECHO_DISABLE "E0" // disable echo response #define AT_GEN_ERROR "+CMEE" // select type of response for errors #define AT_GEN_PB_SELECT "+CPBS" // select phonebook memory / get list of phonebook memories #define AT_GEN_PB_READ "+CPBR" // read entries from phonebook #define AT_GEN_PB_WRITE "+CPBW" // write entries to phonebook #define AT_GEN_SMS_MEM "+CPMS" // select SMS memory / get list #define AT_GEN_SMS_STORE "+CMGW" // store SMS to slot #define AT_GEN_SMS_DELETE "+CMGD" // delete SMS slot #define AT_GEN_SMS_SEND "+CMGS" // send SMS (without storing to a slot) #define AT_GEN_SMS_SLOT_SEND "+CMSS" // send SMS from slot #define AT_GEN_SMS_SLOT_READ "+CMGR" // read SMS from slot (marks unread as read) #define AT_GEN_SMS_LIST_READ "+CMGL" // read SMS by status (marks unread as read) #define AT_GEN_SMS_PHASE "+CSMS" #define AT_GEN_MSG_DIRECT "+CNMI" #define AT_GEN_MSG_ACK "+CNMA" #define AT_GEN_SMSC "+CSCA" // set/get SMSC #define AT_GEN_CHARSET "+CSCS" // set/get current character set #define AT_GEN_PIN "+CPIN" // enter pin (DANGEROUS) #define AT_GEN_TIME "+CCLK" // set/read time #define AT_GEN_OPERATOR "+COPS" // get operator #define AT_GEN_CSD_STATUS "+CREG" // get area code and cell id (for CSD) #define AT_GEN_GPRS_STATUS "+CGREG" // get area code and cell id (for GPRS) #define AT_GEN_GPRS_ATTACH "+CGATT" // is GPRS in attached mode? #define AT_GEN_GPRS_CLASS "+CGCLASS" //get GPRS class #define AT_GEN_LOCK "+CLCK" // set/get lock status #define AT_GEN_PASSWORD "+CPWD" // set/change password to a lock #define AT_GEN_TERM_CMODE "+CMEC" // mobile termination control mode (needed for keypad control) #define AT_GEN_KEYPAD "+CKPD" // keypad control /* siemens-specific commands * probably only works with phones made by Siemens * not all of those are (really) fully documented */ #define AT_SIE_PB_VCF_READ "^SDBR" // read address book like phonebook #define AT_SIE_PB_READ_SORTED "^SPBG" // read phonebook pre-sorted #define AT_SIE_PB_SELECT "^SPBS" // select phonebook memory / get list of phonebook memories #define AT_SIE_PB_DELETE "^SDLD" // delete for phonebooks (only DC, MD and LD) #define AT_SIE_CARD_ID "^SCID" // get SIM card identity number #define AT_SIE_BIN_READ "^SBNR" // read binary data #define AT_SIE_BIN_WRITE "^SBNW" // write binary data #define AT_SIE_SMS_SLOT_READ "^SMGR" // read SMS from slot (without marking unread as read) #define AT_SIE_SMS_LIST_READ "^SMGL" // read SMS by list (without marking unread as read) #define AT_SIE_LOCK "^SLCK" // set/get lock status #define AT_SIE_PASSWORD "^SPWD" // set/change password to a lock #define AT_SIE_PREF_OP_READ "^SPLR" // read an entry from the preferred operator list #define AT_SIE_PREF_OP_WRITE "^SPLW" // write an entry to the preferred operator list #define AT_SIE_OP_LIST "^SPLM" // read PLMN list /* currentyl not used but available on some phones ^SABD // accessory for bluetooth data ^SACD // accessory data ^SACM // output ACM ^SBLK // clear blacklist ^SBMH // bookmark handling ^SCCM // CC monitor ^SCKA // sim card status ^SCKS // sim card status (unsolicited) ^SCNI // call number information ^SGDV // GPRS data volume ^SICO // icon control ^SIFS // query interface setting ^SKPD // keypad control ^SLNG // language settings ^SMSO // mobile switch off ^SNFS // NF hardware select ^SNFV // volume set ^SPIC // output PIN counter ^SPLM // get PLMN ^SPLR // read preferred operator list ^SPLW // write preferred operator list ^SPST // play signal tone ^SPTT // push to talk ^SRMP // ring melody playback ^SSET // profile setting control ^SSTK // SIM ToolKit ^SVMC // voice memo control */ #endif scmxx-0.9.0/src/scmxx/0002755000175000017500000000000010401301576014444 5ustar hendrikhendrikscmxx-0.9.0/src/scmxx/tty_bluetooth.c0000644000175000017500000001162710401277032017521 0ustar hendrikhendrik#include "ttyaccess.h" #include "tty_bluetooth.h" #include #include #include #include #include #include #if defined(OS2_API) /* no bluetooth */ #elif defined(WINDOWS_API) #include #define sock_handle_t SOCKET #define VER_MAJOR 2 #define VER_MINOR 2 /* You need the Platform SDK for the includes below. * This only works with Microsoft Windows XP or later * You must link to Ws2_32.lib. */ #if HAVE_WS2BTH_H #include #if defined(BTHPROTO_RFCOMM) #define WINDOWS_BLUETOOTH_API 1 #endif /* BTHPROTO_RFCOMM */ #endif /* ENABLE_WIN_BT */ #else #include #include /* support for the linux bluez stack */ #if HAVE_BLUETOOTH_BLUETOOTH_H #include #if defined(BTPROTO_RFCOMM) #include #define BLUEZ_API 1 #endif /* BTPROTO_RFCOMM */ #endif /* HAVE_BLUETOOTH_BLUETOOTH_H */ /* support for the freebsd netgraph stack */ #if HAVE_BLUETOOTH_H #include /* bluetooth.h on FreeBSD already includes the following headers: * sys/bitstring.h * netgraph/bluetooth/include/ng_btsocket.h */ #if defined(BLUETOOTH_PROTO_RFCOMM) #define NETGRAPH_API 1 #endif /* BLUETOOTH_PROTO_RFCOMM */ #endif /* HAVE_BLUETOOTH_H */ #endif /* API */ #if BLUEZ_API #define ENABLE_BLUETOOTH 1 #define sock_handle_t int #define rfcomm_sockaddr_t struct sockaddr_rc #define SOCKET_ERROR -1 #define bluetooth_socket() socket(PF_BLUETOOTH,SOCK_STREAM,BTPROTO_RFCOMM) #define print_socket_error() print_error("%s\n",strerror(errno)) #define bluetooth_set_sockaddr(addr,channel,sa) { \ sa.rc_family = AF_BLUETOOTH; \ str2ba(addr,&sa.rc_bdaddr); \ sa.rc_channel = channel; \ } #define closesocket(s) close(s); #endif /* BLUEZ_API */ #if NETGRAPH_API #define ENABLE_BLUETOOTH 1 #define sock_handle_t int #define rfcomm_sockaddr_t struct sockaddr_rfcomm #define SOCKET_ERROR -1 #define bluetooth_socket() socket(PF_BLUETOOTH,SOCK_STREAM,BLUETOOTH_PROTO_RFCOMM) #define print_socket_error() print_error("%s\n",strerror(errno)) #define bluetooth_set_sockaddr(addr,channel,sa) { \ sa.rfcomm_family = AF_BLUETOOTH; \ bt_aton(addr,&sa.rfcomm_bdaddr); \ sa.rfcomm_channel = channel; \ } #define closesocket(s) close(s); #endif #if WINDOWS_BLUETOOTH_API #define ENABLE_BLUETOOTH 1 #define rfcomm_sockaddr_t SOCKADDR_BTH #define bluetooth_socket() socket(PF_BTH,SOCK_STREAM,BTHPROTO_RFCOMM) #define bluetooth_set_sockaddr(addr,channel,sa) { \ int len = sizeof(rfcomm_sockaddr_t); \ sa.addressFamily = AF_BTH; \ WSAStringToAddress(addr,sa.addressFamily,NULL,(SOCKADDR*)&sa,&len); \ sa.port = channel; \ } #define print_socket_error() print_error("%s %d\n",_("system error code"),WSAGetLastError()) #define tty_bluetooth_cleanup() WSACleanup() int tty_bluetooth_init () { WORD ver = MAKEWORD(VER_MAJOR,VER_MINOR); WSADATA data; int err = WSAStartup(ver,&data); if (err || LOBYTE(data.wVersion) != VER_MAJOR || HIBYTE(data.wVersion) != VER_MINOR) { tty_bluetooth_cleanup(); return 0; } return 1; } #endif /* WINDOWS_BLUETOOTH_API */ #ifndef sock_handle_t #define sock_handle_t int #endif #ifndef INVALID_SOCKET #define INVALID_SOCKET -1 #endif #ifndef tty_bluetooth_init #define tty_bluetooth_init() 1 #endif #ifndef tty_bluetooth_cleanup #define tty_bluetooth_cleanup() {} #endif static struct tty_access funcs; static sock_handle_t bt_sock; struct tty_access* tty_bluetooth_open(struct port_args_t* args) { struct tty_access* retval = NULL; #if ENABLE_BLUETOOTH rfcomm_sockaddr_t sa; #endif bt_sock = INVALID_SOCKET; if (!tty_bluetooth_init()) return NULL; #if ENABLE_BLUETOOTH bluetooth_set_sockaddr(args->device,args->channel,sa); if ((bt_sock = bluetooth_socket()) == INVALID_SOCKET || connect(bt_sock,(struct sockaddr*)&sa,sizeof(sa)) == SOCKET_ERROR) { tty_bluetooth_close(); print_socket_error(); return NULL; } retval = &funcs; #else args = NULL; /* just to use it */ print_error("%s\n",_("protocol not implemented")); #endif funcs.read = tty_bluetooth_read; funcs.write = tty_bluetooth_write; funcs.flush = tty_bluetooth_flush; funcs.close = tty_bluetooth_close; return retval; } void tty_bluetooth_close(void) { #if ENABLE_BLUETOOTH if (bt_sock != INVALID_SOCKET) closesocket(bt_sock); #endif tty_bluetooth_cleanup(); } /* as argument to tty_write() */ static long socketwrite (const char* data, long len) { #if ENABLE_BLUETOOTH return send(bt_sock,data,len,0); #else return -1; #endif } int tty_bluetooth_write (const char* data, size_t count) { return tty_write(data,count,socketwrite); } /* as argument to tty_read() */ static long socketread (char* buf, long len) { #if ENABLE_BLUETOOTH return recv(bt_sock,buf,len,0); #else return -1; #endif } char* tty_bluetooth_read (int (*stop_condition)(const char*,const size_t)) { return tty_read(stop_condition,socketread); } void tty_bluetooth_flush (void) { /* nothing to do here */ } scmxx-0.9.0/src/scmxx/ttyaccess.c0000644000175000017500000000730010370077251016615 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "ttyaccess.h" #include "tty_serial.h" #include "tty_bluetooth.h" #include "scmxx.h" #include "helper.h" #include "atcommand.h" #include "config.h" #include "gtincl.h" #include "w32compat.h" #include #include #include #include #include #include #include #include #include struct tty_access* tty_open(struct port_args_t* args) { struct tty_access* t = NULL; print_verbose(0,_("Accessing device %s..."),args->device); switch (args->type) { case TTY_TYPE_BLUETOOTH: t = tty_bluetooth_open(args); break; case TTY_TYPE_SERIAL: t = tty_serial_open(args); break; default: break; } if (t == NULL) { print_error(_("Cannot open %s\n"),args->device); exit(EXIT_FAILURE); } print_verbose(0,"%s\n",_("done")); /* The following seems to be needed for C45 * which seems to react too slow */ if (args->startdelay) { print_verbose(0,_("Waiting for %d seconds as requested...\n"),args->startdelay); sleep(args->startdelay); } return t; } int tty_write (const char* data, size_t count, long (*write_func) (const char* data, long len)) { long status = 0; long instatus; do { instatus = write_func(data+status,count-status); if (instatus != -1) { status += instatus; } else { #if ! ( defined(DOS_API) || defined(WINDOWS_API) ) if (errno == EAGAIN) usleep(1); else #endif return 0; } } while (count-status > 0); return 1; } char* tty_read (int (*stop_condition)(const char*,const size_t), long (*read_func) (char* buf, long len)) { char* retval = NULL; int retvalsize = 0; char buffer; //buffer the read character for checks int counter = 0; //count the read-and-used characters int repeat = 0; //tell the inner loop to loop long status; do { do { status = read_func(&buffer,1); switch (status) { case -1: #if ! ( defined(DOS_API) || defined(WINDOWS_API) ) if (errno == EAGAIN) { usleep(1); repeat = 1; } else #endif { mem_realloc(retval,0); return NULL; } case 0: mem_realloc(retval,0); return str_dup(""); default: repeat = 0; } } while (repeat); // allocate space on stack if (counter >= retvalsize) { retvalsize += BUFSIZ; retval = mem_realloc(retval,retvalsize+1); memset(retval+counter,0,retvalsize-counter+1); } /* fix the '@'=0x00 (GSM character set) problem here :-( * we simply set the MSB to 1, so when processing: * only look at the last 7 bits (char&0x7F) */ retval[counter++] = (buffer == 0) ? 128 : buffer; } while (!stop_condition(retval,counter)); /* There are two types of possible answers: * "> " (2 characters) for data input requests * "...." for all other things (even empty) */ return mem_realloc(retval,strlen(retval)+1); } scmxx-0.9.0/src/scmxx/actions.c0000644000175000017500000004515010370115125016251 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002,2003,2004,2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "scmxx.h" #include "helper.h" #include "memtypes.h" #include "atcommand.h" #include "gtincl.h" #include "w32compat.h" #include #include #include #include inline char* get_revision (void) { at_command_send(AT_GEN_REVISION,NULL); return at_get_value(AT_GEN_REVISION); } inline char* get_phoneserial (void) { at_command_send(AT_GEN_IMSI,NULL); return at_get_value(AT_GEN_IMSI); } inline char* get_simserial (void) { at_command_send(AT_GEN_IMEI,NULL); return at_get_value(AT_GEN_IMEI); } int pbook_select_mem (char* mem) { char* command; char* temp; enum return_code status; if (strcasecmp(mem,VCARD_PHONEBOOK_NAME) == 0) return 1; command = at_sie_phonebook_select(mem); temp = at_read_line(); status = at_line_type(temp,NULL,NULL); mem_realloc(temp,0); if (status == AT_RET_OK) return 1; else return 0; } int sms_select_mem (char* mem, struct slot_range* r, int* current_fill) { char* temp; char* ausgabe; int retval = 0; if (str_len(mem) == 0) { return 0; } at_gen_sms_mem(mem,mem,NULL); ausgabe = at_get_value(AT_GEN_SMS_MEM); //example: +CPMS: 10,112,10,112,8,12 if (str_len(ausgabe) != 0) { if (r != NULL) { strncpy(r->name,mem,sizeof(r->name)); temp = strchr(ausgabe,','); if (str_len(temp)) { r->min = 1; r->max = atoi(temp+1); } } if (current_fill != NULL && str_len(ausgabe)) { *current_fill = atoi(ausgabe); } retval = 1; } mem_realloc(ausgabe,0); return retval; } #include "ttyaccess.h" #include void phone_reset (struct tty_access* hw) { print_verbose(0,"%s...",_("Sending reset frame")); /* sending a sync frame * the phone may not respond without it because it thinks that all * send commands are still data from a previous run */ hw->write("\x1a\r",2); /* it might also happen that some phones are * in "transparent/OBEX mode" and must be switched to "RCCP/GIPSY mode" */ usleep(1010*1000); hw->write("+++",3); usleep(1010*1000); hw->write("\r",1); usleep(1000*1000); /* flush all data because we are not interested in it */ hw->flush(); print_verbose(0,"%s\n",_("done")); } int phone_init (int reset, struct tty_access* hw) { int retval = 1; char* ack; if (reset) { /* big reset */ phone_reset(hw); } else { /* small reset */ hw->write("\r",1); usleep(1000*1000); hw->flush(); } at_command_send(AT_GEN_INIT,NULL); ack = at_read_line(); if (at_line_type(ack,NULL,NULL) != AT_RET_OK) { mem_realloc(ack,0); ack = at_read_line(); if (at_line_type(ack,NULL,NULL) != AT_RET_OK) { retval = 0; } } mem_realloc(ack,0); return retval;; } int command_echo (int enable) { char* command; char* ack; enum return_code status; if (enable) { command = AT_GEN_ECHO_ENABLE; } else { command = AT_GEN_ECHO_DISABLE; } at_command_send(command,NULL); ack = at_read_line(); status = at_line_type(ack,NULL,NULL); mem_realloc(ack,0); return (status == AT_RET_OK); } int verbose_errors (int enable) { char* parmlist; char* ack; enum return_code status; if (enable) { parmlist = "2"; } else { parmlist = "0"; } at_command_send(AT_GEN_ERROR,parmlist); ack = at_read_line(); status = at_line_type(ack,NULL,NULL); mem_realloc(ack,0); return (status == AT_RET_OK); } char* get_charset (void) { char* ausgabe; char* temp; at_syntax_request(AT_GEN_CHARSET); ausgabe = at_get_value(AT_GEN_CHARSET); if (ausgabe != NULL) { if (*ausgabe == '"' && (temp = strchr(ausgabe,'"')) != NULL) { temp = strn_dup(ausgabe+1,temp-ausgabe-1); mem_realloc(ausgabe,0); return temp; } } return NULL; } char** get_charsets (void) { char* ausgabe; at_command_send(AT_GEN_CHARSET,"?"); ausgabe = at_get_value(AT_GEN_CHARSET); //example: +CSCS: ("GSM","UCS2") return at_parse_stringlist(ausgabe); } int set_charset(char *charset) { char *temp; int retval = 0; if (str_len(charset) == 0) { errexit("%s\n",_("no charset specified.")); } at_gen_charset(charset); temp = at_read_line(); if (at_line_type(temp,NULL,NULL) == AT_RET_OK) { retval = 1; } mem_realloc(temp,0); return retval; } void set_smsc (char* number) { char* temp; char* error; enum return_code status; if (str_len(number) == 0) { errexit("%s\n",_("no number specified.")); } else if (is_telephone_number(number) == 0) { errexit("%s\n",_("no valid number specified.")); } at_gen_smsc(number); temp = at_read_line(); status = at_line_type(temp,AT_GEN_SMSC,&error); if (status == AT_RET_OK) { print_verbose(0,_("SMS server number was set to %s\n"),number); } else { errexit("%s\n", (status == AT_RET_ERROR) ? _("unknown cause") : error); } mem_realloc(temp,0); } char* get_smsc (void) { char* ausgabe; char* temp; at_syntax_request(AT_GEN_SMSC); ausgabe = at_get_value(AT_GEN_SMSC); if (ausgabe != NULL && *ausgabe == '"') { if ((temp=strstr(ausgabe,"\",")) != NULL) { temp = strn_dup(ausgabe+1,temp-ausgabe-1); mem_realloc(ausgabe,0); return temp; } } return NULL; } #include "timeincl.h" void set_time (void) { char* ack; time_t seconds; char timestr[20]; //6*2 + 7 + 1 memset(timestr,0,sizeof(timestr)); time(&seconds); //seconds since Unix //string formatting with conversion to local time strftime(timestr,sizeof(timestr),"\"%y/%m/%d,%H:%M:%S\"",localtime(&seconds)); at_command_send(AT_GEN_TIME,timestr); ack = at_read_line(); if (at_line_type(ack,NULL,NULL) == AT_RET_OK) { print_verbose(0,"%s\n",_("Time was synchronized")); } else { errexit("%s\n",_("Time could not be synchronized")); } mem_realloc(ack,0); } static int get_timezone_offset_quarters () { int h = 0; int m = 0; time_t temp = 0; struct tm* p = NULL; time(&temp); p = localtime(&temp); if (p != NULL) { h = p->tm_hour; m = p->tm_min; p = gmtime(&temp); if (p != NULL) { h -= p->tm_hour; m -= p->tm_min; } else h = m = 0; } return (h*4)+(m/15); } #include "smspdu.h" struct tm* get_time (void) { char* ausgabe; struct sms_pdu_time t; struct tm* p = NULL; struct tm* ptemp = NULL; at_syntax_request(AT_GEN_TIME); ausgabe = at_get_value(AT_GEN_TIME); if (ausgabe != NULL) { //example: +CCLK: "04/06/10,02:30:37" sms_pdu_time_init(&t); sms_pdu_time_fill(&t,ausgabe,get_timezone_offset_quarters()); p = mem_alloc(sizeof(*p),1); ptemp = localtime(&t.value); if (ptemp != NULL) memcpy(p,ptemp,sizeof(*p)); return p; } return NULL; } char* get_simid (void) { char* ausgabe; ausgabe = at_get_vendor(); if(ausgabe != NULL && strcasecmp(ausgabe,"SIEMENS") == 0) { at_command_send(AT_SIE_CARD_ID,NULL); return at_get_value(AT_SIE_CARD_ID); } return NULL; } char* get_operator (void) { char* ausgabe; char* temp; at_syntax_request(AT_GEN_OPERATOR); ausgabe = at_get_value(AT_GEN_OPERATOR); if (ausgabe != NULL) { //example: +COPS: 0,0,"E-Plus" if ((temp=strchr(ausgabe,'"')) != NULL) { temp = strn_dup(temp+1,strlen(temp+1)-1); mem_realloc(ausgabe,0); return temp; } mem_realloc(ausgabe,0); } return NULL; } char* get_battery (void) { char* ausgabe; char* temp; at_command_send(AT_GEN_BATTERY,NULL); ausgabe = at_get_value(AT_GEN_BATTERY); if (ausgabe != NULL) { //example: +CBC: 0,80 if ((temp=strchr(ausgabe+6,',')) != NULL) { temp=strn_dup(temp+1,strlen(temp+1)); mem_realloc(ausgabe,0); return temp; } mem_realloc(ausgabe,0); } return NULL; } int get_signal (int* ber_p) { char* ausgabe; char* temp; int signal = -1; int b; if (ber_p != NULL) { *ber_p = -1; } at_command_send(AT_GEN_SIGNAL,NULL); ausgabe = at_get_value(AT_GEN_SIGNAL); if (ausgabe != NULL) { //example: +CSQ: 28,99 signal = atoi(ausgabe+6); if (signal == 99) { signal = -1; } else { if ((signal=111-((signal-1)*2)) < 0) { signal = -1; } } if (ber_p != NULL) { if ((temp=strchr(ausgabe,',')) != NULL) { b = atoi(temp+1); if (b == 7) { *ber_p = 255; } else if (b >= 0 && b < 7) { *ber_p = 2<= 0) { fprintf(fd,"%s:%*s%d dBm\n",fields[14],(int)(fieldsize-str_width(fields[14])),"",-i); if (j >= 0) { if (j <= 128) { fprintf(fd,"%s:%*s<=%d,%d%%\n",fields[15],(int)(fieldsize-str_width(fields[15])),"",j/10,j%10); } else { fprintf(fd,"%s:%*s>12,8%%\n",fields[15],(int)(fieldsize-str_width(fields[15])),""); } } } fflush(stdout); temp=get_gprs_class(); if (temp!=NULL) { fprintf(fd,"%s:%*s",fields[16],(int)(fieldsize-str_width(fields[16])),""); temp=(char *)strtok(temp,"()\","); while (temp!=0) { fprintf(fd,"%s",temp); temp=(char *)strtok(NULL,"()\","); if (temp!=0) { fprintf(fd,", "); } } fprintf(fd,"\n"); } mem_realloc(temp,0); fflush(stdout); temp=get_gprs_status(NULL,NULL); if (temp!=NULL) { fprintf(fd,"%s:%*s%s",fields[17],(int)(fieldsize-str_width(fields[17])),"", temp); i=get_gprs_attach(); if (i==0) { fprintf(fd,", %s\n",_("detached")); } else if (i==1) { fprintf(fd,", %s\n",_("attached")); } } fflush(stdout); } void info_mem (FILE* fd, int full) { unsigned int i = 0; unsigned int fieldsize = 0; char* fields[4]; fields[0] = _("Binary files"); fields[1] = _("Phonebooks"); fields[2] = _("SMS storages"); fields[3] = NULL; while (fields[i] != NULL) { if (fieldsize < (size_t)str_width(fields[i])) fieldsize = str_width(fields[i]); ++i; } fieldsize += 2; fprintf(fd,"%s:%*s",fields[0],(int)(fieldsize-str_width(fields[0])),""); file_print_memlist(fd,full); fprintf(fd,"%s:%*s",fields[1],(int)(fieldsize-str_width(fields[1])),""); pbook_print_memlist(fd,full); fprintf(fd,"%s:%*s",fields[2],(int)(fieldsize-str_width(fields[2])),""); sms_print_memlist(fd,full); } void info (char* file, int misc, int mem, int lock) { if (misc || mem || lock) { FILE* fd; if (!str_len(file) || !strcmp(file,"-")) { fd=stdout; } else { fd=fdopen(file_open_output(file),"w+"); } if (misc) { info_misc(fd); } if (mem || misc) { if (misc || lock) fprintf(fd,"\n%s:\n",_("Available memories")); info_mem(fd,mem); } if (lock || misc) { if (misc || mem) fprintf(fd,"\n%s:\n",_("Settings")); lock_print_list(fd,lock); } if (str_len(file) && strcmp(file,"-")) { fclose(fd); } } } scmxx-0.9.0/src/scmxx/scmxx.c0000644000175000017500000001345310371707263015767 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "scmxx.h" #include "helper.h" #include "atcommand.h" #include "ttyaccess.h" #include "tty_bluetooth.h" #include "gtincl.h" #include "options.h" #include "scmxx_opt.h" #include "config.h" #include #include #include int main (int argc, char** argv) { char* supported_phones[] = { "S25", "S35i", "M35i", "MC35i", "C35i", "TC35", "SL42", "SLIN", "SL45", "SLIK", "C45", "ME45", "S45", "S45i", "M50", "MT50", "M50I", "S55", //there are even some phones from north america "S46", NULL }; unsigned int i = 0; char* vendor; char* model; int cfargc = 0; char** files; struct args_t* args; struct tty_access* tty_funcs; char* temp; //start setup //init global vars helper_init(); //init local vars vendor = NULL; model = NULL; //setting locale of this program setlocale(LC_ALL,""); //init the gettext stuff scmxx_gettext_init(); //the arguments must be parsed early... args_init(); scmxx_use_envvars(); cfargc = scmxx_conffile_parse("config"); files = scmxx_args_parse(argc,argv); args = scmxx_get_args(); verbosity_set(args->verbose); if (argc <= 1 && cfargc <= 0) args->help = 1; //...because we must set the output charset as early as possible //It also configures gettext to the new value. charset_init(args->system_charset,!(args->help||args->version)); if (args->help || args->version) { if (args->help) { help(argv[0],args_type_list,args_list,_("[files...]")); } if (args->version) { printf("%s\n",PACKAGE_VERSION); } exit(EXIT_SUCCESS); } /* maybe the user wants bluetooth */ if (strncmp(args->port.device,"bt://",5) == 0 || strncmp(args->port.device,"bluetooth://",12) == 0) { if (strncmp(args->port.device,"bt://[",6) != 0 && strncmp(args->port.device,"bluetooth://[",13) != 0) errexit("%s\n",_("Malformed bluetooth address")); args->port.type = TTY_TYPE_BLUETOOTH; args->port.device = strchr(args->port.device,(int)'[')+1; temp = strchr(args->port.device,(int)']'); if (temp == NULL) errexit("%s\n",_("Malformed bluetooth address")); args->port.channel = BTCHAN_RFCOMM; *temp = 0; if (*(temp+1) == ':') { temp += 2; if (str_len(temp)) args->port.channel = atoi(temp); } args->reset = 0; } //now open the port tty_funcs = tty_open(&args->port); at_init((struct at_hw_access*)tty_funcs,args->pin); /* Now perform initial phone setup */ //testing the device if (phone_init(args->reset,tty_funcs)) { print_verbose(0,"%s\n",_("OK, a modem device is present.")); } else { errexit("%s\n",_("cannot communicate with device.")); } //disabling command echo command_echo(0); //enabling advanced error response //not needed everywhere but this reduces code duplication verbose_errors(1); //changing to GSM charset set_charset("GSM"); /* Check for registered phones and print a warning on unknown ones */ if (!args->info) { vendor = at_get_vendor(); model = at_get_model(); if (vendor!=NULL) { if (!strcasecmp(vendor,"SIEMENS")) { print_verbose(0,_("Detected %s %s\n"),vendor,model); for (i=0; supported_phones[i] != NULL; ++i) { print_verbose(3,_("Comparing to registered model %s\n"),supported_phones[i]); if (!strcmp(model,supported_phones[i])) { break; } } if (supported_phones[i] == NULL) { print_warning("%s\n", _("this model was not confirmed to be working with this software.")); } } else { print_warning("%s\n", _("phones from this vendor were not confirmed to be working with this software!")); } } mem_realloc(vendor,0); mem_realloc(model,0); } if (args->time || args->smsc || args->dial || args->hangup || args->info || args->meminfo || args->lockinfo || args->lock != NULL) { if ((args->smsc || args->dial) && str_len(args->myparams.number) == 0) errexit("%s\n",_("you must define a number with the --number option.")); if (args->time) set_time(); if (args->smsc) set_smsc(args->myparams.number); if (args->lock != NULL) { if (args->state_change > 0) lock_enable(args->lock,args->pin); else if (args->state_change < 0) lock_disable(args->lock,args->pin); } if (args->info || args->meminfo || args->lockinfo) info(args->myFILE,args->info,args->meminfo,args->lockinfo); if (args->dial) dial(args->myparams.number,1); if (args->hangup) hangup(); exit(EXIT_SUCCESS); } switch(args->scmxx_ftype) { default: errexit("%s\n",_("you must specifiy a valid memory type.")); break; case SCMXX_FTYPE_BINARY: file_transfer_manage(args->scmxx_action,files, args->myFILE,args->myPIPE, args->myparams.mem, args->myparams.slot); break; case SCMXX_FTYPE_PBOOK: pbook_manage(args->scmxx_action,args->myFILE, files,&args->myparams); break; case SCMXX_FTYPE_SMS: sms_manage(args->scmxx_action,files, args->myFILE,args->myPIPE, &args->myparams,&args->mysmsopts); break; } tty_funcs->close(); exit(EXIT_SUCCESS); } scmxx-0.9.0/src/scmxx/s35_pbook.c0000644000175000017500000002252010367440070016417 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002, 2003, 2004, 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "scmxx.h" #include "charsets.h" #include "helper.h" #include "pbmaskgsm.h" #include "options.h" #include "atcommand.h" #include "pbookphone.h" #include "pbookfile.h" #include "gtincl.h" #include #include #include #include #include #include struct pbook_entry** phoneentry_to_fileentry (struct pbook_phone_entry** pentries, int uses_unicode) { struct pbook_entry** fentries = NULL; unsigned int i = 0; while (pentries[i] != NULL) ++i; fentries = mem_alloc((i+1)*sizeof(*fentries),0); for (i = 0; pentries[i] != NULL; ++i) { fentries[i] = mem_alloc(sizeof(**fentries),0); fentries[i]->slot = pentries[i]->slot; fentries[i]->number = pentries[i]->number; if (uses_unicode) { fentries[i]->text = convert_from_ucs2_hexstring((char*)pentries[i]->text,letohs); } else { fentries[i]->text = convert_from_gsm(pentries[i]->text); } pentries[i]->number = NULL; pentries[i]->text = mem_realloc(pentries[i]->text,0); pentries[i] = mem_realloc(pentries[i],0); } fentries[i] = NULL; return fentries; } struct pbook_phone_entry** fileentry_to_phoneentry (struct pbook_entry** fentries, int use_unicode) { struct pbook_phone_entry** pentries = NULL; unsigned int i = 0; while (fentries[i] != NULL) ++i; pentries = mem_alloc((i+1)*sizeof(*pentries),0); for (i = 0; fentries[i] != NULL; ++i) { pentries[i] = mem_alloc(sizeof(**pentries),0); struct_pbook_phone_entry_init(pentries[i]); pentries[i]->slot = fentries[i]->slot; pentries[i]->number = fentries[i]->number; pentries[i]->numtype = numtype(fentries[i]->number); if (use_unicode) { pentries[i]->text = (unsigned char*)convert_to_ucs2_hexstring(fentries[i]->text,htoles); } else { pentries[i]->text = convert_to_gsm(fentries[i]->text); } fentries[i]->number = NULL; fentries[i]->text = mem_realloc(fentries[i]->text,0); fentries[i] = mem_realloc(fentries[i],0); } pentries[i] = NULL; return pentries; } void pbook_send_entry (struct parameters* myparams) { int unicode; struct pbook_phone_entry** pentries = NULL; ucs4char_t* temp; unicode = set_charset("UCS2"); pentries = mem_alloc(2*sizeof(*pentries),0); pentries[1] = NULL; pentries[0] = mem_alloc(sizeof(**pentries),0); struct_pbook_phone_entry_init(pentries[0]); pentries[0]->slot = myparams->slot; if (myparams->number != NULL) { pentries[0]->number = myparams->number; pentries[0]->numtype = numtype(myparams->number); } if (myparams->text != NULL) { temp = convert_from_system(myparams->text); if (unicode) { pentries[0]->text = (unsigned char*)convert_to_ucs2_hexstring(temp,htoles); } else { pentries[0]->text = convert_to_gsm(temp); } mem_realloc(temp,0); } if (pbook_phone_write(myparams->mem,pentries) == 0) { errexit("%s\n",_("something went wrong with sending the phonebook entries")); } set_charset("GSM"); } void pbook_send (char* file, char* phonebook) { int unicode; struct pbook_phone_entry** pentries = NULL; struct pbook_entry** fentries; unicode = set_charset("UCS2"); fentries = pbook_file_read(file); if (fentries == NULL) { errexit(_("invalid phonebook file %s.\n"),file); } if (fentries[0] == NULL) { errexit(_("empty phonebook file %s.\n"),file); } pentries = fileentry_to_phoneentry(fentries,unicode); if (pbook_phone_write(phonebook,pentries) == 0) { errexit("%s\n",_("something went wrong with sending the phonebook entries")); } set_charset("GSM"); } void pbook_get (struct parameters* myparams, char* file) { int unicode; struct pbook_phone_entry** pentries = NULL; struct pbook_entry** fentries = NULL; unicode = set_charset("UCS2"); if (myparams->slot >= SCMXX_SLOT_PBOOK_MIN) { pentries = pbook_phone_get_range(myparams->mem, myparams->slot, myparams->slot, 0); } else { pentries = pbook_phone_get(myparams->mem); } if (pentries == NULL || pentries[0] == NULL) { print_verbose(0,"%s\n",_("Nothing to get.")); } else { fentries = phoneentry_to_fileentry(pentries,unicode); pbook_file_write(file,fentries); } set_charset("GSM"); } void pbook_delete (char* phonebook) { char* ausgabe; char* temp; unsigned int i,min=0,max=0; enum return_code status; struct pbook_phone_entry** pentries = NULL; if ((!strcasecmp(phonebook,"DC")) || (!strcasecmp(phonebook,"MD")) || (!strcasecmp(phonebook,"LD"))) { at_command_send(AT_SIE_PB_DELETE,NULL); ausgabe = at_read_line(); status = at_line_type(ausgabe,AT_SIE_PB_DELETE,&temp); if (status == AT_RET_OK) { print_verbose(0,_("%s deleted.\n"),phonebook); } else { errexit("%s\n%s\n",temp,_("Possible data corruption!")); } mem_realloc(ausgabe,0); } else { if (pbook_get_ranges(phonebook,1,&min,&max,NULL,NULL)) { pentries = mem_alloc((max-min+2)*sizeof(*pentries),0); for (i = 0; i <= max-min; ++i) { pentries[i] = mem_alloc(sizeof(**pentries),0); struct_pbook_phone_entry_init(pentries[i]); pentries[i]->slot = i+min; } pentries[max-min+1] = NULL; if (pbook_phone_write(phonebook,pentries) == 0) { errexit("%s\n",_("something went wrong with sending the phonebook entries")); } } else errexit("%s\n",_("the selected phonebook is not writable")); } } int pbook_get_ranges (char* mem, int write, unsigned int* min, unsigned int* max, int* nrlen, int* txtlen) { char* command; char* ausgabe; char* temp; enum return_code status; if (mem == NULL) return 0; //reset those values to invalid if (nrlen != NULL) *nrlen = -1; if (txtlen != NULL) *txtlen = -1; if (write) { command = AT_GEN_PB_WRITE; } else { if (strcasecmp(mem,VCARD_PHONEBOOK_NAME) == 0) { command = AT_SIE_PB_VCF_READ; //answer does not contain nrlen or txtlen nrlen = NULL; txtlen = NULL; } else if (strcasecmp(mem,"RD") == 0 || strcasecmp(mem,"CS") == 0) { command = AT_SIE_PB_READ_SORTED; } else { command = AT_GEN_PB_READ; } } at_command_send(command,AT_READ_SUFFIX); ausgabe = at_read_line(); status = at_line_type(ausgabe,command,&temp); if (status != AT_RET_ANSWER && status != AT_RET_OTHER) { return 0; } mem_realloc(at_read_line(),0); /* examples: * +CPBW: (1-100),20,(128-255),17 * +CPBR: (1-100),20,17 * ^SPBG: (1-75),20,17 * ^SDBR: (1-45) */ //minimum of range if (min != NULL) { if (*temp != '(') return 0; *min = atoi(temp+1); } ++temp; //maximum of range if (max != NULL) { while (isdigit((int)*temp)) ++temp; switch(*temp) { case '-': *max = atoi(temp+1); break; case ')': *max = *min; break; default: return 0; } } //maximum number field length if (nrlen != NULL) { temp = strchr(temp,','); if (temp == NULL) return 0; *nrlen = atoi(temp+1); } //maximum text field length if (txtlen != NULL) { temp = strrchr(temp,','); if (temp == NULL) return 0; *txtlen = atoi(temp+1); } return 1; } void pbook_manage (int action, char* outfile, char** files, struct parameters* myparams) { unsigned int i = 0; unsigned int max; if (myparams->mem == NULL) { //SIM myparams->mem seems to be a good default myparams->mem = "SM"; } if (strcmp(myparams->mem,"?") == 0) { pbook_print_memlist(NULL,1); return; } if (action == 0) { errexit ("%s\n",_("You must specify a valid action.")); } if (!pbook_select_mem(myparams->mem)) { errexit(_("Cannot select memory %s\n"),myparams->mem); } if (myparams->slot == SCMXX_SLOT_LAST) { if (pbook_get_ranges(myparams->mem,1,NULL,&max,NULL,NULL)) myparams->slot = max; else errexit("%s\n",_("could not determine last slot.")); } switch (action) { default: errexit("%s\n",_("You must specify exactly one operation.")); break; case SCMXX_ACTION_REMOVE: //deleting if (myparams->slot >= SCMXX_SLOT_PBOOK_MIN) { pbook_send_entry(myparams); } else { pbook_delete(myparams->mem); } break; case SCMXX_ACTION_SEND: //sending if (myparams->number != NULL || myparams->text != NULL) { if (myparams->slot == SCMXX_SLOT_UNDEFINED) { myparams->slot = pbook_phone_find_empty(myparams->mem,0); } else if (myparams->slot < SCMXX_SLOT_PBOOK_MIN) { errexit("%s\n",_("invalid slot defined")); } pbook_send_entry(myparams); } else { while (files[i] != NULL) { pbook_send(files[i++],myparams->mem); } } break; case SCMXX_ACTION_GET: //getting pbook_get(myparams,outfile); break; } } scmxx-0.9.0/src/scmxx/memtypes.c0000644000175000017500000004611410375735027016473 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "memtypes.h" #include "scmxx.h" #include "options.h" #include "helper.h" #include "atcommand.h" #include "gtincl.h" #include #include #include #include static unsigned int roundup2 (unsigned int d) { return ((d/2) + (d%2)); } static char* file_types_get_string (int action) { char* ausgabe = at_get_vendor(); char* command; if (ausgabe == NULL || strcasecmp(ausgabe,"SIEMENS") != 0) return NULL; ausgabe = mem_realloc(ausgabe,0); if (action == SCMXX_ACTION_GET) command = AT_SIE_BIN_READ; else command = AT_SIE_BIN_WRITE; at_command_send(command,"?"); return at_get_value(command); } static unsigned int file_type_count (const char* str) { int count = 0; char* start; char* end; if (str == NULL) return 0; //count the number of entries while ((start = strchr(str,(int)'"')) != NULL && (end = strchr(start+1,(int)'"')) != NULL) { ++count; str = end+1; } return count; } static struct slot_range** file_type_filter (struct slot_range** input, int action) { char* vendor = at_get_vendor(); char* model = at_get_model(); unsigned int i = 0; if (strcasecmp(vendor,"SIEMENS") == 0) { if (strcasecmp(model,"ME45") == 0 || strcasecmp(model,"S45") == 0 || strcasecmp(model,"S45i") == 0) { for (; input[i] != NULL; ++i) { /* actually, you should not access midi slot 4 with S45 or ME45 because * of a firmware bug: * no data loss occurs but the phone thinks, a new music file arrived * although this is not true. */ if (action != SCMXX_ACTION_SEND && strcmp(input[i]->name,"mid") == 0 && input[i]->max >= 4) input[i]->max = 3; } } else if (strcasecmp(model,"S55") == 0) { for (; input[i] != NULL; ++i) { /* S55 stalls on bmp slots 3 and 4, obviously not present or very buggy */ if (action != SCMXX_ACTION_GET && strcmp(input[i]->name,"bmp") == 0 && input[i]->max >= 2) input[i]->max = 2; } } } return input; } struct slot_range** file_types_get (int action) { struct slot_range** retval; char* ausgabe; char* temp; char* start; char* end; int count = 0; int status; ausgabe = file_types_get_string(action); /* ^SBNR: ("bmp",(0-2)),("mid",(0-10)),("vcf",(0-500)),("vcs",(1-500)) * ^SBNW: ("bmp",(0-4)),("mid",(0-10)),("vcf",(0-500)),("vcs",(0-500)),("t9d",(0)) */ if (ausgabe == NULL) return NULL; retval = mem_alloc(sizeof(*retval)*(file_type_count(ausgabe)+1),0); //assign the entries; temp = ausgabe; count = 0; while ((start = strchr(temp,(int)'"')) != NULL && (end = strchr(start+1,(int)'"')) != NULL) { temp = end+1; retval[count] = mem_alloc(sizeof(**retval),0); status = sscanf(start,"\"%4[^\"]\",(%d-%d)",retval[count]->name, &retval[count]->min,&retval[count]->max); if (status == 3) { ++count; } else { status = sscanf(start,"\"%4[^\"]\",(%d)",retval[count]->name, &retval[count]->min); if (status == 2) { retval[count]->max = retval[count]->min; ++count; } } } retval[count] = NULL; mem_realloc(ausgabe,0); return file_type_filter(retval,action); } struct file_mem_list { char* name; //pointer in r or w char* longname; struct slot_range* r; struct slot_range* w; }; struct file_mem_list** struct_file_mem_list_init (struct slot_range** r, struct slot_range** w) { struct file_mem_list** retval; unsigned int rc = 0, wc = 0; //counters for r and w unsigned int c = 0; if (r != NULL) while (r[rc] != NULL) ++rc; if (w != NULL) while (w[wc] != NULL) ++wc; retval = mem_alloc((rc+wc+1)*sizeof(*retval),0); if (r != NULL) { for (rc = 0; r[rc] != NULL; ++rc) { retval[c] = mem_alloc(sizeof(**retval),0); retval[c]->name = r[rc]->name; retval[c]->r = r[rc]; retval[c]->w = NULL; ++c; } } if (w != NULL) { for (wc = 0; w[wc] != NULL; ++wc) { for (rc = 0; r[rc] != NULL; ++rc) { if (strcmp(r[rc]->name,w[wc]->name) == 0) break; } if (r[rc] == NULL) { retval[c] = mem_alloc(sizeof(**retval),0); retval[c]->name = w[wc]->name; retval[c]->r = NULL; retval[c]->w = w[wc]; ++c; } else { retval[rc]->w = w[wc]; } } } retval[c] = NULL; for (c = 0; retval[c] != NULL; ++c) { if (strcmp(retval[c]->name,"bmp") == 0) { retval[c]->longname = _("bitmap"); } else if (strcmp(retval[c]->name,"mid") == 0) { retval[c]->longname = _("midi"); } else if (strcmp(retval[c]->name,"vcs") == 0) { retval[c]->longname = _("vCalendar"); } else if (strcmp(retval[c]->name,"vcf") == 0) { retval[c]->longname = _("vCard (address book)"); } else if (strcmp(retval[c]->name,"bmx") == 0) { retval[c]->longname = _("EMS animation"); } else if (strcmp(retval[c]->name,"t9d") == 0) { retval[c]->longname = _("T9 database"); } else if (strcmp(retval[c]->name,"dir") == 0) { retval[c]->longname = _("UCS-2 encoded dir name"); } else { retval[c]->longname = NULL; } } return retval; } void file_print_memlist (FILE* fd, unsigned int full) { struct slot_range** rrange; struct slot_range** wrange; struct file_mem_list** memlist; unsigned int m = 0; const unsigned int columns = 4; struct table_column { char* name; unsigned int width; } table[columns]; char* entry[columns]; unsigned int i; if (fd == NULL) { fd = stdout; } rrange = file_types_get(SCMXX_ACTION_GET); wrange = file_types_get(SCMXX_ACTION_SEND); memlist = struct_file_mem_list_init(rrange,wrange); mem_realloc(rrange,0); mem_realloc(wrange,0); if (!full) { for (; memlist[m] != NULL; ++m) { if (m != 0) fprintf(fd,", "); fprintf(fd,"%s",memlist[m]->name); mem_realloc(memlist[m]->r,0); mem_realloc(memlist[m]->w,0); mem_realloc(memlist[m],0); } } else { table[0].name = _("mem"); table[1].name = _("readable"); table[2].name = _("writable"); table[3].name = _("description"); for (i = 0; i < columns; ++i) table[i].width = strlen(table[i].name); //maybe the column width need to be bigger for (m = 0; memlist[m] != NULL; ++m) { if (table[0].width < strlen(memlist[m]->name)) table[0].width = strlen(memlist[m]->name); if (memlist[m]->r != NULL) if (table[1].width < numlen(memlist[m]->r->min)+1+numlen(memlist[m]->r->max)) table[1].width = numlen(memlist[m]->r->min)+1+numlen(memlist[m]->r->max); if (memlist[m]->w != NULL) if (table[2].width < numlen(memlist[m]->w->min)+1+numlen(memlist[m]->w->max)) table[2].width = numlen(memlist[m]->w->min)+1+numlen(memlist[m]->w->max); } for (i = 0; i < columns; ++i) entry[i] = mem_alloc((table[i].width+1)*sizeof(char),1); fprintf(fd,"\n"); //print table header for (i = 0; i < columns; ++i) fprintf(fd,"%-*s ",table[i].width,table[i].name); fprintf(fd,"\n"); for (i = 0; i < columns; ++i) { memset(entry[i],'-',table[i].width); fprintf(fd,"%s ",entry[i]); } fprintf(fd,"\n"); mem_realloc(entry[0],0); mem_realloc(entry[columns-1],0); for (m = 0; memlist[m] != NULL; ++m) { //1st column entry[0] = memlist[m]->name; //2nd column if (memlist[m]->r) { if (memlist[m]->r->min != memlist[m]->r->max) sprintf(entry[1],"%*s%d-%d", roundup2(table[1].width-numlen(memlist[m]->r->min)-1-numlen(memlist[m]->r->max)), "", memlist[m]->r->min, memlist[m]->r->max); else sprintf(entry[1],"%*s%d", roundup2(table[1].width-numlen(memlist[m]->r->min)), "", memlist[m]->r->min); } else sprintf(entry[1],"%*s%s",roundup2(table[1].width-4),"","none"); //3rd column if (memlist[m]->w) { if (memlist[m]->w->min != memlist[m]->w->max) sprintf(entry[2],"%*s%d-%d", roundup2(table[2].width-numlen(memlist[m]->w->min)-1-numlen(memlist[m]->w->max)), "", memlist[m]->w->min, memlist[m]->w->max); else sprintf(entry[2],"%*s%d", roundup2(table[2].width-numlen(memlist[m]->w->min)), "", memlist[m]->w->min); } else sprintf(entry[2],"%*s%s",roundup2(table[2].width-4),"","none"); //print columns 1-3 for (i = 0; i < columns-1; ++i) { fprintf(fd,"%-*s ",table[i].width,entry[i]); } //print 4th column if present if (memlist[m]->longname != NULL) { fprintf(fd,"%s",memlist[m]->longname); } fprintf(fd,"\n"); mem_realloc(memlist[m]->r,0); mem_realloc(memlist[m]->w,0); mem_realloc(memlist[m],0); } mem_realloc(entry[1],0); mem_realloc(entry[2],0); } mem_realloc(memlist,0); fprintf(fd,"\n"); } char** pb_get_types (void) { char** retval; char* ausgabe; char* command; unsigned int i = 0; int has_mem_vcf = 0; ausgabe = at_get_vendor(); if(ausgabe != NULL && strcasecmp(ausgabe,"SIEMENS") == 0) { command = AT_SIE_PB_SELECT; mem_realloc(ausgabe,0); ausgabe = at_get_model(); if (strcmp(ausgabe,"A65") != 0) { /* A65 stalls on this command, work-around */ at_command_send(AT_SIE_PB_VCF_READ,AT_READ_SUFFIX); mem_realloc(ausgabe,0); ausgabe = at_get_value(AT_SIE_PB_VCF_READ); if (ausgabe != NULL) has_mem_vcf = 1; } } else { command = AT_GEN_PB_SELECT; } mem_realloc(ausgabe,0); at_command_send(command,AT_READ_SUFFIX); ausgabe = at_get_value(command); /* ^SPBS: ("FD","SM","ON","LD","MC","RC","OW","MS","CD","BL","RD","CS") * +CPBS: ("FD","SM","ON","LD","MC","RC") */ if (ausgabe != NULL) { retval = at_parse_stringlist(ausgabe); if (has_mem_vcf) { while (retval[i] != NULL) ++i; retval = mem_realloc(retval,(i+2)*sizeof(*retval)); retval[i] = str_dup(VCARD_PHONEBOOK_NAME); retval[i+1] = NULL; } } else { retval = NULL; } return retval; } void pbook_print_memlist (FILE* fd, unsigned int full) { char** memlist; unsigned int m; const unsigned int columns = 6; struct table_column { char* name; unsigned int width; } table[columns]; char* entry[columns]; unsigned int i = 0; unsigned int min; unsigned int max; int nrlen; int txtlen; int writable; if (fd == NULL) { fd = stdout; } memlist = pb_get_types(); if (memlist == NULL) { fprintf(fd,"\n"); return; } if (!full) { if (memlist != NULL) { for (m = 0; memlist[m] != NULL; ++m) { if (m != 0) fprintf(fd,", "); fprintf(fd,"%s",memlist[m]); } } } else { table[0].name = _("mem"); table[1].name = _("slots"); table[2].name = _("writable"); table[3].name = _("digits"); table[4].name = _("chars"); table[5].name = _("description"); for (i = 0; i < columns; ++i) table[i].width = strlen(table[i].name); if (table[1].width < 6) table[1].width = 6; //in case of 1-1000 if (table[1].width < strlen(_("none"))) table[1].width = strlen(_("none")); if (table[2].width < strlen(_("yes"))) table[2].width = strlen(_("yes")); if (table[2].width < strlen(_("no"))) table[2].width = strlen(_("no")); for (i = 0; i < columns; ++i) entry[i] = mem_alloc((table[i].width+1)*sizeof(char),1); fprintf(fd,"\n"); //print table header for (i = 0; i < columns; ++i) fprintf(fd,"%-*s ",table[i].width,table[i].name); fprintf(fd,"\n"); for (i = 0; i < columns; ++i) { memset(entry[i],'-',table[i].width); fprintf(fd,"%s ",entry[i]); } fprintf(fd,"\n"); mem_realloc(entry[0],0); mem_realloc(entry[columns-1],0); for (m = 0; memlist[m] != NULL; ++m) { //getting data for current row pbook_select_mem(memlist[m]); writable = pbook_get_ranges(memlist[m],1,&min,&max,&nrlen,&txtlen); if (writable == 0) { if(!pbook_get_ranges(memlist[m],0,&min,&max,&nrlen,&txtlen)) { print_warning(_("could not get limits of phonebook %s.\n"),memlist[m]); ++m; continue; } } //1st column entry[0] = memlist[m]; //2nd column if (min != max) { sprintf(entry[1],"%*s%d-%d", roundup2(table[1].width-numlen(min)-1-numlen(max)), "", min,max); } else { if (min == 0) { sprintf(entry[1],"%*s%s", roundup2(table[1].width-strlen(_("none"))), "", _("none")); } else { sprintf(entry[1],"%*s%d", roundup2(table[1].width-numlen(min)), "", min); } } //3rd column if (writable) { sprintf(entry[2],"%*s%s", roundup2(table[2].width-strlen(_("yes"))), "", _("yes")); } else { sprintf(entry[2],"%*s%s", roundup2(table[2].width-strlen(_("no"))), "", _("no")); } //4th column if (nrlen >= 0) { sprintf(entry[3],"%*s%d", roundup2(table[3].width-numlen(nrlen)), "", nrlen); } else { memset(entry[3],0,1); } //5th column if (nrlen >= 0) { sprintf(entry[4],"%*s%d", roundup2(table[4].width-numlen(txtlen)), "", txtlen); } else { memset(entry[4],0,1); } //6th column if (strcasecmp(memlist[m],"FD") == 0) { entry[5] = _("SIM fix-dialing phonebook"); } else if (strcasecmp(memlist[m],"SM") == 0) { entry[5] = _("SIM phonebook"); } else if (strcasecmp(memlist[m],"DC") == 0 || strcasecmp(memlist[m],"MD") == 0) { entry[5] = _("last calls (mobile)"); } else if (strcasecmp(memlist[m],"LD") == 0) { entry[5] = _("last calls (SIM)"); } else if (strcasecmp(memlist[m],"ON") == 0 || strcasecmp(memlist[m],"OW") == 0) { entry[5] = _("own numbers"); } else if (strcasecmp(memlist[m],"ME") == 0) { entry[5] = _("mobile equipment phonebook"); } else if (strcasecmp(memlist[m],"BD") == 0) { entry[5] = _("barred numbers"); } else if (strcasecmp(memlist[m],"SD") == 0) { entry[5] = _("service numbers"); } else if (strcasecmp(memlist[m],"MC") == 0 || strcasecmp(memlist[m],"MS") == 0) { entry[5] = _("missed calls"); } else if (strcasecmp(memlist[m],"RC") == 0 || strcasecmp(memlist[m],"CD") == 0) { entry[5] = _("callback numbers"); } else if (strcasecmp(memlist[m],"BL") == 0) { entry[5] = _("blacklist numbers"); } else if (strcasecmp(memlist[m],"MB") == 0) { entry[5] = _("mailbox numbers"); } else if (strcasecmp(memlist[m],"RD") == 0) { entry[5] = _("red book (VIP in CS)"); } else if (strcasecmp(memlist[m],"CS") == 0) { entry[5] = _("common sortable (FD+SM+ME)"); } else if (strcasecmp(memlist[m],VCARD_PHONEBOOK_NAME) == 0) { entry[5] = _("address book numbers"); } else { entry[5] = NULL; } //print columns 1-5 for (i = 0; i < columns-1; ++i) { fprintf(fd,"%-*s ",table[i].width,entry[i]); } //print column 6 if present if (entry[5] != NULL) { fprintf(fd,"%s",entry[5]); } fprintf(fd,"\n"); } for (i = 1; i < columns-1; ++i) mem_realloc(entry[i],0); } fprintf(fd,"\n"); mem_realloc(*memlist,0); mem_realloc(memlist,0); } char** sms_get_types (void) { char** retval = NULL; unsigned int count = 0; unsigned int i = 0, k = 0; char* ausgabe; char** list; char** list2; at_command_send(AT_GEN_SMS_MEM,"?"); ausgabe = at_get_value(AT_GEN_SMS_MEM); /* +CPMS: ("MT","SM","ME"),("MT","SM","ME"),("MT","SM","ME") */ if (ausgabe != NULL) { list = str_split(ausgabe,"),(",0); if (list != NULL) { retval = mem_alloc(sizeof(*retval),0); retval[0] = NULL; for (i = 0; list[i] != NULL; ++i) { list2 = at_parse_stringlist(list[i]); k = 0; while (list2[k] != NULL) ++k; retval = str_array_append(retval,count,list2,k); count += k; mem_realloc(list2,0); } str_array_uniq(retval); } mem_realloc(list,0); } return retval; } void sms_print_memlist (FILE* fd, unsigned int full) { char** memlist; unsigned int m; const unsigned int columns = 4; struct table_column { char* name; unsigned int width; } table[columns]; char* entry[columns]; unsigned int i = 0; struct slot_range range; int current; if (fd == NULL) { fd = stdout; } memlist = sms_get_types(); if (!full) { if (memlist != NULL) { for (m = 0; memlist[m] != NULL; ++m) { if (m != 0) fprintf(fd,", "); fprintf(fd,"%s",memlist[m]); } } } else { table[0].name = _("mem"); table[1].name = _("slots"); table[2].name = _("used"); table[3].name = _("description"); for (i = 0; i < columns; ++i) table[i].width = strlen(table[i].name); if (table[1].width < 6) table[1].width = 6; //in case of 1-1000 if (table[2].width < 9) table[2].width = 9; //in case of 1000/1000 for (i = 0; i < columns; ++i) entry[i] = mem_alloc((table[i].width+1)*sizeof(char),1); fprintf(fd,"\n"); //print table header for (i = 0; i < columns; ++i) { sprintf(entry[i],"%*s%s", roundup2(table[i].width-strlen(table[i].name)), "",table[i].name); fprintf(fd,"%-*s ",table[i].width,entry[i]); } fprintf(fd,"\n"); for (i = 0; i < columns; ++i) { memset(entry[i],'-',table[i].width); fprintf(fd,"%s ",entry[i]); } fprintf(fd,"\n"); mem_realloc(entry[0],0); mem_realloc(entry[columns-1],0); for (m = 0; memlist[m] != NULL; ++m) { //getting data for current row sms_select_mem(memlist[m],&range,¤t); //1st column entry[0] = memlist[m]; //2nd column if (range.min != range.max) { sprintf(entry[1],"%*s%d-%d", roundup2(table[1].width-numlen(range.min)-1-numlen(range.max)), "",range.min,range.max); } else { if (range.min == 0) { sprintf(entry[1],"%*s%s", roundup2(table[1].width-strlen(_("none"))), "",_("none")); } else { sprintf(entry[1],"%*s%d", roundup2(table[1].width-numlen(range.min)), "",range.min); } } //3rd column sprintf(entry[2],"%*s%d/%d", roundup2(table[2].width-numlen(range.max-range.min+1)-1-numlen(current)), "",current,range.max-range.min+1); //4th column if (strcmp(range.name,"SM") == 0) { entry[3] = _("SIM memory"); } else if (strcmp(range.name,"ME") == 0) { entry[3] = _("mobile equipment memory"); } else if (strcmp(range.name,"MT") == 0) { entry[3] = "ME + SM"; } else { entry[3] = NULL; } //print columns 1-3 for (i = 0; i < columns-1; ++i) { fprintf(fd,"%-*s ",table[i].width,entry[i]); } //print column 4 if present if (entry[3] != NULL) { fprintf(fd,"%s",entry[3]); } fprintf(fd,"\n"); } mem_realloc(entry[1],0); mem_realloc(entry[2],0); } fprintf(fd,"\n"); mem_realloc(*memlist,0); mem_realloc(memlist,0); } scmxx-0.9.0/src/scmxx/pbookphone.c0000644000175000017500000002364410374675040016774 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "pbookphone.h" #include "scmxx.h" #include "helper.h" #include "atcommand.h" #include "gtincl.h" #include #include #include #include void struct_pbook_phone_entry_init (struct pbook_phone_entry* p) { p->slot = 0; p->number = NULL; p->numtype = numtype(NULL); p->text = NULL; } void struct_pbook_phone_entry_delete (struct pbook_phone_entry* p) { mem_realloc(p->number,0); mem_realloc(p->text,0); } int pbook_phone_write_entry (struct pbook_phone_entry* entry) { char* temp; int retval = 1; at_gen_phonebook_write(entry->slot,entry->number, entry->numtype,(char*)entry->text); temp = at_read_line(); if (at_line_type(temp,NULL,NULL) != AT_RET_OK) retval = 0; mem_realloc(temp,0); return retval; } int pbook_phone_write (char* mem, struct pbook_phone_entry** entries) { unsigned int min,max; int nlen,tlen; unsigned long i = 0; unsigned long count = 0; char* text = NULL; if (!pbook_get_ranges(mem,1,&min,&max,&nlen,&tlen)) { errexit(_("getting limits of phonebook %s failed.\n"),mem); } for (i = 0; entries[i] != NULL; ++i) { if (min > entries[i]->slot || entries[i]->slot > max) { errexit (_("slot %d is out of range %d-%d.\n"),entries[i]->slot,min,max); } } count = i; if (count > max-min+1) { errexit(_("too many entries (max. %d).\n"),max-min+1); } if (count > 1) { print_verbose(0,_("Updating entries %s(%d-%d)...\n"),mem,min,max); text = mem_alloc(str_len(mem)+numlen(max)+3,1); for (i = 1; entries[i-1] != NULL; ++i) { if (pbook_phone_write_entry(entries[i-1]) == 0) return 0; sprintf(text,"%s(%u)",(mem)?mem:"",entries[i-1]->slot); console_print_status(STDERR_FILENO,text,str_len(text),&i,&count,1); } mem_realloc(text,0); console_print_status(STDERR_FILENO,_("done"),strlen(_("done")),&i,&count,1); if (count > 1) print_verbose(0,"%c",'\n'); } else { print_verbose(0,_("Updating one entry in slot %d of memory %s..."),entries[0]->slot,mem); if (pbook_phone_write_entry(entries[0]) == 0) return 0; } print_verbose(0,"%s\n",_("done")); return 1; } /* fill the pbook_phone_entry from a text line */ int pbook_phone_str2entry (char* line, struct pbook_phone_entry* entry) { //pointers in line char* slot; char* number; char* numtype; char* text; if (line == NULL || entry == NULL) return -1; /* Policy is to not trust in what the phone delivers * Thus, full checking must be done. * Format: slot,"number",numtype,"text" */ slot = line; while(isdigit((int)*line) && *line != 0) ++line; if (*line != ',' || *line == 0) return 0; ++line; if (*line != '"' || *line == 0) return 0; number = ++line; while (*line != '"' && *line != 0) ++line; if (*line != '"' || *line == 0) return 0; ++line; if (*line != ',' || *line == 0) return 0; numtype = ++line; while(isdigit((int)*line) && *line != 0) ++line; if (*line != ',' || *line == 0) return 0; ++line; if (*line != '"' || *line == 0) return 0; text = ++line; if ((line=strrchr(text-1,'"')) <= text-1) return 0; ++line; if (*line != 0) return 0; entry->slot = atoi(slot); entry->number = strn_dup(number,strchr(number,'"')-number); entry->numtype = atoi(numtype); entry->text = (unsigned char*)strn_dup(text,strrchr(text,'"')-text); return 1; } /* slot_max-slot_min can be used to loop over a limited range * The returned pointer is malloc'd, NULL-terminated list, * each list enty is malloc'd, too. */ #include struct pbook_phone_entry** pbook_phone_get_range (char* mem, unsigned int slot_min, unsigned int slot_max, int print_counter) { unsigned int i = 0; unsigned range = slot_max-slot_min+1; struct pbook_phone_entry** retval; struct pbook_phone_entry* buffer; struct pbook_phone_entry** vcfbuf; char* command; char* ausgabe; char* temp; enum return_code linestatus; int status; int enable_slot_range_test = 1; unsigned int j,k = 0; if (strcasecmp(mem,VCARD_PHONEBOOK_NAME) == 0) if (slot_min != slot_max) { retval = mem_alloc(((range*4)+1)*sizeof(*retval),0); for (i = slot_min; i <= slot_max; ++i) { //call this function recursively (one level) vcfbuf = pbook_phone_get_range(mem,i,i,print_counter); for (j = 0; vcfbuf[j] != NULL; ++j) { retval[k++] = vcfbuf[j]; } vcfbuf = mem_realloc(vcfbuf,0); } retval[k] = NULL; return retval; } else { command = at_sie_phonebook_vcf_read(slot_min, -1); enable_slot_range_test = 0; range = 4; } else if (strcasecmp(mem,"RD") == 0 || strcasecmp(mem,"CS") == 0) command = at_sie_phonebook_read_sorted(slot_min,slot_max); /* Get sorted pb */ else command = at_gen_phonebook_read(slot_min,slot_max); /* Get pb */ if (command != NULL) { ausgabe = at_read_line(); linestatus = at_line_type(ausgabe,command,&temp); } if (command == NULL || linestatus&AT_RET_ERROR) errexit(_("reading from phonebook %s failed: %s\n"),mem,temp); retval = mem_alloc((range+1)*sizeof(*retval),0); while ((linestatus == AT_RET_ANSWER || linestatus == AT_RET_OTHER) && i <= i+range-1) { buffer = mem_alloc(sizeof(**retval),0); struct_pbook_phone_entry_init(buffer); status = pbook_phone_str2entry(temp,buffer); if (status <= 0) errexit(_("parsing entry failed: %s\n"), temp); if (enable_slot_range_test) { if (buffer->slot > slot_max) errexit(_("phone returned unexpected entry %u\n"),buffer->slot); for (; i+slot_min < buffer->slot; ++i) { retval[i] = mem_alloc(sizeof(**retval),0); struct_pbook_phone_entry_init(retval[i]); retval[i]->slot = i+slot_min; if (verbosity_get() < VERBOSE_LEVEL_NOTICE && print_counter) print_verbose(0," %d",retval[i]->slot); } } retval[i] = buffer; if (strcasecmp(mem,VCARD_PHONEBOOK_NAME) == 0) retval[i]->slot = slot_min; if (verbosity_get() < VERBOSE_LEVEL_NOTICE && print_counter) print_verbose(0," %d",retval[i]->slot); mem_realloc(ausgabe,0); ausgabe = at_read_line(); linestatus = at_line_type(ausgabe,command,&temp); if (linestatus&AT_RET_ERROR) errexit(_("reading from phonebook %s failed: %s\n"),mem,temp); ++i; } if (enable_slot_range_test) { for (; i+slot_min <= slot_max; ++i) { retval[i] = mem_alloc(sizeof(**retval),0); struct_pbook_phone_entry_init(retval[i]); retval[i]->slot = i+slot_min; if (verbosity_get() < VERBOSE_LEVEL_NOTICE && print_counter) print_verbose(0," %d",retval[i]->slot); } } retval[i] = NULL; //termination of list return retval; } // number of requested number during a search #define search_delta 5 int pbook_phone_find_empty (char* mem, unsigned int startslot) { unsigned int min = -1, max = -1; unsigned int tempmax; int retval = -1; unsigned int i; struct pbook_phone_entry** temp; //reading available indexes if (!pbook_get_ranges(mem,0,&min,&max,NULL,NULL)) { errexit(_("getting limits of phonebook %s failed.\n"),mem); } if ((min == (unsigned int)0 && max == (unsigned int)0) || startslot > max) { //emty phonebook return -1; } print_verbose(0,"%s\n",_("Trying to find an empty slot...")); if (startslot < min) startslot = min; for (;startslot <= max && retval < 0; startslot += search_delta ) { tempmax = startslot+search_delta-1; if (tempmax > max) tempmax = max; temp = pbook_phone_get_range(mem,startslot,tempmax,0); for (i=0; temp[i] != NULL; ++i) { if (str_len(temp[i]->number) == 0 && str_len((char*)temp[i]->text) == 0 && retval < 0) { retval = temp[i]->slot; print_verbose(0,_("Detected empty slot %d\n"),retval); } struct_pbook_phone_entry_delete(temp[i]); } mem_realloc(temp,0); } return retval; } /* number of requesting numbers * higher means a little bit more speed * lower helps slow phones/SIM-cards to not time out */ #define delta 5 struct pbook_phone_entry** pbook_phone_get (char* mem) { unsigned cur_min, cur_max; unsigned int min = -1, max = -1; struct pbook_phone_entry** retval; struct pbook_phone_entry** temp; unsigned long i,j; //index in temp unsigned int k = 0; //index in retval char* text = NULL; //reading available indexes if (!pbook_get_ranges(mem,0,&min,&max,NULL,NULL)) { errexit(_("getting limits of phonebook %s failed.\n"),mem); } if (min == 0 && max == 0) { //emty phonebook return NULL; } text = mem_alloc(str_len(mem)+numlen(min)+numlen(max)+4,1); sprintf(text,"%s(%d-%d)",mem,min,max); print_verbose(0,"%s\n",_("Receiving phonebook entries...")); //4 times as big due to phonebook vcf retval = mem_alloc(((4*(max-min+1))+1)*sizeof(*retval),0); retval[0] = NULL; for (cur_min = min; cur_min <= (unsigned int)max; cur_min += delta) { cur_max = cur_min+delta-1; if (cur_max > (unsigned int)max) cur_max = max; i = cur_min-min; j = max-min+1; console_print_status(STDERR_FILENO,text,str_len(text),&i,&j,1); temp = pbook_phone_get_range(mem,cur_min,cur_max,0); i = 0; while (temp[i] != NULL) retval[k++] = temp[i++]; retval[k] = NULL; } i = max; console_print_status(STDERR_FILENO,text,str_len(text),&i,&i,1); mem_realloc(text,0); print_verbose(0,"%c",'\n'); return retval; } scmxx-0.9.0/src/scmxx/ttyaccess.h0000644000175000017500000000365310370115010016613 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TTYACCESS_H #define TTYACCESS_H #include "intincl.h" #include enum tty_types { TTY_TYPE_SERIAL, TTY_TYPE_BLUETOOTH }; struct port_args_t { enum tty_types type; char* device; char* baud; /* for serial port */ uint8_t channel; /* for bluetooth */ uint8_t timeout; unsigned int ignorebits :1; unsigned int startdelay; }; struct tty_access { char* (*read) (int (*stop_condition)(const char*, const size_t)); int (*write) (const char* data, size_t count); void (*flush) (void); void (*close) (void); }; struct tty_access* tty_open (struct port_args_t* args); int tty_write (const char* data, size_t count, long (*write_func) (const char* data, long len)); /* This function returns a char* that must be freed. * If it returns NULL, there was an error. Look at errno for the reason. * If the strlen(char*)==0, reading from the device timed out. Retry or abort. * (the timeout might only happen when the device was not opened with O_NONBLOCK, * the timeout time refers to the value that was set as c_cc[VTIME]) */ char* tty_read (int (*stop_condition)(const char*,const size_t), long (*read_func) (char* buf, long len)); #endif scmxx-0.9.0/src/scmxx/scmxx.h0000644000175000017500000000674210366730645016003 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "ttyaccess.h" #include "smspdu.h" #include "memtypes.h" #include "scmxx_opt.h" #include "timeincl.h" #include #include //from keypad.c int keypad_dial_number (char* number); //from dial.c void dial (char* number, int wait); void hangup (); //from lock.c int lock_get_status (const char* lock); int lock_enable (const char* lock, const char* password); int lock_disable (const char* lock, const char* password); void lock_toggle (const char* lock, const char* password); void lock_print_list (FILE* fd, unsigned int full); //from action.c int phone_init (int reset, struct tty_access* hw); int command_echo (int enable); int verbose_errors (int enable); int pbook_select_mem (char* mem); int sms_select_mem (char* mem, struct slot_range* r, int* current_fill); void set_smsc (char* smsnr); void set_time (); int set_charset(char *charset); char* get_revision (); char* get_phoneserial (); char* get_simserial (); char* get_simid (); char* get_operator (); char* get_smsc (); char* get_charset (); char* get_battery (); char* get_signal_ber (); struct tm* get_time (); char* get_netstatus (unsigned int* areacode_p, unsigned int* cellid_p); void info (char* file, int misc, int mem, int lock); //from s35_files.c void file_transfer_manage (int action, char** files, char* outfile, char* pipe, char* mem, int slot); void file_delete (char* ftype, int slot); int file_detect_free_slot (char* ftype, int minimum, int maximum); void file_send (char* file, char* ftype, int slot); void file_get (char* file, char* pipe, char* ftype, unsigned long slot, unsigned long count, unsigned long total); //from s35_pbook.c void pbook_manage (int action, char* outfile, char** files, struct parameters* myparams); int pbook_get_ranges (char* mem, int write, unsigned int* min, unsigned int* max, int* nrlen, int* txtlen); //from s35_sms.c void sms_manage (int action, char** files, char* outfile, char* pipe, struct parameters* myparams, struct smsopts* mysmsopts); void sms_delete_slot (int smsslot); void sms_delete_all (struct sms_slot_data** slist); void sms_send_slot (int smsslot, char* smsnumber); void sms_send_pdu (struct sms_pdu_raw* tpdu, int direct); void sms_send_pdus (struct sms_pdu_raw** pdu, int direct); void sms_send_pdu_all (struct sms_slot_data** slist, char* number, int direct); struct sms_pdu_raw** sms_pdu_create (char* file, char* text, char* number, struct smsopts* mysmsopts); int sms_get (struct sms_slot_data** slist, size_t ssize, int slot, int mark_read); void sms_print (FILE* filefd, char* pipe, struct sms* data); void sms_print_all (char* file, char* pipe, struct sms_slot_data** slist, char* sort_mode); void sms_get_direct (char* file, char* pipe); scmxx-0.9.0/src/scmxx/pbookphone.h0000644000175000017500000000341310343321545016763 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "intincl.h" /* This is formatted like the phone wants it * Needs to be converted according to the settings at time * of getting (e.g. charset in text). */ struct pbook_phone_entry { unsigned int slot; char* number; uint8_t numtype; unsigned char* text; }; void struct_pbook_phone_entry_init (struct pbook_phone_entry* p); void struct_pbook_phone_entry_delete (struct pbook_phone_entry* p); /* return -1 on failure, else a slot number of the next empty slot */ int pbook_phone_find_empty (char* mem, unsigned int startslot); /* The returned pointer is malloc'd, NULL-terminated list, * each list enty is malloc'd, too. */ struct pbook_phone_entry** pbook_phone_get (char* mem); struct pbook_phone_entry** pbook_phone_get_range (char* mem, unsigned int slot_min, unsigned int slot_max, int print_counter); /* returns 1 on success, 0 on failure */ int pbook_phone_write (char* mem, struct pbook_phone_entry** entries); int pbook_phone_write_entry (struct pbook_phone_entry* entry); scmxx-0.9.0/src/scmxx/memtypes.h0000644000175000017500000000243410343321545016464 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef MEMTYPES_H #define MEMTYPES_H #include struct slot_range { char name[4]; int min; int max; }; /* The following always return a valid (NULL-terminated) list. * All list entry pointers and the list pointer itself are malloc'ed. */ struct slot_range** file_types_get (int mode); char** pb_get_types (void); char** sms_get_types (void); void file_print_memlist (FILE* fd, unsigned int full); void pbook_print_memlist (FILE* fd, unsigned int full); void sms_print_memlist (FILE* fd, unsigned int full); #endif scmxx-0.9.0/src/scmxx/pbookfile.c0000644000175000017500000001065310370115125016563 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "pbookfile.h" #include "helper.h" #include "scmxx.h" #include #include #include #include #include #include /* fill the pbook_phone_entry from a text line */ int pbook_file_str2entry (char* line, struct pbook_entry* entry) { //pointers in line char* slot; char* number; char* text; char* temp; if (str_len(line) == 0 || entry == NULL) return -1; /* Policy is to not trust in what the phone delivers * Thus, full checking must be done. * Format: slot,"number",numtype,"text" */ slot = line; while(isdigit((int)*line) && *line != 0) ++line; if (*line != ',' || *line == 0) return 0; ++line; if (*line != '"' || *line == 0) return 0; number = ++line; while (*line != '"' && *line != 0) ++line; if (*line != '"' || *line == 0) return 0; ++line; if (*line != ',' || *line == 0) return 0; ++line; if (*line != '"' || *line == 0) return 0; text = ++line; if ((line=strrchr(text-1,'"')) <= text-1) return 0; ++line; if (strcmp(line,"\n") != 0 && //Unix strcmp(line,"\r\n") != 0 && //Windows strcmp(line,"\r") != 0) { //Mac return 0; } entry->slot = atoi(slot); entry->number = strn_dup(number,strchr(number,'"')-number); temp = strn_dup(text,strchr(text,'"')-text); entry->text = convert_from_system(temp); mem_realloc(temp,0); return 1; } int pbook_file_read_line (FILE* fp,struct pbook_entry* entry) { char buffer[BUFSIZ]; if (fp == NULL || entry == NULL) return -1; memset(buffer,0,1); if (fgets(buffer,BUFSIZ,fp) == NULL) return -1; else return pbook_file_str2entry(buffer,entry); } struct pbook_entry** pbook_file_read (char* file) { FILE* fp; size_t i = 0; struct pbook_entry** plist; size_t psize = 100; int status; if (file == NULL) return NULL; if (str_len(file) && strcmp(file,"-") != 0) { fp = fdopen(file_open_input(file),"r"); if (fp == NULL) return NULL; } else { fp = stdin; } plist = mem_alloc(psize*sizeof(*plist),0); do { if (i+1 >= psize) { psize += 100; plist = mem_realloc(plist,psize*sizeof(*plist)); } plist[i] = mem_alloc(sizeof(**plist),0); status = pbook_file_read_line(fp,plist[i]); switch (status) { case 1: //successful read of entry ++i; break; case -1: //end of file plist[i] = mem_realloc(plist[i],0); plist[i] = NULL; break; case 0: //failure in entry or file plist[i] = mem_realloc(plist[i],0); plist[i] = NULL; i=0; while (plist[i] != NULL) { mem_realloc(plist[i]->number,0); mem_realloc(plist[i]->text,0); mem_realloc(plist[i],0); ++i; } mem_realloc(plist,0); return NULL; } } while (status == 1); plist = mem_realloc(plist,(i+1)*sizeof(*plist)); if (fp != stdin) { fclose(fp); } return plist; } int pbook_file_write_entry (FILE* fp, struct pbook_entry* entry) { char* number = entry->number; char* text; int status; if (number == NULL) number = ""; text = convert_to_system(entry->text,REPMODE_ESCAPE_CHARS); if (text == NULL) { if (entry->text != NULL) return 0; else text = str_dup(""); } status = fprintf(fp,"%u,\"%s\",\"%s\"\n",entry->slot,number,text); mem_realloc(text,0); if (status == 0) return 0; else return 1; } int pbook_file_write (char* file, struct pbook_entry** entries) { unsigned int i = 0; FILE* fp; if (file == NULL) return 0; if (str_len(file) && strcmp(file,"-") != 0) { fp = fdopen(file_open_output(file),"w"); if (fp == NULL) return 0; } else { fp = stdout; } for (; entries[i] != NULL; ++i) { if (pbook_file_write_entry(fp,entries[i]) == 0) return 0; } return 1; } scmxx-0.9.0/src/scmxx/dial.c0000644000175000017500000001020410343616256015525 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "atcommand.h" #include "scmxx.h" #include "gtincl.h" #include "smspdu.h" #include "w32compat.h" #include #include struct call_info { int id; int direction; int status; int mode; int conference; struct gsm_number num; }; struct call_info* call_info_new () { struct call_info* retval = mem_alloc(sizeof(*retval),0); retval->id = 0; retval->direction = 0; retval->status = 0; retval->mode = 0; retval->conference = 0; gsm_number_init(&retval->num); return retval; } void call_info_delete (struct call_info* this) { gsm_number_delete(&this->num); mem_realloc(this,0); } struct call_info* parse_call_info_line (char* line) { struct call_info* retval = call_info_new(); int type = 0; char number[3+20+1]; int i; // ,,,,,, memset(number,0,sizeof(number)); i = sscanf(line,"%d,%d,%d,%d,%d,%23[\"+0-9],%d", &retval->id,&retval->direction,&retval->status, &retval->mode,&retval->conference, number,&type); if (i == 7) { gsm_number_set_toa(&retval->num,(uint8_t)type&0xFF); gsm_number_set(&retval->num,number,str_len(number)); } else { retval = mem_realloc(retval,0); } return retval; } struct call_info** get_call_info () { struct call_info** retval = NULL; unsigned int count = 0; unsigned int i = 0; char* answer; char* temp = NULL; enum return_code code; at_command_send(AT_GEN_CALLINFO,NULL); answer = at_read_line(); code = at_line_type(answer,AT_GEN_CALLINFO,&temp); while (code == AT_RET_ANSWER) { if (i+1 >= count) { count += 5; retval = mem_realloc(retval,count*sizeof(*retval)); retval[i+1] = NULL; retval[i+2] = NULL; } retval[i] = parse_call_info_line(temp); mem_realloc(answer,0); answer = at_read_line(); code = at_line_type(answer,AT_GEN_CALLINFO,&temp); } return retval; } int dial_number (char* number) { char* temp; unsigned int length = str_len(number); if (length == 0) return 0; temp = mem_alloc(length+2,1); snprintf(temp,length+3,"D%s;",number); at_command_send(temp,NULL); mem_realloc(temp,0); temp = at_read_line(); if (at_line_type(temp,NULL,NULL) == AT_RET_OK) return 1; else return 0; } void dial (char* number,int wait) { struct call_info** ci; struct gsm_number num; unsigned int i; int loop_break = 0; int timer = 0; print_verbose(0,_("Using dialing sequence %s.\n"),number); if (keypad_dial_number(number) == 0 && dial_number(number) == 0) errexit("%s\n", _("dialing failed")); /* wait until it rings on the remote side */ if (wait) { gsm_number_init(&num); gsm_number_set_toa(&num,numtype(number)); gsm_number_set(&num,number,str_len(number)); do { ci = get_call_info(); if (ci == NULL || ci[0] == NULL) { usleep(100*1000); ++timer; } if (ci != NULL) { for (i=0; ci[i] != NULL; ++i) if (gsm_number_compare(&num,&ci[i]->num)) { loop_break = 1; if (ci[i]->status == 3) // 2 == dialing, 3 == alert (remote ring) loop_break = 2; } for (i=0; ci[i] != NULL; ++i) call_info_delete(ci[i]); ci = mem_realloc(ci,0); } else { /* if user hangs up before it rings on the other side */ if (loop_break == 1) ++loop_break; } } while (loop_break < 2 && timer < 100); } } void hangup () { at_command_send(AT_GEN_HANGUP,NULL); mem_realloc(at_read_line(),0); } scmxx-0.9.0/src/scmxx/tty_bluetooth.h0000644000175000017500000000217010366740146017532 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TTY_BLUETOOTH_H #define TTY_BLUETOOTH_H #include "ttyaccess.h" #define BTCHAN_RFCOMM 1 struct tty_access* tty_bluetooth_open (struct port_args_t* args); void tty_bluetooth_close(void); int tty_bluetooth_write (const char* data, size_t count); char* tty_bluetooth_read (int (*stop_condition)(const char*,const size_t)); void tty_bluetooth_flush (void); #endif scmxx-0.9.0/src/scmxx/keypad.c0000644000175000017500000000305010343321545016064 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "atcommand.h" #include "helper.h" #include "scmxx.h" #include "string.h" int keypad_dial_number (char* number) { char* keylist; char* ausgabe; char* temp; if (str_len(number) == 0) return 0; // enable keypad control from TE at_command_send(AT_GEN_TERM_CMODE,"2"); //ignore response mem_realloc(at_read_line(),0); //disable keypad lock //should never fail but handle that case anyway if (lock_get_status("CS") != 0) return 0; keylist = mem_alloc(strlen(number)+3,1); sprintf(keylist,"C%sS",number); temp = keylist; do { temp = at_gen_keypad(temp,1,0); ausgabe = at_read_line(); if (at_line_type(ausgabe,NULL,NULL) != AT_RET_OK) { return 0; } mem_realloc(ausgabe,0); } while (temp != NULL); mem_realloc(keylist,0); return 1; } scmxx-0.9.0/src/scmxx/pbookfile.h0000644000175000017500000000201210343321545016563 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "charsets.h" #define PBOOK_FILE_CACHENAME "cache.pb" struct pbook_entry { unsigned int slot; char* number; ucs4char_t* text; }; struct pbook_entry** pbook_file_read (char* file); int pbook_file_write (char* file, struct pbook_entry** entries); scmxx-0.9.0/src/scmxx/tty_serial.c0000644000175000017500000002531610401277032016773 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "ttyaccess.h" #include "tty_serial.h" #include "scmxx.h" #include "helper.h" #include "atcommand.h" #include "config.h" #include "gtincl.h" #include "w32compat.h" #include #include #include #include #include #include #include #include #include #if defined(OS2_API) #define INCL_OS2 #define INCL_DOSDEVICES #define INCL_DOSDEVIOCTL #include #include #undef B9600 #define B9600 9600 #undef B19200 #define B19200 19200 #undef B38400 #define B38400 38400 #undef B57600 #define B57600 57600 #undef B115200 #define B115200 115200 typedef int speed_t; typedef HFILE tty_handle_t; #elif defined(WINDOWS_API) #include #define B9600 CBR_9600 #define B19200 CBR_19200 #define B38400 CBR_38400 #define B57600 CBR_57600 #define B115200 CBR_115200 typedef DWORD speed_t; typedef HANDLE tty_handle_t; #else #include typedef int tty_handle_t; #endif #include "ttyaccess.h" static tty_handle_t tty_portfd; static speed_t tty_serial_speed(char *newttyspeed){ switch (atoi(newttyspeed)) { case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif #ifdef B115200 case 115200: return B115200; #endif default: print_verbose(0,"%s","No valid baudrate defined. Using compiled in value...\n"); return tty_serial_speed(TTYSPEED); } } #if defined(OS2_API) static void tty_serial_makeraw() { LINECONTROL lc; int rc; lc.bDataBits = 8; lc.bParity = 0; lc.bStopBits = 0; lc.fTransBreak = 0; rc = DosDevIOCtl(tty_portfd, IOCTL_ASYNC, ASYNC_SETLINECTRL, &lc, sizeof(LINECONTROL), &size, NULL, 0, NULL); if (rc) { fprintf(stderr,"%s: rc=%d\n",_("Error in setting port attributes"),rc); exit(EXIT_FAILURE); } } static void tty_serial_speed_set (char* baud) { speed_t bps = tty_speed(args->baud); int rc = DosDevIOCtl(tty_portfd, IOCTL_ASYNC, ASYNC_SETBAUDRATE, &bps, sizeof(ULONG), &size, NULL, 0, NULL); if (rc) { fprintf(stderr,"%s: rc=%d\n",_("Error in setting transmission speed"),rc); exit(EXIT_FAILURE); } } static void tty_serial_timeout_set (DCBINFO* devinfo,uint8_t dsec) { int timeout = 65535; if (dsec != 0) timeout = dsec*10; devinfo.fbTimeout = 0x02; devinfo.usReadTimeout = timeout; devinfo.usWriteTimeout = timeout; } void tty_serial_flush () { int rc = DosDevIOCtl(tty_portfd, IOCTL_GENERAL, DEV_FLUSHINPUT, NULL, 0, NULL, NULL, 0, NULL); if (!rc) rc = DosDevIOCtl(tty_portfd, IOCTL_GENERAL, DEV_FLUSHOUTPUT, NULL, 0, NULL, NULL, 0, NULL); if (rc) { fprintf(stderr,"%s: rc=%d\n",_("Error in flushing buffers"),rc); exit(EXIT_FAILURE); } } #elif defined(WINDOWS_API) static void tty_serial_makeraw(DCB* dcb) { dcb->StopBits = ONESTOPBIT; dcb->Parity = NOPARITY; dcb->ByteSize = 8; dcb->fNull = FALSE; } static void tty_serial_speed_set (DCB* dcb, char* baud) { dcb->BaudRate = tty_serial_speed(baud); } static void tty_serial_timeout_set (uint8_t dsec) { COMMTIMEOUTS timeouts; if (GetCommTimeouts(tty_portfd,&timeouts)) { if (dsec == 0) { /* MFC doc tells nothing about ever-blocking read * so I hope that this is correct */ timeouts.ReadIntervalTimeout = 0; timeouts.ReadTotalTimeoutMultiplier = 0; timeouts.ReadTotalTimeoutConstant = 0; } else { timeouts.ReadIntervalTimeout = dsec*10; } SetCommTimeouts(tty_portfd,&timeouts); } } void tty_serial_flush () { if (!PurgeComm(tty_portfd, PURGE_RXCLEAR|PURGE_TXCLEAR)) { print_verbose(0,"%s: %s %d\n",_("Error in flushing buffers"), _("system error code"),GetLastError()); exit(EXIT_FAILURE); } } #else #include "config.h" #ifdef NO_CFMAKERAW static void tty_serial_makeraw(struct termios* termios_p) { termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); termios_p->c_oflag &= ~OPOST; termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); termios_p->c_cflag &= ~(CSIZE|PARENB); termios_p->c_cflag |= CS8; } #else #define tty_serial_makeraw(t) (void)cfmakeraw(t) #endif /*NO_CFMAKERAW */ static void tty_serial_speed_set (struct termios* termios_p, char* baud) { cfsetispeed(termios_p, tty_serial_speed(baud)); //input at baudrate cfsetospeed(termios_p, tty_serial_speed(baud)); //ouput at baudrate } static void tty_serial_timeout_set (struct termios* termios_p, uint8_t dsec) { if (dsec == 0) { termios_p->c_cc[VMIN]=1; //wait for at least one character (never times out) } else { termios_p->c_cc[VMIN]=0; //return after timeout, even with nothing } termios_p->c_cc[VTIME]=dsec; //try reading for this amount of time (in deciseconds) } void tty_serial_flush () { int rc = tcflush(tty_portfd, TCIOFLUSH); if (rc == -1) { fprintf(stderr,"%s: %s\n",_("Error in flushing buffers"),strerror(errno)); exit(EXIT_FAILURE); } } #endif static struct tty_access funcs; struct tty_access* tty_serial_open (struct port_args_t* args) { #if defined(OS2_API) long action; unsigned long size; int rc; DCBINFO devinfo; //opening the device rc = DosOpen(args->device, &tty_portfd, &action, 0, FILE_NORMAL, FILE_OPEN, OPEN_ACCESS_READWRITE|OPEN_SHARE_DENYNONE, (PEAOP2)NULL); if (rc) { print_verbose(0,": rc=%d\n",rc); return NULL; } tty_setspeed(args->baud); tty_makeraw(); rc = DosDevIOCtl(tty_portfd, /* file decsriptor */ IOCTL_ASYNC, /*asyncronous change */ ASYNC_GETDCBINFO, /* get device control block info */ NULL, /* */ 0, /* length of the previous parameter */ NULL, /* max length of data ret */ &devinfo, /* data to be recieved */ sizeof(DCBINFO), /* length of data */ &size); /* length of data returned */ devinfo.fbFlowReplace = 0; // diable rts/cts control devinfo.fbCtlHndShake = 1; // Truning on DTR. tty_settimeout(&devinfo,args->timeout); rc = DosDevIOCtl(tty_portfd, IOCTL_ASYNC, ASYNC_SETDCBINFO, &devinfo, /* parameters to set */ sizeof(DCBINFO),&size, NULL, 0, NULL); #elif defined(WINDOWS_API) DCB dcb; //opening the device tty_portfd = CreateFile(args->device, GENERIC_READ | GENERIC_WRITE, 0, // must be opened with exclusive-access NULL, // no security attributes OPEN_EXISTING, // must use OPEN_EXISTING 0, // not overlapped I/O NULL); // hTemplate must be NULL for comm devices if (tty_portfd == INVALID_HANDLE_VALUE) { print_verbose(0,": %s %d\n",_("system error code"),GetLastError()); return NULL; } if (GetCommState(tty_portfd,&dcb) == 0) { fprintf(stderr,"%s: %s %d\n",_("Error in getting port attributes"), _("system error code"),GetLastError()); return NULL; } tty_serial_speed_set(&dcb,args->baud); tty_serial_makeraw(&dcb); if (SetCommState(tty_portfd,&dcb) == 0) { fprintf(stderr,"%s: %s %d\n",_("Error in setting port attributes"), _("system error code"),GetLastError()); return NULL; } tty_serial_timeout_set(args->timeout); #else int flags = O_RDWR | O_NOCTTY | O_NONBLOCK; struct termios newtio; /* FHS (http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES) * specifies lock files for devices but the Serial HowTo (13.3) * also mentions the problem when it comes to DevFS (Linux). * Since this makes it an unreliable test, forget about it. */ //opening the device if ((tty_portfd=open(args->device,flags)) == -1) { print_error("%s\n",strerror(errno)); return NULL; } if (fcntl(tty_portfd,F_SETFL,flags&(~O_NONBLOCK)) == -1) { fprintf(stderr,"%s: %s\n",_("Error in setting port attributes"),strerror(errno)); return NULL; } if (!args->ignorebits) { //getting port parameters if (tcgetattr(tty_portfd,&newtio) < 0){ fprintf(stderr,"%s: %s\n",_("Error in getting port attributes"),strerror(errno)); return NULL; } } else { memset(&newtio,0,sizeof(newtio)); } tty_serial_speed_set(&newtio, args->baud); tty_serial_makeraw(&newtio); //make raw, 8N1 /* CLOCAL: ignore modem control lines * CREAD: enable receiver * ~CSTOPB: do not send two stop bits (but one) */ newtio.c_cflag |= (CLOCAL | CREAD); newtio.c_cflag &= ~CSTOPB; tty_serial_timeout_set(&newtio,args->timeout); tty_serial_flush(); if(tcsetattr(tty_portfd,TCSANOW,&newtio) < 0){ //set now fprintf(stderr,"%s: %s\n",_("Error in setting port attributes"),strerror(errno)); return NULL; } #endif funcs.read = tty_serial_read; funcs.write = tty_serial_write; funcs.flush = tty_serial_flush; funcs.close = tty_serial_close; return &funcs; } void tty_serial_close() { #if defined(OS2_API) DosClose(tty_portfd); #elif defined(WINDOWS_API) CloseHandle(tty_portfd); #else close(tty_portfd); #endif } /* as argument to tty_write() */ static long devicewrite (const char* data, long len) { #if defined(OS2_API) ULONG written;; if (DosWrite(tty_port,data,len,&written)) return -1; else return (long)written; #elif defined(WINDOWS_API) ULONG written;; if (WriteFile(tty_portfd,data,len,&written,NULL) == FALSE) return -1; else return (long)written; #else return write(tty_portfd,data,len); #endif } int tty_serial_write (const char* data, size_t count) { return tty_write(data,count,devicewrite); } /* as argument to tty_read() */ static long deviceread (char* buf, long len) { #if defined(OS2_API) ULONG status; if (DosRead(tty_portfd,buf,len,&status)) return -1; else return (long)status; #elif defined(WINDOWS_API) DWORD status; if (ReadFile(tty_portfd,buf,len,&status,NULL) == FALSE) return -1; else return (long)status; #else return read(tty_portfd,buf,len); #endif } char* tty_serial_read (int (*stop_condition)(const char*,const size_t)) { return tty_read(stop_condition,deviceread); } scmxx-0.9.0/src/scmxx/pbmaskgsm.c0000644000175000017500000000370110343321545016576 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "helper.h" #include "charsets.h" #include char* pb_mask_chars (gsmchar_t* input) { char* retval; unsigned int i; unsigned int off = 0; retval=mem_alloc(strlen((char*)input)*3,1); for (i=0; i #include #include #include #include static struct args_t args; #include "config.h" void args_init () { args.port.type = TTY_TYPE_SERIAL; args.port.device = TTYPORT; args.port.baud = TTYSPEED; args.port.timeout = 100; args.port.ignorebits = 1; args.port.startdelay = 0; args.myparams.text=NULL; args.myparams.number=NULL; args.myparams.mem=NULL; args.myparams.slot=SCMXX_SLOT_UNDEFINED; args.mysmsopts.flash=0; args.mysmsopts.srr=0; args.mysmsopts.unicode=0; args.mysmsopts.direct=0; args.mysmsopts.sort_mode="type,time"; args.scmxx_action=0; args.scmxx_ftype=0; args.myFILE=NULL; args.myPIPE=NULL; args.info = 0; args.meminfo = 0; args.lockinfo = 0; args.time = 0; args.lock = NULL; args.state_change = 0; args.smsc = 0; args.dial = 0; args.hangup = 0; args.reset = 0; args.help = 0; args.version = 0; args.verbose = 0; args.pin = NULL; args.system_charset = NULL; } static void arg_fill_slot (char* argument) { if (is_number(argument)) { args.myparams.slot = atoi(argument); } else { if(!strcmp(argument,"all")) { args.myparams.slot = SCMXX_SLOT_ALL; } else if(!strcmp(argument,"sent")) { args.myparams.slot = SCMXX_SLOT_SMS_SENT; } else if(!strcmp(argument,"unsent")) { args.myparams.slot = SCMXX_SLOT_SMS_UNSENT; } else if(!strcmp(argument,"read")) { args.myparams.slot = SCMXX_SLOT_SMS_READ; } else if(!strcmp(argument,"unread")) { args.myparams.slot = SCMXX_SLOT_SMS_UNREAD; } else if (!strcmp(argument,"last")) { args.myparams.slot = SCMXX_SLOT_LAST; } else { args.myparams.slot = SCMXX_SLOT_UNDEFINED; } } } static void arg_fill (int short_opt, const char* long_opt, char* argument) { int temp; switch (short_opt) { case 'b': //--baud args.port.baud = argument; break; case 'd': //--device args.port.device = str_dup(argument); break; case 'g': args.scmxx_action |= SCMXX_ACTION_GET; break; case 'h': args.help=1; break; case 'i': args.info=1; break; case 'l': arg_fill_slot(argument); break; case 'm': args.myparams.mem = str_dup(argument); break; case 'n': if (str_len(argument)) args.myparams.number=str_dup(argument); break; case 'o': args.myFILE=str_dup(argument); break; case 'p': args.myPIPE=str_dup(argument); break; case 'q': args.verbose--; break; case 'r': args.scmxx_action |= SCMXX_ACTION_REMOVE; break; case 's': args.scmxx_action |= SCMXX_ACTION_SEND; break; case 't': if (str_len(argument)) args.myparams.text=str_dup(argument); break; case 'v': args.verbose++; break; case 'N': args.scmxx_ftype = SCMXX_FTYPE_BINARY; break; case 'P': args.scmxx_ftype = SCMXX_FTYPE_PBOOK; break; case 'S': args.scmxx_ftype = SCMXX_FTYPE_SMS; break; case 'V': args.version=1; break; case 0: if (str_len(long_opt)) { if (!strcmp(long_opt,"pin")) { args.pin = str_dup(argument); } else if (!strcmp(long_opt,"unicode")) { args.mysmsopts.unicode=1; } else if (!strcmp(long_opt,"direct")) { args.mysmsopts.direct=1; } else if (!strcmp(long_opt,"srr")) { args.mysmsopts.srr=1; } else if (!strcmp(long_opt,"flash")) { args.mysmsopts.flash=1; } else if (!strcmp(long_opt,"ignore-serial-bits")) { args.port.ignorebits=1; } else if (!strcmp(long_opt,"keep-serial-bits")) { args.port.ignorebits=0; } else if (!strcmp(long_opt,"device-timeout")) { if (argument) { temp = atoi(argument); if (temp < 1) { args.port.timeout = 10; } else if (1 <= temp && temp <= 25) { args.port.timeout = 10*temp; } else if (temp > 25) { args.port.timeout = 0; } } } else if (!strcmp(long_opt,"start-delay")) { args.port.startdelay = atoi(argument); } else if (!strcmp(long_opt,"reset")) { args.reset=1; } else if (!strcmp(long_opt,"set-time")) { args.time=1; } else if (!strcmp(long_opt,"set-smsc")) { args.smsc=1; } else if (!strcmp(long_opt,"lock")) { args.lock=str_dup(argument); } else if (!strcmp(long_opt,"enable")) { args.state_change=1; } else if (!strcmp(long_opt,"disable")) { args.state_change=-1; } else if (!strcmp(long_opt,"dial")) { args.dial=1; } else if (!strcmp(long_opt,"hangup")) { args.hangup=1; } else if (!strcmp(long_opt,"mem-info")) { args.meminfo = 1; } else if (!strcmp(long_opt,"lock-info")) { args.lockinfo = 1; } else if (!strcmp(long_opt,"sort")) { //old, compat args.mysmsopts.sort_mode = str_dup(argument); } else if (!strcmp(long_opt,"system-charset")) { args.system_charset = str_dup(argument); } } break; } } //gettext workaround #ifdef _ #undef _ #endif #define _(s) s struct args_def_type args_type_list[] = { { 0, _("options"), 0 }, { 1, _("actions"), 1 }, { 2, _("memory types"), 0 }, { 3, _("memory type options"), 0 }, { 4, _("SMS options"), 0 }, ARGS_DEF_TYPE_LAST }; struct args_def args_list[] = { {"baud",'b',"SCMXX_BAUD",ARGS_PARAM_REQ,_("rate"),0, _("specify another than the compiled in baudrate")}, {"binary",'N',NULL,ARGS_PARAM_NONE,NULL,2, _("binary file transfer")}, {"device",'d',"SCMXX_TTY",ARGS_PARAM_REQ,_("device"),0, _("specify another than the compiled in device")}, {"device-timeout",0,NULL,ARGS_PARAM_REQ,_("seconds"),0, _("return after this time if there is no answer")}, {"dial",0,NULL,ARGS_PARAM_NONE,NULL,1, _("dials a number (requires option -n)")}, //since 0.7.4 {"direct",0,NULL,ARGS_PARAM_NONE,NULL,4, _("send/receive without storing in the phone")}, {"disable",0,NULL,ARGS_PARAM_NONE,NULL,1, _("disable e.g. a lock")}, //since 0.8.0 {"enable",0,NULL,ARGS_PARAM_NONE,NULL,1, _("enable e.g. a lock")}, //since 0.8.0 {"flash",0,NULL,ARGS_PARAM_NONE,NULL,4, _("make the sms appear directly (if supported by the receiving entity)")}, {"get",'g',NULL,ARGS_PARAM_NONE,NULL,1, _("get something from the phone")}, {"hangup",0,NULL,ARGS_PARAM_NONE,NULL,1, _("hangup all active calls")}, //since 0.8.0 {"help",'h',NULL,ARGS_PARAM_NONE,NULL,0, _("print this message")}, {"ignore-serial-bits",0,NULL,ARGS_PARAM_NONE,NULL,0, _("do not use current serial port settings as base (default)")}, {"info",'i',NULL,ARGS_PARAM_NONE,NULL,1, _("show various information")}, {"keep-serial-bits",0,NULL,ARGS_PARAM_NONE,NULL,0, _("use current serial port settings as base")}, {"lock",0,NULL,ARGS_PARAM_REQ,_("lock"),1, _("selects a lock to change (might need option --pin)")}, //since 0.8.0 {"lock-info",0,NULL,ARGS_PARAM_NONE,NULL,1, _("show lock information")}, {"mem",'m',NULL,ARGS_PARAM_REQ,_("mem"),3, _("select a memory")}, {"mem-info",0,NULL,ARGS_PARAM_NONE,NULL,1, _("show memory information")}, {"number",'n',NULL,ARGS_PARAM_REQ,_("number"),0, _("specify number on send")}, {"out",'o',NULL,ARGS_PARAM_REQ,_("file"),0, _("specify a file when getting ('-' for stdout)")}, {"pbook",'P',NULL,ARGS_PARAM_NONE,NULL,2, _("phonebook")}, {"pin",0,NULL,ARGS_PARAM_REQ,"PIN",4, _("use this pin if one is needed")}, {"pipe",'p',NULL,ARGS_PARAM_REQ,_("program"),0, _("specify a pipe to use")}, {"quiet",'q',NULL,ARGS_PARAM_NONE,NULL,0, _("decreases verbosity by 1")}, {"remove",'r',NULL,ARGS_PARAM_NONE,NULL,1, _("removes something from the phone")}, {"reset",0,NULL,ARGS_PARAM_NONE,NULL,1, _("sends some special characters")}, {"send",'s',NULL,ARGS_PARAM_NONE,NULL,1, _("sends something to the phone")}, {"set-smsc",0,NULL,ARGS_PARAM_NONE,NULL,1, _("set the SMSC number (requires option -n)")}, {"set-time",0,NULL,ARGS_PARAM_NONE,NULL,1, _("synchronize time on phone")}, {"slot",'l',NULL,ARGS_PARAM_REQ,_("slot"),3, _("select a slot or slot group")}, {"sms",'S',NULL,ARGS_PARAM_NONE,NULL,2, _("short messages")}, {"sort",0,NULL,ARGS_PARAM_REQ,_("method"),4, _("sort short message on getting([type,][slot|time])")}, //since 0.7.3 {"srr",0,NULL,ARGS_PARAM_NONE,NULL,4, _("request a status report from the SMSC")}, {"start-delay",0,NULL,ARGS_PARAM_REQ,_("seconds"),0, _("wait this time after opening device")}, {"system-charset",0,NULL,ARGS_PARAM_REQ,_("charset"),0, _("use charset for input/output from/to system")}, //since 0.7.5 {"text",'t',NULL,ARGS_PARAM_REQ,_("text"),0, _("specify content on send")}, {"unicode",0,NULL,ARGS_PARAM_NONE,NULL,4, _("use UCS-2 (unicode) as charset")}, {"verbose",'v',NULL,ARGS_PARAM_NONE,NULL,0, _("increases verbosity by 1")}, {"version",'V',NULL,ARGS_PARAM_NONE,NULL,0, _("print the version number")}, ARGS_DEF_LAST }; void scmxx_use_envvars () { use_envvars(args_list,arg_fill); } int scmxx_conffile_parse (char* filename) { int retval = 0; char* filepath = configfile_get_path(PACKAGE_NAME,filename); retval = configfile_parse(filepath,args_list,arg_fill); mem_realloc(filepath,0); return retval; } char** scmxx_args_parse (int argc, char** argv) { return args_parse(argc,argv,args_list,arg_fill); } struct args_t* scmxx_get_args () { return &args; } scmxx-0.9.0/src/scmxx/tty_serial.h0000644000175000017500000000211210366730645017003 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TTY_SERIAL_H #define TTY_SERIAL_H #include "ttyaccess.h" struct tty_access* tty_serial_open (struct port_args_t* args); void tty_serial_close(void); int tty_serial_write (const char* data, size_t count); char* tty_serial_read (int (*stop_condition)(const char*,const size_t)); void tty_serial_flush (void); #endif scmxx-0.9.0/src/scmxx/pinfile.c0000644000175000017500000001776510357700457016267 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "helper.h" #include "scmxx.h" #include "gtincl.h" #include #include #include #include #include #include #include #include char* pinfile_get_data (char* filename) { int fd = open(filename,O_RDONLY); struct stat fdstat; ssize_t status = 0; ssize_t total = 0; char* data = NULL; char* i; char* k; if (fd == -1) return NULL; //check the file if (fstat(fd,&fdstat) == -1) { print_verbose(0,"%s: %s: %s\n",_("File check failed"),filename,strerror(errno)); file_close(fd); return NULL; } if ((fdstat.st_mode&S_IFMT) != S_IFREG) { print_verbose(0,"%s: %s: %s\n",_("File check failed"),filename,_("file is not a regular file")); file_close(fd); return NULL; } #if ! defined(WINDOWS_API) if ((fdstat.st_mode&(S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) != 0) { print_verbose(0,"%s: %s: %s\n",_("File check failed"),filename,_("file is group or world accessible")); file_close(fd); return NULL; } if (fdstat.st_size > SSIZE_MAX) fdstat.st_size = SSIZE_MAX; #endif //read the file data = mem_alloc(fdstat.st_size+1,1); do { status = read(fd,data,fdstat.st_size-total); if (status > 0) total += status; } while (status > 0 && total < fdstat.st_size); if (status == -1) { print_verbose(0,"%s: %s: %s\n",_("File read failed"),filename,strerror(errno)); file_close(fd); return mem_realloc(data,0); } //removing all spaces, changing '\r' to '\n' i = data; for (k = data; *k != 0; ++k) { if (isascii((int)*k)) { if (*k == '\r') *k = '\n'; if (isalnum((int)*k) || *k == '{' || *k == '}' || *k == '=' || *k == ';' || *k == '\n') *(i++) = *k; } } if (i == data) { file_close(fd); return mem_realloc(data,0); } else { *i = 0; } //removing all '\n', adding ';' where necessary i = data; for (k = data; *k != 0; ++k) { if (*k == '\n') { if (i != data && *(i-1) != '{' && *(i-1) != '}' && *(i-1) != ';') *(i++) = ';'; } else { *(i++) = *k; } } *i = 0; file_close(fd); return data; } int pinfile_select_sub (const char* sub_type, const char* sub_id, char* data) { int level = 0; char* begin; char* sub_begin = NULL; char* sub_end = data; do { if (sub_end != NULL) { if (*sub_end == 0) return 0; else begin = sub_end; } else { break; } sub_begin = strchr(begin,'{'); if (sub_begin != NULL) { ++level; for (sub_end = ++sub_begin; *sub_end != 0 && level > 0; ++sub_end) { switch (*sub_end) { case '{': ++level; break; case '}': --level; break; } } } else { break; } } while (strncasecmp(begin,sub_type,strlen(sub_type)) != 0 || strncasecmp(begin+strlen(sub_type),sub_id,strlen(sub_id)) != 0 || begin+strlen(sub_type)+strlen(sub_id)+1 != sub_begin); if (sub_begin != NULL) { if (sub_end != NULL) *(--sub_end) = 0; memmove(data,sub_begin,(sub_end-sub_begin+1)*sizeof(*data)); return 1; } else { return 0; } } const char* pinfile_find_pinpuk (const char* type, const char* data) { const char* pin_begin = data; const char* pin_end; if (str_len(type) == 0 || str_len(data) == 0) return NULL; while (strncasecmp(type,pin_begin,strlen(type)) != 0 || *(pin_begin+strlen(type)) != '=') { pin_begin = strchr(pin_begin,';'); if (pin_begin == NULL) return NULL; else ++pin_begin; } pin_end = strchr(pin_begin,';'); if (pin_end == NULL) return NULL; else return strchr(pin_begin,'=')+1; } char* pinfile_get_subdata (const char* scope, /* "sim" or "device" */ const char* scope_id, /* IMSI or IMEI */ const char* class, /* ignored if scope="sim" */ const char* type) /* "PIN" or "PUK", also "PIN2" or "PUK2" if scope="sim" */ { char* filename; char* data = NULL; char* temp = NULL; char* pin = NULL; char* puk = NULL; char* retval; //check scope if (scope == NULL || (strcasecmp(scope,"sim") != 0 && strcasecmp(scope,"device") != 0)) return NULL; //check scope_id if (is_number(scope_id) == 0) return NULL; //check class if (strcasecmp(scope,"device") == 0 && str_len(class) == 0) return NULL; //check type if (strncasecmp(type,"PIN",3) != 0 && strncasecmp(type,"PUK",3) != 0) return NULL; if (type[3] != 0 && (strcasecmp(scope,"sim") != 0 || type[3] != '2')) return NULL; filename = configfile_get_path(PACKAGE_NAME,"pin"); if (strcasecmp(scope,"sim") != 0) { print_verbose(0,_("Looking for %s for %s %s, %s %s in %s..."), type,scope,scope_id,"type",class,filename); } else { print_verbose(0,_("Looking for %s for %s %s in %s..."), type,scope,scope_id,filename); } data = pinfile_get_data(filename); mem_realloc(filename,0); if (data == NULL) return strdup(""); //find the section for if (pinfile_select_sub(scope,scope_id,data) == 0 || (strcasecmp(scope,"sim") != 0 && pinfile_select_sub("type",class,data) == 0)) { mem_realloc(data,0); print_verbose(0,"%s\n",_("not found")); return str_dup(""); } //final steps to find the wanted item if (strncasecmp(type,"puk",3) == 0) { //get PUK and PIN puk = (char*)pinfile_find_pinpuk(type,data); if (puk == NULL) { mem_realloc(data,0); print_verbose(0,"%s\n",_("not found")); return strdup(""); } else { temp = mem_alloc(5,1); //type[3] is either '2' or '\0', see above sprintf(temp,"pin%c",type[3]); pin = (char*)pinfile_find_pinpuk(temp,data); mem_realloc(temp,0); if (pin != NULL) { //find_pinpuk() already checked it puk = strn_dup(puk,strchr(puk,';')-puk); } } } else { //get PIN only pin = (char*)pinfile_find_pinpuk(type,data); } if (pin == NULL) { mem_realloc(data,0); print_verbose(0,"%s\n",_("not found")); return strdup(""); } else { print_verbose(0,"%s\n",_("found")); //find_pinpuk() already checked it pin = strn_dup(pin,strchr(pin,';')-pin); mem_realloc(data,0); if (puk == NULL) { return pin; } else { retval = mem_alloc(str_len(puk)+1+str_len(pin)+1,1); sprintf(retval,"%s,%s",puk,pin); mem_realloc(pin,0); mem_realloc(puk,0); return retval; } } } char* pinfile_get (const char* request) { char* valcpy; char* scope = NULL; char* scope_id = NULL; char* class = NULL; char* type = NULL; char* retval; static int antiloop = 0; if (str_len(request) < 7) return NULL; else valcpy = str_dup(request); /* confirm that type is valid */ type = strchr(valcpy,' '); if (type == NULL) return mem_realloc(class,0); else *(type++) = 0; /* look for the scope to use */ if (strncasecmp(valcpy,"PH-",3) == 0) { scope = "device"; scope_id = get_phoneserial(); class = valcpy+3; } else { scope = "sim"; /* The following might (but not necessarily) start a loop, * prevent that loop * TODO: not threadsafe but we don't use threads */ ++antiloop; if (antiloop > 1) { --antiloop; return mem_realloc(valcpy,0); } scope_id = get_simserial(); --antiloop; } retval = pinfile_get_subdata(scope,scope_id,class,type); mem_realloc(scope_id,0); mem_realloc(valcpy,0); return retval; } scmxx-0.9.0/src/scmxx/lock.c0000644000175000017500000001702210343321545015543 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "scmxx.h" #include "atcommand.h" #include "helper.h" #include "gtincl.h" #include #include #include char* lock_get_longname (const char* shortname) { if (strcasecmp(shortname,"PS") == 0) { return _("phone locked to SIM (device code)"); } else if (strcasecmp(shortname,"SC") == 0) { return _("SIM card (PIN)"); } else if (strcasecmp(shortname,"P2") == 0) { return "PIN2"; } else if (strcasecmp(shortname,"FD") == 0) { return _("FDN lock"); } else if (strcasecmp(shortname,"AO") == 0) { return _("bar all outgoing calls"); } else if (strcasecmp(shortname,"OI") == 0) { return _("bar outgoing international calls"); } else if (strcasecmp(shortname,"OX") == 0) { return _("bar outgoing international calls except to home country"); } else if (strcasecmp(shortname,"AI") == 0) { return _("bar all incoming calls"); } else if (strcasecmp(shortname,"IR") == 0) { return _("bar incoming calls when roaming outside the home country"); } else if (strcasecmp(shortname,"AB") == 0) { return _("all barring services"); } else if (strcasecmp(shortname,"AG") == 0) { return _("all outgoing barring services"); } else if (strcasecmp(shortname,"AC") == 0) { return _("all incoming barring services"); } else if (strcasecmp(shortname,"PN") == 0) { return _("network personalization"); } else if (strcasecmp(shortname,"PC") == 0) { return _("corporate personalization"); } else if (strcasecmp(shortname,"PU") == 0) { return _("network subset personalization"); } else if (strcasecmp(shortname,"PP") == 0) { return _("service provider personalization"); } else if (strcasecmp(shortname,"PF") == 0) { return _("phone locked to very first inserted SIM"); } else if (strcasecmp(shortname,"CS") == 0) { return _("keyboard"); } else { return NULL; } } int lock_set_pass (const char* lock, const char* oldpin, const char* newpin) { char* ausgabe = NULL; char* temp = NULL; enum return_code status; char* command = NULL; if (lock == NULL || (str_len(oldpin) == 0 && str_len(newpin) == 0)) return 0; if (str_len(oldpin) == 0) oldpin = NULL; if (str_len(newpin) == 0) newpin = NULL; command = at_sie_password(lock,oldpin,newpin); ausgabe = at_read_line(); status = at_line_type(ausgabe,command,&temp); mem_realloc(ausgabe,0); if (status&AT_RET_ERROR) { print_warning("%s\n",_("Be beware of phone internal passwort counters that are normally set to 3 failures!")); print_warning("%s\n",_("The current failure count cannot be read!")); errexit("%s\n",_("Setting new password FAILED!")); } else { return 1; } } int lock_get_status (const char* lock) { char* ausgabe = NULL; char* temp = NULL; enum return_code status; int retval = -1; int value = 0; unsigned short class = 0; char* command = NULL; if (lock == NULL) return 0; command = at_sie_lock(lock,2,NULL,0); do { ausgabe = at_read_line(); status = at_line_type(ausgabe,command,&temp); if (status == AT_RET_ANSWER) { retval = atoi(temp); temp = strchr(temp,','); if (temp != NULL) { class = atoi(temp+1); value += retval*class; } } mem_realloc(ausgabe,0); } while (status == AT_RET_ANSWER); if (value != 0) return value; else return retval; } int lock_enable (const char* lock, const char* password) { int retval = -1; char* ausgabe = NULL; enum return_code status; char* command = NULL; if (lock == NULL) return 0; command = at_sie_lock(lock,1,password,0); ausgabe = at_read_line(); status = at_line_type(ausgabe,command,NULL); if (status == AT_RET_OK) { retval = lock_get_status(lock); } mem_realloc(ausgabe,0); return retval; } int lock_disable (const char* lock, const char* password) { int retval = -1; char* ausgabe = NULL; enum return_code status; char* command = NULL; if (lock == NULL) return 0; command = at_sie_lock(lock,0,password,0); ausgabe = at_read_line(); status = at_line_type(ausgabe,command,NULL); if (status == AT_RET_OK) { retval = lock_get_status(lock); } mem_realloc(ausgabe,0); return retval; } void lock_toggle (const char* lock, const char* password) { int status = lock_get_status(lock); if (lock == NULL) return; if (status == -1 || (status == 0 && lock_enable(lock,password) <= 0) || (status == 1 && lock_disable(lock,password) != 0)) { errexit("%s\n",_("Lock status change failed.")); } else { print_verbose(0,_("Lock %s successfully %s.\n"),lock, (status)? _("disabled") : _("enabled")); } } void lock_print_list (FILE* fd, unsigned int full) { char* ausgabe = NULL; char* temp = NULL; enum return_code status; char** list = NULL; unsigned int l; unsigned int i; int code; const unsigned int columns = 3; struct table_column { char* name; unsigned int width; } table[columns]; char* entry[columns]; char* command = NULL; char* vendor = at_get_vendor(); if (fd == NULL) { mem_realloc(vendor,0); return; } if (strcasecmp(vendor,"SIEMENS") == 0) { command = AT_SIE_LOCK; } else { command = AT_GEN_LOCK; } mem_realloc(vendor,0); at_command_send(command,AT_READ_SUFFIX); ausgabe = at_read_line(); status = at_line_type(ausgabe,command,&temp); if (status == AT_RET_ANSWER) { mem_realloc(at_read_line(),0); memmove(ausgabe,temp,strlen(temp)+1); list = at_parse_stringlist(ausgabe); fprintf(fd,"%s: ",_("Locks")); if (!full) { for (i = 0; list[i] != 0; ++i) { if (i != 0) fprintf(fd,", "); fprintf(fd,"%s",list[i]); } } else { table[0].name = _("lock"); table[1].name = _("status"); table[2].name = _("description"); fprintf(fd,"\n"); for (i = 0; i < columns; ++i) { table[i].width = strlen(table[i].name); entry[i] = mem_alloc((table[i].width+1)*sizeof(char),1); fprintf(fd,"%-*s ",table[i].width,table[i].name); } fprintf(fd,"\n"); for (i = 0; i < columns; ++i) { memset(entry[i],'-',table[i].width); fprintf(fd,"%s ",entry[i]); } fprintf(fd,"\n"); mem_realloc(entry[0],0); mem_realloc(entry[columns-1],0); for (l = 0; list[l] != NULL; ++l) { code = lock_get_status(list[l]); if (code == -1) { print_verbose(0,"%s %s(%s): %s\n", _("Lock"), list[l], lock_get_longname(list[l]), _("getting lock status failed.")); } else { entry[0] = list[l]; sprintf(entry[1],"%s",(code)? _("on") : _("off")); entry[columns-1] = lock_get_longname(list[l]); for (i = 0; i < columns-1; ++i) { fprintf(fd,"%-*s ",table[i].width,entry[i]); } if (entry[columns-1] != NULL) { fprintf(fd,"%s",entry[columns-1]); } fprintf(fd,"\n"); } } } fprintf(fd,"\n"); mem_realloc(*list,0); mem_realloc(list,0); } } scmxx-0.9.0/src/scmxx/pbmaskgsm.h0000644000175000017500000000174710343321545016613 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ /* this function expect as input a 7bit-GSM unencoded string as * produced from convert_to_gsm and outputs a char* that must be * freed and is suitable as text for phonebook upload */ char* pb_mask_chars (gsmchar_t* input); scmxx-0.9.0/src/scmxx/scmxx_opt.h0000644000175000017500000000503710357700457016657 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2003 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SCMXX_OPT_H #define SCMXX_OPT_H #include "options.h" #include "ttyaccess.h" extern struct args_def_type args_type_list[]; extern struct args_def args_list[]; #define SCMXX_ACTION_REMOVE 0x1 #define SCMXX_ACTION_SEND 0x2 #define SCMXX_ACTION_GET 0x4 #define SCMXX_FTYPE_BINARY 0x1 #define SCMXX_FTYPE_PBOOK 0x2 #define SCMXX_FTYPE_SMS 0x4 #define SCMXX_SLOT_LAST -7 #define SCMXX_SLOT_SMS_SENT -6 #define SCMXX_SLOT_SMS_UNSENT -5 #define SCMXX_SLOT_SMS_READ -4 #define SCMXX_SLOT_SMS_UNREAD -3 #define SCMXX_SLOT_ALL -2 #define SCMXX_SLOT_UNDEFINED -1 #define SCMXX_SLOT_BINARY_MIN 0 #define SCMXX_SLOT_PBOOK_MIN 1 #define SCMXX_SLOT_SMS_MIN 1 #define VCARD_PHONEBOOK_NAME "VCF" /* various SMS options */ struct smsopts { //for sending unsigned int flash :1; unsigned int srr :1; unsigned int unicode :1; /* to be removed from here * should be in the application, only */ unsigned int direct :1; char* sort_mode; }; struct parameters { char* text; char* number; int slot; char* mem; }; struct args_t { struct port_args_t port; struct parameters myparams; struct smsopts mysmsopts; char scmxx_action; char scmxx_ftype; char* myFILE; char* myPIPE; unsigned int info :1; unsigned int meminfo :1; unsigned int lockinfo :1; unsigned int time :1; char* lock; int state_change; unsigned int smsc :1; unsigned int dial :1; unsigned int hangup :1; unsigned int reset :1; unsigned int help :1; unsigned int version :1; int verbose; char* pin; char* system_charset; }; /* a function to init the variables in the struct */ void args_init (); void scmxx_use_envvars (); int scmxx_conffile_parse (char* filename); char** scmxx_args_parse (int argc, char** argv); struct args_t* scmxx_get_args (); #endif scmxx-0.9.0/src/scmxx/s35_files.c0000644000175000017500000003172410374671423016423 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "scmxx.h" #include "helper.h" #include "options.h" #include "atcommand.h" #include "ttyaccess.h" #include "gtincl.h" #include #include #include #include #include void file_transfer_manage (int action, char** files, char* outfile, char* pipe, char* mem, int slot) { char* filename; size_t fn_size; struct slot_range** range; struct slot_range** drange; //for free slot detection int enable_search = 1; int i = 0; int j = 0; int k = 0; int current; if (mem == NULL) { errexit ("%s\n",_("You must define a memory to use.")); } if (strcmp(mem,"?") == 0) { file_print_memlist(NULL,1); return; } if (action == 0) { errexit ("%s\n",_("You must specify a valid action.")); } if (slot < SCMXX_SLOT_BINARY_MIN && slot != SCMXX_SLOT_UNDEFINED && slot != SCMXX_SLOT_ALL) { errexit ("%s\n",_("You must define either a valid slot, nothing or \"all\".")); } range = file_types_get(action); if (range == NULL || range[0] == NULL) { errexit("%s\n",_("this phone does not support file exchange.")); } while (range[i] != NULL && strcmp(range[i]->name,mem)) { ++i; } if (range[i] == NULL) { errexit("type %s is not supported.\n",mem); } if (slot >= SCMXX_SLOT_BINARY_MIN && (range[i]->min > slot || slot > range[i]->max)) { // ... test if slot is correctly set if (range[i]->min != range[i]->max) { errexit(_("%s values can only be %d to %d.\n"),range[i]->name,range[i]->min,range[i]->max); } else { errexit(_("%s value can only be %d.\n"),range[i]->name,range[i]->min); } } switch(action){ default: errexit("%s\n",_("You must specify exactly one operation.")); break; case SCMXX_ACTION_REMOVE: //deleting if (slot == SCMXX_SLOT_ALL) { for (current=range[i]->min;current<=range[i]->max;current++) { file_delete(mem, current); } } else if (slot < SCMXX_SLOT_BINARY_MIN) { errexit ("%s\n",_("You must define a valid slot or \"all\".")); } else { file_delete(mem, slot); } break; case SCMXX_ACTION_SEND: //sending if (slot != SCMXX_SLOT_ALL) { // get the detection range (read, not write)... drange = file_types_get(SCMXX_ACTION_SEND); // ...find the mem type in it... while (drange[j] != NULL && strcmp(drange[j]->name,mem)) { ++j; } if (drange[j] == NULL) { // ...and either disable searching if not found... enable_search = 0; mem_realloc(drange,0); drange = range; j = i; } else { // ...or mak min/max a subrange of both ranges if (drange[j]->min < range[i]->min) { drange[j]->min = range[i]->min; } if (drange[j]->max > range[i]->max) { drange[j]->max = range[i]->max; } } } else { drange = range; j = i; } // define current slot... if (slot < range[i]->min) { current = range[i]->min; // ...to minimum if below... } else { current = slot; // ...or the defined slot } while (files[k] != NULL && current <= range[i]->max) { print_verbose(0,_("Using slot %d\n"),current); file_send(files[k],mem,current); if (k == 0) { if (enable_search == 0 && slot != SCMXX_SLOT_ALL) { //stop here if we cannot search for free slots break; } else { //make sure that current is in searchable range if (current < drange[j]->min) { current = drange[j]->min; } } } ++k; if (files[k] != NULL) { if (slot == SCMXX_SLOT_ALL) { ++current; // simply increase if all slot shall be used } else { // only empty slots shall be used current = file_detect_free_slot(mem,current,drange[j]->max); if (current < 0) { errexit("%s\n",_("No free slot found.")); } else { print_verbose(0,_("Detected empty slot %d\n"),current); } } } } break; case SCMXX_ACTION_GET: //getting if (slot == SCMXX_SLOT_UNDEFINED) { slot = SCMXX_SLOT_ALL; } if (slot == SCMXX_SLOT_ALL) { fn_size = str_len(outfile)+numlen(range[i]->max)+1+strlen(mem); for (k=range[i]->min;k<=range[i]->max;k++) { if (outfile != NULL) { if (!strcmp(outfile,"-")) { file_get(outfile,pipe,mem,k,k-range[i]->min+1,range[i]->max-range[i]->min+1); } else { filename = mem_alloc(fn_size+1,1); snprintf(filename,fn_size+1,"%s%0*d.%s", outfile,numlen(range[i]->max),k,mem); file_get(filename,pipe,mem,k,k-range[i]->min+1,range[i]->max-range[i]->min+1); free(filename); } } else { errexit("%s\n",_("You must specify a file name prefix (can be \"\").")); } } } else { i = 0; k = 1; file_get(outfile,pipe,mem,slot,i,k); } fprintf(stderr,"\n"); break; } } void file_delete (char* ftype, int slot) { char* ausgabe; if (at_sie_binary_write(ftype,slot,0,0) == NULL) return; ausgabe = at_read_line(); if (!strcmp(ausgabe,"OK")) { print_verbose(0,_("%s %d deleted.\n"),ftype,slot); } else { errexit(_("%s %d NOT deleted, something went wrong: %s\n"),ftype,slot,ausgabe); } mem_realloc(ausgabe,0); } int file_detect_free_slot (char* ftype, int minimum, int maximum) { char* ausgabe; char* content; int i; enum return_code status; print_verbose(0,"%s\n",_("Trying to find an empty slot...")); i = minimum; while (i <= maximum) { if (at_sie_binary_read(ftype,i) == NULL) break; ausgabe = at_read_line(); status = at_line_type(ausgabe,AT_SIE_BIN_READ,&content); switch (status) { case AT_RET_ERROR_CME: if (strcmp(content,"unknown")) errexit("%s\n",content); /* no break */ case AT_RET_OK: mem_realloc(ausgabe,0); return i; case AT_RET_ERROR: errexit("%s\n",_("unknown cause")); case AT_RET_ERROR_CMS: errexit("%s\n",content); default: do { mem_realloc(ausgabe,0); ausgabe = at_read_line(); status = at_line_type(ausgabe,AT_SIE_BIN_READ,&content); } while (status == AT_RET_ANSWER || status == AT_RET_OTHER); if (status == AT_RET_OK) { ++i; } else if (status == AT_RET_ERROR) { errexit("%s\n",_("unknown cause")); } else { errexit("%s\n",content); } mem_realloc(ausgabe,0); break; //no break } } return -1; } /* these are just for documenting the * paket size limits */ #define FILE_PDUSIZE_MAX_SPEC 176 //max as in spec #define FILE_PDUSIZE_MAX_SL42 175 //max for SL42 v23 #define FILE_PDUSIZE_MIN_S45 6 //min for S45/ME45 v10 #define FILE_PDUSIZE 175 void file_send (char* file, char* ftype, int slot) { char* data; unsigned int count = file_read_binary(file,&data); unsigned int pcount = (count/FILE_PDUSIZE); unsigned int i = 1; unsigned int k; unsigned int psize = FILE_PDUSIZE; char buffer[(FILE_PDUSIZE*2)+1]; char* ack; char* vendor = at_get_vendor(); char* model = at_get_model(); unsigned int strategy = 0; if (count%FILE_PDUSIZE) ++pcount; /* we need different stategies here * 0: equal packet size except last packet (S55) * 1: try to split the last two packets equally (S45/ME45) * It does not matter for other models, see above for default. */ if (strcasecmp(vendor,"SIEMENS") == 0 && (strcasecmp(model,"C45") == 0 || /* not sure if needed but works with this mode */ strcasecmp(model,"ME45") == 0 || strcasecmp(model,"S45") == 0 || strcasecmp(model,"S45i") == 0)) { strategy = 1; } mem_realloc(vendor,0); mem_realloc(model,0); print_verbose(0,"%s\n",_("File transfer...")); for (; i <= pcount; ++i) { /* split the transfer size between the last two packets * make the first one bigger */ switch (strategy) { default: case 0: if (psize > count) psize = count; break; case 1: if (count < 2*FILE_PDUSIZE && count > FILE_PDUSIZE) psize = count/2 + (count%2); /* second last packet */ else if (count < FILE_PDUSIZE) psize = count; /* last packet */ break; } /* filling buffer */ memset(buffer,0,sizeof(buffer)); for (k = 0; k < psize; ++k) { sprintf(buffer+(k*2),"%02x",((uint8_t*)data)[k]&0xFF); } data += k; count -= k; //starting packet transfer if (at_sie_binary_write(ftype,slot,i,pcount) == NULL) return; print_verbose(0,"%s",_("Waiting for data request...")); ack = at_read_line(); if (strncmp(ack,"> ",2) != 0) { if (strcmp(ack,"+CME ERROR: INVALID INDEX") == 0) { print_verbose(0,"%s\n",_("Packet buffer seems to be filled with something else, clearing...")); if (at_sie_binary_write(ftype,slot,-1,-1) == NULL) return; mem_realloc(ack,0); ack = at_read_line(); if (strcmp(ack,"OK") != 0) errexit("%s\n",ack); } else { errexit("\n\"%s\"\n",ack); } } mem_realloc(ack,0); if (verbosity_get()) { print_verbose(1,_("\nSending %d Bytes in packet %d\n"),psize,i); } else { print_verbose(0,"%s",_("Sending data...")); } //sending hex data at_data_send(buffer,2*psize); ack = at_read_line(); if (strcmp(ack,"OK") == 0) { print_verbose(0,_("Packet %d sent\n"),i); } else if (strcmp(ack,"+CME ERROR: INV CHAR IN TEXT") == 0) { errexit("%s\n",_("Wrong data format")); } else { errexit("\n\"%s\"\n",ack); } mem_realloc(ack,0); } if (pcount) { print_verbose(0,"%s\n",_("File transfer complete.")); } else { print_verbose(0,"%s\n",_("Nothing to transfer.")); } } void file_get (char* file, char* pipe, char* ftype, unsigned long slot, unsigned long count, unsigned long total) { char* ausgabe; char* temp = NULL; char* command; char* parsestr; enum return_code atcode; unsigned long current[2]; unsigned long totals[2]; int myfd = -1; unsigned int i = 0; unsigned char data; char datastr[3]; FILE* pipefd = NULL; char* text; long text_size = console_width(0); memset(datastr,0,sizeof(datastr)); command = at_sie_binary_read(ftype,slot); if (command == NULL) return; text = mem_alloc(text_size,1); snprintf(text,text_size,_("%s slot %lu"),ftype,slot); current[0] = 0; totals[0] = 1; current[1] = count; totals[1] = total; parsestr = mem_alloc(1+strlen(ftype)+2+numlen(slot)+(2*(strlen(",%d")+1))+1,1); /* example: ^SBNR: "vcf",9,1,3 */ sprintf(parsestr,"\"%s\",%lu,%%d,%%d",ftype,slot); do{ ausgabe = at_read_line(); atcode = at_line_type(ausgabe,command,&temp); //here we have to check not only for an output of OK, but because of //funny behaviour of the S55 and later, also for "+CME ERROR: unknown". //both stand for an empty entry if (atcode == AT_RET_OK || (atcode == AT_RET_ERROR_CME && strcmp(temp,"unknown") == 0)) { mem_realloc(ausgabe,0); mem_realloc(parsestr,0); ++current[1]; console_print_status(STDERR_FILENO,text,strlen(text),current,totals,2); file_close(myfd); return; } else if (atcode&AT_RET_ERROR) { file_close(myfd); errexit("%s\n",(temp)?temp:ausgabe); } else { console_print_status(STDERR_FILENO,text,strlen(text),current,totals,2); if (2 != sscanf(temp,parsestr,¤t[0],&totals[0])) errexit(_("parsing answer from phone failed: \"%s\"\n"),ausgabe); if (str_len(file) && myfd==-1) { myfd=file_open_output(file); } if (str_len(pipe) && pipefd==NULL) { pipefd=popen(pipe,"w"); } mem_realloc(ausgabe,0); ausgabe = at_read_line(); for (i=0;i #include #include #include #include //needed by at least Solaris8 #include void sms_manage (int action, char** files, char* outfile, char* pipe, struct parameters* myparams, struct smsopts* mysmsopts) { char* storetype; char** memlist; int i = 0; struct slot_range range; int current_fill; struct sms_slot_data** slist; struct sms_pdu_raw** pdu; int mark_read = 1; //getting SMS with changing status from "unread" to "read" memlist = NULL; slist = NULL; if (str_len(myparams->mem) != 0 && strcmp(myparams->mem,"?") == 0) { sms_print_memlist(NULL,1); return; } if (action == 0) { errexit ("%s\n",_("You must specify a valid action.")); } if (myparams->slot == SCMXX_SLOT_UNDEFINED) { switch (action) { case SCMXX_ACTION_GET: myparams->slot = SCMXX_SLOT_SMS_UNREAD; break; case SCMXX_ACTION_SEND: break; default: errexit("%s\n",_("If you want to remove short messages or mix actions, you must define a slot or slot type.")); break; } } if (str_len(myparams->mem)) { storetype = myparams->mem; } else { memlist = sms_get_types(); if (memlist[i] == NULL) { mem_realloc(memlist,0); return; } else { do { if (!strcasecmp(memlist[i],"MT")) { break; } } while (memlist[++i] != NULL); if (memlist[i] == NULL) { // MT not present i=0; do { if (!strcasecmp(memlist[i],"SM")) { break; } } while (memlist[++i] != NULL); if (memlist[i] == NULL) { // SM not present (should never happen) i=0; //choosing first one in list } } } storetype=memlist[i]; } if (!sms_select_mem(storetype,&range,¤t_fill)) { errexit(_("SMS storage type \"%s\" could not be selected.\n"),storetype); } if (memlist != NULL) mem_realloc(*memlist,0); mem_realloc(memlist,0); if (str_len(outfile) == 0 && str_len(pipe) == 0) { mark_read = 0; } if (action&SCMXX_ACTION_GET) { if (mysmsopts->direct) { //getting messages as unexpected notice from the phone sms_get_direct(outfile,pipe); } else { do { if (i > current_fill) { current_fill = i; } slist = mem_alloc((current_fill+1)*sizeof(*slist),0); i = sms_get(slist,current_fill+1,myparams->slot,mark_read); } while (i > current_fill); sms_print_all(outfile,pipe,slist,mysmsopts->sort_mode); } } if (action&SCMXX_ACTION_SEND) { if (myparams->slot != SCMXX_SLOT_UNDEFINED && (myparams->slot < SCMXX_SLOT_SMS_MIN || (myparams->slot >= SCMXX_SLOT_SMS_MIN && str_len(myparams->number) == 0))) { if (slist == NULL) { do { if (i > current_fill) { current_fill = i; } slist = mem_alloc((current_fill+1)*sizeof(*slist),0); i = sms_get(slist,current_fill+1,myparams->slot,mark_read); } while (i > current_fill); } if (slist != NULL) { /* These mails come from SMS storage and thus are sent, not stored. * This was also the behaviour in previous versions. */ sms_send_pdu_all(slist,myparams->number,1); } } else { if (myparams->slot >= SCMXX_SLOT_SMS_MIN) { sms_send_slot(myparams->slot,myparams->number); } else { if (myparams->text == NULL && (files == NULL || str_len(files[0]) == 0)) { print_verbose(0,"%s\n",_("Hmm, nothing to send?")); } if (myparams->text != NULL) { pdu = sms_pdu_create(NULL,myparams->text,myparams->number,mysmsopts); sms_send_pdus(pdu,mysmsopts->direct); //so we do not submit the same sms multiple times myparams->text = NULL; } if (files != NULL) { i=0; while (files[i] != NULL) { pdu = sms_pdu_create(files[i++],NULL,myparams->number,mysmsopts); sms_send_pdus(pdu,mysmsopts->direct); } } } } } if (action&SCMXX_ACTION_REMOVE) { if (slist == NULL && myparams->slot < SCMXX_SLOT_SMS_MIN) { do { if (i > current_fill) { current_fill = i; } slist = mem_alloc((current_fill+1)*sizeof(*slist),0); i = sms_get(slist,current_fill+1,myparams->slot,mark_read); } while (i > current_fill); } if (slist != NULL) { sms_delete_all(slist); } else { sms_delete_slot(myparams->slot); } } } void sms_delete_slot (int smsslot) { char* ack; if (smsslot >= SCMXX_SLOT_SMS_MIN) { at_gen_sms_delete(smsslot); ack = at_read_line(); if (!strcmp(ack,"OK")) { print_verbose(0,_("SMS slot %d was deleted.\n"),smsslot); } else if(!strcmp(ack,"+CMS ERROR: INVALID MEMORY INDEX")) { errexit("%s\n",_("This slot is not available.")); } else if(strstr(ack,"ERROR")!=NULL) { errexit("%s\n",ack); } mem_realloc(ack,0); } else { errexit("%s\n",_("You must specify a valid slot number.")); } } void sms_delete_all (struct sms_slot_data** slist) { size_t i = 0; if (slist == NULL) { return; } while (slist[i] != NULL) { if (slist[i]->slot != SMS_SLOT_INVALID) { sms_delete_slot(slist[i]->slot); } ++i; } } char* sms_pdu_number_lookup (char* number) { char* filename; struct pbook_entry** cache = NULL; struct pbook_entry** found = NULL; unsigned int i; unsigned int k = 0; ucs4char_t* entry_name; char* entry_number = NULL; //if number is not a number but text, look it up if (is_telephone_number(number) == 0) { filename = configfile_get_path (PACKAGE_NAME,PBOOK_FILE_CACHENAME); if (filename == NULL || file_accessible_ro(filename) == 0) { errexit("%s\n",_("Argument to --number is not a number but phonebook cache is not present.")); } else { cache = pbook_file_read(filename); entry_name = convert_from_system(number); while (cache[k] != NULL) ++k; found = mem_alloc((k+1)*sizeof(*found),0); k = 0; found[k] = NULL; for (i = 0; cache[i] != NULL; ++i) { if (ucs4str(cache[i]->text,entry_name) != NULL) { found[k++] = cache[i]; found[k] = NULL; } } mem_realloc(entry_name,0); if (found[0] == NULL) { errexit(_("no cache entry for \"%s\" found.\n"),number); } else if (found[1] != NULL) { print_error(_("no unique hit in cache for search term \"%s\":\n"), (number == NULL) ? "" : number); for (k = 0; found[k] != NULL; ++k) { entry_number = convert_to_system(found[k]->text,REPMODE_QUESTIONMARK); fprintf(stderr,"%s: %s\n",entry_number,found[k]->number); entry_number = mem_realloc(entry_number,0); } exit(EXIT_FAILURE); } else { return str_dup(found[0]->number); } for (k = 0; cache[k] != NULL; ++k) { mem_realloc(cache[k]->number,0); mem_realloc(cache[k]->text,0); mem_realloc(cache[k],0); } mem_realloc(cache,0); mem_realloc(found,0); } } else { return str_dup(number); } return NULL; } void sms_send_slot (int smsslot, char* smsnumber) { char* ausgabe; char* entry_number = NULL; entry_number = sms_pdu_number_lookup(smsnumber); if (str_len(entry_number) == 0) errexit("%s\n",_("zero-length number")); at_gen_sms_slot_send(smsslot,entry_number); mem_realloc(entry_number,0); ausgabe = at_read_line(); if (!strcmp(ausgabe,"+CMS ERROR: INVALID MEMORY INDEX")) { errexit("%s\n",_("This slot is not available.")); } else if(strstr(ausgabe,"ERROR")!=NULL) { errexit("%s\n",ausgabe); } print_verbose(0,"%s %s: %s\n",_("The message was sent."),_("Message reference"),ausgabe+7); mem_realloc(ausgabe,0); ausgabe = at_read_line(); print_verbose(0,"%s: %s\n",_("The phone returned"),ausgabe); mem_realloc(ausgabe,0); } void sms_send_pdus (struct sms_pdu_raw** pdu, int direct) { unsigned int i = 0; for (; pdu[i] != NULL; ++i) sms_send_pdu(pdu[i],direct); } void sms_send_pdu (struct sms_pdu_raw* tpdu, int direct) { char* command; char* ausgabe; char* ack; char* pdustr = sms_pdu_raw_to_hexstring(tpdu); if (direct) { at_gen_sms_send(sms_tpdu_len(SMS_OUTGOING,tpdu)); command = AT_GEN_SMS_SEND; } else { at_gen_sms_store(sms_tpdu_len(SMS_OUTGOING,tpdu)); command = AT_GEN_SMS_STORE; } print_verbose(0,"%s\n",_("Waiting for data request...")); ack = at_read_line(); if (!strncmp(ack,"> ",2)) { mem_realloc(ack,0); print_verbose(0,"%s\n",_("Sending data...")); at_data_send(pdustr,strlen(pdustr)); ausgabe = at_read_line(); if (strstr(ausgabe,"ERROR")!=NULL) { errexit(_("An error occured on sending the SMS: %s\n"),ausgabe); } if (direct) { print_verbose(0,"%s %s: %s\n",_("The message was sent."),_("Message reference"),ausgabe+7); } else { print_verbose(0,_("The message was saved to SMS memory slot %s\n"),ausgabe+7); } mem_realloc(ausgabe,0); ack = at_read_line(); print_verbose(0,"%s: %s\n",_("The phone returned"),ack); } else { if (!strncmp(ack,"ERROR",5)) { errexit("%s\n",_("An unknown error occured.")); } else if (!strcasecmp(ack,"+CMS ERROR: MEMORY FULL")) { errexit("%s\n",_("There is no slot free to store the sms.")); } else { errexit("%s\n",ack+12); } } mem_realloc(ack,0); mem_realloc(pdustr,0); } void sms_send_pdu_all (struct sms_slot_data** slist, char* number, int direct) { int i = 0; if (slist == NULL || *slist == NULL) { return; } while (slist[i] != NULL) { if (slist[i]->slot != SMS_SLOT_INVALID) { print_verbose(0,_("Trying to send SMS from slot %d...\n"),slist[i]->slot); } if (slist[i]->dir != SMS_OUTGOING) { print_verbose(0,"%s\n",_("Sending is only possible with SMS of outgoing type.")); } else { if (str_len(number) && slist[i]->slot != SMS_SLOT_INVALID) { sms_send_slot(slist[i]->slot, number); } else { sms_send_pdu(&slist[i]->tpdu,direct); } } ++i; } } struct sms_pdu_raw** sms_pdu_create (char* file, char* text, char* number, struct smsopts* mysmsopts) { struct sms_pdu_raw** pdu; char* smsinput; unsigned int smsinputsize; unsigned int i; char* entry_number = NULL; unsigned long flags = 0; if (str_len(text) == 0) {// --sms-text was not used, look for other sources smsinputsize = file_read_binary(file,&smsinput); if (smsinputsize == 0) { errexit("%s\n",_("No SMS text found (or zero length).")); } } else { smsinput = str_dup(text); } entry_number = sms_pdu_number_lookup(number); print_verbose(0,"%s\n",_("Creating PDU...")); if (mysmsopts->flash) flags |= SMS_CREATE_OPT_FLASH; if (mysmsopts->srr) flags |= SMS_CREATE_OPT_REPORT; if (mysmsopts->unicode) flags |= SMS_CREATE_OPT_UNICODE; pdu = sms_pdu_create_submit(smsinput,entry_number,flags); if (pdu == NULL) errexit("%s\n",_("short message encoding failed")); mem_realloc(entry_number,0); mem_realloc(smsinput,0); for (i=0; pdu[i] != NULL; ++i) { smsinput = sms_pdu_raw_to_hexstring(pdu[i]); print_verbose(1,"PDU[%d]: %s\n",i,smsinput); mem_realloc(smsinput,0); } return pdu; } /* slist must be of size (ssize*sizeof(struct sms_slot_data*)) * slist ends with NULL * If all entries (and NULL) fit into slist, 0 is returned * else the suggested number of entries is returned. * * The pointers in slist are malloc'ed and need to be free'd. */ int sms_get (struct sms_slot_data** slist, size_t ssize, int slot, int mark_read) { char* command; char* ausgabe; char* temp; size_t retval = 0; int type = 0; enum return_code status; int listval = -1; char* mark1 = NULL; char* mark2 = NULL; if (slot >= SCMXX_SLOT_SMS_MIN) { if (mark_read) { command = at_gen_sms_slot_read(slot); } else { command = at_sie_sms_slot_read(slot); if (command == NULL) errexit("%s\n", _("You must define an output target.")); } } else { switch (slot) { case SCMXX_SLOT_ALL: listval = 4; break; case SCMXX_SLOT_SMS_SENT: listval = 3; break; case SCMXX_SLOT_SMS_UNSENT: listval = 2; break; case SCMXX_SLOT_SMS_READ: listval = 1; break; case SCMXX_SLOT_SMS_UNREAD: listval = 0; break; default: return 0; } if (mark_read) { command = at_gen_sms_list_read(listval); } else { command = at_sie_sms_list_read(listval); if (command == NULL) errexit("%s\n", _("You must define an output target.")); } } ausgabe = at_read_line(); /* example: * +CMGR: 1,,159 * +CMGL: 2,2,,14 */ switch (at_line_type(ausgabe,command,&temp)) { case AT_RET_ANSWER: case AT_RET_OTHER: break; case AT_RET_ERROR: errexit("%s\n",_("unknown cause")); case AT_RET_ERROR_CME: case AT_RET_ERROR_CMS: if (strcasecmp(temp,"INVALID MEMORY INDEX") == 0) { errexit("%s\n",_("This slot is not available.")); } else { errexit("%s\n",temp); } break; case AT_RET_OK: switch (slot) { default: case SCMXX_SLOT_ALL: temp = NULL ; break; case SCMXX_SLOT_SMS_SENT: temp = _("sent"); break; case SCMXX_SLOT_SMS_UNSENT: temp = _("unsent"); break; case SCMXX_SLOT_SMS_READ: temp = _("read"); break; case SCMXX_SLOT_SMS_UNREAD: temp = _("unread"); break; } if (temp != NULL) { errexit(_("There are no %s short messages on the phone.\n"),temp); } else { errexit("%s",_("There are no short messages on the phone.\n")); } temp = NULL; break; } if (slot < SCMXX_SLOT_SMS_MIN) { print_verbose(0,"%s\n",_("Looking for SMS of specified type...")); } do { slist[retval]=mem_alloc(sizeof(**slist),0); sms_slot_data_init(slist[retval]); if (slot >= SCMXX_SLOT_SMS_MIN) { slist[retval]->slot = (unsigned int)slot; } else { slist[retval]->slot = atoi(temp); temp = strchr(temp,','); if (temp == NULL) errexit("%s\n",_("Output parsing error.")); ++temp; } type = atoi(temp); if (type < 2) { slist[retval]->dir = SMS_INCOMING; } else { slist[retval]->dir = SMS_OUTGOING; } mem_realloc(ausgabe,0); ausgabe = at_read_line(); if (!strcmp(ausgabe,"OK")) { errexit(_("Slot %u is empty.\n"), slist[retval]->slot); } else { switch (type) { case 0: mark1 = _("incoming"); mark2 = _("unread"); break; case 1: mark1 = _("incoming"); mark2 = _("read"); break; case 2: mark1 = _("outgoing"); mark2 = _("unsent"); break; case 3: mark1 = _("outgoing"); mark2 = _("sent"); break; default: break; } if (mark1 != NULL && mark2 != NULL) { print_verbose(0,_("Found %s, %s SMS in slot %u.\n"), mark1, mark2, slist[retval]->slot); } else { print_verbose(0,_("Found SMS of unknown type in slot %u.\n"), slist[retval]->slot); } if (strlen(ausgabe) >= sizeof(slist[retval]->tpdu)*2) { errexit("%s\n",_("Returned PDU exceeds buffer size.")); } else { sms_pdu_raw_init(&slist[retval]->tpdu); sms_pdu_raw_from_hexstring(&slist[retval]->tpdu,ausgabe); } mem_realloc(ausgabe,0); ausgabe = at_read_line(); } status = at_line_type(ausgabe,command,&temp); } while (retval++ <= ssize && (status == AT_RET_ANSWER || status == AT_RET_OTHER)); mem_realloc(ausgabe,0); slist[retval] = NULL; return retval; } void sms_print (FILE* filefd, char* pipe, struct sms* data) { FILE* pipefd = NULL; if (filefd != NULL) { //send output to a file sms_pdu_print(filefd,data,SMS_PRINT_ALL_HEADERS); } if (str_len(pipe)) { //also send output (splitted) to a given pipe pipefd = popen(pipe,"w"); if (pipefd != NULL) { sms_pdu_print(pipefd,data,SMS_PRINT_ALL_HEADERS); if (pclose(pipefd) == -1) { fprintf(stderr,"\n"); print_warning(_("closing pipe \"%s\" failed.\n"),pipe); } } } } int strn_reverse_compare (const char* s1, const char* s2, size_t n) { size_t s1len = str_len(s1); size_t s2len = str_len(s2); if (s1 == NULL && s2 == NULL) return 1; if (s1 == NULL || s2 == NULL) return 0; if (s1len < n) { if(s2len >= n) { return 0; } else { //both are smaller than n if (s1len != s2len) return 0; else n = s1len; } } else { if (s2len < n) return 0; /* else both are longer than n */ } if (strcmp(s1+s1len-n,s2+s2len-n) != 0) return 0; else return 1; } void sms_print_all (char* file, char* pipe, struct sms_slot_data** slist, char* sort_mode) { struct sms** data = NULL; FILE* filefd = NULL; unsigned int i = 0; unsigned int k = 0; struct sms_tpdu* decoded; char* filename; struct pbook_entry** cache = NULL; struct pbook_entry** found = NULL; unsigned int fcount = 0; unsigned int hitlen; struct gsm_number* addr; if (slist == NULL || (str_len(file) == 0 && str_len(pipe) == 0)) { return; } if (str_len(file) != 0) { if (!strcmp(file,"-")) { filefd=stdout; } else { filefd=fdopen(file_open_output(file),"w+"); } } //decoding while (slist[i] != NULL) ++i; if (i == 0) return; data = mem_alloc((i+1)*sizeof(*data),0); for (i = 0; slist[i] != NULL; ++i) { data[i] = NULL; decoded = sms_pdu_decode(slist[i]); if (decoded == NULL || decoded->pdu == NULL) { ++k; } else { data[i-k] = mem_alloc(sizeof(**data),0); sms_init(data[i-k],slist[i],decoded); } } data[i] = NULL; //matching status report sms_statusreport_match(data); //merging if (sms_multipart_merge(data) < 0) { print_error("%s\n",_("Concatenated messages cannot be reassembled.")); } //sorting sms_pdu_sort(data,sort_mode); //looking up number in cache filename = configfile_get_path (PACKAGE_NAME,PBOOK_FILE_CACHENAME); if (filename != NULL && file_accessible_ro(filename) == 1) { cache = pbook_file_read(filename); while (cache[k] != NULL) ++k; found = mem_alloc((k+1)*sizeof(*found),0); //assigning numbers for (i = 0; data[i] != NULL; ++i) { addr = &(data[i]->decoded->pdu->address); if (addr->text == NULL) { hitlen = 5; do { //(re-)init loop fcount = 0; found[0] = NULL; //register matching entries for (k = 0; cache[k] != NULL; ++k) { if (strn_reverse_compare(cache[k]->number, addr->digits,hitlen) == 1) { found[fcount++] = cache[k]; found[fcount] = NULL; } } //evaluate if only one match was found if (found[0] == NULL) { print_verbose(1,_("\nNo cache hit for number \"%s\" with match size %d\n"), addr->digits,hitlen); } else if (found[1] == NULL) { print_verbose(1,_("\nCache hit for number \"%s\" with match size %d\n"), found[0]->number,hitlen); addr->text = ucs4dup(found[0]->text); } else { print_verbose(1,_("\nNo unique hit in cache for number \"%s\" with match size %d\n"), addr->digits,hitlen); //try to be more specific on the match ++hitlen; //additinal loop break condition if (hitlen > strlen(addr->digits)) break; } } while (found[0] != NULL && found[1] != NULL); } } //cleaning up cache for (k = 0; cache[k] != NULL; ++k) { mem_realloc(cache[k]->number,0); mem_realloc(cache[k]->text,0); mem_realloc(cache[k],0); } mem_realloc(cache,0); mem_realloc(found,0); } //printing for (i = 0; data[i] != NULL; ++i) { sms_print(filefd,pipe,data[i]); } if (str_len(file) && strcmp(file,"-")) { fclose(filefd); } } void sms_get_direct (char* file, char* pipe) { char* ausgabe; char* temp; FILE* filefd = NULL; struct sms data; struct sms_slot_data* encoded; struct sms_tpdu* decoded; enum return_code status; ausgabe = NULL; temp = NULL; if (str_len(file) == 0 && str_len(pipe) == 0) { errexit("%s\n",_("No output method was specified.")); } at_gen_sms_phase(1); ausgabe = at_read_line(); status = at_line_type(ausgabe,AT_GEN_SMS_PHASE,NULL); mem_realloc(ausgabe,0); if (status == AT_RET_ANSWER || status == AT_RET_OTHER) { mem_realloc(at_read_line(),0); } else { errexit("%s\n",_("Could not set Phase 2+ compatible mode.")); } at_gen_msg_direct (1,2,2,1); ausgabe = at_read_line(); status = at_line_type(ausgabe,AT_GEN_MSG_DIRECT,NULL); mem_realloc(ausgabe,0); if (status != AT_RET_OK) { errexit("%s\n",_("Could not set direct mode.")); } if (str_len(file) != 0) { if (!strcmp(file,"-")) { filefd = stdout; } else { filefd = fdopen(file_open_input(file),"w+"); } } ausgabe = NULL; while (1) { do { mem_realloc(ausgabe,0); ausgabe = at_read_line(); } while (str_len(ausgabe) == 0); if (at_line_type(ausgabe,"+CMT",NULL) == AT_RET_ANSWER /* SMS-DELIVER */ || at_line_type(ausgabe,"+CDS",NULL) == AT_RET_ANSWER /* SMS-STATUS-REPORT */) { mem_realloc(ausgabe,0); ausgabe = at_read_line(); encoded = mem_alloc(sizeof(*encoded),0); sms_slot_data_init(encoded); encoded->slot = SMS_SLOT_INVALID; encoded->dir = SMS_INCOMING; sms_pdu_raw_from_hexstring(&encoded->tpdu,ausgabe); //decode and print the short message //does not handle concatenated short messages decoded = sms_pdu_decode(encoded); if (decoded == NULL || decoded->pdu == NULL) { errexit("%s\n",_("Failed to decode PDU.")); } sms_init(&data,encoded,decoded); sms_print(filefd,pipe,&data); sms_delete(&data); encoded = NULL; decoded = NULL; //if this is not sent, SMSC will resent the SMS so we would receive it multiple times mem_realloc(ausgabe,0); at_command_send(AT_GEN_MSG_ACK,"0"); ausgabe = at_read_line(); status = at_line_type(ausgabe,NULL,NULL); if (status != AT_RET_OK) { errexit("%s\n",_("SMS ACK should have been ok but was not.")); } } else if (at_line_type(ausgabe,"+CMTI",NULL) == AT_RET_ANSWER || at_line_type(ausgabe,"+CDSI",NULL) == AT_RET_ANSWER) { //not the message itself but an indication to it (very rare case) print_notice("%s\n",_("A new message was stored in the phone.")); } else if (at_line_type(ausgabe,"+CBM",NULL) == AT_RET_ANSWER) { mem_realloc(ausgabe,0); ausgabe = at_read_line(); print_notice("\n%s%s\n\n", "A cell broadcast message was received, but decoding is not implemented, yet.\n" "I would like to implement cell broadcast message decoding but have no examples.\n" "Please mail this to post@hendrik-sattler.de, including the following PDU:\n", ausgabe); } } } scmxx-0.9.0/src/intincl.h.in0000644000175000017500000000061710271511702015521 0ustar hendrikhendrik#ifndef INTINCL_H #define INTINCL_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H #ifdef HAVE_INTTYPES_H # include #else # ifdef HAVE_STDINT_H # include # endif #endif /* BSD needs this */ #ifndef UINT16_MAX #define UINT16_MAX 0xffffU #endif #endif scmxx-0.9.0/src/timeincl.h.in0000644000175000017500000000060710053757674015706 0ustar hendrikhendrik#ifndef TIMEINCL_H #define TIMEINCL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #endif scmxx-0.9.0/src/atcommand/0002755000175000017500000000000010401301576015245 5ustar hendrikhendrikscmxx-0.9.0/src/atcommand/siemens.c0000644000175000017500000001376110334742630017067 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include #include static int at_sie_blacklisted (char* model) { if (strcmp(model,"SF65") == 0) return 1; return 0; } int at_sie_supported () { char* vendor = at_get_vendor(); char* model = at_get_model(); int retval = 1; if (at_sie_blacklisted(model) || strcasecmp(vendor,"SIEMENS")) retval = 0; mem_realloc(vendor,0); mem_realloc(model,0); return retval; } char* at_sie_pref_op_read (unsigned int index1, unsigned int index2) { char* parmlist; if (!at_sie_supported()) return NULL; parmlist = mem_alloc(numlen(index1)+1+numlen(index2)+1,1); if (index2 > index1) sprintf(parmlist,"%d,%d",index1,index2); else sprintf(parmlist,"%d",index1); at_command_send(AT_SIE_PREF_OP_READ,parmlist); mem_realloc(parmlist,0); return AT_SIE_PREF_OP_READ; } char* at_sie_password (const char* lock, const char* oldpin, const char* newpin) { char* parmlist; if (!at_sie_supported()) return at_gen_password(lock,oldpin,newpin); if (str_len(lock) == 0 || (oldpin == NULL && newpin == NULL)) return NULL; parmlist = mem_alloc(1+strlen(lock)+3+str_len(oldpin)+3 +str_len(newpin)+1,1); if (oldpin == NULL) { //there is no pin set, yet sprintf(parmlist,"\"%s\",,\"%s\"",lock,newpin); } else { if (newpin == NULL) { //delete the pin sprintf(parmlist,"\"%s\",\"%s\"",lock,oldpin); } else { sprintf(parmlist,"\"%s\",\"%s\",\"%s\"",lock,oldpin,newpin); } } at_command_send(AT_SIE_PASSWORD,parmlist); mem_realloc(parmlist,0); return AT_SIE_PASSWORD; } char* at_sie_lock (const char* lock, int mode, const char* password, uint8_t class) { char* parmlist; if (str_len(lock) == 0) return NULL; if (!at_sie_supported()) return at_gen_lock(lock,mode,password,class); parmlist = mem_alloc(1+strlen(lock)+1 +1+numlen(mode) +2+str_len(password)+1 +1+numlen(class)+1,1); if (class > 0) if (str_len(password)) sprintf(parmlist,"\"%s\",%d,\"%s\",%d",lock,mode,password,class); else sprintf(parmlist,"\"%s\",%d,,%d",lock,mode,class); else if (str_len(password)) sprintf(parmlist,"\"%s\",%d,\"%s\"",lock,mode,password); else sprintf(parmlist,"\"%s\",%d",lock,mode); at_command_send(AT_SIE_LOCK,parmlist); mem_realloc(parmlist,0); return AT_SIE_LOCK; } char* at_sie_binary_write (const char* ftype, unsigned int slot, int part, int total) { char* parmlist; if (str_len(ftype) == 0) return NULL; if (!at_sie_supported()) return NULL; parmlist = mem_alloc(1+strlen(ftype)+2+numlen(slot) +1+numlen(part)+1+numlen(total) +1, 1); if (part < 0 || total < 0) { sprintf(parmlist,"\"%s\",%d",ftype,slot); } else if (part == 0 || total == 0) { sprintf(parmlist,"\"%s\",%d,%d",ftype,slot,part); } else { sprintf(parmlist,"\"%s\",%d,%d,%d",ftype,slot,part,total); } at_command_send(AT_SIE_BIN_WRITE,parmlist); mem_realloc(parmlist,0); return AT_SIE_BIN_WRITE; } char* at_sie_binary_read (const char* ftype, unsigned int slot) { char* parmlist; if (str_len(ftype) == 0) return NULL; if (!at_sie_supported()) return NULL; parmlist = mem_alloc(1+strlen(ftype)+2+numlen(slot)+1, 1); sprintf(parmlist,"\"%s\",%d",ftype,slot); at_command_send(AT_SIE_BIN_READ,parmlist); mem_realloc(parmlist,0); return AT_SIE_BIN_READ; } char* at_sie_phonebook_vcf_read (unsigned int slot, int type) { char* parmlist; if (!at_sie_supported()) return NULL; if (type > 3 || type < 0) { type = -1; parmlist = mem_alloc(numlen(slot)+1,1); sprintf(parmlist,"%d",slot); } else { parmlist = mem_alloc(numlen(slot)+1+numlen(type)+1,1); sprintf(parmlist,"%d,%d",slot,type); } at_command_send(AT_SIE_PB_VCF_READ,parmlist); mem_realloc(parmlist,0); return AT_SIE_PB_VCF_READ; } char* at_sie_phonebook_read_sorted (unsigned int slot_low, unsigned int slot_high) { char* parmlist; if (!at_sie_supported()) return NULL; parmlist = mem_alloc(numlen(slot_low)+1 +numlen(slot_high)+1, 1); sprintf(parmlist,"%d,%d",slot_low,slot_high); at_command_send(AT_SIE_PB_READ_SORTED,parmlist); mem_realloc(parmlist,0); return AT_SIE_PB_READ_SORTED; } char* at_sie_phonebook_select (const char* mem) { char* parmlist; if (mem == NULL) return NULL; if (!at_sie_supported()) return at_gen_phonebook_select(mem); parmlist = mem_alloc(1+strlen(mem)+2, 1); sprintf(parmlist,"\"%s\"",mem); at_command_send(AT_SIE_PB_SELECT,parmlist); mem_realloc(parmlist,0); return AT_SIE_PB_SELECT; } char* at_sie_sms_slot_read (unsigned int slot) { char* parmlist; if (!at_sie_supported()) return NULL; parmlist = mem_alloc(numlen(slot)+1,1); sprintf(parmlist,"%d",slot); at_command_send(AT_SIE_SMS_SLOT_READ,parmlist); mem_realloc(parmlist,0); return AT_SIE_SMS_SLOT_READ; } char* at_sie_sms_list_read (unsigned int list_id) { char* parmlist; if (!at_sie_supported()) return NULL; parmlist = mem_alloc(numlen(list_id)+1,1); sprintf(parmlist,"%d",list_id); at_command_send(AT_SIE_SMS_LIST_READ,parmlist); mem_realloc(parmlist,0); return AT_SIE_SMS_LIST_READ; } scmxx-0.9.0/src/atcommand/cached.c0000644000175000017500000000227010323522531016616 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include char* at_get_vendor (void) { static char* vendor = NULL; if (vendor == NULL) { at_command_send(AT_GEN_VENDOR,NULL); vendor = at_get_value(AT_GEN_VENDOR); } return str_dup(vendor); } char* at_get_model (void) { static char* model = NULL; if (model == NULL) { at_command_send(AT_GEN_MODEL,NULL); model = at_get_value(AT_GEN_MODEL); } return str_dup(model); } scmxx-0.9.0/src/atcommand/common.c0000644000175000017500000002103610366726550016716 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include #include #include #include #include static char* at_last_command; static char* at_last_parameter; static int at_last_was_syntax_request; static char* PIN; static struct at_hw_access at_tty; void at_init (struct at_hw_access* tty, char* pin) { at_last_command = NULL; at_last_parameter = NULL; at_last_was_syntax_request = 0; PIN = str_dup(pin); at_set_tty(tty); } void at_set_tty(struct at_hw_access* tty) { at_tty.read = tty->read; at_tty.write = tty->write; } int at_check_line_end (const char* input, const size_t len) { return ((len >= 2 && input[len-2] == '\r' && input[len-1] == '\n') || (input[0] == '>' && len > 1)); } char* at_read_line_raw () { char* value; char* temp; int repeat; int estatus; value = NULL; do { repeat = 0; value = at_tty.read(at_check_line_end); if (str_len(value) == 0) { if (value == NULL) { estatus = errno; } else { estatus = ETIMEDOUT; } errexit("%s: %s\n",_("Cannot read from device"),strerror(estatus)); } else { if ((temp=strchr(value,'\r')) != NULL || (temp=strchr(value,'\n')) != NULL) { //we do not want values 13=='\r' and 10=='\n' in our strings memset(temp,0,1); //we do not want to return empty strings //we do not accept the at_command_p as answer if (strlen(value) == 0 || (strncmp(value,AT_PREFIX,sizeof(AT_PREFIX)-1) == 0 && strncmp(value+sizeof(AT_PREFIX)-1, at_last_command, str_len(at_last_command)) == 0)) { value = mem_realloc(value,0); repeat = 1; } } } } while (repeat); print_message(2,_("Received"),"%s\n",value); return value; } char* at_read_line () { char* value; char* temp; char* ctemp; char* ptemp; char* pintype; int srtemp; value = at_read_line_raw(); //PIN handling for all function is done transparently here if (at_line_type(value,NULL,&temp) == AT_RET_ERROR_CME) { if (strstr(temp,"PIN") != NULL || strstr(temp,"PUK") != NULL) { //save previous command ctemp = str_dup(at_last_command); ptemp = str_dup(at_last_parameter); srtemp = at_last_was_syntax_request; /* On first PIN usage, the command line option overrides * pin file usage, subsequent request are always answered * by pin file. */ if (str_len(PIN) == 0) { at_syntax_request(AT_GEN_PIN); pintype = at_read_line_raw(); if (at_line_type(pintype,AT_GEN_PIN,&temp) == AT_RET_ANSWER) mem_realloc(at_read_line_raw(),0); PIN = pinfile_get(temp); mem_realloc(pintype,0); } if (str_len(PIN) == 0) { //fail if pin file lookup failed and nothing was specified at command line ctemp = mem_realloc(ctemp,0); ptemp = mem_realloc(ptemp,0); if (PIN != NULL) mem_realloc(PIN,0); at_line_type(value,NULL,&temp); errexit("%s\n%s\n",temp,_("Use the --pin parameter or edit the pin file.")); } else { //resend command to be sure to be allowed to enter the pin if (srtemp) at_syntax_request(ctemp); else at_command_send(ctemp,ptemp); mem_realloc(at_read_line_raw(),0); //enter the pin at_gen_pin(PIN); mem_realloc(value,0); value = at_read_line_raw(); if (at_line_type(value,AT_GEN_PIN,&temp) != AT_RET_OK) errexit("%s: %s\n",_("Using PIN failed"),temp); mem_realloc(value,0); //prevent a loop, use pin file for multiple usages PIN = mem_realloc(PIN,0); //resend previous command if (srtemp) at_syntax_request(ctemp); else at_command_send(ctemp,ptemp); ctemp = mem_realloc(ctemp,0); ptemp = mem_realloc(ptemp,0); value = at_read_line_raw(); } } } else if (strncmp(value,"RING",4) == 0 || strncmp(value,"NO CARRIER",10) == 0) { mem_realloc(value,0); value = at_read_line(); } return mem_realloc(value,strlen(value)+1); } void at_command_send (const char* command, const char* parmlist) { if (command == NULL) return; print_message(2,_("\nSending command"),"%s%s",AT_PREFIX,command); if (str_len(parmlist) > 0) { print_verbose(2,"%s%s\n",AT_WRITE_DELIM,parmlist); } else { print_verbose(2,"%s","\n"); } if (at_tty.write(AT_PREFIX,sizeof(AT_PREFIX)-1) == 0 || at_tty.write(command,strlen(command)) == 0 || (str_len(parmlist) != 0 && (at_tty.write(AT_WRITE_DELIM,sizeof(AT_WRITE_DELIM)-1) == 0 || at_tty.write(parmlist,strlen(parmlist)) == 0)) || at_tty.write("\r",1) == 0) { errexit("%s: %s\n",_("Cannot send at command"),strerror(errno)); } else { at_last_command = mem_realloc(at_last_command,0); at_last_command = str_dup(command); at_last_parameter = mem_realloc(at_last_parameter,0); at_last_parameter = str_dup(parmlist); at_last_was_syntax_request = 0; } } void at_syntax_request (const char* command) { if (command == NULL) return; print_message(2,_("\nSending command"),"%s%s%s\n", AT_PREFIX, command, AT_READ_SUFFIX); if (at_tty.write(AT_PREFIX,sizeof(AT_PREFIX)-1) == 0 || at_tty.write(command,strlen(command)) == 0 || at_tty.write(AT_READ_SUFFIX,strlen(AT_READ_SUFFIX)) == 0 || at_tty.write("\r",1) == 0) { errexit("%s: %s\n",_("Cannot send at command"),strerror(errno)); } else { at_last_command = mem_realloc(at_last_command,0); at_last_command = str_dup(command); at_last_parameter = mem_realloc(at_last_parameter,0); at_last_was_syntax_request = 1; } } void at_data_send (const char* data, size_t size) { /* 0x1a is Ctrl-Z (represents end of data stream) */ if (at_tty.write(data,size)) at_tty.write("\x1a",1); } char* at_get_value (const char* command) { char* temp; char* temp2; temp = at_read_line(); if (temp == NULL) return NULL; switch (at_line_type(temp,command,&temp2)) { case AT_RET_ANSWER: memmove(temp,temp2,strlen(temp2)+1); //no break case AT_RET_OTHER: temp2 = at_read_line(); if (at_line_type(temp2,NULL,NULL) == AT_RET_OK) { mem_realloc(temp2,0); return temp; } mem_realloc(temp2,0); //no break default: mem_realloc(temp,0); return NULL; } } char** at_parse_stringlist (char* stringlist) { char* temp = stringlist; if (*temp == '(') ++temp; if (*temp == '"') ++temp; memmove(stringlist,temp,strlen(temp)+1); temp = stringlist+strlen(stringlist)-1; if (*temp == ')') --temp; if (*temp != '"') ++temp; memset(temp,0,1); return str_split(stringlist,"\",\"",0); } enum return_code at_line_type (const char* response, const char* command, char** content) { char* temp = NULL; enum return_code retval = AT_RET_OTHER; if (content != NULL) *content = (char*)response; if (response == NULL) return retval; if (strcasecmp(response,AT_OK) == 0) { temp = "OK"; retval = AT_RET_OK; } else if (strcasecmp(response,AT_ERROR) == 0) { temp = "ERROR"; retval = AT_RET_ERROR; } else if (strncasecmp(response,AT_ERROR_CME, str_len(AT_ERROR_CME)) == 0) { temp = "CME ERROR"; if (content != NULL) *content = (char*)response + str_len(AT_ERROR_CME); retval = AT_RET_ERROR_CME; } else if (strncasecmp(response,AT_ERROR_CMS, str_len(AT_ERROR_CMS)) == 0) { temp = "CMS ERROR"; if (content != NULL) *content = (char*)response + str_len(AT_ERROR_CMS); retval = AT_RET_ERROR_CMS; } else if (command != NULL && strncasecmp(response,command,strlen(command)) == 0 && strncasecmp(response+str_len(command), AT_REPLY_SEPERATOR, str_len(AT_REPLY_SEPERATOR)) == 0) { temp = _("command return value"); if (content != NULL) { *content = (char*)response + str_len(command) + str_len(AT_REPLY_SEPERATOR); } retval = AT_RET_ANSWER; } else { temp = _("nothing"); retval = AT_RET_OTHER; } print_verbose(3,_("Value matched %s.\n"),temp); return retval; } scmxx-0.9.0/src/atcommand/Makefile0000644000175000017500000000005110070544712016702 0ustar hendrikhendrikSUBDIR=atcommand include ../Makefile.sub scmxx-0.9.0/src/atcommand/generic.c0000644000175000017500000002054410331162471017031 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include #include #include #include #include char* at_gen_keypad (char* keylist, uint8_t duration, uint8_t pause) { char* parmlist; char* current_keys = NULL; char* retval = NULL; unsigned int i = 0; if (str_len(keylist) == 0 || duration == 0) return NULL; for (; keylist[i] != 0; ++i) { if (keylist[i] == '+') { if (i == 0) { // replace '+' with '0' and // make duration at least 10 to get the '+' current_keys = str_dup("0"); if (duration < 10) duration = 10; /* if (pause < 10) pause = 10; */ } else { // Since '+' needs special processing (see above) // process all keys just before the '+'. // The '+' will then be processed by the next call // to this function. current_keys = strn_dup(keylist,i); } retval = keylist + strlen(current_keys); break; } } if (current_keys == NULL) current_keys = str_dup(keylist); parmlist = mem_alloc(1+strlen(current_keys)+1 +1+numlen(duration) +1+numlen(pause)+1,1); sprintf(parmlist,"\"%s\",%u,%u",current_keys,duration,pause); mem_realloc(current_keys,0); at_command_send(AT_GEN_KEYPAD,parmlist); mem_realloc(parmlist,0); // at least the S55 needs some time after an '+' if (keylist[0] == '+') sleep(1); return retval; } char* at_gen_password (const char* lock, const char* oldpin, const char* newpin) { char* parmlist; if (str_len(lock) == 0 || (oldpin == NULL && newpin == NULL)) return NULL; parmlist = mem_alloc(1+strlen(lock)+3+str_len(oldpin)+3 +str_len(newpin)+1,1); if (oldpin == NULL) { //there is no pin set, yet sprintf(parmlist,"\"%s\",,\"%s\"",lock,newpin); } else { if (newpin == NULL) { //delete the pin sprintf(parmlist,"\"%s\",\"%s\"",lock,oldpin); } else { sprintf(parmlist,"\"%s\",\"%s\",\"%s\"",lock,oldpin,newpin); } } at_command_send(AT_GEN_PASSWORD,parmlist); mem_realloc(parmlist,0); return AT_GEN_PASSWORD; } char* at_gen_lock (const char* lock, int mode, const char* password, uint8_t class) { char* parmlist; if (str_len(lock) == 0) return NULL; parmlist = mem_alloc(1+strlen(lock)+1 +1+numlen(mode) +2+str_len(password)+1 +1+numlen(class)+1,1); if (class > 0) if (str_len(password)) sprintf(parmlist,"\"%s\",%d,\"%s\",%d",lock,mode,password,class); else sprintf(parmlist,"\"%s\",%d,,%d",lock,mode,class); else if (str_len(password)) sprintf(parmlist,"\"%s\",%d,\"%s\"",lock,mode,password); else sprintf(parmlist,"\"%s\",%d",lock,mode); at_command_send(AT_GEN_LOCK,parmlist); mem_realloc(parmlist,0); return AT_GEN_LOCK; } void at_gen_phonebook_write (unsigned int slot, const char* number, unsigned int numtype, const char* text) { char* parmlist; parmlist = mem_alloc(numlen(slot)+1 +1+str_len(number)+1 +1+numlen(numtype)+1 +1+str_len(text)+1 +1, 1); if (str_len(number) == 0 && str_len(text) == 0) { sprintf(parmlist,"%d",slot); } else { if (number == NULL) { sprintf(parmlist,"%d,\"\",%d,\"%s\"", slot,numtype,text); } else if (text == NULL) { sprintf(parmlist,"%d,\"%s\",%d,\"\"", slot,number,numtype); } else { sprintf(parmlist,"%d,\"%s\",%d,\"%s\"", slot,number,numtype,text); } } at_command_send(AT_GEN_PB_WRITE,parmlist); mem_realloc(parmlist,0); } char* at_gen_phonebook_read (unsigned int slot_low, unsigned int slot_high) { char* parmlist; parmlist = mem_alloc(numlen(slot_low)+1 +numlen(slot_high)+1, 1); sprintf(parmlist,"%d,%d",slot_low,slot_high); at_command_send(AT_GEN_PB_READ,parmlist); mem_realloc(parmlist,0); return AT_GEN_PB_READ; } char* at_gen_phonebook_select (const char* mem) { char* parmlist; if (mem == NULL) return NULL; parmlist = mem_alloc(1+strlen(mem)+2, 1); sprintf(parmlist,"\"%s\"",mem); at_command_send(AT_GEN_PB_SELECT,parmlist); mem_realloc(parmlist,0); return AT_GEN_PB_SELECT; } void at_gen_sms_delete (unsigned int slot) { char* parmlist; parmlist = mem_alloc(numlen(slot)+1, 1); sprintf(parmlist,"%d",slot); at_command_send(AT_GEN_SMS_DELETE,parmlist); mem_realloc(parmlist,0); } void at_gen_sms_slot_send (unsigned int slot, const char* number) { char* parmlist; if (number == NULL) return; parmlist = mem_alloc(numlen(slot) +2+strlen(number)+2 +numlen(numtype(number)) +1, 1); if (str_len(number) == 0) { sprintf(parmlist,"%d",slot); } else { sprintf(parmlist,"%d,\"%s\",%d",slot,number,numtype(number)); } at_command_send(AT_GEN_SMS_SLOT_SEND,parmlist); mem_realloc(parmlist,0); } void at_gen_sms_send (unsigned int len) { char* parmlist; parmlist = mem_alloc(numlen(len)+1,1); sprintf(parmlist,"%d",len); at_command_send(AT_GEN_SMS_SEND,parmlist); mem_realloc(parmlist,0); } void at_gen_sms_store (unsigned int len) { char* parmlist; parmlist = mem_alloc(numlen(len)+1,1); sprintf(parmlist,"%d",len); at_command_send(AT_GEN_SMS_STORE,parmlist); mem_realloc(parmlist,0); } void at_gen_sms_mem (const char* mem1, const char* mem2, const char* mem3) { char* parmlist; if (mem1 == NULL) return; parmlist = mem_alloc(1+strlen(mem1)+2 +1+str_len(mem2)+2 +1+str_len(mem3)+1 +1, 1); if (mem2 == NULL) { sprintf(parmlist,"\"%s\"",mem1); } else if (mem3 == NULL) { sprintf(parmlist,"\"%s\",\"%s\"",mem1,mem2); } else { sprintf(parmlist,"\"%s\",\"%s\",\"%s\"",mem1,mem2,mem3); } at_command_send(AT_GEN_SMS_MEM,parmlist); mem_realloc(parmlist,0); } char* at_gen_sms_slot_read (unsigned int slot) { char* parmlist; parmlist = mem_alloc(numlen(slot)+1,1); sprintf(parmlist,"%d",slot); at_command_send(AT_GEN_SMS_SLOT_READ,parmlist); mem_realloc(parmlist,0); return AT_GEN_SMS_SLOT_READ; } char* at_gen_sms_list_read (unsigned int list_id) { char* parmlist; parmlist = mem_alloc(numlen(list_id)+1,1); sprintf(parmlist,"%d",list_id); at_command_send(AT_GEN_SMS_LIST_READ,parmlist); mem_realloc(parmlist,0); return AT_GEN_SMS_LIST_READ; } void at_gen_charset (const char* charset) { char* parmlist; if (charset == NULL) return; parmlist = mem_alloc(1+strlen(charset)+2, 1); sprintf(parmlist,"\"%s\"",charset); at_command_send(AT_GEN_CHARSET,parmlist); mem_realloc(parmlist,0); } void at_gen_smsc (const char* number) { char* parmlist; if (number == NULL) return; parmlist = mem_alloc(1+strlen(number)+2 +numlen(numtype(number))+1, 1); sprintf(parmlist,"\"%s\",%d",number,numtype(number)); at_command_send(AT_GEN_CHARSET,parmlist); mem_realloc(parmlist,0); } void at_gen_pin (const char* pin) { char* parmlist; if (pin == NULL) return; parmlist = mem_alloc(1+strlen(pin)+2,1); sprintf(parmlist,"\"%s\"",pin); at_command_send(AT_GEN_PIN,parmlist); mem_realloc(parmlist,0); } void at_gen_sms_phase (int enable) { char* parmlist; if (enable) parmlist = "1"; else parmlist = "0"; at_command_send(AT_GEN_SMS_PHASE,"1"); } void at_gen_msg_direct (int mode, int mt, int bm, int ds) { char* parmlist; if (mode < 0 || mode > 1) return; if (mt < 0 || mt > 3) return; if (bm != 0 && bm != 2 && bm != 3) return; if (ds < 0 || ds > 2) return; parmlist = mem_alloc(numlen(mode)+1+numlen(mt)+1+ numlen(bm)+1+numlen(ds)+1+2,1); sprintf(parmlist,"%d,%d,%d,%d,1",mode,mt,bm,ds); at_command_send(AT_GEN_MSG_DIRECT,parmlist); } scmxx-0.9.0/src/charsets.h0000644000175000017500000000755210367440070015302 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef CHARSETS_H #define CHARSETS_H /** You MUST call this function before all other charset functions. * @param charset if NULL, locale specific charset will be returned * on get_system_charset(). * @param announce if non-zero, prints a informational message to stderr */ void charset_init (char* charset, int announce); /** returns the system character set */ char* get_system_charset (); /* considers setting from charset_init() */ char* get_system_charset_raw(); /* only what the system tells */ enum repmode { /* replace all unknown character with a \XXXX replacement * it is used for all output that we might read again */ REPMODE_ESCAPE_CHARS = 0, /* replace all unknown character with a '?' * it is used for all output that we may not read again */ REPMODE_QUESTIONMARK, /* ignore any failure (prints an error message) */ REPMODE_IGNORE }; #include "intincl.h" #define ucs4char_t uint32_t #define ucs2char_t uint16_t #define gsmchar_t uint8_t #include /* return memory count of elements */ size_t ucs4len (const ucs4char_t* input); size_t ucs2len (const ucs2char_t* input); #define gsmlen(input) str_len(input) /* return the count of characters */ size_t gsmwidth (const gsmchar_t* input); /* almost like strndup()/strdup() but return NULL if s == NULL */ ucs4char_t* ucs4ndup(const ucs4char_t* s, size_t n); ucs4char_t* ucs4dup(const ucs4char_t* s); ucs2char_t* ucs2ndup(const ucs2char_t* s, size_t n); ucs2char_t* ucs2dup(const ucs2char_t* s); /* just like strncmp()/strcmp() */ int ucs4ncmp (const ucs4char_t* s1, const ucs4char_t* s2, size_t n); int ucs4cmp (const ucs4char_t* s1, const ucs4char_t* s2); /* just like strstr() */ ucs4char_t* ucs4str (const ucs4char_t* haystack, const ucs4char_t* needle); /* not like strncpy but copies n-1 characters with a terminating 0 */ ucs4char_t* ucs4ncpy (ucs4char_t* dest, const ucs4char_t* src, size_t n); /* these two are mainly used by the other function from below */ ucs4char_t* convert_to_internal (const char* from_code, char* input, size_t insize); char* convert_from_internal (const char* to_code, ucs4char_t* input, enum repmode replacement_mode); /* convert from/to the system's charset */ char* convert_to_system (ucs4char_t* input, enum repmode replacement_mode); ucs4char_t* convert_from_system (char* input); /* convert from/to 7bit GSM charset */ gsmchar_t* convert_to_gsm (ucs4char_t* input); ucs4char_t* convert_from_gsm (gsmchar_t* input); /* convert from/to UCS-2 unicode charset * input must be in host endianess */ ucs2char_t* convert_to_ucs2 (ucs4char_t* input); ucs4char_t* convert_from_ucs2 (ucs2char_t* input); /* fromhe and tohe define function to convert from and to host endianess */ char* convert_to_ucs2_hexstring (ucs4char_t* input, uint16_t (*fromhe)(uint16_t i)); ucs4char_t* convert_from_ucs2_hexstring (char* input, uint16_t (*tohe)(uint16_t i)); /* Count how many GSM-encoded UCS-4 characters fit into * a max of count septets. * A count of zero counts the septets needed by input. */ unsigned int gsm_count (ucs4char_t* input, unsigned int count); #endif scmxx-0.9.0/src/apoconv/0002755000175000017500000000000010401301576014747 5ustar hendrikhendrikscmxx-0.9.0/src/apoconv/apoheader.c0000644000175000017500000003507410377446354017072 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "apoheader.h" #include "helper.h" #include "charsets.h" #include "smspdu.h" #include #include static enum apo_version version; void apo_header_init(enum apo_version ver) { version = ver; } struct apo_header_def { uint16_t type; uint8_t apotype; char* descr; enum apo_entry_type format; }; static struct apo_header_def apo_header[] = { { 0x00, APO_REM, "alarm time", APO_DATE }, { 0x01, APO_REM, "start time", APO_DATE }, { 0x02, APO_REM, "end time", APO_DATE }, { 0x0a, APO_NOTE, "creation time", APO_DATE }, { 0x0b, APO_NOTE, "modification time", APO_DATE }, { 0x0c, APO_NOTE, "unknown", APO_2BYTE }, { 0x0d, APO_NOTE, "text", APO_STRING }, { 0x10, APO_APP|APO_TASK, "appointment type", APO_APPTYPE }, { 0x11, APO_APP, "description", APO_STRING }, { 0x12, APO_TASK, "priority", APO_PRIO }, { 0x13, APO_TASK, "status", APO_STATUS }, { 0x14, APO_TASK, "due time", APO_DATE }, { 0x15, APO_APP|APO_TASK, "alarm time", APO_DATE }, { 0x16, APO_APP, "start time", APO_DATE }, { 0x17, APO_TASK, "closed at", APO_DATE }, { 0x18, APO_APP, "voice memo filename", APO_STRING }, { 0x19, APO_APP, "location", APO_STRING }, { 0x1a, APO_APP, "end time", APO_DATE }, { 0x1b, APO_APP, "reoccurrence", APO_STRING }, { 0x1d, APO_APP, "call number", APO_TELNUM }, { 0x1e, APO_APP, "address book reference", APO_LINK }, { 0x20, APO_REM, "appointment reference", APO_LINK }, { 0x21, APO_APP|APO_TASK, "alarm", APO_ALARM }, { 0x23, APO_ADDR, "family name", APO_STRING }, { 0x24, APO_ADDR, "given name", APO_STRING }, { 0x25, APO_ADDR, "street", APO_STRING }, { 0x26, APO_ADDR, "postal code", APO_STRING }, { 0x27, APO_ADDR, "city", APO_STRING }, { 0x28, APO_ADDR, "country", APO_STRING }, { 0x29, APO_ADDR, "company", APO_STRING }, { 0x2a, APO_ADDR, "number office", APO_TELNUM }, { 0x2b, APO_ADDR, "number fax 1", APO_TELNUM }, { 0x2c, APO_ADDR, "number mobile", APO_TELNUM }, { 0x2d, APO_ADDR, "number home", APO_TELNUM }, { 0x2e, APO_ADDR, "e-mail 1", APO_STRING }, { 0x2f, APO_ADDR, "URL", APO_STRING }, { 0x30, APO_ADDR, "birthday", APO_DATE }, { 0x31, APO_ADDR, "appointment reference", APO_LINK }, { 0x32, APO_ADDR, "group", APO_GROUP }, { 0x33, APO_ADDR, "picture file address", APO_STRING }, { 0x35, APO_ADDR, "title", APO_STRING }, { 0x3e, APO_ADDR, "wireless village ID", APO_STRING }, { 0x3f, APO_ADDR, "nickname", APO_STRING }, { 0x41, APO_ADDR, "ICQ number", APO_STRING }, { 0x46, APO_ADDR, "AIM buddy name", APO_STRING }, { 0x4d, APO_APP|APO_TASK, "alarm type", APO_4BYTE }, /* 0=normal 1=silent */ { 0x4e, APO_APP, "unknown", APO_4BYTE }, { 0x4f, APO_APP|APO_NOTE|APO_TASK, "unknown", APO_2BYTE }, { 0x50, APO_CALREC, "call name", APO_STRING }, { 0x51, APO_CALREC, "call time", APO_DATE }, { 0x52, APO_CALREC, "unknown", APO_2BYTE }, { 0x53, APO_CALREC, "unknown", APO_2BYTE }, { 0x54, APO_CALREC, "unknown", APO_4BYTE }, { 0x55, APO_CALREC, "unknown", APO_4BYTE }, { 0x56, APO_CALREC, "unknown", APO_4BYTE }, { 0x57, APO_CALREC, "unknown", APO_4BYTE }, { 0x58, APO_CALREC, "unknown", APO_4BYTE }, { 0x59, APO_CALREC, "unknown", APO_4BYTE }, { 0x5a, APO_CALREC, "unknown", APO_4BYTE }, { 0x5d, APO_ADDR, "e-mail 2", APO_STRING }, { 0x5e, APO_ADDR, "number fax 2", APO_TELNUM }, { 0x60, APO_ADDR, "display name", APO_STRING }, { 0x62, APO_ADDR, "number (private)", APO_TELNUM }, { 0x63, APO_ADDR, "number (office)", APO_TELNUM }, { 0x64, APO_ADDR, "number (private,mobile)", APO_TELNUM }, { 0x65, APO_ADDR, "number (office,mobile)", APO_TELNUM }, { 0x66, APO_ADDR, "ring tone file address", APO_STRING }, { 0x67, APO_ADDR, "ring video file address", APO_STRING }, { 0x68, APO_ADDR, "short message tone file address", APO_STRING }, { 0x69, APO_ADDR, "unknown", APO_4BYTE }, { 0x6a, APO_ADDR, "number (private,fax)", APO_TELNUM }, { 0x6b, APO_ADDR, "e-mail (private)", APO_STRING }, { 0x6c, APO_ADDR, "note (private)", APO_STRING }, { 0x6d, APO_ADDR, "Push-To-Talk ID", APO_STRING }, { 0x6e, APO_ADDR, "unknown", APO_2BYTE }, /* CX75 */ { 0x6f, APO_ADDR, "profession", APO_STRING }, /* SL 75 */ { 0x6f, APO_APP, "unknown", APO_DATE }, /* S65 */ { 0x70, APO_APP, "unknown", APO_DATE }, { 0x71, APO_ADDR, "e-mail (office)", APO_STRING }, { 0x72, APO_ADDR, "e-mail 2 (office)", APO_STRING }, { 0x73, APO_ADDR, "URL (office)", APO_STRING }, { 0x74, APO_ADDR, "street (office)", APO_STRING }, { 0x75, APO_ADDR, "city (office)", APO_STRING }, { 0x76, APO_ADDR, "postal code (office)", APO_STRING }, { 0x77, APO_ADDR, "sub-state (office)", APO_STRING }, { 0x78, APO_ADDR, "country (office)", APO_STRING }, { 0x79, APO_ADDR, "note (office)", APO_STRING }, { 0x7a, APO_ADDR, "wireless village ID", APO_STRING }, { 0x7e, APO_ADDR, "note (person)", APO_STRING }, { 0x7f, APO_ADDR, "sub-state (private)", APO_STRING }, { 0x84, APO_PRES, "unknown", APO_STRING }, { 0x85, APO_PRES, "unknown", APO_2BYTE }, { 0x86, APO_PRES, "unknown", APO_2BYTE }, { 0x87, APO_PRES, "unknown", APO_STRING }, { 0x88, APO_PRES, "unknown", APO_2BYTE }, { 0x89, APO_PRES, "unknown", APO_STRING }, { 0x8a, APO_PRES, "unknown", APO_STRING }, { 0x8b, APO_PRES, "unknown", APO_2BYTE }, { 0x8c, APO_PRES, "unknown", APO_2BYTE }, { 0x8d, APO_PRES, "unknown", APO_STRING }, { 0x8e, APO_PRES, "unknown", APO_2BYTE }, { 0x91, APO_ADDR, "number (office,fax)", APO_TELNUM }, { 0xa7, APO_PRES, "unknown", APO_STRING }, { 0xffff, 0 , NULL, APO_STRING } }; static uint16_t apo_number_size (void* ptr) { uint16_t nlen; uint16_t tlen; uint16_t flen; uint16_t retval = 0; switch (version) { case APO_S55: case APO_S65: return 5+79; case APO_SL75: nlen = letohs(PTR16(ptr)[0]); retval += 2+(nlen+1)+((nlen+1)%2); tlen = letohs(PTR16(PTR8(ptr)+retval)[0]); retval += 2+(tlen+1)+((tlen+1)%2); flen = letohs(PTR16(PTR8(ptr)+retval)[0]); retval += 2+flen+12; return retval; default: return 0xFFFF; } } static uint16_t apo_text_size (void* ptr) { ptr=ptr; return 2+letohs(PTR16(ptr)[0]); } static uint16_t apo_date_size (void* ptr) { ptr=ptr; switch (version) { case APO_S55: return 10; default: return 16; } } static uint16_t apo_4byte_size (void* ptr) { ptr=ptr; return 4; } static uint16_t apo_2byte_size (void* ptr) { ptr=ptr; return 2; } ucs4char_t* apo_text_decode (void* ptr) { return convert_to_internal("UCS-2LE",(char*)(ptr)+4,letohs(PTR16(ptr)[1])*2); } struct gsm_number* apo_number_decode (void* ptr) { struct gsm_number* s = mem_alloc(sizeof(*s),0); size_t len = 0; gsm_number_init(s); switch (version) { case APO_S55: case APO_S65: gsm_number_set_semioctets(s,PTR8(ptr)[1],PTR8(ptr)+5,PTR8(ptr)[2]); break; case APO_SL75: len = letohs(PTR16(ptr)[0]); gsm_number_set(s,(char*)PTR8(ptr)+2,len); break; } return s; } static ucs4char_t* apo_number_descr_decode (void* ptr) { uint8_t tlen = 0; uint8_t* temp = ptr; gsmchar_t* s = NULL; ucs4char_t* retval = NULL; switch (version) { case APO_S55: case APO_S65: tlen = PTR8(ptr)[4]; temp += 5 + 21; break; case APO_SL75: temp += 2+((letohs(PTR16(ptr)[0])+2)/2)*2; tlen = letohs(PTR16(temp)[0]); temp += 2; break; default: return NULL; } s = (gsmchar_t*)strn_dup((char*)temp,tlen); retval = convert_from_gsm(s); mem_realloc(s,0); return retval; } static time_t apo_date_decode (void* ptr) { struct tm temp = { .tm_wday = 0, .tm_yday = 0, .tm_isdst = -1 }; switch (version) { case APO_S55: temp.tm_year = (letohs(PTR16(ptr)[0])-1900); temp.tm_mon = (PTR8(ptr)[2]-1); temp.tm_mday = PTR8(ptr)[3]; temp.tm_hour = PTR8(ptr)[4]; temp.tm_min = PTR8(ptr)[5]; temp.tm_sec = PTR8(ptr)[6]; #ifdef DEBUG if (PTR8(ptr)[7] || PTR8(ptr)[8] || PTR8(ptr)[9]) fprintf(DEBUG," (extra bytes not all 0x00) "); #endif break; case APO_S65: case APO_SL75: temp.tm_year = (letohs(PTR16(ptr)[0])-1900); temp.tm_mon = (PTR8(ptr)[4]-1); temp.tm_mday = PTR8(ptr)[5]; temp.tm_hour = PTR8(ptr)[8]; temp.tm_min = PTR8(ptr)[9]; temp.tm_sec = PTR8(ptr)[10]; #ifdef DEBUG if (PTR8(ptr)[2] || PTR8(ptr)[3] || PTR8(ptr)[6] || PTR8(ptr)[7] || PTR8(ptr)[11] || PTR8(ptr)[12] || PTR8(ptr)[13] || PTR8(ptr)[14] || PTR8(ptr)[15]) fprintf(DEBUG," (extra bytes not all 0x00) "); #endif break; default: return (time_t)0; } tzset(); return mktime(&temp); } static void apo_printText_text (void* ptr, FILE* stream) { ucs4char_t* s1 = apo_text_decode(ptr); char* s2 = convert_to_system(s1,REPMODE_QUESTIONMARK); mem_realloc(s1,0); if (s2) fprintf(stream,"%s",s2); mem_realloc(s2,0); } static void apo_printText_number (void* ptr, FILE* stream) { struct gsm_number* s; ucs4char_t* descr; char* temp; s = apo_number_decode(ptr); temp = gsm_number_get(s); if (temp) fprintf(stream,"number=\"%s\"",temp); mem_realloc(temp,0); mem_realloc(s,0); descr = apo_number_descr_decode(ptr); if (descr) { temp = convert_to_system(descr,REPMODE_QUESTIONMARK); mem_realloc(descr,0); fprintf(stream,", text=\"%s\"",temp); mem_realloc(temp,0); } switch (version) { case APO_S55: case APO_S65: fprintf(stream," (extra: 0=0x%02x, 3=0x%02x)",PTR8(ptr)[0],PTR8(ptr)[3]); break; default: break; } } struct apo_value_map { uint16_t value; char* descr; }; #define APO_VALUE_MAP_LAST { 0xFFFF, NULL } static void apo_printText_2byte (void* ptr, FILE* stream, struct apo_value_map* map) { uint16_t value = letohs(PTR16(ptr)[0]); unsigned int i = 0; fprintf(stream,"%u",value); while (map[i].value != value && map[i].value != 0xFFFF) ++i; if (map[i].value == value && map[i].descr != NULL) fprintf(stream," (%s)",map[i].descr); } static void apo_printText_group (void* ptr, FILE* stream) { struct apo_value_map groups[] = { { 0x01 , "VIP" }, { 0x02 , "office" }, { 0x03 , "family" }, { 0x04 , "individual" }, { 0x05 , "leisure" }, { 0x06 , "private" }, { 0x07 , "business" }, { 0x08 , "received" }, { 0x09 , "no group" }, APO_VALUE_MAP_LAST }; apo_printText_2byte(ptr,stream,groups); } static void apo_printText_apptype (void* ptr, FILE* stream) { struct apo_value_map types[] = { { 0x01 , "memo" }, { 0x02 , "speech memo" }, { 0x04 , "meeting" }, { 0x08 , "holiday" }, { 0x10 , "birthday" }, { 0x20 , "call" }, APO_VALUE_MAP_LAST }; apo_printText_2byte(ptr,stream,types); } static void apo_printText_priority (void* ptr, FILE* stream) { struct apo_value_map prios[] = { { 0x01 , "highest" }, { 0x02 , "high" }, { 0x03 , "normal" }, { 0x04 , "low" }, { 0x05 , "lowest" }, APO_VALUE_MAP_LAST }; apo_printText_2byte(ptr,stream,prios); } static void apo_printText_status (void* ptr, FILE* stream) { struct apo_value_map status[] = { { 0x00 , "outstanding" }, { 0x02 , "done" }, APO_VALUE_MAP_LAST }; apo_printText_2byte(ptr,stream,status); } static void apo_printText_alarm (void* ptr, FILE* stream) { struct apo_value_map alarms[] = { { 0x00 , "disabled" }, { 0x10 , "enabled" }, APO_VALUE_MAP_LAST }; apo_printText_2byte(ptr,stream,alarms); } static void apo_printText_date (void* ptr, FILE* stream) { time_t t1 = apo_date_decode(ptr); struct tm* t2 = localtime(&t1); char s[200]; char* format; if (t2->tm_hour || t2->tm_min || t2->tm_sec) format = "%c"; else format = "%x"; strftime(s,sizeof(s),format,t2); fprintf(stream,"%s",s); } static void apo_printText_link (void* ptr, FILE* stream) { fprintf(stream,"0x%04x (extra: 0x%02x 0x%02x)", letohs(PTR16(ptr)[0]), PTR8(ptr)[2],PTR8(ptr)[3]); } static void apo_debug_2byte (void* ptr, FILE* stream) { fprintf(stream,"0x%02x 0x%02x ",PTR8(ptr)[0],PTR8(ptr)[1]); } static void apo_debug_4byte (void* ptr, FILE* stream) { apo_debug_2byte(ptr,stream); apo_debug_2byte(PTR8(ptr)+2,stream); } /* the order MUST match the one in the enum! */ static struct apo_entry_func apo_entry_funcs[] = { { APO_STRING, apo_text_size, apo_printText_text }, { APO_TELNUM, apo_number_size, apo_printText_number }, { APO_DATE, apo_date_size, apo_printText_date }, { APO_LINK, apo_4byte_size, apo_printText_link }, { APO_GROUP, apo_2byte_size, apo_printText_group }, { APO_APPTYPE, apo_2byte_size, apo_printText_apptype }, { APO_PRIO, apo_2byte_size, apo_printText_priority }, { APO_STATUS, apo_2byte_size, apo_printText_status }, { APO_ALARM, apo_2byte_size, apo_printText_alarm }, { APO_2BYTE, apo_2byte_size, apo_debug_2byte }, { APO_4BYTE, apo_4byte_size, apo_debug_4byte }, }; static long apo_seek (uint16_t type) { unsigned int i = 0; long retval = -1; for (; apo_header[i].type != 0xffff; ++i) if (apo_header[i].type == type) break; if (apo_header[i].type == type) retval = (long)i; if (type == 0x6f && version == APO_S65 && apo_header[retval+1].type == type) ++retval; return retval; } struct apo_entry_func* apo_get_entry_funcs (uint16_t htype) { long i = apo_seek(htype); if (i < 0) return NULL; else return &apo_entry_funcs[apo_header[i].format]; } char* apo_get_description (uint16_t htype) { long i = apo_seek(htype); if (i < 0) return NULL; return apo_header[i].descr; } uint8_t apo_get_type (void* ptr) { uint16_t type = letohs(PTR16(ptr)[0]); long i = apo_seek(type); return apo_header[i].apotype; } /* return aligned pointer data after header type */ void* apo_header_align (void* ptr, void* base) { if (version == APO_S55) return (void*)(PTR8(ptr)+2); else return (void*)(PTR8(ptr)+(4-((PTR8(ptr)-PTR8(base))%4))); } void* apo_get_next_header (void* ptr, void* base) { uint16_t type = letohs(PTR16(ptr)[0]); long i = apo_seek(type); if (i < 0) return NULL; ptr = apo_header_align(ptr,base); ptr = (void*)(PTR8(ptr)+apo_entry_funcs[apo_header[i].format].getSize(ptr)); return ptr; } scmxx-0.9.0/src/apoconv/apo_main.c0000644000175000017500000000562510377325443016717 0ustar hendrikhendrik#include "apoconv.h" #include #include #include #ifndef DIR_SEPERATOR #define DIR_SEPERATOR '/' #endif void apo_main_info_init (struct apo_main_info* this) { this->version = 0; /* 0 is an invalid version */ this->files = NULL; } void apo_main_decode_v2 (struct mmapped_file* apo, const char* prefix, struct apo_main_info* info) { char* buffer = NULL; int hsize = 0; uint16_t max = 0; uint8_t* ptr = PTR8(apo->ptr); uint8_t bitpos = 0; uint16_t bytepos = 0; uint8_t level1 = 0; uint8_t level2 = 0; uint8_t entry = 0; if (PTR8(apo->ptr)[1] != 0x33) errexit("Unexpected version id %#02x\n",PTR8(apo->ptr)[1]); hsize = 6; /* SL75 */ max = PTR16(ptr+4)[0]; ptr += hsize; info->version = 3; info->files = NULL; if (max == 0) return; buffer = mem_alloc(strlen(prefix)+4+6+3+1,1); while (bytepos*8+bitpos < max && level1*level2*entry <= 0xFFFF) { if (ptr[bytepos]&(1<<(7-bitpos))) { sprintf(buffer,"%s%s%c%02u%c%02u%c%02u", prefix,"data",DIR_SEPERATOR, level1,DIR_SEPERATOR, level2,DIR_SEPERATOR, entry); info->files = str_list_append(info->files,str_list_create(str_dup(buffer))); } if (++bitpos > 7) { bitpos = 0; ++bytepos; } if (++entry > 40) { entry = 0; ++level2; } if (level2 > 40) { level2 = 0; ++level1; } } mem_realloc(buffer,0); info->files = str_list_rewind(info->files); } void apo_main_decode_v1 (struct mmapped_file* apo, const char* prefix, struct apo_main_info* info) { char* buffer = NULL; int i = 0; int k = 0;; uint32_t* ptr; int hsize = 0; switch (PTR8(apo->ptr)[1]) { case 0x31: hsize = 2; /* S55 */ info->version = 1; break; case 0x32: hsize = 4; /* S65 */ info->version = 2; break; default: errexit("Unexpected version id %#02x\n",PTR8(apo->ptr)[1]); } ptr = (uint32_t*)(PTR8(apo->ptr) + hsize); buffer = mem_alloc(strlen(prefix)+2+1+2+1,1); for (; i < (apo->size-hsize)/4; ++i) for (k = 0; k < 32; ++k) if ((letohl(ptr[i])>>k)&1) { sprintf(buffer,"%s%02X%c%02X",prefix,i,DIR_SEPERATOR,k); info->files = str_list_append(info->files,str_list_create(str_dup(buffer))); } mem_realloc(buffer,0); info->files = str_list_rewind(info->files); } void apo_main_decode (char* file, struct apo_main_info* info) { struct mmapped_file apo; char* prefix; if (mem_map(file,&apo) < 0) { fprintf(stderr,"Failed to open %s\n",file); exit(EXIT_FAILURE); } prefix = strrchr(file,DIR_SEPERATOR); if (prefix == NULL) prefix = str_dup(""); else prefix = strn_dup(file,prefix-file+1); switch (PTR8(apo.ptr)[0]) { case 0x61: apo_main_decode_v1(&apo,prefix,info); break; case 0x62: apo_main_decode_v2(&apo,prefix,info); break; default: errexit("Unknown format id %#02x\n",PTR8(apo.ptr)[1]); } mem_realloc(prefix,0); } scmxx-0.9.0/src/apoconv/apoconv.c0000644000175000017500000000455510377435707016607 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "apoconv.h" #include #include #include #include #include #define PROGRAM_NAME "apoconv" #define PROGRAM_VERSION "0.0.2" #include #define SYNTAX "Usage: apoconv {-m
[-s] | -V }" int main (int argc, char** argv) { struct apo_main_info info; str_list_t* temp; int show_only = 0; int i = 1; if (argc <= 1) { print_proginfo(PROGRAM_NAME,PROGRAM_VERSION); print_disclaimer(); fprintf(stderr,"%s\n",SYNTAX); exit(EXIT_FAILURE); } //setting locale of this program setlocale(LC_ALL,""); while (argv[i] && argv[i][0] == '-') { switch (argv[i++][1]) { case 'm': if (argc-i) { apo_main_info_init(&info); apo_main_decode(argv[i],&info); ++i; continue; } break; case 's': show_only = 1; continue; case 'V': if (argc-i) { info.version = atoi(argv[i]); for (++i; i < argc && argv[i][0] != '-'; ++i) info.files = str_list_append(info.files,str_list_create(argv[i])); continue; } break; default: break; } print_proginfo(PROGRAM_NAME,PROGRAM_VERSION); print_disclaimer(); fprintf(stderr,"%s\n",SYNTAX); exit(EXIT_FAILURE); } if (!info.version) exit(EXIT_FAILURE); if (show_only) { fprintf(stderr,"The following files are probably version %d:\n",info.version); while (info.files != NULL) { temp = info.files; info.files = info.files->next; printf("%s\n",temp->data); str_list_destroy(temp); } } else { apo_data_decode(&info); } exit(EXIT_SUCCESS); } scmxx-0.9.0/src/apoconv/apo_data.c0000644000175000017500000000373610377325443016705 0ustar hendrikhendrik#include "apoconv.h" #include "apoheader.h" #include #include #include #include uint8_t apo_data_header_print (uint8_t* ptr, char* file, size_t size) { unsigned int i = 0; uint8_t count = ptr[size-1]; /* print the header */ fprintf(stdout,"File: %s\n",file); fprintf(stdout,"Full header: "); for (; i < size; ++i) fprintf(stdout,"0x%02x ",ptr[i]); fprintf(stdout,"\n"); fprintf(stdout,"Serial: 0x%04x\n",letohs(PTR16(ptr)[0])); fprintf(stdout,"Count: %u\n",count); return count; } void apo_data_decode_file (char* file, size_t headersize) { struct mmapped_file apo; unsigned int i = 0; void* ptr; uint16_t descr; uint8_t count = 0; struct apo_entry_func* funcs; if (mem_map(file,&apo) < 0) { fprintf(stderr,"Failed to open %s\n",file); exit(EXIT_FAILURE); } count = apo_data_header_print(PTR8(apo.ptr),file,headersize); i = 0; for (ptr = PTR8(apo.ptr)+headersize; PTR8(ptr) < PTR8(apo.ptr)+apo.size; ptr = apo_get_next_header(ptr,apo.ptr)) { descr = letohs(PTR16(ptr)[0]); fprintf(stdout,"Field: 0x%02x at 0x%04lx",descr,(long)ptr-(long)apo.ptr); fprintf(stdout," (%s)",apo_get_description(descr)); funcs = apo_get_entry_funcs (descr); if (funcs && funcs->printText) { fprintf(stdout,": "); funcs->printText(apo_header_align(ptr,apo.ptr),stdout); } fprintf(stdout,"\n"); ++i; } fprintf(stdout,"\n"); if (i != count) { fprintf(stdout,"Count check failed: %u != %u\n",i,count); exit(EXIT_FAILURE+1); } } void apo_data_decode (struct apo_main_info* info) { size_t hsize = 0; switch (info->version) { case 1: hsize = 6; apo_header_init(APO_S55); break; case 2: hsize = 6; apo_header_init(APO_S65); break; case 3: hsize = 10; apo_header_init(APO_SL75); break; default: return; } for (; info->files != NULL; info->files = info->files->next) apo_data_decode_file(info->files->data,hsize); } scmxx-0.9.0/src/apoconv/apoheader.h0000644000175000017500000000467010377446354017075 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include enum apo_version { APO_S55, APO_S65, APO_SL75 }; void apo_header_init(enum apo_version ver); enum apo_entry_type { APO_STRING = 0, APO_TELNUM, APO_DATE, APO_LINK, APO_GROUP, APO_APPTYPE, APO_PRIO, APO_STATUS, APO_ALARM, /* these are strictly for unknown values */ APO_2BYTE, APO_4BYTE }; struct apo_entry_func { enum apo_entry_type type; /* @param hptr pointer to first valid byte after header type */ uint16_t (*getSize) (void* hptr); /**< size of field */ void (*printText) (void* hptr, FILE* stream); /**< print as text */ }; void* apo_header_align (void* ptr, void* base); /** Get usable functions for a specific header type * @param htype the header type * @return pointer to a const struct */ struct apo_entry_func* apo_get_entry_funcs (uint16_t htype); #define APO_ADDR 0x01 /* addresses */ #define APO_APP 0x02 /* appointments */ #define APO_CALREC 0x04 /* call records */ #define APO_NOTE 0x08 /* notes */ #define APO_REM 0x10 /* reminders */ #define APO_TASK 0x20 /* tasks */ #define APO_PRES 0x40 /* presence */ /** Get the file type that the nex header belongs to * @param ptr pointer to the header to check * @return bitmask of allowed file types */ uint8_t apo_get_type (void* ptr); /** Get the textual description of the header type * @param fval the header type value * @return an acutally constant string */ char* apo_get_description (uint16_t htype); /** Get the next header in the file * @param ptr pointer to current header * @param base pointer to start of file * @return pointer to next header or NULL if there is none */ void* apo_get_next_header (void* ptr, void* base); scmxx-0.9.0/src/apoconv/apoconv.h0000644000175000017500000000037510375735027016604 0ustar hendrikhendrik#include struct apo_main_info { int version; str_list_t* files; }; void apo_main_info_init (struct apo_main_info* this); void apo_main_decode (char* file, struct apo_main_info* info); void apo_data_decode (struct apo_main_info* info); scmxx-0.9.0/src/apoconv/Makefile0000644000175000017500000000004710343321545016411 0ustar hendrikhendrikSUBDIR=apoconv include ../Makefile.sub scmxx-0.9.0/src/versit.h0000644000175000017500000000742210350060527014773 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef VERSIT_H #define VERSIT_H #include #include #include extern char* encoding_string[4]; enum encoding_value { ENC_SEVENBIT = 0, ENC_EIGHTBIT, ENC_QUOTEDPRINTABLE, ENC_BASE64 }; unsigned char* encode_chars (enum encoding_value enc, unsigned char* input); int is_eightbit (uint8_t* s); enum vcard_version { VCARD_VERSION_21 = 2, /* version 2.1 */ VCARD_VERSION_30 = 3 /* version 3.0 */ }; #define VERSIT_LINE_END "\r\n" /** create a new handle * This creates a new handle. You have to make sure yourself * that the FILE* is not used twice. * You must use versit_out_close() to close the handle! * * @param fp where to write the data * @param cset the default character set * @param enc the default encoding * @param version the vCard version * * @return a handle */ void* versit_out_open (FILE* fp, char* cset, enum encoding_value enc, enum vcard_version version); /** finish a handle * This writes the END property if needed and cleans * up the handle. * It does _not_ close the underlying FILE handle. * * @param h the handle to act on */ void versit_out_close (void* h); #define VERSIT_NUMBER_HOME 0x0001 #define VERSIT_NUMBER_WORK 0x0002 #define VERSIT_NUMBER_CELL 0x0004 #define VERSIT_NUMBER_FAX 0x0008 /** print a versit number field * * @param h the handle to act on * @param num the number * @param type the type bitfield (VERSIT_NUMBER_*) */ void versit_out_number(void* h, struct gsm_number* num, uint32_t type); /** print a name field * * @param h the handle to act on * @param first first name / given name * @param last last name / family name */ void versit_out_name (void* h, ucs4char_t* first, ucs4char_t* last); /** print an address field * * @param h the handle to act on * @param street the street name (including house number) * @param city the city name * @param country the country (not region) * @param postal the postal code */ void versit_out_address (void* h, ucs4char_t* street, ucs4char_t* city, ucs4char_t* country,ucs4char_t* postal); /** print an organisation field * * @param h the handle to act on * @param org the organisation name */ void versit_out_org (void* h, ucs4char_t* org); /** print an e-mail field * * @param h the handle to act on * @param email the electronic mail address */ void versit_out_email (void* h, ucs4char_t* email); /** print an URL field * * @param h the handle to act on * @param url the uniform resouce location string */ void versit_out_url (void* h, ucs4char_t* url); /** print a revision field * * @param h the handle to act on * @param rev the revision string */ void versit_out_revision (void* h, ucs4char_t* rev); /** print a birthday field * * @param h the handle to act on * @param year the birthday year (4 digits) * @param month the birthday month (2 digits: 1-12) * @param day the day (2 digits: 1-31) */ void versit_out_birthday (void* h, uint16_t year, uint16_t month, uint16_t day); #endif scmxx-0.9.0/src/Makefile.sub.in0000644000175000017500000000174610342342553016151 0ustar hendrikhendrik# #if this file gets include, SUBDIR must be defined # SHELL=@SHELL@ CC=@CC@ LD=@LD@ CFLAGS=@CFLAGS@ -I.. OBJEXT=@OBJEXT@ ifeq '$(SOURCES)' '' SOURCES=$(wildcard *.c) endif HEADERS=$(wildcard *.h) OBJECTS=$(patsubst %.c, %.$(OBJEXT), $(SOURCES)) .PHONY: all all: ../$(SUBDIR).$(OBJEXT) ../$(SUBDIR).$(OBJEXT): $(OBJECTS) $(LD) -r -o $@ $(OBJECTS) #GNU make will automatically call the rule for the include #It will print a non-fatal error message, though but do not #worry about it. #If your make cannot do this and you cannot use GNU make, #change this from 'include' to 'sinclude' and run # make depend #before compiling. ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),distclean) include .dependencies endif endif .PHONY: depend depend: $(CC) $(CFLAGS) -MM $(SOURCES) >.dependencies .dependencies: $(SOURCES) $(HEADERS) $(CC) $(CFLAGS) -MM $(SOURCES) >$@ .PHONY: clean clean: -rm -f *.$(OBJEXT) ../$(SUBDIR).$(OBJEXT) .PHONY: dist-clean distclean: clean -rm -f .dependencies scmxx-0.9.0/src/helper.h0000644000175000017500000002035310375735027014747 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef HELPERS_H #define HELPERS_H #include "intincl.h" #include "charsets.h" #include "gtincl.h" #include #if defined(WINDOWS_API) #include #else #include #endif void helper_init (); #define VERBOSE_LEVEL_ERROR 0 #define VERBOSE_LEVEL_WARNING 1 #define VERBOSE_LEVEL_NOTICE 2 #define VERBOSE_LEVEL_DEBUG 3 int verbosity_get (); void verbosity_set (int level); #define print_verbose(level,m, ...) { if (verbosity_get() >= level) { fprintf(stderr,m,__VA_ARGS__); fflush(stderr); } } #define print_message(level,key, m, ...) { print_verbose(level,"%s: ",key); print_verbose(level,m,__VA_ARGS__); } #define print_error(m, ...) print_message(VERBOSE_LEVEL_ERROR,_("\nError"),m,__VA_ARGS__) #define print_warning(m, ...) print_message(VERBOSE_LEVEL_WARNING,_("Warning"),m,__VA_ARGS__) #define print_notice(m, ...) print_message(VERBOSE_LEVEL_NOTICE,_("Notice"),m,__VA_ARGS__) #define print_debug(m, ...) print_message(VERBOSE_LEVEL_DEBUG,_("Debug"),m,__VA_ARGS__) #define errexit(m, ...) { print_error(m,__VA_ARGS__); exit(EXIT_FAILURE); } /* check if a file can be read */ int file_accessible_ro (char* file); /* open an input file (read-only) */ int file_open_input (char* file); /* open an output file (read-write) */ int file_open_output (char* file); /* read a binary file */ unsigned int file_read_binary (char* file, char** buffer); /* close a file handle */ void file_close (int filedes); /* returns the console width in columns for fd */ long console_width(int fd); /* print a status bar to console */ void console_print_status (int fd, const char* text, size_t textlen, const unsigned long* current, const unsigned long* total, unsigned int fcount); /* returns the number of digits in num */ unsigned int numlen (long num); /* returns the GSM type of address (TOA) value */ uint8_t numtype (const char* number); /* returns 1 if every character in s is a digit else 0*/ int is_number(const char* s); /* returns 1 if s is a telephone number else 0 */ int is_telephone_number (const char* s); /* converts a hexadezimal string with a given length to an int */ unsigned int hexstr2int(char *hexstring, unsigned int length); /* (re)allocate memory */ void* mem_alloc (size_t size, short zero_it); void* mem_realloc (void* oldpointer, size_t size); /* duplicate a c string */ char* str_dup (const char* input); char* strn_dup (const char* input, size_t insize); /* strlen() does not seem to check for strlen(NULL) and crashes */ size_t str_len(const char *s); /** calculate the printed string width * This works for UTF-8 and charsets with fixed-size elements * @param s the string * @param len bytecount of s or less * @return amount of printed characters */ size_t str_width (const char* s); size_t strn_width (const char* s, size_t len); /** check if a string is valid * This works for UTF-8 and charsets with fixed-size elements * @param s string in ISO-8859-? or UTF-8 * @param len bytecount of s or less */ int strn_valid (const char* s, size_t len); int str_valid (const char* s); /* * * String array functions * * */ #define str_array_t char* /** split a string * @param str string to split up (it gets modified!) * @param split at what points in str to split * @param count maximum number of splits, 0 means unlimited * * @return return the dynamically allocated array ([0] = str) */ str_array_t* str_split (char* str, char* split, unsigned long count); /** remove duplicates from a string array (keeps order) * @param array a NULL terminated list of strings */ void str_array_uniq (str_array_t* array); /** append a array to another array * @param array1 malloc'ed pointer to an array * @param size1 current number of elements in array1 * @param array2 array to append to array1 * @param size2 number of elements in array2 * @return realloc'ed (from array1), NULL-terminated list pointer */ str_array_t* str_array_append (str_array_t* array1, size_t size1, str_array_t* array2, size_t size2); /** sort the list (alphabetical order) * Be warned that if you use an array created be str_split, * the memory pointer may not be at element 0 anymore! * @param list a NULL terminated list of strings */ void str_array_sort (str_array_t* array); /* * * String list functions * * */ typedef struct str_list { char* data; struct str_list* prev; struct str_list* next; } str_list_t; /* Initialize a string list element so it can * be use as list head. */ void str_list_init (str_list_t* this); /* Create a new string list element from string: * The string gets copied. The element is already * initialized. */ str_list_t* str_list_create (char* data); /* Destroy a string list element * You should remove it from its list first. */ void str_list_destroy (str_list_t* this); /* insert tail directly after entry */ void str_list_insert (str_list_t* entry, str_list_t* tail); /* append tail after last element of list * If this is repeated many times, it is suggested to use the * return value as list in the next invocation and * run str_list_rewind() later. */ str_list_t* str_list_append (str_list_t* list, str_list_t* tail); /* remove an element from its current list */ str_list_t* str_list_remove (str_list_t* element); /* return pointer to first element of list */ str_list_t* str_list_rewind (str_list_t* list); #include #define PTR8(ptr) ((uint8_t*)(ptr)) #define PTR16(ptr) ((uint16_t*)(ptr)) struct mmapped_file { void* ptr; off_t size; }; /* These are wrapper functons to similar named ones * but they check for return code and may exit on failure. * They also check to NULL on there parameters. */ /* wrapper to mmap: map a file to memory * Does not exit on failure but returns -1 instead */ int mem_map(char* file, struct mmapped_file* fs); void mem_unmap (struct mmapped_file* fs); /* little endianess to host endianess */ uint16_t letohs (uint16_t i); uint32_t letohl (uint32_t i); /* host endianess to little endianess */ uint16_t htoles (uint16_t i); uint32_t htolel (uint32_t i); /* big endianess to host endianess */ #define betohs(i) ntohs(i) #define betohl(i) ntohl(i) /* host endianess to big endianess */ #define htobes(i) htons(i) #define htobel(i) htonl(i) /* GSM number */ #define GSM_NUMBER_TEXT_LEN 11 #define GSM_NUMBER_DIGITS_LEN 20 #define GSM_NUMBER_TYPE_UNKNOWN 0 #define GSM_NUMBER_TYPE_INTERNAT 1 #define GSM_NUMBER_TYPE_NAT 2 #define GSM_NUMBER_TYPE_TEXT 5 #define GSM_NUMBER_PLAN_UNKNOWN 0 #define GSM_NUMBER_PLAN_ISDN 1 struct gsm_number { struct { /* see ETSI 23.040, Ch. 9.1.2.5 */ /* MSB is always 1! */ unsigned int type :3; // type of number, see GSM_NUMBER_TYPE_* unsigned int plan :4; // nummbering plan identification, see GSM_NUMBER_PLAN_* } toa; /* type of address */ char digits[GSM_NUMBER_DIGITS_LEN+1]; /* if toa.type != GSM_NUMBER_TYPE_TEXT */ ucs4char_t* text; }; void gsm_number_init (struct gsm_number* s); void gsm_number_delete (struct gsm_number* s); int gsm_number_compare (const struct gsm_number* s1, const struct gsm_number* s2); void gsm_number_set_semioctets (struct gsm_number* this, uint8_t toa, uint8_t* semioctets, size_t len); size_t gsm_number_get_semioctets (struct gsm_number* this, uint8_t* out); void gsm_number_set (struct gsm_number* this, const char* number, size_t len); char* gsm_number_get (const struct gsm_number* this); void gsm_number_set_toa (struct gsm_number* this, uint8_t toa); uint8_t gsm_number_get_toa (const struct gsm_number* this); #endif scmxx-0.9.0/src/smspdu/0002755000175000017500000000000010401301577014616 5ustar hendrikhendrikscmxx-0.9.0/src/smspdu/smspdu_print.c0000644000175000017500000003275610362713036017527 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif #ifndef _REENTRANT # define _REENTRANT #endif #include #include "smscoding.h" #include "smsudh.h" #include #include #include #include #include #include #include static void sms_pdu_print_item_slot (FILE* fp, struct sms* sms) { struct sms_pdu* pdu; unsigned int i = 0; unsigned int p = 1; pdu = sms->decoded->pdu; if (pdu->parts > 1) p = pdu->parts; for (; i < p; ++i) { if (sms->encoded[i] != NULL && sms->encoded[i]->slot >= 1) { fprintf(fp,"%s: %d\n",_("Slot"), sms->encoded[i]->slot); } } } static void sms_pdu_print_item_address (FILE* fp, struct sms* sms) { struct sms_pdu* pdu; char* temp; pdu = sms->decoded->pdu; if (str_len(pdu->address.digits) > 0 || ucs4len(pdu->address.text) > 0) { switch(pdu->options.type) { default: case SMS_TYPE_SUBMIT: temp = _("To"); break; case SMS_TYPE_DELIVER: temp = _("From"); break; case SMS_TYPE_STATUS_REPORT: temp = _("Original To"); break; } fprintf(fp,"%s:",temp); if (str_len(temp) > 0) { temp = gsm_number_get(&pdu->address); if (temp != NULL) fprintf(fp," %s",temp); mem_realloc(temp,0); } if (ucs4len(pdu->address.text)) { temp = convert_to_system(pdu->address.text,REPMODE_QUESTIONMARK); fprintf(fp," (%s)",temp); mem_realloc(temp,0); } fprintf(fp,"\n"); } } static void sms_pdu_print_item_time (FILE* fp, enum sms_pdu_type type, struct sms_pdu_time* t) { unsigned short weeks; unsigned short days; unsigned short hours; unsigned short minutes; unsigned short seconds; struct tm sct_tm; struct tm* sct_status; char* field; char temp[81]; switch (t->format) { case SMS_PDU_TIME_NONE: break; case SMS_PDU_TIME_RELATIVE: /* fprintf(fp,"Valid for: %ld seconds\n",t->value); */ weeks = t->value / (7*24*3600); days = (t->value / (24*3600))%7; hours = (t->value / 3600)%24; minutes = (t->value / 60)%60; seconds = t->value%60; fprintf(fp,"%s:",_("Valid for")); if (weeks) fprintf(fp," %d %s", weeks, ngettext("week","weeks",weeks)); if (days) fprintf(fp," %d %s", days, ngettext("day","days",days)); if (hours) fprintf(fp," %d %s", hours, ngettext("hour","hours",hours)); if (minutes) fprintf(fp," %d %s", minutes, ngettext("minute","minutes",minutes)); if (seconds) fprintf(fp," %d %s", seconds, ngettext("second","seconds",seconds)); fprintf(fp,"\n"); break; case SMS_PDU_TIME_ABSOLUTE: field = NULL; sct_status = localtime(&t->value); if (sct_status != NULL) { memcpy(&sct_tm,sct_status,sizeof(struct tm)); if (strftime(temp,sizeof(temp)-1,"%c",&sct_tm) > 0) { switch(type) { case SMS_TYPE_SUBMIT: field = _("Valid until"); break; case SMS_TYPE_DELIVER: field = _("Date"); break; case SMS_TYPE_STATUS_REPORT: field = _("Message status time"); break; default: break; } fprintf(fp,"%s: %s\n",field,temp); } } break; } } static void sms_pdu_print_item_smsc (FILE* fp, struct sms* sms) { char* temp = gsm_number_get(&(sms->decoded->sca)); if (str_len(temp) > 0) fprintf(fp,"%s: %s\n",_("SMSC number"),temp); mem_realloc(temp,0); } char* sms_pdu_type_string (enum sms_pdu_type t) { switch (t) { case SMS_TYPE_DELIVER: return "SMS-DELIVER"; case SMS_TYPE_SUBMIT: return "SMS-SUBMIT"; case SMS_TYPE_STATUS_REPORT: return "SMS-STATUS-REPORT"; case SMS_TYPE_SUBMIT_REPORT: return "SMS-SUBMIT-REPORT"; case SMS_TYPE_DELIVER_REPORT: return "SMS-DELIVER-REPORT"; case SMS_TYPE_COMMAND: return "SMS-COMMAND"; } return ""; } static void sms_pdu_print_item_options (FILE* fp, struct sms* sms) { struct sms_pdu* pdu; pdu = sms->decoded->pdu; fprintf(fp,"%s: %s\n",_("PDU type"),sms_pdu_type_string(pdu->options.type)); /* since this is a union and deliver is the biggest... */ if (pdu->options.type != SMS_TYPE_SUBMIT_REPORT && pdu->options.type != SMS_TYPE_DELIVER_REPORT && (pdu->options.u.deliver.sr || pdu->options.u.deliver.mms || pdu->options.u.deliver.rp)) { fprintf(fp,"%s:",_("PDU flags")); if (pdu->options.u.deliver.sr) fprintf(fp," %s",_("StatusRequest")); if (pdu->options.type == SMS_TYPE_SUBMIT) { if (pdu->options.u.submit.rd) fprintf(fp," %s",_("RejectDuplicate")); } else if (pdu->options.type == SMS_TYPE_DELIVER || pdu->options.type == SMS_TYPE_STATUS_REPORT) { if (pdu->options.u.deliver.mms) fprintf(fp," %s",_("MoreMessagesToSend")); } if (pdu->options.type == SMS_TYPE_DELIVER || pdu->options.type == SMS_TYPE_SUBMIT) if (pdu->options.u.deliver.rp) fprintf(fp," %s",_("ReplyPath")); fprintf(fp,"\n"); } } static void sms_pdu_print_item_pid (FILE* fp, struct sms* sms) { struct sms_pdu* pdu; pdu = sms->decoded->pdu; if (pdu->pid > 0 && (pdu->pid&0xC0) != 0x80) { fprintf(fp,"%s: 0x%02x (",_("Protocol ID"),pdu->pid); switch (pdu->pid&0xC0) { case 0xC0: fprintf(fp,"%s",_("service-center-specific use")); break; case 0x40: if (0 < (pdu->pid&0x3F) && (pdu->pid&0x3F) <= 9) { fprintf(fp,_("replace short message type %d"),pdu->pid&0x3F); } switch (pdu->pid&0x3F) { case 0x00: fprintf(fp,"%s",_("short message type 0")); break; case 0x1e: fprintf(fp,"%s",_("obsolete EMS mark")); break; case 0x1f: fprintf(fp,"%s",_("return call message")); break; case 0x3c: fprintf(fp,"%s","ANSI-136 R-DATA"); break; case 0x3d: fprintf(fp,"%s",_("ME data download")); break; case 0x3e: fprintf(fp,"%s",_("ME de-personalization short message")); break; case 0x3f: fprintf(fp,"%s",_("(U)SIM data download")); break; default: break; } break; case 0x00: if ((pdu->pid&0x20) == 0) { fprintf(fp,"%s",_("SMS-to-SME protocol")); } else { fprintf(fp,"%s",_("telematic interworking")); } break; default: case 0x80: //reserved value, ignored with if-statement above break; } fprintf(fp,")\n"); } } static void sms_pdu_print_item_dcs (FILE* fp, struct sms* sms) { struct sms_pdu* pdu; char* temp = NULL; pdu = sms->decoded->pdu; if (pdu->scheme.type == SMS_DCS_TYPE_NORMAL) { fprintf(fp,"%s:",_("Settings")); if (pdu->scheme.value.normal.compressed) fprintf(fp," %s",_("compressed")); switch (pdu->scheme.encoding) { case SMS_CHARSET_GSM: fprintf(fp," %s","7bit-GSM"); break; case SMS_CHARSET_UCS2: fprintf(fp," %s","UCS-2"); break; case SMS_CHARSET_8BIT: fprintf(fp," %s","8bit"); break; } if (pdu->scheme.value.normal.class != SMS_CLASS_NONE) fprintf(fp,_(" (class %d)"),pdu->scheme.value.normal.class); if (pdu->scheme.value.normal.autodel) fprintf(fp," %s",_("marked as auto-delete")); } else if (pdu->scheme.type == SMS_DCS_TYPE_IND) { fprintf(fp,"%s:",_("Settings")); switch (pdu->scheme.encoding) { case SMS_CHARSET_GSM: fprintf(fp," %s","7bit-GSM"); break; case SMS_CHARSET_UCS2: fprintf(fp," %s","UCS-2"); break; case SMS_CHARSET_8BIT: fprintf(fp," %s","8bit"); break; } fprintf(fp,"\n%s: ",_("Indication")); switch(pdu->scheme.value.ind.type) { case SMS_DCS_IND_VOICE: temp = _("voicemail"); break; case SMS_DCS_IND_FAX: temp = _("fax"); break; case SMS_DCS_IND_EMAIL: temp = _("e-mail"); break; case SMS_DCS_IND_OTHER: temp = _("misc."); break; } if (pdu->scheme.value.ind.sense) fprintf(fp,_("new %s message(s) waiting"),temp); else fprintf(fp,_("no more %s messages waiting"),temp); } fprintf(fp,"\n"); } static void sms_pdu_print_item_text (FILE* fp, struct sms* sms) { struct sms_pdu* pdu; uint16_t textlen = 0; char* temp; unsigned int i; pdu = sms->decoded->pdu; if (pdu->ud == NULL) return; for (i = 0; i < pdu->parts; ++i) { textlen += ucs4len(pdu->ud[i].text); } fprintf(fp,"%s: %d\n\n",_("Message length"),textlen); if (textlen == 0) return; for (i = 0; i < pdu->parts; ++i) { if (pdu->ud[i].text == NULL) { fprintf(fp,"[...]"); } else { temp = convert_to_system(pdu->ud[i].text,REPMODE_QUESTIONMARK); fprintf(fp,"%s",temp); mem_realloc(temp,0); } } fprintf(fp,"\n"); } static void sms_pdu_print_item_status (FILE* fp, struct sms_pdu_message_status* m) { char* temp; char* temp2; if (m == NULL) return; switch (m->status&0xd0) { case 0x00: case 0x40: temp2 = _("transaction completed"); break; case 0x20: case 0x60: default: temp2 = _("SC still trying to transfer short message"); break; } switch (m->status) { case 0x00: temp = _("received by SME"); break; case 0x01: temp = _("forwarded to SME but delivery cannot be confirmed"); break; case 0x02: temp = _("replaced"); break; case 0x20: case 0x60: temp = _("congestion"); break; case 0x21: case 0x61: temp = _("SME busy"); break; case 0x22: case 0x62: temp = _("no response from SME"); break; case 0x23: case 0x63: temp = _("service rejected"); break; case 0x24: case 0x44: case 0x64: temp = _("QoS not available"); break; case 0x25: case 0x65: temp = _("error in SME"); break; case 0x40: temp = _("remote procedure error"); break; case 0x41: temp = _("incompatible destination"); break; case 0x42: temp = _("connection rejected by SME"); break; case 0x43: temp = _("not obtainable"); break; case 0x45: temp = _("no interworking available"); break; case 0x46: temp = _("validity period expired"); break; case 0x47: temp = _("deleted by sender"); break; case 0x48: temp = _("deleted by service center"); break; case 0x49: temp = _("message does not exist"); break; default: temp = _("service rejected"); } fprintf(fp,"%s: %s\n",_("Message status"),temp2); fprintf(fp,"%s: %s\n",_("Message status reason"),temp); sms_pdu_print_item_time(fp,SMS_TYPE_STATUS_REPORT,&m->time); } static void sms_pdu_print_item_mr (FILE* fp, struct sms* sms) { struct sms_pdu* pdu; pdu = sms->decoded->pdu; switch (pdu->options.type) { case SMS_TYPE_SUBMIT: fprintf(fp,"%s: %d\n",_("Message reference"),pdu->extra.submit.mref); if (pdu->ud != NULL) sms_pdu_print_item_status(fp,pdu->ud[pdu->partnum].ack); break; case SMS_TYPE_STATUS_REPORT: fprintf(fp,"%s: %d\n",_("Message reference"),pdu->extra.statusreport.mref); sms_pdu_print_item_status(fp,pdu->extra.statusreport.status); break; default: break; } } static void sms_pdu_print_deliver (FILE* fp, struct sms* sms, unsigned long flags) { struct sms_pdu* pdu; if (fp == NULL || sms == NULL || sms->decoded == NULL || sms->decoded->pdu == NULL) { return; } pdu = sms->decoded->pdu; if (flags&SMS_PRINT_COMMON_HEADERS) { sms_pdu_print_item_slot(fp,sms); sms_pdu_print_item_address(fp,sms); sms_pdu_print_item_time(fp,pdu->options.type,&pdu->timedata); } if (flags&SMS_PRINT_EXTENDED_HEADERS) { sms_pdu_print_item_smsc(fp,sms); sms_pdu_print_item_mr(fp,sms); sms_pdu_print_item_options(fp,sms); sms_pdu_print_item_pid(fp,sms); sms_pdu_print_item_dcs(fp,sms); } if (flags&SMS_PRINT_USERDATA_HEADERS) { sms_udh_print(fp,sms->decoded->pdu->ud, sms->decoded->pdu->parts); } sms_pdu_print_item_text(fp,sms); fprintf(fp,"\n"); } static void sms_pdu_print_statusreport (FILE* fp, struct sms* sms, unsigned long flags) { struct sms_pdu* pdu; if (fp == NULL || sms == NULL || sms->decoded == NULL || sms->decoded->pdu == NULL) { return; } pdu = sms->decoded->pdu; if (pdu->extra.statusreport.status != NULL && pdu->extra.statusreport.status->message_parent == NULL) { if (flags&SMS_PRINT_COMMON_HEADERS) { sms_pdu_print_item_slot(fp,sms); sms_pdu_print_item_address(fp,sms); sms_pdu_print_item_time(fp,SMS_TYPE_DELIVER,&pdu->timedata); } if (flags&SMS_PRINT_EXTENDED_HEADERS) { sms_pdu_print_item_smsc(fp,sms); sms_pdu_print_item_mr(fp,sms); sms_pdu_print_item_options(fp,sms); sms_pdu_print_item_pid(fp,sms); sms_pdu_print_item_dcs(fp,sms); } if (flags&SMS_PRINT_USERDATA_HEADERS) { sms_udh_print(fp,sms->decoded->pdu->ud,sms->decoded->pdu->parts); } sms_pdu_print_item_text(fp,sms); fprintf(fp,"\n"); } } void sms_pdu_print (FILE* fp, struct sms* sms, unsigned long flags) { if (fp == NULL || sms == NULL || sms->decoded == NULL || sms->decoded->pdu == NULL) { return; } switch(sms->decoded->pdu->options.type) { case SMS_TYPE_DELIVER: case SMS_TYPE_SUBMIT: sms_pdu_print_deliver(fp,sms,flags); break; case SMS_TYPE_STATUS_REPORT: sms_pdu_print_statusreport(fp,sms,flags); break; case SMS_TYPE_SUBMIT_REPORT: case SMS_TYPE_DELIVER_REPORT: case SMS_TYPE_COMMAND: fprintf(stderr,"%s: %s\n\n",_("Unsupported pdu type"), sms_pdu_type_string(sms->decoded->pdu->options.type)); break; } } scmxx-0.9.0/src/smspdu/smspdu_enc.c0000644000175000017500000001233710346675223017140 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif #ifndef _REENTRANT # define _REENTRANT #endif #include #include "smscoding.h" #include "smsudh.h" #include #include #include #include #include #include #include static struct sms_pdu_raw* sms_pdu_create_submit_frame (char* number, unsigned long options, int header_present) { uint8_t sca_len = 0; struct gsm_number sca; //short message service center address uint8_t pdutype; //PDU type uint8_t mr; //message reference uint8_t da_len = 0; struct gsm_number da; //destination address uint8_t pid = 0; //protocol identifier (normally 0) uint8_t dcs; //data coding scheme uint8_t vp_rel = 0xff; //validity period (0xff = max = 63 weeks) //char vp_abs[15]; //validity period (YYMMDDhhmmssTZ) struct sms_pdu_raw* frame = mem_alloc(sizeof(*frame),0); char* temp; uint8_t* ptr; sms_pdu_raw_init(frame); /* not yet supported * zero length means that the phone will use its default */ gsm_number_init(&sca); sca_len = 0; /* set PDU type to standard values */ pdutype = 1; //message type SMS-SUBMIT pdutype |= (1<<4); //validity period format: relative if (options&SMS_CREATE_OPT_REPORT) { pdutype |= (1<<5); //status report request; } if (header_present) { pdutype |= (1<<6); //user data header indication } /* message reference must be zero for Siemens phones! */ mr = 0; /* destination number */ if (is_telephone_number(number) == 0) { fprintf(stderr,"%s: %s\n",_("Error"),_("No valid number specified.")); return NULL; } gsm_number_init(&da); gsm_number_set_toa(&da,numtype(number)); gsm_number_set(&da,number,str_len(number)); temp = gsm_number_get(&da); if (temp == NULL || strcmp(temp,number) != 0) { fprintf(stderr,_("%s: sms number cannot have more than %lu digits.\n"),_("Error"),(unsigned long)sizeof(da.digits)-1); return NULL; } mem_realloc(temp,0); da_len = strlen(da.digits); /* support "flash-SMS" and unicode here */ dcs = 0; if (options&SMS_CREATE_OPT_FLASH) { dcs &= 0xec; //clear all affected bits dcs |= 0x10; //set class 0 message (immediate display) } if (options&SMS_CREATE_OPT_UNICODE) { dcs &= 0xf3; //clear all affected bits dcs |= 0x08; //set unicode charset } //leave pid and vp_rel as is //create PDU frame ptr = frame->data; ptr[0] = sca_len; ++ptr; if (sca_len) { ptr[0] = gsm_number_get_toa(&sca); ptr += gsm_number_get_semioctets(&sca,ptr)+1; } ptr[0] = pdutype; ptr[1] = mr; ptr += 2; ptr[0] = da_len; ptr[1] = gsm_number_get_toa(&da); ptr += 2; if (da_len) ptr += gsm_number_get_semioctets(&da,ptr); ptr[0] = pid; ptr[1] = dcs; ptr[2] = vp_rel; ptr += 3; frame->size = ptr-frame->data; gsm_number_delete(&sca); gsm_number_delete(&da); return frame; } struct sms_pdu_raw** sms_pdu_create_submit (char* text, char* number, unsigned long options) { ucs4char_t* wide_str = convert_from_system(text); struct sms_pdu_raw** tpdu = NULL; unsigned int i = 0; struct sms_pdu_raw* frame; enum sms_encoding charset = SMS_CHARSET_GSM; gsmchar_t* g1 = NULL; ucs2char_t* g2 = NULL; if (options&SMS_CREATE_OPT_UNICODE) charset = SMS_CHARSET_UCS2; if (charset == SMS_CHARSET_GSM && options&SMS_CREATE_OPT_AUTOCHAR) { g1 = convert_to_gsm(wide_str); if (gsmwidth(g1) < ucs4len(wide_str)) { g2 = convert_to_ucs2(wide_str); if (ucs2len(g2) == ucs4len(wide_str) || ucs2len(g2) > gsmwidth(g1)) { /* more characters from the original string can be * encoded if UCS-2 is used instead of the default GSM character set */ fprintf(stderr,"%s: %s\n",_("Notice"),_("Selecting UCS-2 character set.")); charset = SMS_CHARSET_UCS2; } else { /* we do not want error messages from convert_to_gsm * being printed twice */ mem_realloc(wide_str,0); wide_str = convert_from_gsm(g1); } mem_realloc(g2,0); } mem_realloc(g1,0); } tpdu = sms_data_encode(charset,NULL, wide_str); mem_realloc(wide_str,0); if (tpdu == NULL) return NULL; frame = sms_pdu_create_submit_frame(number,options, (tpdu[1] == NULL)? 0 : 1); if (frame == NULL) return NULL; for (; tpdu[i] != NULL; ++i) { memmove(tpdu[i]->data+frame->size,tpdu[i]->data,tpdu[i]->size); memcpy(tpdu[i]->data,frame->data,frame->size); tpdu[i]->size += frame->size; } mem_realloc(frame,0); return tpdu; } scmxx-0.9.0/src/smspdu/smsud_enc.c0000644000175000017500000002050610367440070016746 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "smscoding.h" #include "smsudh.h" #include #include #include #include #include #include #include #include #include static uint16_t sms_new_sequence_id () { /* this does not have to be good random (linear would be ok) * just not the same on every call */ srand(time(NULL)); return rand()&UINT16_MAX; } static uint8_t sms_header_size (struct sms_pdu_ud_header** header) { uint8_t headersize = 1; unsigned int i = 0; if (header == NULL) { return 0; } else { for (; header[i] != NULL; ++i) { headersize += header[i]->len + 2; } } return headersize; } static void sms_data_insert_header (struct sms_pdu_ud_header** header, struct sms_pdu_raw* userdata) { uint8_t size = sms_header_size(header); unsigned int i = 0; if (userdata == NULL || size == 0) return; --size; sms_pdu_raw_append(userdata,&size,1); for (; header[i] != NULL; ++i) { sms_pdu_raw_append(userdata,&header[i]->type,1); sms_pdu_raw_append(userdata,&header[i]->len,1); sms_pdu_raw_append(userdata,header[i]->data,header[i]->len); } } static struct sms_pdu_raw* sms_data_gsm_encode (struct sms_pdu_ud_header** header, ucs4char_t* input) { struct sms_pdu_raw* retval; gsmchar_t* temp; unsigned char first, end; unsigned int headersize = sms_header_size(header); unsigned int enc_len = 0; unsigned int inc = 0; uint8_t state = (headersize*8)/7; uint8_t value = 0; if (headersize > 140) return NULL; temp = convert_to_gsm(input); enc_len = strlen((char*)temp); retval = mem_alloc(sizeof(*retval),0); sms_pdu_raw_init(retval); retval->size = 1; sms_data_insert_header(header,retval); if (ucs4len(input) > 0) { /* 7bit-GSM octet encoding */ if (state%8 != 0) { //state%8 == 0 equals headersize%7 == 0 // do the septet padding value = ((temp[inc] & 0x7F) << (7-(state%8))) & 0xFF; sms_pdu_raw_append(retval,&value,1); ++state; } for (; inc < enc_len && state < (140*8/7); ++inc, ++state) { if (state%8 != 7) { //the character are 7bit //shifting dependent on state (0-7) first = ((temp[inc+1] & 0x7F) << (7-(state%8))) & 0xFF; end = (temp[inc] & 0x7F) >> (state%8); value = first|end; sms_pdu_raw_append(retval,&value,1); } } //Return NULL to indicate error during encoding. //In this case, input string was too large to fit. if (inc != enc_len) { mem_realloc(retval,0); return NULL; } } /* the user data length must contain the septet count * of all userdata (including header) */ retval->data[0] = state; return retval; } static struct sms_pdu_raw* sms_data_ucs2_encode (struct sms_pdu_ud_header** header, ucs4char_t* input) { struct sms_pdu_raw* retval; ucs2char_t* tmp; uint8_t enc_len = 0; uint8_t headersize = sms_header_size(header); if (headersize > 140) return NULL; tmp = convert_to_ucs2(input); /* convert to big-endian */ if (tmp) for (; tmp[enc_len] != 0; ++enc_len) tmp[enc_len] = htobes(tmp[enc_len]); enc_len *= 2; retval = mem_alloc(sizeof(*retval),1); sms_pdu_raw_init(retval); retval->size = 1; if (headersize) sms_data_insert_header(header,retval); sms_pdu_raw_append(retval,(uint8_t*)tmp,(size_t)enc_len); enc_len = retval->size-1; retval->data[0] = enc_len; return retval; } #define SMS_PARTS_SUGGESTED_MAX 10 struct sms_pdu_raw** sms_data_encode (enum sms_encoding charset, struct sms_pdu_ud_header** header, ucs4char_t* input) { struct sms_pdu_raw** retval = NULL; struct sms_pdu_ud_header** h = NULL; unsigned int hcount = 0; unsigned int count = 0; unsigned int parts = 0; unsigned int i = 0; unsigned int k; char* delayMessage = _("Delaying for %2d seconds, press Ctrl+C to abort."); ucs2char_t* input2 = NULL; ucs4char_t* input_tmp; uint16_t sequence = sms_new_sequence_id(); /* get rid of compiler warning */ header = header; switch (charset) { case SMS_CHARSET_GSM: /* If more than 160 septets are needed: * Text data must be aligned at septet: * if (H % 7) != 0: minus 1 septet * * H = 1+6 * (140-H)*8/7 - ((H%7)?1:0) = 152 Septets */ count = gsm_count(input,0); if (count <= 160) parts = 1; else while (i < ucs4len(input)) { i += gsm_count(input+i,152); parts += 1; } break; case SMS_CHARSET_UCS2: /* If more than 70 characters are needed (H=1+6): * 140-(H/2 + H%2)*2 = 140-(3+1)*2 = 132 Oktets * = 66 UCS-2 characters */ input2 = convert_to_ucs2(input); count = ucs2len(input2); if (count <= 70) parts = 1; else { parts = count/66; if (count%66) ++parts; } break; case SMS_CHARSET_8BIT: //no break default: return NULL; //not supported } fprintf(stderr,"%s: ",_("Notice")); fprintf(stderr, ngettext("This message has %lu character", "This message has %lu characters", ucs4len(input)), (unsigned long)ucs4len(input)); fprintf(stderr,"%s"," "); fprintf(stderr, ngettext("and will use %u part.\n", "and will use %u parts.\n", parts), parts); if (parts > SMS_PARTS_SUGGESTED_MAX) { fprintf(stderr, _("%s: The suggested maximum parts count is %d.\n"), _("Warning"),SMS_PARTS_SUGGESTED_MAX); for (i=10; i>0; --i) { fprintf(stderr, delayMessage, i); fprintf(stderr,"\r"); sleep(1); } for (i=strlen(delayMessage)-2; i>0; --i) fprintf(stderr," "); fprintf(stderr,"\r"); } if (parts > 255) { fprintf(stderr,_("%s: message part count exceeds maximum of 255\n"), _("Error")); fprintf(stderr,_("%s: SMS text is too long (max. %d characters).\n"), _("Error"), (charset==SMS_CHARSET_GSM) ? 255*152 : 255*66); if (charset == SMS_CHARSET_GSM) { fprintf(stderr,"%s\n", _("Please be aware that some characters " "are encoded as 14bit (instead of 7bit), " "e.g. the euro character.")); } return NULL; } retval = mem_alloc(sizeof(*retval)*(parts+1),0); for (i=0; i<=parts; ++i) retval[i] = NULL; if (parts > 1) { hcount += 1; h = mem_alloc((hcount+1)*sizeof(*h),0); for (i=0; i<=hcount; ++i) h[i] = NULL; count = 0; switch (charset) { case SMS_CHARSET_GSM: for (i=0; i #include #include //standard headers #include #include struct sms_pdu_ud_header* sms_udh_multipart16_get (uint16_t seqnum, uint8_t index, uint8_t total) { struct sms_pdu_ud_header* retval; retval = mem_alloc(sizeof(*retval),0); sms_pdu_ud_header_init(retval); retval->type = 0x08; retval->len = 4; retval->data[0] = (seqnum >>8)&0xFF; retval->data[1] = seqnum&0xFF; retval->data[2] = total; retval->data[3] = index; return retval; } static void sms_udh_indication_print (FILE* fp, uint8_t* data) { char* type = NULL; fprintf(fp,"%s:",_("Indication")); switch (data[0]&0x4F) { case 0: type = _("voicemail"); break; case 1: type = _("fax"); break; case 2: type = _("e-mail"); break; case 3: type = _("misc."); break; } fprintf(fp,ngettext("%d %s message waiting","%d %s messages waiting",data[1]),data[1],type); } static void sms_udh_wcmpdu_print (FILE* fp, uint8_t* data) { data = data; fprintf(fp,"%s\n",_("Wireless control message protocol data unit")); } static void sms_udh_smstk_print (FILE* fp, uint8_t* data) { data = data; fprintf(fp,_("SIM toolkit security header")); } static void sms_udh_multipart8_print (FILE* fp, uint8_t* data) { fprintf(fp,_("Multipart message: sequence number = %d, part %d of %d"), data[0],data[2],data[1]); } static void sms_udh_multipart16_print (FILE* fp, uint8_t* data) { fprintf(fp,_("Multipart message: sequence number = %d, part %d of %d"), (data[0]<<8)+data[1],data[3],data[2]); } static void sms_udh_application8_print (FILE* fp, uint8_t* data) { fprintf(fp,_("Application port: destination port = %d, originator port = %d"), data[0],data[1]); } static void sms_udh_application16_print (FILE* fp, uint8_t* data) { fprintf(fp,_("Application port: destination port = %d, originator port = %d"), (data[0]<<8)+data[1],((uint16_t*)data)[1]); } static void sms_udh_source_indicator_print (FILE* fp, uint8_t* data) { fprintf(fp,"%s ",_("The following headers were created by")); switch (data[0]) { case 1: fprintf(fp,"%s",_("original sender")); break; case 2: fprintf(fp,"%s",_("original receiver")); break; case 3: fprintf(fp,"%s","SMSC"); break; default: fprintf(fp,_("(unknown value %d)"),data[0]); break; } } void sms_udh_print_header (FILE* fp, struct sms_pdu_ud_header* header) { int k = 0; while (sms_pdu_ud_header_defs[k].type != -1 && sms_pdu_ud_header_defs[k].type != header->type) { ++k; } if (sms_pdu_ud_header_defs[k].type != -1 && sms_pdu_ud_header_defs[k].type == header->type) { fprintf(fp,"\t"); if (sms_pdu_ud_header_defs[k].print_func != NULL) { sms_pdu_ud_header_defs[k].print_func(fp,header->data); } else { fprintf(fp,_("Ignored header type 0x%02x"),header->type); } fprintf(fp,"\n"); } } void sms_udh_print (FILE* fp, struct sms_pdu_ud* plist, uint8_t parts) { struct sms_pdu_ud_header** udh = NULL; int i = 0; int h = 0; if (fp == NULL || plist == NULL || parts == 0) return; //look for at least one header for (i = 0; i < parts; ++i) if (plist[i].header != NULL && plist[i].header[0] != NULL) { h = 1; break; } if (h) fprintf(fp,"%s:\n",_("Message header")); else return; for (h = 0; h < parts; ++h) { udh = plist[h].header; if (udh != NULL) for (i=0; udh[i] != NULL; ++i) sms_udh_print_header(fp, udh[i]); } } void sms_udh_fill (struct sms_pdu* sms, uint8_t* data) { uint8_t udhsize = 0; uint8_t offset = 0; unsigned int i = 0; unsigned int k; struct sms_pdu_ud_header** header; if (sms == NULL) { return; } if (sms->ud == NULL) { sms->ud = mem_alloc(sizeof(*(sms->ud)),0); sms_pdu_ud_init(sms->ud); } if (sms->options.udh_present) { //extract the user data header data udhsize = data[0]; data += 1; //split the udh into its parts sms->ud[0].header = mem_alloc(((udhsize/2)+1)*sizeof(*sms->ud[0].header),0); header = sms->ud[0].header; header[i] = NULL; while (offset+2 <= udhsize) { header[i] = mem_alloc(sizeof(**header),0); sms_pdu_ud_header_init(header[i]); //read fields that are mandatory for each user data header header[i]->type = data[offset]; header[i]->len = data[offset+1]; offset += 2; //find the udh type in the list of known headers k = 0; while (sms_pdu_ud_header_defs[k].type != -1 && sms_pdu_ud_header_defs[k].type != header[i]->type) ++k; //check that everything is correct with the udh data if (offset+(header[i]->len) <= udhsize && sms_pdu_ud_header_defs[k].type != -1 && sms_pdu_ud_header_defs[k].minlen <= header[i]->len && header[i]->len <= sms_pdu_ud_header_defs[k].maxlen) { memcpy(header[i]->data,data+offset,header[i]->len); header[i+1] = NULL; offset += header[i]->len; } else { //bogus or unknown header, delete it and stop processing the headers mem_realloc(header[i],0); header[i] = NULL; break; } ++i; } } sms_udh_multipart_mark(sms); } void sms_udh_multipart_mark (struct sms_pdu* data) { int i = 0; int k; struct sms_pdu_ud_header** header = NULL; if (data == NULL) { return; } if (data->ud[0].header != NULL) { //save the headers header = data->ud[0].header; for (i=0; header[i] != NULL; ++i) { if (header[i]->type == 0x00 || header[i]->type == 0x08) { if (header[i]->type == 0x00) { data->multipart_id = header[i]->data[0]; data->parts = header[i]->data[1]; data->partnum = header[i]->data[2]-1; } else if (header[i]->type == 0x08) { data->multipart_id = *((uint16_t*)header[i]->data); data->parts = header[i]->data[2]; data->partnum = header[i]->data[3]-1; } break; } } } data->ud = mem_realloc(data->ud,data->parts*sizeof(*(data->ud))); for (k=0; k < data->parts; ++k) { sms_pdu_ud_init(&data->ud[k]); } //restore the headers to their correct position data->ud[data->partnum].header = header; } struct sms_pdu_ud_header_def sms_pdu_ud_header_defs[] = { {0x00, 3, 3, sms_udh_multipart8_print}, //multipart message (8bit sequence) {0x01, 2, 2, sms_udh_indication_print}, //special sms indication (like in DCS) {0x04, 2, 2, sms_udh_application8_print}, //application port addressing 8bit address {0x05, 4, 4, sms_udh_application16_print}, //application port addressing 16bit address {0x06, 1, 1, NULL}, //SMSC control parameters {0x07, 1, 1, sms_udh_source_indicator_print}, //UDH source indicator {0x08, 4, 4, sms_udh_multipart16_print}, //multipart message (16bit sequence) {0x09, 1,137, sms_udh_wcmpdu_print}, //wireless control message protocol {0x0a, 4, 4, NULL}, //EMS: text formatting {0x0b, 2, 2, NULL}, //EMS: predefined sound {0x0c, 2,129, NULL}, //EMS: user defined sound {0x0d, 2, 2, NULL}, //EMS: predefined animation {0x0e,129,129, NULL}, //EMS: large animation {0x0f, 33, 33, NULL}, //EMS: small animation {0x10,129,129, NULL}, //EMS: large picture {0x11, 33, 33, NULL}, //EMS: small picture {0x12, 4,131, NULL}, //EMS: variable picture {0x13, 1, 1, NULL}, //EMS: user prompt indicator {0x14, 1,137, NULL}, //EMS: extended object {0x15, 3, 3, NULL}, //EMS: reused extended object {0x16, 1,137, NULL}, //EMS: compression control {0x17, 2, 2, NULL}, //EMS: object distribution indicator {0x18, 2,137, NULL}, //EMS: standard WVG object {0x19, 2,137, NULL}, //EMS: character size WVG object {0x1a, 0, 0, NULL}, //EMS: extended object data request command {0x20, 1, 1, NULL}, //RFC822 email header {0x21, 4, 4, NULL}, //hyperlink format element {0x22, 22, 22, NULL}, //reply address element {0x70, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x71, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x72, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x73, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x74, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x75, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x76, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x77, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x78, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x79, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x7a, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x7b, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x7c, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x7d, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x7e, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {0x7f, 0, 0, sms_udh_smstk_print}, //SIM toolkit security header {-1,0,0, NULL} //list end element (do not remove!) }; scmxx-0.9.0/src/smspdu/smspdu_dec.c0000644000175000017500000005010010367431021017101 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif #ifndef _REENTRANT # define _REENTRANT #endif #include #include "smscoding.h" #include "smsudh.h" #include #include #include #include #include #include #include static uint8_t sms_octet (uint8_t in, uint8_t base) { return ((in>>4)&0xF)%base + (in&0xF)*base; } void sms_statusreport_match (struct sms** list) { struct sms** outgoing; struct sms** reports; unsigned int l = 0; unsigned int o = 0; unsigned int r = 0; unsigned int rmax = 0; struct sms_pdu* oc; struct sms_pdu* rc; //sort from list into outgoing and reports while (list[l] != NULL) ++l; outgoing = mem_alloc((l+1)*sizeof(*outgoing),0); reports = mem_alloc((l+1)*sizeof(*reports),0); l = 0; while (list[l] != NULL) { switch (list[l]->decoded->pdu->options.type) { case SMS_TYPE_SUBMIT: outgoing[o++] = list[l++]; break; case SMS_TYPE_STATUS_REPORT: if (list[l]->decoded->pdu->options.u.status.sr == 0) { //SMS-STATUS-REPORT is answer to a SMS-SUBMIT // == 1 would be answer to a SMS-COMMAND reports[rmax++] = list[l++]; } break; default: ++l; break; } } outgoing[o] = NULL; reports[rmax] = NULL; //now trying to match all reports to an outgoing message for (o = 0; outgoing[o] != NULL; ++o) { oc = outgoing[o]->decoded->pdu; for (r = 0; r < rmax; ++r) { if (reports[r] != NULL) { rc = reports[r]->decoded->pdu; if (oc->extra.statusreport.mref == rc->extra.statusreport.mref && gsm_number_compare(&oc->address,&rc->address)) { //there may be more than one status report per message... if (oc->ud[oc->partnum].ack != NULL) { //...so match the latest one to link with the final status if (oc->ud[oc->partnum].ack->time.value < rc->extra.statusreport.status->time.value) { oc->ud[oc->partnum].ack->message_parent = NULL; oc->ud[oc->partnum].ack = rc->extra.statusreport.status; oc->ud[oc->partnum].ack->message_parent = &(oc->ud[oc->partnum]); } } else { oc->ud[oc->partnum].ack = rc->extra.statusreport.status; oc->ud[oc->partnum].ack->message_parent = &(oc->ud[oc->partnum]); } //disable all previously matched reports in the list reports[r] = NULL; } } } } mem_realloc(outgoing,0); mem_realloc(reports,0); } int sms_multipart_merge (struct sms** list) { struct sms** multipart; //for multipart matches struct sms** results; //for the final list, copied back to list struct sms** nondel; //matched messages that need special deletion unsigned int l = 0; unsigned int m = 0; unsigned int r = 0; unsigned int n = 0; struct sms_pdu* c1; struct sms_pdu* c2; if (list == NULL || list[0] == NULL) { return 0; } while (list[l] != NULL) ++l; multipart = mem_alloc((l+1)*sizeof(*multipart),0); multipart[0] = NULL; results = mem_alloc((l+1)*sizeof(*results),0); results[0] = NULL; nondel = mem_alloc((l+1)*sizeof(*nondel),0); nondel[0] = NULL; for (l = 0; list[l] != NULL; ++l) { if (list[l]->decoded != NULL && list[l]->decoded->pdu->parts > 1) { c1 = list[l]->decoded->pdu; for (m = 0; multipart[m] != NULL; ++m) { c2 = multipart[m]->decoded->pdu; //criteria for matching the parts if (c1->options.type == c2->options.type && c1->multipart_id == c2->multipart_id && c1->parts == c2->parts && gsm_number_compare(&c1->address,&c2->address)) { if (c1->partnum == c2->partnum || (multipart[m]->encoded[c1->partnum] != NULL)) { /* We now have two concatenated short messages * from the same sender with the same id. * In this case, a clean match is not possible, * thus abort the whole process. */ //reverting all previous matches for (m = 0; multipart[m] != NULL; ++m) { c2 = multipart[m]->decoded->pdu; for (n = 0; n < c2->parts; ++n) { if (c2->partnum != n) { sms_pdu_ud_delete(&c2->ud[n]); sms_pdu_ud_init(&c2->ud[n]); multipart[m]->encoded[n] = NULL; } } } mem_realloc(multipart,0); mem_realloc(results,0); mem_realloc(nondel,0); fprintf(stderr,"Warning: Duplicated multipart messages id from the same sender detected.\n"); return -1; } else { c2->ud[c1->partnum] = c1->ud[c1->partnum]; multipart[m]->encoded[c1->partnum] = list[l]->encoded[c1->partnum]; nondel[n++] = list[l]; nondel[n] = NULL; break; } } } if (multipart[m] == NULL) { multipart[m++] = list[l]; multipart[m] = NULL; results[r++] = list[l]; results[r] = NULL; } } else { results[r++] = list[l]; results[r] = NULL; } } mem_realloc(multipart,0); /* Copy back the results */ for (l = 0; list[l] != NULL; ++l) { list[l] = NULL; } for (r = 0; results[r] != NULL; ++r) { list[r] = results[r]; } mem_realloc(results,0); /* for nondel list, make sure that encoded messages, * message header and text do not get deleted */ for (n = 0; nondel[n] != NULL; ++n) { nondel[n]->encoded = NULL; nondel[n]->decoded->pdu->ud = NULL; sms_delete(nondel[n]); mem_realloc(nondel[n],0); } mem_realloc(nondel,0); return 1; } enum sms_pdu_type sms_pdu_type_get (enum sms_direction d, uint8_t type) { switch (d) { case SMS_INCOMING: switch (type&3) { case 0: return SMS_TYPE_DELIVER; case 1: return SMS_TYPE_SUBMIT_REPORT; case 2: return SMS_TYPE_STATUS_REPORT; default: return SMS_TYPE_DELIVER; } case SMS_OUTGOING: switch (type&3) { case 0: return SMS_TYPE_DELIVER_REPORT; case 1: return SMS_TYPE_SUBMIT; case 2: return SMS_TYPE_COMMAND; default: return SMS_TYPE_SUBMIT; } } //never reaches this point return SMS_TYPE_DELIVER; } static void sms_pdu_decode_options (enum sms_direction d, uint8_t type, struct sms_pdu_options* p) { if (p == NULL) return; p->type = sms_pdu_type_get(d,type); if (type&0x04) { if (p->type == SMS_TYPE_DELIVER) { p->u.deliver.mms = 1; } else if (p->type == SMS_TYPE_STATUS_REPORT) { p->u.status.mms = 1; } else if (p->type == SMS_TYPE_SUBMIT) { p->u.submit.rd = 1; } } if (type&0x20) { switch (p->type) { case SMS_TYPE_DELIVER: p->u.deliver.sr = 1; break; case SMS_TYPE_SUBMIT: p->u.submit.sr = 1; break; case SMS_TYPE_COMMAND: p->u.command.sr = 1; break; case SMS_TYPE_STATUS_REPORT: p->u.status.sr = 1; break; default: break; } } if (type&0x40) { p->udh_present = 1; } if (type&0x80) { if (p->type == SMS_TYPE_DELIVER) p->u.deliver.rp = 1; else if (p->type == SMS_TYPE_SUBMIT) p->u.submit.rp = 1; } } static void sms_pdu_dcs_decode (uint8_t dcs, struct sms_pdu_dcs* p) { if (p == NULL) return; if ((dcs&0x8c) == 0x00 || //0xxx 00xx (dcs&0xe0) == 0xb0 || //110x xxxx (dcs&0xf4) == 0xf0 //1111 x0xx /*((dcs&0xf0) >= 0x80 && (dcs&0xf0) <= 0xb0)*/ //reserved ) { p->encoding = SMS_CHARSET_GSM; } else if ((dcs&0x8c) == 0x08 || //0xxx 10xx (dcs&0xf0) == 0xe0 //1110 xxxx ) { p->encoding = SMS_CHARSET_UCS2; } else { p->encoding = SMS_CHARSET_8BIT; } if ((dcs&0x80) == 0) { p->type = SMS_DCS_TYPE_NORMAL; p->value.normal.autodel = (dcs>>6)&1; //0x40; p->value.normal.compressed = (dcs>>5)&1; //0x20 if (dcs&0x10) switch (dcs&3) { case 0: p->value.normal.class = SMS_CLASS_FLASH; break; case 1: p->value.normal.class = SMS_CLASS_ME; break; case 2: p->value.normal.class = SMS_CLASS_SIM; break; case 3: p->value.normal.class = SMS_CLASS_TE; break; } else p->value.normal.class = SMS_CLASS_NONE; } else { if (dcs >= 0xF0) { p->type = SMS_DCS_TYPE_NORMAL; p->value.normal.autodel = 0; p->value.normal.compressed = 0; if (dcs&0x10) switch (dcs&3) { case 0: p->value.normal.class = SMS_CLASS_FLASH; break; case 1: p->value.normal.class = SMS_CLASS_ME; break; case 2: p->value.normal.class = SMS_CLASS_SIM; break; case 3: p->value.normal.class = SMS_CLASS_TE; break; } else p->value.normal.class = SMS_CLASS_NONE; } else if (dcs >= 0xC0) { p->type = SMS_DCS_TYPE_IND; if ((dcs&0x30) == 0) p->value.ind.group = SMS_DCS_IND_DISCARD; else p->value.ind.group = SMS_DCS_IND_STORE; p->value.ind.sense = (dcs>>3)&1; switch(dcs&0x03) { case 0: p->value.ind.type = SMS_DCS_IND_VOICE; break; case 1: p->value.ind.type = SMS_DCS_IND_FAX; break; case 2: p->value.ind.type = SMS_DCS_IND_EMAIL; break; case 3: p->value.ind.type = SMS_DCS_IND_OTHER; break; } } } } /* returns the number of character to advance in pdu */ static size_t sms_pdu_address_decode (uint8_t* pdu, struct gsm_number* n) { size_t len; len = pdu[0]; //number of semioctets len = (len+(len%2))/2; gsm_number_init(n); gsm_number_set_toa(n,pdu[1]); if (len) { switch (n->toa.type) { case GSM_NUMBER_TYPE_TEXT: //those are octets, not semi-octets n->text = sms_data_decode(SMS_CHARSET_GSM, pdu+2,(len*8)/7,0); break; default: gsm_number_set_semioctets(n,pdu[1],pdu+2,len); } } return len+2; } static unsigned int sms_pdu_scts_decode (uint8_t* pdu, struct sms_pdu_time* t) { char* temp; int tz; //read real timezone offset tz = sms_octet(pdu[6],10); /* parse negation bit */ if (tz >= 80) tz = (-1)*(tz-80); temp = mem_alloc(20,1); sprintf(temp,"\"%02x/%02x/%02x,%02x:%02x:%02x\"", sms_octet(pdu[0],16),sms_octet(pdu[1],16),sms_octet(pdu[2],16), sms_octet(pdu[3],16),sms_octet(pdu[4],16),sms_octet(pdu[5],16)); sms_pdu_time_fill(t,temp,tz); mem_realloc(temp,0); return 7; } static void sms_pdu_userdata_decode (uint8_t* pdu, size_t len, struct sms_pdu* sms) { uint8_t udlen = pdu[0]; uint8_t udhsize = 0; ++pdu; if ((len-1)*8/7 < udlen) udlen = (len-1)*8/7; if (udlen) { //assume that only one part is present until we can look at the header sms->parts = 1; sms->partnum = 0; //fill all headers (also calls sms_udh_multipart_mark()) if (sms->options.udh_present) { udhsize = pdu[0]; } else { udhsize = 0; } sms_udh_fill(sms,pdu); //decode text sms->ud[sms->partnum].text = sms_data_decode(sms->scheme.encoding, pdu,udlen, sms->options.udh_present); } } static struct sms_pdu* sms_pdu_decode_statusreport (struct sms_pdu_raw* tpdu, size_t off) { struct sms_pdu* sms; uint8_t* pdu = tpdu->data+off; uint8_t temp = 0; sms = mem_alloc(sizeof(*sms),0); sms_pdu_init(sms); sms_pdu_decode_options(SMS_INCOMING,pdu[0],&sms->options); /* From ETSI TS 123.040 v5.3.0 R5 9.2.2.3: * Where the SMS-STATUS-REPORT is the result of an * SMS-COMMAND and the TP-Command-Type was an Enquiry, * the TP-MR returned in the SMS-STATUS-REPORT shall be the * TP-MN which was sent in the SMS-COMMAND (i.e. the TP-MR * of the previously submitted SM to which the Enquiry refers). */ sms->extra.statusreport.mref = pdu[1]; pdu += 2; pdu += sms_pdu_address_decode(pdu,&sms->address); pdu += sms_pdu_scts_decode(pdu,&sms->timedata); sms->extra.statusreport.status = mem_alloc(sizeof(*sms->extra.statusreport.status),0); sms_pdu_message_status_init(sms->extra.statusreport.status); sms->extra.statusreport.status->status_parent = sms; pdu += sms_pdu_scts_decode(pdu,&sms->extra.statusreport.status->time); //fixme: decode status->s with more detail sms->extra.statusreport.status->status = pdu[0]; pdu += 1; /* From ETSI TS 123.040 v5.3.0 R5 9.2.2.3: * parameter indicator: * Mandatory if any of the optional parameters following * TP-PI is present, otherwise optional. */ if (tpdu->size-off > (size_t)(pdu-tpdu->data)) { temp = pdu[0]; if (temp != 0xff) { //Siemens S55 now fills the rest with 0xff pdu += 1; if (temp&0x01) { //PID present sms->pid = pdu[0]; pdu += 1; } if (temp&0x02) { //DCS present sms_pdu_dcs_decode(pdu[0],&sms->scheme); pdu += 1; } if (temp&0x04) { //user data present sms_pdu_userdata_decode(pdu,tpdu->size-(size_t)(pdu-tpdu->data),sms); } } } return sms; } static struct sms_pdu* sms_pdu_decode_deliver (struct sms_pdu_raw* tpdu, size_t off) { struct sms_pdu* sms; uint8_t* pdu = tpdu->data+off; sms = mem_alloc(sizeof(*sms),0); sms_pdu_init(sms); sms_pdu_decode_options(SMS_INCOMING,pdu[0],&sms->options); pdu += 1; pdu += sms_pdu_address_decode(pdu,&sms->address); sms->pid = pdu[0]; pdu += 1; sms_pdu_dcs_decode(pdu[0],&sms->scheme); pdu += 1; pdu += sms_pdu_scts_decode(pdu,&sms->timedata); sms_pdu_userdata_decode(pdu,tpdu->size-(size_t)(pdu-tpdu->data),sms); return sms; } static struct sms_pdu* sms_pdu_decode_submit (struct sms_pdu_raw* tpdu, size_t off) { struct sms_pdu* sms; uint8_t* pdu = tpdu->data+off; uint8_t type = pdu[0]; uint8_t i; char* temp; temp = NULL; sms = mem_alloc(sizeof(*sms),0); sms_pdu_init(sms); sms_pdu_decode_options(SMS_OUTGOING,type,&sms->options); sms->extra.submit.mref = pdu[1]; pdu += 2; pdu += sms_pdu_address_decode(pdu,&sms->address); sms->pid = pdu[0]; sms_pdu_dcs_decode(pdu[1],&sms->scheme); pdu += 2; switch (type&0x18) { case 0x00: //VP not present sms->timedata.format = SMS_PDU_TIME_NONE; break; case 0x08: //VP enhanced i = pdu[0]; //reading octet 1 if (i&0x80) { //extension bit //not supported sms->timedata.format = SMS_PDU_TIME_NONE; } //ignore bit 6 (single shot SM) //bits 5,4 and 3 are reserved switch (i&0x07) { //bits 2, 1 and 0 default: //reserved values case 0x00: sms->timedata.format = SMS_PDU_TIME_NONE; break; case 0x01: //value in seconds (1 octet) sms->timedata.format = SMS_PDU_TIME_RELATIVE; sms->timedata.value = pdu[1]; if (sms->timedata.value == 0) { sms->timedata.format = SMS_PDU_TIME_NONE; } break; case 0x02: //real relative value sms->timedata.format = SMS_PDU_TIME_RELATIVE; i = pdu[1]; if ( i <= 143) { //5 minutes sms->timedata.value = (i+1)*5*60; } else if (144 <= i && i <= 167) { //30 minutes sms->timedata.value = (i-143+24)*30*60; } else if (168 <= i && i <= 196) {//1 day sms->timedata.value = (i-166)*(3600*24); } else if (197 <= i) {//1 week sms->timedata.value = (i-192)*(3600*24*7); } break; case 0x03: // value as HH:MM:SS sms->timedata.format = SMS_PDU_TIME_RELATIVE; temp = mem_alloc(9,1); sms->timedata.value = ((pdu[1]&0xF)*10 + ((pdu[1]>>4)&0xF))*3600 + ((pdu[2]&0xF)*10 + ((pdu[2]>>4)&0xF))*60 + (pdu[3]&0xF) + ((pdu[3]>>4)&0xF); break; } pdu += 7; break; case 0x10: //VP relative sms->timedata.format = SMS_PDU_TIME_RELATIVE; i = pdu[0]; if (i <= 143) { //5 minutes sms->timedata.value = (i+1)*5*60; } else if (144 <= i && i <= 167) { //30 minutes sms->timedata.value = (i-143+24)*30*60; } else if (168 <= i && i <= 196) {//1 day sms->timedata.value = (i-166)*(3600*24); } else if (197 <= i) {//1 week sms->timedata.value = (i-192)*(3600*24*7); } pdu += 1; break; case 0x18: //VP absolute pdu += sms_pdu_scts_decode(pdu,&sms->timedata); break; } sms_pdu_userdata_decode(pdu,tpdu->size-(size_t)(pdu-tpdu->data),sms); return sms; } struct sms_tpdu* sms_pdu_decode (struct sms_slot_data* sms) { struct sms_tpdu* decoded; uint8_t* pdu = NULL; uint8_t sca_len = 0; decoded = mem_alloc(sizeof(*decoded),0); sms_tpdu_init(decoded); //extracting SMSC sca_len = sms->tpdu.data[0]; if (sca_len > 0) { gsm_number_set_semioctets(&(decoded->sca),sms->tpdu.data[1], sms->tpdu.data+2,sca_len-1); } pdu = sms->tpdu.data+sca_len+1; //checking if PDUtype is supported and can thus be decoded switch (sms_pdu_type_get(sms->dir,pdu[0])) { case SMS_TYPE_DELIVER: decoded->pdu = sms_pdu_decode_deliver(&sms->tpdu,sca_len+1); break; case SMS_TYPE_SUBMIT: decoded->pdu = sms_pdu_decode_submit(&sms->tpdu,sca_len+1);; break; case SMS_TYPE_STATUS_REPORT: decoded->pdu = sms_pdu_decode_statusreport(&sms->tpdu,sca_len+1);; break; case SMS_TYPE_SUBMIT_REPORT: case SMS_TYPE_DELIVER_REPORT: case SMS_TYPE_COMMAND: fprintf(stderr,"%s: %s\n",_("Unsupported pdu type"), sms_pdu_type_string(sms_pdu_type_get(sms->dir,pdu[0]))); sms_tpdu_delete(decoded); decoded = mem_realloc(decoded,0); break; } return decoded; } static unsigned int sms_pdu_submitdeliver_len (enum sms_pdu_type type, uint8_t vpsize, struct sms_pdu_raw* raw, size_t offset) { struct sms_pdu_dcs d; size_t retval = offset+1; uint8_t temp; if (type == SMS_TYPE_SUBMIT) { /* minimal PDU length 7 octets */ if (raw->size < 7) return 0; //invalid retval += 1; //MR } else { /* minimal PDU length 13 octets */ if (raw->size < 13) return 0; //invalid } retval += 2 + (raw->data[retval] + raw->data[retval]%2)/2; //DA retval += 1; //PID if (raw->size < retval+1) return 0; sms_pdu_dcs_decode(raw->data[retval],&d); retval += 1+vpsize; //DCS,VP if (raw->size < retval+1) return 0; temp = raw->data[retval]; if (d.encoding == SMS_CHARSET_GSM) { if (temp > 160) return 0; retval += (temp*7)/8; /* If the length is no multiple of 8, * an extra octet is needed */ if (temp%8) ++retval; } else { if (temp > 140) return 0; retval += temp; } ++retval; //UDL return retval-offset; } static unsigned int sms_pdu_statusreport_len (struct sms_pdu_raw* raw, size_t offset) { struct sms_pdu_dcs d; size_t retval = offset+1; //MR uint8_t temp; /* minimal PDU length 20 octets */ if (raw->size < 20) return 0; //invalid retval += 2 + (raw->data[retval] + raw->data[retval]%2)/2; //RA retval += 7 + 7 + 1; //SCTS,DT,ST if (raw->size < retval+1) return 0; temp = raw->data[retval]; if (temp&0x01) ++retval; //PID if (temp&0x02) { //DCS sms_pdu_dcs_decode(raw->data[++retval],&d); } if (temp&0x04) { //user data if (raw->size < retval+1) return 0; temp = raw->data[retval]; if (d.encoding == SMS_CHARSET_GSM) { retval += (temp*7)/8; /* If the length is no multiple of 8, * an extra octet is needed */ if (temp%8) ++retval; } else { retval += temp; } } ++retval; //UDL if (retval > 164) return 0; return retval-offset; } static unsigned int sms_pdu_len_off (enum sms_direction d, struct sms_pdu_raw* raw, size_t offset) { uint8_t type; struct sms_pdu_options p; unsigned int temp = 0; if (raw->size < 1) return 0; type = raw->data[offset]; sms_pdu_decode_options(d,type,&p); switch (p.type) { case SMS_TYPE_SUBMIT: switch (type&0x18) { //VP default: temp += 6; case 0x10: temp += 1; case 0x00: break; } return sms_pdu_submitdeliver_len(p.type,temp,raw,offset); case SMS_TYPE_DELIVER: return sms_pdu_submitdeliver_len(p.type,7,raw,offset); case SMS_TYPE_STATUS_REPORT: return sms_pdu_statusreport_len(raw,offset); default: return 0; } } unsigned int sms_pdu_len (enum sms_direction d, struct sms_pdu_raw* raw) { return sms_pdu_len_off(d,raw,0); } unsigned int sms_tpdu_len (enum sms_direction d, struct sms_pdu_raw* raw) { if (raw->size < 1 || raw->data[0] > 11) return 0; return sms_pdu_len_off(d,raw,raw->data[0]+1); } scmxx-0.9.0/src/smspdu/smsud_dec.c0000644000175000017500000000663210367440070016740 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "smscoding.h" #include #include #include static ucs4char_t* sms_data_gsm_decode (uint8_t* input, unsigned int udl, int header_present) { gsmchar_t decoded[160+1]; unsigned int state=0, inc=0, outc=0; unsigned char first=0, end=0; unsigned int i=0; uint8_t headersize = 0; if (input == NULL) { return NULL; } memset(decoded,0,sizeof(decoded)); if (header_present) { headersize = input[0] + 1; } //7bit-GSM octet decoding state = (headersize*8)/7; if (headersize%7 != 0) ++state; inc = headersize; while (state < udl && outc < 160) { i = state%8; if (i == 0) { //character at state 0 needs no shifting decoded[outc] = input[inc] & 0x7F; } else { //shifting dependent on state (1-7) first = (input[inc+1]) << i; end = (input[inc]) >> (8-i); decoded[outc] = (first | end) & 0x7F; ++inc; } if (decoded[outc] == 0) { //special char '@' decoded[outc] = 128; } ++outc; ++state; } return convert_from_gsm(decoded); } static ucs4char_t* sms_data_ucs2_decode (uint8_t* input, unsigned int udl, int header_present) { ucs4char_t* retval; ucs2char_t* temp; uint8_t headersize = 0; size_t i = 0; if (input == NULL) return NULL; if (header_present) { headersize = input[0] + 1; if (headersize > udl) return NULL; input += headersize; udl -= headersize; } temp = ucs2ndup((ucs2char_t*)input,udl/2); /* convert to host byte order */ for (; temp[i] != 0; ++i) temp[i] = betohs(temp[i]); retval = convert_from_ucs2(temp); mem_realloc(temp,0); return retval; } static ucs4char_t* sms_data_8bit_decode (uint8_t* input, unsigned int udl, int header_present) { ucs4char_t* retval; uint8_t headersize = 0; char* temp; if (input == NULL) return NULL; if (header_present) { headersize = input[0] + 1; if (headersize > udl) return NULL; input += headersize; udl -= headersize; } temp = strn_dup((char*)input,udl); retval = convert_to_internal("ISO-8859-1",temp,udl); return retval; } ucs4char_t* sms_data_decode (enum sms_encoding encoding, uint8_t* input, unsigned int udl, int header_present) { switch (encoding) { case SMS_CHARSET_GSM: //all encodings of uncompressed 7bit return sms_data_gsm_decode(input,udl,header_present); case SMS_CHARSET_UCS2: //all encodings of uncompressed 16bit unicode return sms_data_ucs2_decode(input,udl,header_present); case SMS_CHARSET_8BIT: //all encodings of 8bit data: ASCII assumed return sms_data_8bit_decode(input,udl,header_present); default: //never happens return NULL; } } scmxx-0.9.0/src/smspdu/smsstructs.c0000644000175000017500000001554710366527625017244 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //own headers #include #include //standard headers #include void sms_pdu_message_status_init(struct sms_pdu_message_status* s) { s->status = 0; sms_pdu_time_init(&s->time); s->message_parent = NULL; s->status_parent = NULL; } void sms_pdu_time_init (struct sms_pdu_time* this) { if (this != NULL) { this->format = SMS_PDU_TIME_NONE; this->value = 0; } } int sms_pdu_time_fill (struct sms_pdu_time* this, const char* s, int tz) { struct tm* sct_tm; int status = 0; sct_tm = mem_alloc(sizeof(*sct_tm),1); /* mingw does not have strptime */ status = sscanf(s,"\"%d/%d/%d,%d:%d:%d\"", &sct_tm->tm_year,&sct_tm->tm_mon,&sct_tm->tm_mday, &sct_tm->tm_hour,&sct_tm->tm_min,&sct_tm->tm_sec); if (status == 6) /*if (strptime(s,format,&sct_tm) != NULL)*/ { if (sct_tm->tm_year < 70) sct_tm->tm_year += 100; sct_tm->tm_mon -= 1; //0 = january sct_tm->tm_yday = 0; sct_tm->tm_wday = 0; /* Not set by strptime(); tells mktime() to determine whether * daylight saving time is in effect */ sct_tm->tm_isdst = -1; /* work-around for lazy *BSD implementation of strptime() * that does not set tm_yday in struct tm */ tzset(); this->value = mktime(sct_tm); mem_realloc(sct_tm,0); sct_tm = localtime(&this->value); /* mktime() does not work correctly for this, so we use the following from * http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap04.html#tag_04_14 * (slightly modified) */ this->value = sct_tm->tm_sec + sct_tm->tm_min*60 + sct_tm->tm_hour*3600; this->value += 86400 * (sct_tm->tm_yday + (sct_tm->tm_year-70)*365 + (sct_tm->tm_year-69)/4 - (sct_tm->tm_year-1)/100 + (sct_tm->tm_year+299)/400); /* previous timezone is now GMT but value is still local time * apply timezone offset so that it really is GMT * NOTE: the phone's firmware does NOT do this * and some SCTS are broken (unset TZ field) */ if (tz <= 12*4) this->value -= (tz*15*60); this->format = SMS_PDU_TIME_ABSOLUTE; return 1; } else { //fallback for strptime failure mem_realloc(sct_tm,0); this->format = SMS_PDU_TIME_NONE; return 0; } } void sms_pdu_ud_header_init (struct sms_pdu_ud_header* s) { if (s == NULL) return; s->type = 0; s->len = 0; memset(s->data,0,sizeof(s->data)); } void sms_pdu_ud_init (struct sms_pdu_ud* s) { if (s == NULL) return; s->header = NULL; s->text = NULL; s->ack = NULL; } void sms_pdu_ud_delete (struct sms_pdu_ud* s) { unsigned int i = 0; if (s == NULL) return; if (s->header != NULL) { while (s->header[i] != NULL) { mem_realloc(s->header[i],0); ++i; } mem_realloc(s->header,0); } mem_realloc(s->text,0); } void sms_pdu_options_init (struct sms_pdu_options* s) { s->type = SMS_TYPE_SUBMIT; s->udh_present = 0; s->u.submit.sr = 0; s->u.submit.rd = 0; s->u.submit.rp = 0; } void sms_pdu_dcs_init (struct sms_pdu_dcs* s) { s->type = SMS_DCS_TYPE_NONE; s->encoding = SMS_CHARSET_GSM; } void sms_pdu_init (struct sms_pdu* s) { if (s == NULL) return; sms_pdu_options_init(&s->options); gsm_number_init(&s->address); s->pid = 0; sms_pdu_dcs_init(&s->scheme); sms_pdu_time_init(&s->timedata); s->multipart_id = 0; s->partnum = 0; s->parts = 0; s->ud = NULL; s->extra.statusreport.status = NULL; } void sms_pdu_delete (struct sms_pdu* s) { unsigned int i = 0; if (s == NULL) return; gsm_number_delete(&s->address); if (s->ud != NULL) { while (i < s->parts) { sms_pdu_ud_delete(&s->ud[i++]); } mem_realloc(s->ud,0); } if (s->extra.statusreport.status != NULL && (s->options.type == SMS_TYPE_STATUS_REPORT || s->extra.statusreport.status->status_parent == NULL)) { mem_realloc(s->extra.statusreport.status,0); } } void sms_tpdu_init (struct sms_tpdu* s) { if (s == NULL) return; gsm_number_init(&s->sca); s->pdu = NULL; } void sms_tpdu_delete (struct sms_tpdu* s) { if (s == NULL) return; gsm_number_delete(&s->sca); if (s->pdu != NULL) { sms_pdu_delete(s->pdu); mem_realloc(s->pdu,0); } } void sms_pdu_raw_init (struct sms_pdu_raw* this) { if (this == NULL) return; this->size = 0; memset(this->data,0xff,sizeof(this->data)); } void sms_pdu_raw_append (struct sms_pdu_raw* this, uint8_t* data, size_t len) { if (this->size+len > sizeof(this->data)) len = sizeof(this->data)-this->size; memcpy(this->data+this->size,data,len); this->size += len; } void sms_pdu_raw_from_hexstring (struct sms_pdu_raw* this, char* hexstring) { size_t i = 0; if (this == NULL) return; this->size = str_len(hexstring)/2; if (this->size > sizeof(this->data)) this->size = sizeof(this->data); for (; i < this->size; ++i) this->data[i] = hexstr2int(hexstring+2*i,2); } char* sms_pdu_raw_to_hexstring (struct sms_pdu_raw* this) { char* retval; size_t i = 0; if (this == NULL) return NULL; if (this->size > sizeof(this->data)) this->size = sizeof(this->data); retval = mem_alloc(this->size*2+1,1); for (; i < this->size; ++i) sprintf(retval+2*i,"%02X",this->data[i]); return retval; } void sms_slot_data_init (struct sms_slot_data* this) { if (this == NULL) return; this->slot = SMS_SLOT_INVALID; this->dir = SMS_OUTGOING; sms_pdu_raw_init(&this->tpdu); } void sms_init (struct sms* s, struct sms_slot_data* encoded, struct sms_tpdu* decoded) { unsigned int i; unsigned int p = 2; if (s == NULL || encoded == NULL || decoded == NULL || decoded->pdu == NULL) { return; } if (decoded->pdu->parts > 0) p = decoded->pdu->parts+1; s->encoded = mem_alloc(p*sizeof(*(s->encoded)),0); for (i = 0; i < p; ++i) { s->encoded[i] = NULL; } s->encoded[decoded->pdu->partnum] = encoded; s->decoded = decoded; } void sms_delete (struct sms* s) { unsigned int i = 0; if (s == NULL) return; if (s->encoded != NULL) { while (s->encoded[i] != NULL) { mem_realloc(s->encoded[i],0); ++i; } mem_realloc(s->encoded,0); } if (s->decoded != NULL) { sms_tpdu_delete(s->decoded); mem_realloc(s->decoded,0); } } scmxx-0.9.0/src/smspdu/smsudh.h0000644000175000017500000000377510343616256016314 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SMSUDH_H #define SMSUDH_H //own headers #include struct sms_pdu_ud_header* sms_udh_multipart16_get (uint16_t seqnum, uint8_t index, uint8_t total); /** print all headers as text to fp * sms_udh_fill() and sms_multipart_merge() should be * called before this one * This is called e.g. by sms_pdu_print_deliver() * * @param fp file/pipe/etc. to print to * @param plist user data from the (concatenated) short message * @param parts message parts (1-255) */ void sms_udh_print (FILE* fp, struct sms_pdu_ud* plist, uint8_t parts); void sms_udh_print_header (FILE* fp, struct sms_pdu_ud_header* header); /** to parse the user data header from a pdu */ void sms_udh_fill (struct sms_pdu* sms, uint8_t* data); /** called by sms_udh_fill(), no need to call anywhere else */ void sms_udh_multipart_mark (struct sms_pdu* data); //mainly used by sms_udh_fill() struct sms_pdu_ud_header_def { int16_t type; //negative entries are invalid uint8_t minlen; //in octets uint8_t maxlen; //in octets (obviously not more than 137(=140-1-2))) void (*print_func) (FILE* fp, uint8_t* data); //function pointer to header type printer }; extern struct sms_pdu_ud_header_def sms_pdu_ud_header_defs[]; //known header types #endif scmxx-0.9.0/src/smspdu/smssort.c0000644000175000017500000001076310357523160016505 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include static void sms_pdu_sort_type (struct sms** list, const char* sub_order) { //4 lists for type sorting struct sms** list_sub; //SMS-SUBMIT unsigned int lssub = 0; struct sms** list_del; //SMS-DELIVER unsigned int lsdel = 0; struct sms** list_sr; //SMS-STATUS-REPORT unsigned int lssr = 0; struct sms** list_uns; //unsupported types unsigned int lsuns = 0; unsigned int listsize = 0; if (list == NULL || list[0] == NULL) return; //count items in list; while (list[listsize] != NULL) ++listsize; //splitting into type lists list_sub = mem_alloc((listsize+1)*sizeof(struct sms*),0); list_del = mem_alloc((listsize+1)*sizeof(struct sms*),0); list_sr = mem_alloc((listsize+1)*sizeof(struct sms*),0); list_uns = mem_alloc((listsize+1)*sizeof(struct sms*),0); listsize = 0; //do type sorting while (list[listsize] != NULL) { switch (list[listsize]->decoded->pdu->options.type) { case SMS_TYPE_SUBMIT: list_sub[lssub++] = list[listsize]; break; case SMS_TYPE_DELIVER: list_del[lsdel++] = list[listsize]; break; case SMS_TYPE_STATUS_REPORT: list_sr[lssr++] = list[listsize]; break; default: list_uns[lsuns++] = list[listsize]; break; } ++listsize; } list_sub[lssub] = NULL; list_del[lsdel] = NULL; list_sr[lssr] = NULL; list_uns[lsuns] = NULL; //subsorting sms_pdu_sort(list_sub,sub_order); sms_pdu_sort(list_del,sub_order); sms_pdu_sort(list_sr,sub_order); //merging to list listsize = 0; for (lsuns = 0; list_uns[lsuns] != NULL; ++lsuns) list[listsize++] = list_uns[lsuns]; for (lssub = 0; list_sub[lssub] != NULL; ++lssub) list[listsize++] = list_sub[lssub]; for (lssr = 0; list_sr[lssr] != NULL; ++lssr) list[listsize++] = list_sr[lssr]; for (lsdel = 0; list_del[lsdel] != NULL; ++lsdel) list[listsize++] = list_del[lsdel]; list[listsize] = NULL; mem_realloc(list_uns,0); mem_realloc(list_sub,0); mem_realloc(list_sr,0); mem_realloc(list_del,0); } //as input for argument 4 of qsort static int sms_pdu_sort_slot (const void* s1, const void* s2) { const struct sms* sms1 = *((const struct sms**)s1); const struct sms* sms2 = *((const struct sms**)s2); int slot1 = sms1->encoded[sms1->decoded->pdu->partnum]->slot; int slot2 = sms2->encoded[sms1->decoded->pdu->partnum]->slot; return slot1-slot2; } //as input for argument 4 of qsort static int sms_pdu_sort_time (const void* s1, const void* s2) { const struct sms* sms1 = *((const struct sms**)s1); const struct sms* sms2 = *((const struct sms**)s2); struct sms_pdu_time* t1 = &sms1->decoded->pdu->timedata; struct sms_pdu_time* t2 = &sms2->decoded->pdu->timedata; if (t1->format != t2->format) return t1->format-t2->format; else return t1->value-t2->value; } void sms_pdu_sort (struct sms** list, const char* order) { char* new_order; char* orders[] = { "type", "slot", "time" }; unsigned int listsize = 0; if (list == NULL || list[0] == NULL || str_len(order) == 0) return; //count items in list; while (list[listsize] != NULL) ++listsize; //find next sorting item new_order = strchr(order,','); if (new_order != NULL) { do { ++new_order; } while (isspace((int)*new_order) && *new_order != 0); } if (strncasecmp(order,orders[0],strlen(orders[0])) == 0) { /* type sorting */ sms_pdu_sort_type(list,new_order); } else if (strncasecmp(order,orders[1],strlen(orders[1])) == 0) { /* slot sorting */ qsort(list,listsize,sizeof(*list),sms_pdu_sort_slot); } else if (strncasecmp(order,orders[2],strlen(orders[2])) == 0) { /* time sorting */ qsort(list,listsize,sizeof(*list),sms_pdu_sort_time); } } scmxx-0.9.0/src/smspdu/smscoding.h0000644000175000017500000000412210343616256016762 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SMSCODING_H #define SMSCODING_H #include #include /* This calls all functions that are needed to encode the userdata. * Returns NULL on parameter errors or if the data doesn't fit * else a char* that must be freed and which contains the data already as HEXSTRING! * Headersize MUST include the length field (means: must be value of * length field + 1)! * There is enough space left at the beginning to fit a header of * size headersize. Headersize also influences the encoding itself! * enc_len then contains the value suitable for user data length field */ /* char* sms_data_encode (enum sms_encoding charset, */ /* ucs4char_t* input, */ /* uint8_t* enc_len, */ /* uint8_t headersize); */ struct sms_pdu_raw** sms_data_encode (enum sms_encoding charset, struct sms_pdu_ud_header** header, ucs4char_t* input); /* This calls all functions that are needed to decode the userdata * returns NULL on parameter errors else a ucs4char_t* that must be freed * udl must be the user data length field from the PDU * (encoded character count for GSM, byte count else), * _not_ the string length of input which certainly differs */ ucs4char_t* sms_data_decode (enum sms_encoding charset, uint8_t* input, unsigned int udl, int header_present); #endif scmxx-0.9.0/src/smspdu/Makefile0000644000175000017500000000004610070544712016256 0ustar hendrikhendrikSUBDIR=smspdu include ../Makefile.sub scmxx-0.9.0/src/w32compat.h0000644000175000017500000000227210342335112015270 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef W32COMPAT_H #define W32COMPAT_H #if defined(WINDOWS_API) #include #define sleep(sec) Sleep(1000*sec) #define usleep(usec) Sleep(usec/1000) #define setenv(name,value,ow) SetEnvironmentVariable(name,value) #define unsetenv(name) SetEnvironmentVariable(name,NULL) #include #define S_IRGRP S_IRUSR /* TODO: this entry is not correct */ #define ETIMEDOUT 116 #define PATH_SEPARATOR '\\' #endif #endif scmxx-0.9.0/src/charsets/0002755000175000017500000000000010401301577015117 5ustar hendrikhendrikscmxx-0.9.0/src/charsets/local_dec.c0000644000175000017500000000534110271732351017174 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //own headers #include #include #include //standard headers #include #include #include #include #include ucs4char_t* convert_from_system (char* input) { ucs4char_t* retval; size_t k = 0; ucs4char_t* temp; size_t i = 0; char buffer[4+1]; //buffer for \XXXX unsigned int counter; unsigned int status = 0; if (str_len(input) == 0) return NULL; temp = convert_to_internal(get_system_charset(),input,strlen(input)); retval = mem_alloc((ucs4len(temp)+1)*sizeof(*retval),0); /* Now we have to handle all direct \XXXX character inputs */ while (temp[i] != 0) { switch (temp[i]) { case 0x5c: // backslash is cast character switch (temp[i+1]) { case 0x6e: // 'n' retval[k++] = 0x0a; ++i; break; case 0x5c: // backslash retval[k++] = 0x5c; ++i; break; default: status = 1; //assume successful loop for (counter = 0; counter < sizeof(buffer)-1; ++counter) { if (temp[i+1+counter] > (ucs4char_t)0x00 && temp[i+1+counter] <= (ucs4char_t)0x7f) { if (isxdigit((int)temp[i+1+counter])) { /* We can do this because Unicode is based on ASCII * and we just tested for ASCII */ buffer[counter] = (char)(temp[i+1+counter]&0x7f); } else { fprintf(stderr,_("%s: character %ld is not a hexdigit.\n"), _("Error on text conversion to internal charset"), (unsigned long)i+1+counter); status = 0; break; } } else { fprintf(stderr,_("%s: character %ld is not ACSII.\n"), _("Error on text conversion to internal charset"), (unsigned long)i+1+counter); status = 0; break; } } if (status == 1) { buffer[counter] = 0; retval[k++] = (ucs4char_t)hexstr2int(buffer,4); } i += counter; break; } ++i; break; default: retval[k++] = temp[i++]; break; } } retval[k] = 0; mem_realloc(temp,0); return retval; } scmxx-0.9.0/src/charsets/ucs2_enc.c0000644000175000017500000000261110367440070016765 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include "ucs2.h" #include #include ucs2char_t* convert_to_ucs2 (ucs4char_t* input) { return (ucs2char_t*)convert_from_internal(ucs2_get_iconv_charset(), input, REPMODE_IGNORE); } char* convert_to_ucs2_hexstring (ucs4char_t* input, uint16_t (*fromhe)(uint16_t i)) { char* retval; ucs2char_t* temp; unsigned int i; temp = convert_to_ucs2(input); retval = mem_alloc((ucs2len(temp)*2*sizeof(ucs2char_t))+1,1); for (i = 0; i < ucs2len(temp); ++i) { sprintf(retval+(4*i),"%04X",fromhe(temp[i])); } mem_realloc(temp,0); return retval; } scmxx-0.9.0/src/charsets/gsm_dec.c0000644000175000017500000000321410236260070016660 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //own headers #include #include #include #include "gsm.h" //standard headers #include #include ucs4char_t* convert_from_gsm (gsmchar_t* input) { ucs4char_t* retval; unsigned int i; unsigned int k=0; unsigned int g; retval = mem_alloc((strlen((char*)input)+1)*sizeof(ucs4char_t),1); for (i = 0; i < strlen((char*)input); ++i) { for (g = 0; gsm_chars[g].gsize != 0; ++g) { if (input[i] == gsm_chars[g].gval[0] && (gsm_chars[g].gsize < 2 || input[i+1] == gsm_chars[g].gval[1])) { break; } } if (gsm_chars[g].gsize == 0) { fprintf(stderr,_("Ups, value 0x%02x not found in list of valid GSM characters.\n"), input[i]); continue; } retval[k++] = gsm_chars[g].uval; i += (gsm_chars[g].gsize-1); } retval[k]=0; return mem_realloc(retval,(k+1)*sizeof(ucs4char_t)); } scmxx-0.9.0/src/charsets/ucs4_enc.c0000644000175000017500000000350510120563721016766 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //own headers #include #include #include #include "ucs4.h" //standard headers #include #include #include #include ucs4char_t* convert_to_internal (const char* from_code, char* input, size_t insize) { iconv_t cd; ucs4char_t* outbuf; char* outptr; size_t outsize; if (from_code == NULL || input == NULL || insize == 0) return NULL; cd = iconv_open(ucs4_get_iconv_charset(),from_code); if (cd == (iconv_t)-1) { fprintf(stderr,"%s: %s\n",_("Error on text conversion"), strerror(errno)); exit(EXIT_FAILURE); } outsize = insize*sizeof(ucs4char_t); outbuf = mem_alloc(outsize+sizeof(ucs4char_t),1); outptr = (char*)outbuf; if (iconv(cd,(ICONV_CAST)&input,&insize,&outptr,&outsize) == (size_t)-1) { fprintf(stderr,_("Error on text conversion from charset \"%s\" to charset \"%s\": %s\n"), from_code,ucs4_get_iconv_charset(),strerror(errno)); exit(EXIT_FAILURE); } iconv_close(cd); return mem_realloc(outbuf,(ucs4len(outbuf)+1)*sizeof(ucs4char_t)); } scmxx-0.9.0/src/charsets/local_enc.c0000644000175000017500000000172410070544712017206 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //own headers #include char* convert_to_system (ucs4char_t* input, enum repmode replacement_mode) { return convert_from_internal(get_system_charset(), input,replacement_mode); } scmxx-0.9.0/src/charsets/gsm_enc.c0000644000175000017500000000332110271732351016676 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include /* Converting to GSM and back does _NOT_ always result in the same string! * * You should only use the last 7 bits of the encoded characters! * (e.g. using the mask "& 0x7f") */ #include "gsm.h" gsmchar_t* convert_to_gsm (ucs4char_t* input) { gsmchar_t* retval; unsigned int i; unsigned int k = 0; unsigned int g; unsigned int l; retval = mem_alloc((ucs4len(input)*2)+1,0); for (i = 0; i < ucs4len(input); ++i) { for (g = 0; gsm_chars[g].gsize != 0; ++g) { if (input[i] == gsm_chars[g].uval) break; } if (gsm_chars[g].gsize == 0) { fprintf(stderr,_("Unicode value 0x%04lx is not a GSM character\n"), (unsigned long)input[i]); continue; } for (l = 0; l < gsm_chars[g].gsize; ++l) { retval[k++] = gsm_chars[g].gval[l]; } } retval[k]=0; return mem_realloc(retval,(k+1)*sizeof(gsmchar_t)); } scmxx-0.9.0/src/charsets/ucs2.c0000644000175000017500000000362410367440070016145 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //own headers #include #include //standard headers #include #include #include #ifdef WORDS_BIGENDIAN #define UCS2_DEF "UCS-2BE" #else #define UCS2_DEF "UCS-2LE" #endif const char* ucs2_get_iconv_charset() { static char* ucs2_charset = NULL; iconv_t cd; if (ucs2_charset == NULL) { cd = iconv_open(UCS2_DEF,UCS2_DEF); if (cd == (iconv_t)-1) { fprintf(stderr,_("%s: the iconv implementation of this system does not support %s"),_("Error"),UCS2_DEF); exit(EXIT_FAILURE); } else { ucs2_charset = UCS2_DEF; } iconv_close(cd); } return ucs2_charset; } size_t ucs2len (const ucs2char_t* input) { size_t retval = 0; if (input != NULL) while (input[retval] != 0) ++retval; return retval; } ucs2char_t* ucs2ndup(const ucs2char_t* s, size_t n) { ucs2char_t* retval; size_t i = 0; if (s == NULL) return NULL; while (s[i] != 0 && i < n) ++i; retval = mem_alloc((i+1)*sizeof(*retval),0); (void)memcpy(retval,s,i*sizeof(*s)); retval[i] = 0; return retval; } ucs2char_t* ucs2dup(const ucs2char_t* s) { return ucs2ndup((ucs2char_t*)s,ucs2len(s)+1); } scmxx-0.9.0/src/charsets/ucs4.c0000644000175000017500000000614510250635147016152 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //own headers #include #include #include //standard headers #include #include #include #include #ifdef WORDS_BIGENDIAN # define UCS4_WITH_ENDIANESS "UCS-4BE" #else # define UCS4_WITH_ENDIANESS "UCS-4LE" #endif const char* ucs4_get_iconv_charset() { static char* ucs4_charset = NULL; iconv_t cd; if (ucs4_charset == NULL) { cd = iconv_open(UCS4_WITH_ENDIANESS,UCS4_WITH_ENDIANESS); if (cd == (iconv_t)-1) { fprintf(stderr,_("%s: the iconv implementation of this system does not support %s"),_("Error"),UCS4_WITH_ENDIANESS); exit(EXIT_FAILURE); } else { ucs4_charset = UCS4_WITH_ENDIANESS; } iconv_close(cd); } return ucs4_charset; } size_t ucs4len (const ucs4char_t* input) { size_t retval = 0; if (input != NULL) while (input[retval] != 0) ++retval; return retval; } ucs4char_t* ucs4ndup(const ucs4char_t* s, size_t n) { ucs4char_t* retval; size_t i = 0; if (s == NULL) return NULL; while (s[i] != 0 && i < n) ++i; retval = mem_alloc((i+1)*sizeof(*retval),0); (void)memcpy(retval,s,i*sizeof(*s)); retval[i] = 0; return retval; } ucs4char_t* ucs4dup(const ucs4char_t* s) { return ucs4ndup((ucs4char_t*)s,ucs4len(s)+1); } int ucs4ncmp (const ucs4char_t* s1, const ucs4char_t* s2, size_t n) { size_t i = 0; if (s1 == NULL && s2 == NULL) { return 0; } else { if (s1 == NULL) return -1; else if (s2 == NULL) return 1; else for (;i < n; ++i) { if (s1[i] != s2[i]) { if (s1[i] < s2[i]) return -1; else return 1; } } } return 0; } int ucs4cmp (const ucs4char_t* s1, const ucs4char_t* s2) { size_t s1len = ucs4len((ucs4char_t*)s1); size_t s2len = ucs4len((ucs4char_t*)s2); return ucs4ncmp(s1,s2,(s1len >= s2len) ? s1len : s2len); } ucs4char_t* ucs4str (const ucs4char_t* haystack, const ucs4char_t* needle) { unsigned int i = 0; unsigned int len = ucs4len(needle); if (len == 0) return (ucs4char_t*)haystack; if (ucs4len(haystack) == 0) return NULL; for (; haystack[i] != 0; ++i) { if (ucs4ncmp(&(haystack[i]),needle,len) == 0) { return (ucs4char_t*)&(haystack[i]); } } return NULL; } ucs4char_t* ucs4ncpy (ucs4char_t* dest, const ucs4char_t* src, size_t n) { size_t i = 0; for (; i #include #include "ucs2.h" //standard headers #include #include ucs4char_t* convert_from_ucs2 (ucs2char_t* input) { return convert_to_internal(ucs2_get_iconv_charset(), (char*)input, ucs2len(input)*sizeof(ucs2char_t)); } ucs4char_t* convert_from_ucs2_hexstring (char* input, uint16_t (*tohe)(uint16_t i)) { ucs4char_t* retval; ucs2char_t* temp; unsigned int i; if (input == NULL) return NULL; temp = mem_alloc(((strlen(input)/4)+1)*sizeof(ucs2char_t),1); for (i = 0; ((i+1)*4) <= strlen(input); ++i) { temp[i]=tohe(hexstr2int(input+(i*4),4)); } retval = convert_from_ucs2(temp); mem_realloc(temp,0); return retval; } scmxx-0.9.0/src/charsets/ucs2.h0000644000175000017500000000151610111212754016141 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //gets the charset string for UCS-2 const char* ucs2_get_iconv_charset(); scmxx-0.9.0/src/charsets/ucs4.h0000644000175000017500000000163110111212754016141 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #ifndef ICONV_CAST # define ICONV_CAST char** #endif //gets the charset string for UCS-4 const char* ucs4_get_iconv_charset(); scmxx-0.9.0/src/charsets/gsm.c0000644000175000017500000002140010271732351016047 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "gsm.h" struct charset_translation gsm_chars[] = { { 0x0040, { 0x80, 0x00 }, 1 }, //commercial at { 0x0040, { 0x00, 0x00 }, 1 }, //commercial at { 0x00a3, { 0x01, 0x00 }, 1 }, //pound sign { 0x0024, { 0x02, 0x00 }, 1 }, //dollar sign { 0x00a5, { 0x03, 0x00 }, 1 }, //yen sign { 0x00e8, { 0x04, 0x00 }, 1 }, //small 'e' with grave { 0x00e9, { 0x05, 0x00 }, 1 }, //small 'e' with acute { 0x00f9, { 0x06, 0x00 }, 1 }, //small 'u' with grave { 0x00ec, { 0x07, 0x00 }, 1 }, //small 'i' with grave { 0x00f2, { 0x08, 0x00 }, 1 }, //small 'o' with grave { 0x00e7, { 0x09, 0x00 }, 1 }, //small 'c' with cedilla { 0x00c7, { 0x09, 0x00 }, 1 }, //capital 'C' with cedilla { 0x000a, { 0x0a, 0x00 }, 1 }, //line feed { 0x00d8, { 0x0b, 0x00 }, 1 }, //small 'O' with stroke { 0x00f8, { 0x0c, 0x00 }, 1 }, //small 'o' with stroke { 0x000d, { 0x0d, 0x00 }, 1 }, //carriage return { 0x00c5, { 0x0e, 0x00 }, 1 }, //capital 'A' with ring above { 0x00e5, { 0x0f, 0x00 }, 1 }, //small 'a' with ring above { 0x0394, { 0x10, 0x00 }, 1 }, //capital delta { 0x005f, { 0x11, 0x00 }, 1 }, //underscore / low line { 0x03a6, { 0x12, 0x00 }, 1 }, //capital phi { 0x0393, { 0x13, 0x00 }, 1 }, //capital gamma { 0x039b, { 0x14, 0x00 }, 1 }, //capital lambda { 0x03a9, { 0x15, 0x00 }, 1 }, //capital omega { 0x03a0, { 0x16, 0x00 }, 1 }, //capital pi { 0x03a8, { 0x17, 0x00 }, 1 }, //capital psi { 0x03a3, { 0x18, 0x00 }, 1 }, //capital sigma { 0x0398, { 0x19, 0x00 }, 1 }, //capital theta { 0x039a, { 0x1a, 0x00 }, 1 }, //capital xi //begin extension table one { 0x000c, { 0x1b, 0x0a }, 2 }, //form feed { 0x005e, { 0x1b, 0x14 }, 2 }, //circumflex accent { 0x007b, { 0x1b, 0x28 }, 2 }, //left curly bracket { 0x007d, { 0x1b, 0x29 }, 2 }, //right curly bracket { 0x005c, { 0x1b, 0x2f }, 2 }, //reverse solidus (back slash) { 0x005b, { 0x1b, 0x3c }, 2 }, //left square bracket { 0x007e, { 0x1b, 0x3d }, 2 }, //tilde { 0x005d, { 0x1b, 0x3e }, 2 }, //right square bracket { 0x007c, { 0x1b, 0x40 }, 2 }, //vertical line { 0x20ac, { 0x1b, 0x65 }, 2 }, //euro sign //end extension table one { 0x00c6, { 0x1c, 0x00 }, 1 }, //capital AE { 0x00e6, { 0x1d, 0x00 }, 1 }, //small ae { 0x00df, { 0x1e, 0x00 }, 1 }, //small sharp s (german) { 0x00c9, { 0x1f, 0x00 }, 1 }, //capital 'E' with acute { 0x0020, { 0x20, 0x00 }, 1 }, //space { 0x0021, { 0x21, 0x00 }, 1 }, //exclamation mark { 0x0022, { 0x22, 0x00 }, 1 }, //quotation mark { 0x0023, { 0x23, 0x00 }, 1 }, //number sign { 0x00a4, { 0x24, 0x00 }, 1 }, //currency sign { 0x00b0, { 0x24, 0x00 }, 1 }, //degree sign (not official, preference of author) { 0x0025, { 0x25, 0x00 }, 1 }, //percent sign { 0x0026, { 0x26, 0x00 }, 1 }, //ambersand { 0x0027, { 0x27, 0x00 }, 1 }, //apostrophe { 0x0028, { 0x28, 0x00 }, 1 }, //left parenthesis { 0x0029, { 0x29, 0x00 }, 1 }, //right parenthesis { 0x002a, { 0x2a, 0x00 }, 1 }, //asterisk { 0x002b, { 0x2b, 0x00 }, 1 }, //plus sign { 0x002c, { 0x2c, 0x00 }, 1 }, //comma { 0x002d, { 0x2d, 0x00 }, 1 }, //hyphen / minus { 0x002e, { 0x2e, 0x00 }, 1 }, //full stop { 0x002f, { 0x2f, 0x00 }, 1 }, //solidus { 0x0030, { 0x30, 0x00 }, 1 }, //digit zero { 0x0031, { 0x31, 0x00 }, 1 }, //digit one { 0x0032, { 0x32, 0x00 }, 1 }, //digit two { 0x0033, { 0x33, 0x00 }, 1 }, //digit three { 0x0034, { 0x34, 0x00 }, 1 }, //digit four { 0x0035, { 0x35, 0x00 }, 1 }, //digit five { 0x0036, { 0x36, 0x00 }, 1 }, //digit six { 0x0037, { 0x37, 0x00 }, 1 }, //digit seven { 0x0038, { 0x38, 0x00 }, 1 }, //digit eight { 0x0039, { 0x39, 0x00 }, 1 }, //digit nine { 0x003a, { 0x3a, 0x00 }, 1 }, //colon { 0x003b, { 0x3b, 0x00 }, 1 }, //semicolon { 0x003c, { 0x3c, 0x00 }, 1 }, //less-than sign { 0x003d, { 0x3d, 0x00 }, 1 }, //equals sign { 0x003e, { 0x3e, 0x00 }, 1 }, //greater-than sign { 0x003f, { 0x3f, 0x00 }, 1 }, //question mark { 0x00a1, { 0x40, 0x00 }, 1 }, //inverted exclamation mark { 0x0041, { 0x41, 0x00 }, 1 }, //A { 0x0391, { 0x41, 0x00 }, 1 }, //capital alpha { 0x0042, { 0x42, 0x00 }, 1 }, //B { 0x0392, { 0x42, 0x00 }, 1 }, //capital beta { 0x0043, { 0x43, 0x00 }, 1 }, //C { 0x0044, { 0x44, 0x00 }, 1 }, //D { 0x0045, { 0x45, 0x00 }, 1 }, //E { 0x0395, { 0x45, 0x00 }, 1 }, //capital epsilon { 0x0046, { 0x46, 0x00 }, 1 }, //F { 0x0047, { 0x47, 0x00 }, 1 }, //G { 0x0048, { 0x48, 0x00 }, 1 }, //H { 0x0397, { 0x48, 0x00 }, 1 }, //capital eta { 0x0049, { 0x49, 0x00 }, 1 }, //I { 0x0399, { 0x49, 0x00 }, 1 }, //capital iota { 0x004a, { 0x4a, 0x00 }, 1 }, //J { 0x004b, { 0x4b, 0x00 }, 1 }, //K { 0x039a, { 0x4b, 0x00 }, 1 }, //capital kappa { 0x004c, { 0x4c, 0x00 }, 1 }, //L { 0x004d, { 0x4d, 0x00 }, 1 }, //M { 0x039c, { 0x4d, 0x00 }, 1 }, //capital mu { 0x004e, { 0x4e, 0x00 }, 1 }, //N { 0x039d, { 0x4e, 0x00 }, 1 }, //capital nu { 0x004f, { 0x4f, 0x00 }, 1 }, //O { 0x039f, { 0x4f, 0x00 }, 1 }, //capital omicron { 0x0050, { 0x50, 0x00 }, 1 }, //P { 0x03a1, { 0x50, 0x00 }, 1 }, //capital rho { 0x0051, { 0x51, 0x00 }, 1 }, //Q { 0x0052, { 0x52, 0x00 }, 1 }, //R { 0x0053, { 0x53, 0x00 }, 1 }, //S { 0x0054, { 0x54, 0x00 }, 1 }, //T { 0x03a4, { 0x54, 0x00 }, 1 }, //capitla tau { 0x0055, { 0x55, 0x00 }, 1 }, //U { 0x03a5, { 0x55, 0x00 }, 1 }, //capital upsilon { 0x0056, { 0x56, 0x00 }, 1 }, //V { 0x0057, { 0x57, 0x00 }, 1 }, //W { 0x0058, { 0x58, 0x00 }, 1 }, //X { 0x03a7, { 0x58, 0x00 }, 1 }, //capital chi { 0x0059, { 0x59, 0x00 }, 1 }, //Y { 0x005a, { 0x5a, 0x00 }, 1 }, //Z { 0x0396, { 0x5a, 0x00 }, 1 }, //capital zeta { 0x00c4, { 0x5b, 0x00 }, 1 }, //capital 'A' with diaeresis { 0x00d6, { 0x5c, 0x00 }, 1 }, //capital 'O' with diaeresis { 0x00d1, { 0x5d, 0x00 }, 1 }, //capital 'N' with tilde { 0x00dc, { 0x5e, 0x00 }, 1 }, //capital 'U' with diaeresis { 0x00a7, { 0x5f, 0x00 }, 1 }, //section sign { 0x00bf, { 0x60, 0x00 }, 1 }, //inverted question mark { 0x0061, { 0x61, 0x00 }, 1 }, //a { 0x0062, { 0x62, 0x00 }, 1 }, //b { 0x0063, { 0x63, 0x00 }, 1 }, //c { 0x0064, { 0x64, 0x00 }, 1 }, //d { 0x0065, { 0x65, 0x00 }, 1 }, //e { 0x0066, { 0x66, 0x00 }, 1 }, //f { 0x0067, { 0x67, 0x00 }, 1 }, //g { 0x0068, { 0x68, 0x00 }, 1 }, //h { 0x0069, { 0x69, 0x00 }, 1 }, //i { 0x006a, { 0x6a, 0x00 }, 1 }, //j { 0x006b, { 0x6b, 0x00 }, 1 }, //k { 0x006c, { 0x6c, 0x00 }, 1 }, //l { 0x006d, { 0x6d, 0x00 }, 1 }, //m { 0x006e, { 0x6e, 0x00 }, 1 }, //n { 0x006f, { 0x6f, 0x00 }, 1 }, //o { 0x0070, { 0x70, 0x00 }, 1 }, //p { 0x0071, { 0x71, 0x00 }, 1 }, //q { 0x0072, { 0x72, 0x00 }, 1 }, //r { 0x0073, { 0x73, 0x00 }, 1 }, //s { 0x0074, { 0x74, 0x00 }, 1 }, //t { 0x0075, { 0x75, 0x00 }, 1 }, //u { 0x0076, { 0x76, 0x00 }, 1 }, //v { 0x0077, { 0x77, 0x00 }, 1 }, //w { 0x0078, { 0x78, 0x00 }, 1 }, //x { 0x0079, { 0x79, 0x00 }, 1 }, //y { 0x007a, { 0x7a, 0x00 }, 1 }, //z { 0x00e4, { 0x7b, 0x00 }, 1 }, //small 'a' with diaeresis { 0x00f6, { 0x7c, 0x00 }, 1 }, //small 'o' wiht diaeesis { 0x00f1, { 0x7d, 0x00 }, 1 }, //small 'n' with tilde { 0x00fc, { 0x7e, 0x00 }, 1 }, //small 'u' with diaeresis { 0x00e0, { 0x7f, 0x00 }, 1 }, //small 'a' with grave //final element { 0x0000, { 0x00, 0x00 }, 0 } }; #include size_t gsmwidth (const gsmchar_t* input) { size_t count = strlen((char*)input); unsigned int i = 0; if (input == NULL) return 0; for (; input[i] != 0; ++i) /* 0x1b marks an extension table */ if (input[i] == 0x1b) --count; return count; } unsigned int gsm_count (ucs4char_t* input, unsigned int count) { unsigned int i = 0; unsigned int k = 0; unsigned int g; if (input == NULL) return 0; for (; (count == 0 || k < count) && input[i] != 0 ; ++i) { for (g = 0; gsm_chars[g].gsize != 0; ++g) { if (input[i] == gsm_chars[g].uval) break; } k += gsm_chars[g].gsize; } /* Since some characters have an encoded size of two * k can be greater or equal than count * in this case, the last char won't fit */ if (count != 0) { if (k > count) --i; return i; } else { return k; } } scmxx-0.9.0/src/charsets/ucs4_dec.c0000644000175000017500000001213710367241647016772 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ //own headers #include #include #include #include #include "ucs4.h" //standard headers #include #include #include #include #include static size_t replace_char_escape (char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { uint16_t temp = (uint16_t)(*((ucs4char_t*)*inbuf) & UINT16_MAX); if (inbuf == NULL || *inbuf == NULL || outbuf == NULL || *outbuf == NULL || *inbytesleft <= 0) { return 0; } if (*outbytesleft < 5) { return (size_t)-1; } /* do this endianess independent */ sprintf(*outbuf,"\\%02X%02X",(temp>>8)&0xFF,temp&0xFF); *inbuf += sizeof(ucs4char_t); *inbytesleft -= sizeof(ucs4char_t); *outbuf += 5; *outbytesleft -= 5; return 0; } static size_t replace_char_questionmark (char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { if (inbuf == NULL || *inbuf == NULL || outbuf == NULL || *outbuf == NULL || *inbytesleft <= 0) { return 0; } if (*outbytesleft < 5) { return (size_t)-1; } sprintf(*outbuf,"?"); *inbuf += sizeof(ucs4char_t); *inbytesleft -= sizeof(ucs4char_t); *outbuf += 1; *outbytesleft -= 1; return 0; } static size_t replace_char(enum repmode replacement_mode, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { size_t retval = 0; switch(replacement_mode) { case REPMODE_IGNORE: fprintf(stderr,_("%s: Unicode character 0x%lx cannot be converted.\n"),_("Error"), (unsigned long)*((ucs4char_t*)*inbuf)); break; case REPMODE_ESCAPE_CHARS: retval = replace_char_escape(inbuf,inbytesleft,outbuf,outbytesleft); break; case REPMODE_QUESTIONMARK: retval = replace_char_questionmark(inbuf,inbytesleft,outbuf,outbytesleft); break; } return retval; } char* convert_from_internal (const char* to_code, ucs4char_t* input, enum repmode replacement_mode) { iconv_t cd; size_t status; int estatus; char* retval; size_t insize = sizeof(ucs4char_t); size_t insize_conv; char* inptr = (char*)input; char* inptr_conv = inptr; /* must be at least 5 for replace_char functions */ const size_t mult = (MB_LEN_MAX>5)?MB_LEN_MAX:5; /* this should be enough for every possible locale * MB_CUR_MAX can NOT be used! */ size_t outsize = ucs4len(input)*mult; size_t outsize_conv = outsize; char* outptr; char* outptr_conv; if (to_code == NULL || input == NULL) return NULL; cd = iconv_open(to_code,ucs4_get_iconv_charset()); if (cd == (iconv_t)-1) { fprintf(stderr,_("Error on text conversion from charset \"%s\" to charset \"%s\": %s\n"), ucs4_get_iconv_charset(),to_code,strerror(errno)); exit(EXIT_FAILURE); } retval = mem_alloc(outsize+mult,1); //not to be modified later outptr = retval; outptr_conv = retval; while (ucs4len((ucs4char_t*)inptr) > 0) { insize_conv = insize; status = iconv(cd, (ICONV_CAST)&inptr_conv,&insize_conv, &outptr_conv,&outsize_conv); estatus = errno; /* the character conversion may have failed * because the target charset has no such char */ if (status > (size_t)0) { insize_conv = insize; //set the vars back to before conversion try inptr_conv = inptr; outptr_conv = outptr; outsize_conv = outsize; status = replace_char(replacement_mode, &inptr_conv,&insize_conv, &outptr_conv,&outsize_conv); if (status == (size_t)-1) { //there is only one implemented estatus = E2BIG; } } /* the character conversion/replacement may be buggy */ if (status == (size_t)-1) { switch (estatus) { case E2BIG: //we have to resize outbuf, should never happen fprintf(stderr,"%s: %s %s\n",_("Error"), _("insufficient memory on unicode decoding."), _("Please report as bug.")); exit(EXIT_FAILURE); break; case EINVAL: case EILSEQ: fprintf(stderr,"%s: %s\n",_("Error with internal charset"),strerror(estatus)); exit(EXIT_FAILURE); break; default: fprintf(stderr,"%s: %s\n",_("Error"),strerror(estatus)); exit(EXIT_FAILURE); break; } } //we update the loop-external values, too inptr = inptr_conv; outptr = outptr_conv; outsize = outsize_conv; } iconv_close(cd); return retval; } scmxx-0.9.0/src/charsets/local.c0000644000175000017500000000467610350311311016356 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2002 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include //own headers #include #include #include #if defined(OS2) #define INCL_DOSNLS #include #define DOS_API static char localcp[30]; char* get_system_charset_raw() { int rc; ULONG aulCpList[8] = {0}; /* Code page list */ ULONG ulBufSize = 8 * sizeof(ULONG); /* Size of output list */ ULONG ulListSize = 0; /* Size of list returned */ rc = DosQueryCp(ulBufSize,aulCpList,&ulListSize); /* dirty solution, but it work ... */ snprintf(localcp,sizeof(localcp)-1,"CP%u",(int)aulCpList[0]); return localcp; } #elif defined(WINDOWS_API) #include static char localcp[30]; char* get_system_charset_raw() { snprintf(localcp,sizeof(localcp)-1,"CP%u",GetConsoleCP()); return localcp; } #else #include #ifdef HAVE_LANGINFO_H # include #endif char* get_system_charset_raw() { # ifdef NO_NL_LANGINFO return "ANSI_X3.4-1968"; # else //NO_NL_LANGINFO # ifdef HAVE_LIBICONV /* The default implementation uses nl_langinfo(CODESET) * If this gives you problems with your mixture * of libc and libiconv, fix it here. */ # endif return nl_langinfo(CODESET); # endif //NO_NL_LANGINFO } #endif static char* system_charset; void charset_init (char* charset, int announce) { //str_dup returns NULL on NULL input system_charset = str_dup(charset); if (announce) { fprintf(stderr,_("Using \"%s\" as system character set."),get_system_charset()); fprintf(stderr,"\n"); } gettext_set_codeset(get_system_charset()); } char* get_system_charset () { if (system_charset != NULL) return system_charset; else return get_system_charset_raw(); } scmxx-0.9.0/src/charsets/gsm.h0000644000175000017500000000215610120416034016051 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include /* The whole GSM<->Unicode translation table * Unofficial translations are indented by two spaces and * must be located below the official one. */ struct charset_translation { ucs4char_t uval; //unicode value gsmchar_t gval[2]; //GSM value uint8_t gsize; //size of GSM value }; extern struct charset_translation gsm_chars[]; scmxx-0.9.0/src/charsets/Makefile0000644000175000017500000000005010070544712016552 0ustar hendrikhendrikSUBDIR=charsets include ../Makefile.sub scmxx-0.9.0/src/gtincl.h.in0000644000175000017500000000361610261266007015347 0ustar hendrikhendrik#ifndef GTINCL_H #define GTINCL_H /* This defines the dirname for bindtextdomain */ #ifndef GETTEXT_DIRNAME #undef GETTEXT_DIRNAME #endif /* Define to the full name of this package. */ #ifndef PACKAGE_NAME #undef PACKAGE_NAME #endif /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Set this to 0 if gettext("") does not return the msgstr for msgid "" * That it returns something is a nice test and I do not consider this a bug. */ #define EXTENDED_CATALOG_SEARCH 1 #if EXTENDED_CATALOG_SEARCH #include "helper.h" /* a local work-around for xgettext (does not like the "") */ #define gettext_noscan(s) gettext(s) #define scmxx_gettext_dirname(p) {\ char* default_dirname = bindtextdomain(p,NULL);\ bindtextdomain(p,GETTEXT_DIRNAME);\ if (str_len(gettext_noscan("")) == 0) bindtextdomain(p,".");\ if (str_len(gettext_noscan("")) == 0) bindtextdomain(p,"./share/locale");\ if (str_len(gettext_noscan("")) == 0) bindtextdomain(p,"./locale");\ if (str_len(gettext_noscan("")) == 0) bindtextdomain(p,"../share/locale");\ if (str_len(gettext_noscan("")) == 0) bindtextdomain(p,"../locale");\ if (str_len(gettext_noscan("")) == 0) bindtextdomain(p,default_dirname);\ } #undef gettext_noscan #else #define scmxx_gettext_dirname(p) {\ bindtextdomain(p,GETTEXT_DIRNAME);\ } #endif #ifdef HAVE_LIBINTL_H #include #define scmxx_gettext_init() {\ textdomain(PACKAGE_NAME);\ scmxx_gettext_dirname(PACKAGE_NAME);\ } #define scmxx_gettext_codeset(c) bind_textdomain_codeset(PACKAGE_NAME,c); #else #define gettext(msg) ((char*)msg) #define ngettext(msg,msgn,n) ((char*)((n != 1) ? msgn : msg)) #define scmxx_gettext_init() { } #define scmxx_gettext_codeset(c) { } #endif #define _(msg) gettext(msg) #define gettext_set_codeset(c) scmxx_gettext_codeset(c) #endif scmxx-0.9.0/src/versit/0002755000175000017500000000000010401301577014617 5ustar hendrikhendrikscmxx-0.9.0/src/versit/vcard_out.c0000644000175000017500000002037610366527625016775 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include #include struct versit_out_handle { FILE* fp; char* charset; unsigned int needs_charset :1; enum encoding_value encoding; enum vcard_version version; unsigned int begin; }; #define HANDLE(h) ((struct versit_out_handle*)(h)) static void versit_out_begin (struct versit_out_handle* h) { if (h->begin) return; fprintf(h->fp,"BEGIN:VCARD"VERSIT_LINE_END); fprintf(h->fp,"VERSION:%s"VERSIT_LINE_END,(h->version==VCARD_VERSION_21)?"2.1":"3.0"); h->begin = 1; } static void versit_out_end (struct versit_out_handle* h) { if (!h->begin) return; fprintf(h->fp,"END:VCARD"VERSIT_LINE_END); } struct versit_out_propopt { unsigned int needs_encoding :1; unsigned int needs_charset :1; }; static void versit_out_prop (struct versit_out_handle* h, char* property, struct versit_out_propopt* p) { fprintf(h->fp,"%s",property); if (h->version != VCARD_VERSION_30 && p != NULL) { if (p->needs_charset) fprintf(h->fp,";CHARSET=%s",h->charset); if (p->needs_encoding || h->encoding != ENC_SEVENBIT) fprintf(h->fp,";ENCODING=%s",encoding_string[h->encoding]); } } static void versit_out_prop_param (struct versit_out_handle* h, char* type, char* value) { char* p = str_dup(value); size_t i = 0; switch (h->version) { case VCARD_VERSION_21: for (; i < str_len(p); ++i) p[i] = (char)(toupper((int)p[i])&0x7F); break; case VCARD_VERSION_30: for (; i < str_len(p); ++i) p[i] = (char)(tolower((int)p[i])&0x7F); break; } if (strcasecmp(type,"TYPE") == 0) type = NULL; if (type) fprintf(h->fp,";%s=%s",type,p); else fprintf(h->fp,";%s",p); mem_realloc(p,0); } static char* versit_out_convert (struct versit_out_handle* h, ucs4char_t* text, struct versit_out_propopt* p) { char* temp = convert_from_internal(h->charset,text,REPMODE_QUESTIONMARK); char* retval = (char*)encode_chars(h->encoding,(unsigned char*)temp); p->needs_charset = h->needs_charset; if (is_eightbit((uint8_t*)temp)) p->needs_encoding = 1; mem_realloc(temp,0); return retval; } void* versit_out_open (FILE* fp, char* cset, enum encoding_value enc, enum vcard_version version) { struct versit_out_handle* h = mem_alloc(sizeof(*h),0); char* l; h->fp = fp; h->encoding = enc; if (cset != NULL && (strncmp(cset,"ANSI_X3",7) == 0 || strcmp(cset,"ASCII") == 0 || strcmp(cset,"646") == 0)) { l = str_dup(setlocale(LC_ALL,NULL)); setlocale(LC_ALL,"C"); h->charset = str_dup(get_system_charset_raw()); setlocale(LC_ALL,l); mem_realloc(l,0); /* ASCII is the default for vCard-2.1 */ h->needs_charset = 0; /* ASCII is always 7bit charset and 7bit is default for vCard-2.1 */ if (h->encoding == ENC_EIGHTBIT) h->encoding = ENC_SEVENBIT; } else { h->charset = str_dup(cset); h->needs_charset = 1; /* It's better to assume that his need 8bit. * However, honour the 7bit user request. */ if (h->encoding == ENC_SEVENBIT) h->encoding = ENC_QUOTEDPRINTABLE; } h->version = version; h->begin = 0; return (void*)h; } void versit_out_close (void* h) { versit_out_end(HANDLE(h)); mem_realloc(HANDLE(h)->charset,0); mem_realloc(h,0); } void versit_out_number(void* h, struct gsm_number* num, uint32_t type) { char* temp = gsm_number_get(num); if (str_len(temp)) { versit_out_begin(HANDLE(h)); versit_out_prop(HANDLE(h),"TEL",NULL); if (type&VERSIT_NUMBER_HOME) versit_out_prop_param(HANDLE(h),"TYPE","HOME"); if (type&VERSIT_NUMBER_WORK) versit_out_prop_param(HANDLE(h),"TYPE","WORK"); if (type&VERSIT_NUMBER_CELL) versit_out_prop_param(HANDLE(h),"TYPE","CELL"); if (type&VERSIT_NUMBER_FAX) versit_out_prop_param(HANDLE(h),"TYPE","FAX"); fprintf(HANDLE(h)->fp,":%s"VERSIT_LINE_END,temp); } mem_realloc(temp,0); } void versit_out_name (void* h, ucs4char_t* first, ucs4char_t* last) { struct versit_out_propopt p = { 0, 0 }; char* given_name = versit_out_convert(HANDLE(h),first,&p); char* family_name = versit_out_convert(HANDLE(h),last,&p); if (str_len(given_name) || str_len(family_name)) { versit_out_begin(HANDLE(h)); versit_out_prop(HANDLE(h),"N",&p); fprintf(HANDLE(h)->fp,":%s;%s"VERSIT_LINE_END, (given_name)?given_name:"", (family_name)?family_name:""); } mem_realloc(given_name,0); mem_realloc(family_name,0); } void versit_out_address (void* h, ucs4char_t* street, ucs4char_t* city, ucs4char_t* country,ucs4char_t* postal) { struct versit_out_propopt p = { 0, 0 }; char* st = versit_out_convert(HANDLE(h),street,&p); char* ci = versit_out_convert(HANDLE(h),city,&p); char* co = versit_out_convert(HANDLE(h),country,&p); char* po = versit_out_convert(HANDLE(h),postal,&p); if (str_len(st) || str_len(ci) || str_len(co) || str_len(po)) { versit_out_begin(HANDLE(h)); versit_out_prop(HANDLE(h),"ADR",&p); fprintf(HANDLE(h)->fp,":;;%s;%s;;%s;%s"VERSIT_LINE_END, (st)?st:"",(ci)?ci:"",(co)?co:"",(po)?po:""); } mem_realloc(st,0); mem_realloc(ci,0); mem_realloc(co,0); mem_realloc(po,0); } static void versit_out_misc (void* h, char* prop, ucs4char_t* value) { struct versit_out_propopt p = { 0, 0 }; char* v = versit_out_convert(HANDLE(h),value,&p); if (str_len(v)) { versit_out_begin(HANDLE(h)); versit_out_prop(HANDLE(h),prop,&p); fprintf(HANDLE(h)->fp,":%s"VERSIT_LINE_END,(v)?v:""); } mem_realloc(v,0); } void versit_out_org (void* h, ucs4char_t* org) { versit_out_misc(h,"ORG",org); } void versit_out_email (void* h, ucs4char_t* email) { versit_out_misc(h,"EMAIL",email); } void versit_out_url (void* h, ucs4char_t* url) { versit_out_misc(h,"URL",url); } void versit_out_revision (void* h, ucs4char_t* rev) { versit_out_misc(h,"REV",rev); } void versit_out_birthday (void* h, uint16_t year, uint16_t month, uint16_t day) { if (year >= 1900 && 1 <= month && month <=12 && 1 <= day && day != 31) { versit_out_begin(HANDLE(h)); versit_out_prop(HANDLE(h),"BDAY",NULL); fprintf(HANDLE(h)->fp,":%04d-%02d-%02d"VERSIT_LINE_END, year,month,day); } } void versit_out_photo_url (void* h, char* url) { versit_out_begin(HANDLE(h)); switch (HANDLE(h)->version) { case VCARD_VERSION_21: versit_out_prop(HANDLE(h),"X-SIEMENS-FLEXMEM",NULL); versit_out_prop_param(HANDLE(h),NULL,"PHOTO"); break; case VCARD_VERSION_30: versit_out_prop(HANDLE(h),"PHOTO",NULL); versit_out_prop_param(HANDLE(h),"VALUE","uri"); break; } fprintf(HANDLE(h)->fp,":%s"VERSIT_LINE_END,url); } void versit_out_nickname (void* h, char* nick) { versit_out_begin(HANDLE(h)); switch (HANDLE(h)->version) { case VCARD_VERSION_21: versit_out_prop(HANDLE(h),"X-SIEMENS-NICKNAME",NULL); break; case VCARD_VERSION_30: versit_out_prop(HANDLE(h),"NICKNAME",NULL); break; } fprintf(HANDLE(h)->fp,":%s"VERSIT_LINE_END,nick); } void versit_out_messaging (void* h, char* type, char* value) { char* part1prefix = "messaging/"; char* part2 = "All"; char* temp = mem_alloc(1+sizeof(part1prefix)+str_len(type)+sizeof(part2)+1,1); versit_out_begin(HANDLE(h)); sprintf(temp,"X-%s%s-%s",part1prefix,type,part2); versit_out_prop(HANDLE(h),temp,NULL); fprintf(HANDLE(h)->fp,":%s",value); mem_realloc(temp,0); } void versit_out_serial (void* h, uint16_t value) { versit_out_begin(HANDLE(h)); versit_out_prop(HANDLE(h),"X-SIEMENS-SERIAL",NULL); fprintf(HANDLE(h)->fp,":%X",value); } scmxx-0.9.0/src/versit/encoding.c0000644000175000017500000000500710350060527016551 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2004 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "versit.h" #include "helper.h" #include #include int is_eightbit (uint8_t* s) { if (s != NULL) while (*s != 0) { if (*s > 0x7F) return 1; ++s; } return 0; } const char* base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char* encoding_string[4] = { "7BIT", "8BIT", "QUOTED-PRINTABLE", "BASE64", }; unsigned char* encode_chars (enum encoding_value enc, unsigned char* input) { unsigned char* retval; size_t i = 0; size_t len = str_len((char*)input); unsigned int base = 0; switch (enc) { case ENC_SEVENBIT: retval = (unsigned char*)str_dup((char*)input); for (; i < str_len((char*)retval); ++i) { if (retval[i] >= 0x80) retval[i] = ' '; } return retval; case ENC_EIGHTBIT: return (unsigned char*)str_dup((char*)input); case ENC_QUOTEDPRINTABLE: //quoted printable as described in RFC 2045, chapter 6.7 retval = mem_alloc((len*3)+1,1); while (*input != 0) { if ((33 <= *input && *input <= 60) || (62 <= *input && *input <= 126) || ((*input == 9 || *input == 32) && *(input+1) != 0)) { retval[i] = *input; ++i; } else { sprintf((char*)retval+i,"=%02X",*input); i += 3; } ++input; } return retval; case ENC_BASE64: retval = mem_alloc(((len-(len%3)+3)*4)+1,1); for (i = 0; i < len; i += 3) { retval[base++] = base64[(input[i]>>2)&63]; retval[base++] = base64[((input[i]<<4)+((input[i+1]>>4)&15))&63]; if (i+1 < len) retval[base++] = base64[((input[i+1]<<2)+((input[i+2]>>6)&3))&63]; else retval[base++] = '='; if (i+2 < len) retval[base++] = base64[input[i+2]&63]; else retval[base++] = '='; } return retval; default: return NULL; } } scmxx-0.9.0/src/versit/encoding.h0000644000175000017500000000000010350060527016542 0ustar hendrikhendrikscmxx-0.9.0/src/versit/Makefile0000644000175000017500000000004610350060527016255 0ustar hendrikhendrikSUBDIR=versit include ../Makefile.sub scmxx-0.9.0/src/pinfile.h0000644000175000017500000000342710250635500015104 0ustar hendrikhendrik/*************************************************************************** * copyright : (C) 2005 by Hendrik Sattler * * mail : post@hendrik-sattler.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SCMXX_PIN_H #define SCMXX_PIN_H /* typical request strings: * "SIM PIN", "SIM PUK" (SIM PIN and PUK) * "SIM PIN2", "SIM PUK2" (SIM PIN 2 and PUK 2) * "PH-SIM PIN", "PH-SIM PUK" (theft protection PIN and PUK) * * There are device specific codes (SIM LOCK) but you * usually do not need them: * "PH-FSIM PIN", "PH-FSIM PUK" (Phone locked to very first inserted SIM) * "PH-NET PIN", "PH-NET PUK" (Network Personalization is actually a PUK) * "PH-NETSUB PIN", "PH-NETSUB PUK" (Network Subset Personalization is actually a PUK) * "PH-SP PIN", "PH-SP PUK" (Network Personalization is actually a PUK) * "PH-CORP PIN", "PH-CORP PUK" (Network Personalization is actually a PUK) * * Other request are ignored: * * Return value (malloc'ed values): * "" on a pin request (if pin is defined in file) * "," on a puk request (if puk AND pin is defined in file) * "" if the pin file does not exist or the valid request cannot be processed * NULL on an invalid request */ char* pinfile_get (char* request); #endif scmxx-0.9.0/src/config.h.in0000644000175000017500000000767210401301607015332 0ustar hendrikhendrik/* src/config.h.in. Generated from configure.in by autoheader. */ /* This defines the dirname for bindtextdomain */ #undef GETTEXT_DIRNAME /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_BLUETOOTH_BLUETOOTH_H /* Define to 1 if you have the header file. */ #undef HAVE_BLUETOOTH_H /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the header file. */ #undef HAVE_GNUGETOPT_GETOPT_H /* Define to 1 if you have the header file. */ #undef HAVE_ICONV_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `labs' function. */ #undef HAVE_LABS /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* define this if you want to use and link to libbluetooth */ #undef HAVE_LIBBLUETOOTH /* Define to 1 if you have the `iconv' library (-liconv). */ #undef HAVE_LIBICONV /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `log10' function. */ #undef HAVE_LOG10 /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_NETGRAPH_BLUETOOTH_INCLUDE_NG_BTSOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_POPT_H /* Define to 1 if you have the header file. */ #undef HAVE_SHLOBJ_H /* Define to 1 if you have the header file. */ #undef HAVE_SHLWAPI_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITSTRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H /* Define to 1 if you have the header file. */ #undef HAVE_WS2BTH_H /* Define as const if the declaration of iconv() needs const */ #undef ICONV_CAST /* define this to include own cfmakeraw() */ #undef NO_CFMAKERAW /* define this to include nl_langinfo() replacement */ #undef NO_NL_LANGINFO /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as 1 to use getopt or as 2 to use libpopt */ #undef PARSELIB /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* This defines the default device to open parameter --device which overwrites this setting */ #undef TTYPORT /* This defines the default serial baudrate, valid values may depend on system */ #undef TTYSPEED /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN scmxx-0.9.0/docs/0002755000175000017500000000000010401301641013434 5ustar hendrikhendrikscmxx-0.9.0/docs/doc_sources.txt0000644000175000017500000000026507723512025016523 0ustar hendrikhendrikFurther documents are available from: http://www.my-siemens.com http://www.etsi.org http://www.nobbi.com I guess that I'm not allowed to publish them here. I did not ask, either. scmxx-0.9.0/docs/Makefile.in0000644000175000017500000000557310265504365015531 0ustar hendrikhendrikSHELL=@SHELL@ prefix=@prefix@ mandir=$(DESTDIR)@mandir@ INSTALL=@INSTALL@ PACKAGE_NAME=@PACKAGE_NAME@ MANCAT=1 MAN=$(PACKAGE_NAME).$(MANCAT) MAN_LANGS=$(patsubst $(PACKAGE_NAME).%.xml,%,$(wildcard $(PACKAGE_NAME).??.xml)) MAN_I18N=$(patsubst %,$(PACKAGE_NAME).%.$(MANCAT),$(MAN_LANGS)) #Use db2x_* directly, because docbook2x-0.8.5 is broken DB2X_XSLTPROC=@DB2X_XSLTPROC@ DB2X_MANXML=@DB2X_MANXML@ XSLTPROC=@XSLTPROC@ #those are only used for xsltproc XSL_MAN=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl XSL_MAN_UTF8=docbook-man-utf8.xsl XSL_HTML=http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl .PHONY: all all: man-doc html-doc .PHONY: man-doc man-doc: $(MAN_I18N) # If doxbook2x programs are not present, try the N. Walsh stylesheets. # The xsltproc --output option is broken/ignored (probably forced by the XSL file) # output always goes to $(MAN) as specified by the XML file %.ru.$(MANCAT): %.ru.xml @-( test "$(DB2X_XSLTPROC)" && test "$(DB2X_MANXML)" && \ echo "docbook2x: $< -> $@" && \ $(DB2X_XSLTPROC) -s man $< | $(DB2X_MANXML) --encoding=UTF-8 --to-stdout >$@ ) || \ ( ( rm $(MAN) 2>/dev/null || true ) && \ test ! "$(DB2X_XSLTPROC)" && test ! "$(DB2X_MANXML)" && test "$(XSLTPROC)" && \ echo "xsltproc: $< -> $@" && \ $(XSLTPROC) $(XSL_MAN_UTF8) $< && test -f $(MAN) && mv $(MAN) $@ ) %.$(MANCAT): %.xml @-( test "$(DB2X_XSLTPROC)" && test "$(DB2X_MANXML)" && \ echo "docbook2x: $< -> $@" && \ $(DB2X_XSLTPROC) -s man $< | $(DB2X_MANXML) --to-stdout >$@ ) || \ ( ( rm $(MAN) 2>/dev/null || true ) && \ test ! "$(DB2X_XSLTPROC)" && test ! "$(DB2X_MANXML)" && test "$(XSLTPROC)" && \ echo "xsltproc: $< -> $@" && \ $(XSLTPROC) $(XSL_MAN) $< && test -f $(MAN) && mv $(MAN) $@ ) .PHONY: html-doc html-doc: $(patsubst %,$(PACKAGE_NAME).%.html,$(MAN_LANGS)) %.html: %.xml #default output for HTML is to stdout @-test "$(XSLTPROC)" && \ echo "xsltproc: $< -> $@" && \ $(XSLTPROC) $(XSL_HTML) $< >$@ .PHONY: clean clean: @echo "To remove the troff and html files, run the distclean make target." .PHONY: distclean distclean: rm -f $(patsubst %,$(PACKAGE_NAME).%.1,$(MAN_LANGS)); rm -f $(patsubst %,$(PACKAGE_NAME).%.html,$(MAN_LANGS)); .PHONY: install-$(PACKAGE_NAME).en.$(MANCAT) install-$(PACKAGE_NAME).en.$(MANCAT): $(PACKAGE_NAME).en.$(MANCAT) $(INSTALL) -d $(mandir)/man$(MANCAT); \ $(INSTALL) -m 644 $(PACKAGE_NAME).en.$(MANCAT) $(mandir)/man$(MANCAT)/$(MAN); \ .PHONY: install-$(PACKAGE_NAME).%.$(MANCAT) install-$(PACKAGE_NAME).%.$(MANCAT): $(PACKAGE_NAME).%.$(MANCAT) $(INSTALL) -d $(mandir)/$*/man$(MANCAT); \ $(INSTALL) -m 644 $(PACKAGE_NAME).$*.$(MANCAT) $(mandir)/$*/man$(MANCAT)/$(MAN); \ .PHONY: install install: $(patsubst %,install-$(PACKAGE_NAME).%.$(MANCAT),$(MAN_LANGS)) .PHONY: uninstall uninstall: -rm -f $(mandir)/man$(MANCAT)/$(MAN) -rm -f $(mandir)/*/man$(MANCAT)/$(MAN); scmxx-0.9.0/docs/gsm0338.txt0000644000175000017500000002223007723512025015313 0ustar hendrikhendrik# Source: http://www.unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT # # Name: GSM 03.38 to Unicode # Unicode version: 3.0 # Table version: 1.1 # Table format: Format A # Date: 2000 May 30 # Authors: Ken Whistler , # Kent Karlsson , # Markus Kuhn # # Copyright (c) 2000 Unicode, Inc. All Rights reserved. # # This file is provided as-is by Unicode, Inc. (The Unicode Consortium). # No claims are made as to fitness for any particular purpose. No # warranties of any kind are expressed or implied. The recipient # agrees to determine applicability of information provided. If this # file has been provided on optical media by Unicode, Inc., the sole # remedy for any claim will be exchange of defective media within 90 # days of receipt. # # Unicode, Inc. hereby grants the right to freely use the information # supplied in this file in the creation of products supporting the # Unicode Standard, and to make copies of this file in any form for # internal or external distribution as long as this notice remains # attached. # # General notes: # # This table contains the data the Unicode Consortium has on how # ETSI GSM 03.38 7-bit default alphabet characters map into Unicode. # This mapping is based on ETSI TS 100 900 V7.2.0 (1999-07), with # a correction of 0x09 to *small* c-cedilla, instead of *capital* # C-cedilla. # # Format: Three tab-separated columns # Column #1 is the ETSI GSM 03.38 7-bit default alphabet # code (in hex as 0xXX, or 0xXXXX for double-byte # sequences) # Column #2 is the Unicode scalar value (in hex as 0xXXXX) # Column #3 the Unicode name (follows a comment sign, '#') # # The entries are in ETSI GSM 03.38 7-bit default alphabet code order. # # Note that ETSI GSM 03.38 also allows for the use of UCS-2 (UTF-16 # restricted to the BMP) in GSM/SMS messages. # # Note also that there are commented Greek mappings for some # capital Latin characters. This follows from the clear intent # of the ETSI GSM 03.38 to have glyph coverage for the uppercase # Greek alphabet by reusing Latin letters that have the same # form as an uppercase Greek letter. Conversion implementations # should be aware of this fact. # # The ETSI GSM 03.38 specification shows an uppercase C-cedilla # glyph at 0x09. This may be the result of limited display # capabilities for handling characters with descenders. However, the # language coverage intent is clearly for the lowercase c-cedilla, as shown # in the mapping below. The mapping for uppercase C-cedilla is shown # in a commented line in the mapping table. # # The ESC character 0x1B is # mapped to the no-break space character, unless it is part of a # valid ESC sequence, to facilitate round-trip compatibility in # the presence of unknown ESC sequences. # # 0x00 is NULL (when followed only by 0x00 up to the # end of (fixed byte length) message, possibly also up to # FORM FEED. But 0x00 is also the code for COMMERCIAL AT # when some other character (CARRIAGE RETURN if nothing else) # comes after the 0x00. # # Version history # 1.0 version: first creation # 1.1 version: fixed problem with the wrong line being a comment, # added text regarding 0x00's interpretation, # added second mapping for C-cedilla, # added mapping of 0x1B escape to NBSP for display. # # Updated versions of this file may be found in: # # # Any comments or problems, contact # Please note that is an archival address; # notices will be checked, but do not expect an immediate response. # 0x00 0x0040 # COMMERCIAL AT #0x00 0x0000 # NULL (see note above) 0x01 0x00A3 # POUND SIGN 0x02 0x0024 # DOLLAR SIGN 0x03 0x00A5 # YEN SIGN 0x04 0x00E8 # LATIN SMALL LETTER E WITH GRAVE 0x05 0x00E9 # LATIN SMALL LETTER E WITH ACUTE 0x06 0x00F9 # LATIN SMALL LETTER U WITH GRAVE 0x07 0x00EC # LATIN SMALL LETTER I WITH GRAVE 0x08 0x00F2 # LATIN SMALL LETTER O WITH GRAVE 0x09 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA #0x09 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA (see note above) 0x0A 0x000A # LINE FEED 0x0B 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE 0x0C 0x00F8 # LATIN SMALL LETTER O WITH STROKE 0x0D 0x000D # CARRIAGE RETURN 0x0E 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE 0x0F 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE 0x10 0x0394 # GREEK CAPITAL LETTER DELTA 0x11 0x005F # LOW LINE 0x12 0x03A6 # GREEK CAPITAL LETTER PHI 0x13 0x0393 # GREEK CAPITAL LETTER GAMMA 0x14 0x039B # GREEK CAPITAL LETTER LAMDA 0x15 0x03A9 # GREEK CAPITAL LETTER OMEGA 0x16 0x03A0 # GREEK CAPITAL LETTER PI 0x17 0x03A8 # GREEK CAPITAL LETTER PSI 0x18 0x03A3 # GREEK CAPITAL LETTER SIGMA 0x19 0x0398 # GREEK CAPITAL LETTER THETA 0x1A 0x039E # GREEK CAPITAL LETTER XI 0x1B 0x00A0 # ESCAPE TO EXTENSION TABLE (or displayed as NBSP, see note above) 0x1B0A 0x000C # FORM FEED 0x1B14 0x005E # CIRCUMFLEX ACCENT 0x1B28 0x007B # LEFT CURLY BRACKET 0x1B29 0x007D # RIGHT CURLY BRACKET 0x1B2F 0x005C # REVERSE SOLIDUS 0x1B3C 0x005B # LEFT SQUARE BRACKET 0x1B3D 0x007E # TILDE 0x1B3E 0x005D # RIGHT SQUARE BRACKET 0x1B40 0x007C # VERTICAL LINE 0x1B65 0x20AC # EURO SIGN 0x1C 0x00C6 # LATIN CAPITAL LETTER AE 0x1D 0x00E6 # LATIN SMALL LETTER AE 0x1E 0x00DF # LATIN SMALL LETTER SHARP S (German) 0x1F 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE 0x20 0x0020 # SPACE 0x21 0x0021 # EXCLAMATION MARK 0x22 0x0022 # QUOTATION MARK 0x23 0x0023 # NUMBER SIGN 0x24 0x00A4 # CURRENCY SIGN 0x25 0x0025 # PERCENT SIGN 0x26 0x0026 # AMPERSAND 0x27 0x0027 # APOSTROPHE 0x28 0x0028 # LEFT PARENTHESIS 0x29 0x0029 # RIGHT PARENTHESIS 0x2A 0x002A # ASTERISK 0x2B 0x002B # PLUS SIGN 0x2C 0x002C # COMMA 0x2D 0x002D # HYPHEN-MINUS 0x2E 0x002E # FULL STOP 0x2F 0x002F # SOLIDUS 0x30 0x0030 # DIGIT ZERO 0x31 0x0031 # DIGIT ONE 0x32 0x0032 # DIGIT TWO 0x33 0x0033 # DIGIT THREE 0x34 0x0034 # DIGIT FOUR 0x35 0x0035 # DIGIT FIVE 0x36 0x0036 # DIGIT SIX 0x37 0x0037 # DIGIT SEVEN 0x38 0x0038 # DIGIT EIGHT 0x39 0x0039 # DIGIT NINE 0x3A 0x003A # COLON 0x3B 0x003B # SEMICOLON 0x3C 0x003C # LESS-THAN SIGN 0x3D 0x003D # EQUALS SIGN 0x3E 0x003E # GREATER-THAN SIGN 0x3F 0x003F # QUESTION MARK 0x40 0x00A1 # INVERTED EXCLAMATION MARK 0x41 0x0041 # LATIN CAPITAL LETTER A #0x41 0x0391 # GREEK CAPITAL LETTER ALPHA 0x42 0x0042 # LATIN CAPITAL LETTER B #0x42 0x0392 # GREEK CAPITAL LETTER BETA 0x43 0x0043 # LATIN CAPITAL LETTER C 0x44 0x0044 # LATIN CAPITAL LETTER D 0x45 0x0045 # LATIN CAPITAL LETTER E #0x45 0x0395 # GREEK CAPITAL LETTER EPSILON 0x46 0x0046 # LATIN CAPITAL LETTER F 0x47 0x0047 # LATIN CAPITAL LETTER G 0x48 0x0048 # LATIN CAPITAL LETTER H #0x48 0x0397 # GREEK CAPITAL LETTER ETA 0x49 0x0049 # LATIN CAPITAL LETTER I #0x49 0x0399 # GREEK CAPITAL LETTER IOTA 0x4A 0x004A # LATIN CAPITAL LETTER J 0x4B 0x004B # LATIN CAPITAL LETTER K #0x4B 0x039A # GREEK CAPITAL LETTER KAPPA 0x4C 0x004C # LATIN CAPITAL LETTER L 0x4D 0x004D # LATIN CAPITAL LETTER M #0x4D 0x039C # GREEK CAPITAL LETTER MU 0x4E 0x004E # LATIN CAPITAL LETTER N #0x4E 0x039D # GREEK CAPITAL LETTER NU 0x4F 0x004F # LATIN CAPITAL LETTER O #0x4F 0x039F # GREEK CAPITAL LETTER OMICRON 0x50 0x0050 # LATIN CAPITAL LETTER P #0x50 0x03A1 # GREEK CAPITAL LETTER RHO 0x51 0x0051 # LATIN CAPITAL LETTER Q 0x52 0x0052 # LATIN CAPITAL LETTER R 0x53 0x0053 # LATIN CAPITAL LETTER S 0x54 0x0054 # LATIN CAPITAL LETTER T #0x54 0x03A4 # GREEK CAPITAL LETTER TAU 0x55 0x0055 # LATIN CAPITAL LETTER U #0x55 0x03A5 # GREEK CAPITAL LETTER UPSILON 0x56 0x0056 # LATIN CAPITAL LETTER V 0x57 0x0057 # LATIN CAPITAL LETTER W 0x58 0x0058 # LATIN CAPITAL LETTER X #0x58 0x03A7 # GREEK CAPITAL LETTER CHI 0x59 0x0059 # LATIN CAPITAL LETTER Y 0x5A 0x005A # LATIN CAPITAL LETTER Z #0x5A 0x0396 # GREEK CAPITAL LETTER ZETA 0x5B 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS 0x5C 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS 0x5D 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE 0x5E 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS 0x5F 0x00A7 # SECTION SIGN 0x60 0x00BF # INVERTED QUESTION MARK 0x61 0x0061 # LATIN SMALL LETTER A 0x62 0x0062 # LATIN SMALL LETTER B 0x63 0x0063 # LATIN SMALL LETTER C 0x64 0x0064 # LATIN SMALL LETTER D 0x65 0x0065 # LATIN SMALL LETTER E 0x66 0x0066 # LATIN SMALL LETTER F 0x67 0x0067 # LATIN SMALL LETTER G 0x68 0x0068 # LATIN SMALL LETTER H 0x69 0x0069 # LATIN SMALL LETTER I 0x6A 0x006A # LATIN SMALL LETTER J 0x6B 0x006B # LATIN SMALL LETTER K 0x6C 0x006C # LATIN SMALL LETTER L 0x6D 0x006D # LATIN SMALL LETTER M 0x6E 0x006E # LATIN SMALL LETTER N 0x6F 0x006F # LATIN SMALL LETTER O 0x70 0x0070 # LATIN SMALL LETTER P 0x71 0x0071 # LATIN SMALL LETTER Q 0x72 0x0072 # LATIN SMALL LETTER R 0x73 0x0073 # LATIN SMALL LETTER S 0x74 0x0074 # LATIN SMALL LETTER T 0x75 0x0075 # LATIN SMALL LETTER U 0x76 0x0076 # LATIN SMALL LETTER V 0x77 0x0077 # LATIN SMALL LETTER W 0x78 0x0078 # LATIN SMALL LETTER X 0x79 0x0079 # LATIN SMALL LETTER Y 0x7A 0x007A # LATIN SMALL LETTER Z 0x7B 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS 0x7C 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS 0x7D 0x00F1 # LATIN SMALL LETTER N WITH TILDE 0x7E 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS 0x7F 0x00E0 # LATIN SMALL LETTER A WITH GRAVE scmxx-0.9.0/docs/adr.txt0000644000175000017500000002221310366515316014761 0ustar hendrikhendrikSiemens .adr file format ======================== Author: Hendrik Sattler Location of .adr files: .adr files can be found in the "/Address book" directory of the FlexMem (accessible by obexftp protocl) or MMC. Only phones manufactured by Siemens that have an address book may have such a file (with exception to phones with SymbianOS). The known phones are: S45, ME45, SL42, SL45, SL45i, S55 and SL55 File name explanation: the ?? seem to indicate the file version as the number increases with newer models. Known versions are (and thus supported): 02: SL42, SL45, S45, ME45 03: S45, ME45 07: S55 08: SL55 Endianness is little-endian (except when stated otherwise). the 9F??.adr file ==================== Header: List count (1 byte): the number of lists v02 and v03: 6 v07: 7 v08: ??? 0x04: unknown meaning #(list count)*1byte: the meaning of each of the lists, represented by an 8bit number. The number is the field number from the 5F??.adr file (counted from 1), thus last name, index and the telephone numbers. Then follow some other unknown bytes that always end in the sequence: 0x02 0x04 0xc3 0x05 0xc3 0x05 After that follow #(list count) lists of 16bit integers. The numbers are all index numbers from the 7F??.adr file, counting from 0. The list order depends on the type of the field. Entries that are marked deleted in the 7F??.adr are omitted. It is unclear, though, what this file is actually used for. It is not necessary for decoding. the 7F??.adr file ==================== This file contains a simple list of 16bit integers that mark the offset in the 5F??.adr file (see below). The MSB marks deleted entries: 1: deleted 0: not deleted the 5F??.adr file ==================== The file has the following format: 5x 16bit integers file header: 1: number of fields per entry: v02=19, v03=20, v07=28, v08=29 2: number of undeleted entries 3: unknown (always 0x0000) 4: number of deleted entries 5: unknown (always 0x0001) Example: 13 00 | 2a 00 | 00 00 | 01 00 | 01 00 Now come #(number of fields) 16bit integers that specify the entry limits. These are joined values with the following decoding rule: bits 15..3 (upper 13bits) maximum field size in bits (including the end-of-field element) or in bytes if you shift 3 bits to the right. bits 2..0 (lower 3 bits) field format: 0x0: 8bit integer values end-of-field element: none 0x1: semi-octet string as defined in ETSI 23.040 (*) end-of-field element: >=0xf0 (includes data if <=0xfd) 0x2: ISO-8859-1 string end-of-field element: 0x00 0x3: UCS-2 unicode string end-of-field element: 0x0000 0x4: 16bit integer values end-of-field element: none 0x5: 16bit integers used for date end-of-field element: none (*) with additional elements: A='*' B='#' C='+' (not, if leading plus) D='?' (marks a variable part of a number) E is unknown F is reserved for padding Examples: SL42: 13 01 93 01 13 01 93 02 13 01 13 01 93 00 4a 01 0a 02 4a 00 a9 00 a9 00 a9 00 a9 00 08 00 08 00 08 00 08 00 82 00 S55: 13 01 93 01 13 01 93 02 13 01 13 01 13 08 93 00 9a 01 9a 01 0a 02 4a 00 a9 00 a9 00 a9 00 a9 00 a9 00 08 00 08 00 08 00 08 00 08 00 82 00 14 00 24 00 35 00 08 00 08 00 SL55: 13 01 93 01 13 01 93 02 13 01 13 01 13 08 93 00 9a 01 9a 01 0a 02 4a 00 a9 00 a9 00 a9 00 a9 00 a9 00 08 00 08 00 08 00 08 00 08 00 82 00 14 00 24 00 35 00 08 00 08 00 07 00 See description of fields at end of file. It may happen that the entry limit description is followed by some bytes of value 0xdd. Now the entries begin: Empty entries: begin with 0xee which is followed by an unknown number of bytes of value 0xdd. Non-empty entries: have the following format:
header: begin with #(number of fields) 16bit integers that specify the actual length (in bytes!) of the field in this entry Example: 10 00 12 00 0C 00 0E 00 0C 00 0A 00 02 00 12 00 0B 00 0B 00 0E 00 09 00 15 00 15 00 15 00 15 00 15 00 01 00 01 00 01 00 01 00 01 00 10 00 02 00 04 00 06 00 01 00 01 00 It is unknown what happends with field sizes of 0xdd or 0xee. fields: may again be followed by an unknown number of bytes of value 0xdd. Example: 56 00 6F 00 72 00 6E 00 61 00 6D 00 65 00 00 00 4E 00 61 00 63 00 68 00 6E 00 61 00 6D 00 65 00 00 00 46 00 69 00 72 00 6D 00 61 00 00 00 53 00 74 00 72 00 61 00 DF 00 65 00 00 00 53 00 74 00 61 00 64 00 74 00 00 00 4C 00 61 00 6E 00 64 00 00 00 00 00 34 00 4E 00 61 00 63 00 68 00 6E 00 61 00 00 00 00 00 65 40 6D 61 69 6C 31 2E 64 65 00 65 40 6D 61 69 6C 32 2E 64 65 00 68 74 74 70 3A 2F 2F 75 72 6C 2E 64 65 00 36 36 36 36 36 36 36 36 00 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 FF 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 FF 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 FF 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 FF 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 FF 81 81 81 81 81 32 30 30 34 30 32 31 38 54 30 30 32 31 35 31 00 21 7A 00 00 00 00 00 00 00 00 00 00 00 00 The following meanings of the fields or known: file version 02: ================ field meaning size type comment ----------------------------------------- 1. first name 0x0110 0x3 2. last name 0x0190 0x3 3. company 0x0110 0x3 4. street 0x0290 0x3 5. city 0x0110 0x3 6. country 0x0110 0x3 7. index 0x0090 0x3 (*) 8. e-mail 0x0148 0x2 9. URL 0x0208 0x2 10. postal code 0x0048 0x2 11. tel/home 0x00a8 0x1 12. tel/office 0x00a8 0x1 13. tel/mobile 0x00a8 0x1 14. tel/fax 0x00a8 0x1 15. type/home 0x0008 0x0 as defined in ETSI 23.040 16. type/office 0x0008 0x0 as defined in ETSI 23.040 17. type/mobile 0x0008 0x0 as defined in ETSI 23.040 18. type/fax 0x0008 0x0 as defined in ETSI 23.040 19. mod. time 0x0080 0x2 "JJJJMMTThhmmss" (local time in ISO8601 basic format) file version 03: ================ field meaning size type comment ----------------------------------------- 1.-19. like for file version 02 20. ***unknown*** 0x0020 0x4 (example: 0x4b 0x38 0x72 0x75) file version 07: ================ field meaning size type comment ----------------------------------------- 1. first name 0x0110 0x3 2. last name 0x0190 0x3 3. company 0x0110 0x3 4. street 0x0290 0x3 5. city 0x0110 0x3 6. country 0x0110 0x3 7. picture file 0x0810 0x3 a file name with abosolute path in flexmem 8. index 0x0090 0x3 (*) 9. e-mail 1 0x0198 0x2 10. e-mail 2 0x0198 0x2 11. URL 0x0208 0x2 12. postal code 0x0048 0x2 13. tel/home 0x00a8 0x1 14. tel/office 0x00a8 0x1 15. tel/mobile 0x00a8 0x1 16. tel/fax 1 0x00a8 0x1 17. tel/fax 2 0x00a8 0x1 18. type/home 0x0008 0x0 as defined in ETSI 23.040 19. type/office 0x0008 0x0 as defined in ETSI 23.040 20. type/mobile 0x0008 0x0 as defined in ETSI 23.040 21. type/fax 1 0x0008 0x0 as defined in ETSI 23.040 22. type/fax 2 0x0008 0x0 as defined in ETSI 23.040 23. mod. time 0x0080 0x2 "JJJJMMTThhmmss" (local time in ISO8601 basic format) 24. extra 0x0010 0x4 entry reference number (???) 25. apo link 0x0020 0x4 (**) 26. birthday 0x0030 0x5 order: day, month, year 27. remember flag 0x0008 0x0 if set, an calendar entry on birthday exists 28. ***unknown*** 0x0008 0x0 (example: 0x00) file version 08: ================ field meaning size type comment ----------------------------------------- 1.-28. like for file version 07 29. Index2 0x0038 0x0 (*) the only interesting thing in this field is the first character: SL42: 0=business card, 1=VIP, 2=no group S55: 1=family, 2=friends, 3=office, 4=VIP, 5=leisure, 6=private, 7=business, 8=received, 9=no group The rest of this field serves the purpose of sorting. (**) the format is pretty unclear but it has something do with addressing an apo file, somehow: ref: apo reference number or some lookup value? type: byte 0: 0x00 or 0x01 (unknown meaning) byte 1: 0xcc (target is an apo appointment file) scmxx-0.9.0/docs/docbook-man-utf8.xsl0000644000175000017500000000061710243201016017242 0ustar hendrikhendrik scmxx-0.9.0/docs/scmxx.en.xml0000644000175000017500000006440410367522171015745 0ustar hendrikhendrik 2006-01-30 SCMxx scmxx 1 SCMxx scmxx exchange data with your Siemens mobile phone scmxx device baudrate lock number name scmxx device baudrate file pipe memory slot file... scmxx device baudrate file pipe PIN memory slot text number name file... scmxx device baudrate file pipe memory slot text number name file... scmxx Description SCMxx can copy files to and from a Siemens mobile phone and also delete stored files. Files can read from a given file or through stdin and stored to a given file or stdout. SMS can also be directly sent or received without storing in the mobile phone. SCMxx was tested with several mobile phones manufactured by Siemens (only S25 and later). Options specify another than the compiled in device. This overwrites the SCMXX_TTY environment variable and the compiled-in value. For linux systems, this may be e.g. /dev/ttyS0 for serial connections, /dev/ircomm0 for infrared connections and /dev/rfcomm0 for bluetooth connections. If native bluetooth support is compiled in, you can also use the format bt://[xx:xx:xx:xx:xx:xx]:n or bluetooth://[xx:xx:xx:xx:xx:xx]:n to specify a bluetooth address xx:xx:xx:xx:xx:xx and the bluetooth channel n (default is 1). The channel is optional, omit the colon in this case, too. specify the device's speed. Valid values are dependent on the system but may be 9600, 19200, 38400, 57600 or 115200. The default value is 19200. The S25 and *35i only work at the 19200, all later phones also work at full serial speed. Infrared connections may be an exception to these rules (dependent on the infrared donle). This overwrites the SCMXX_BAUD environment variable and the compiled-in value. specify a file to use. When getting binary files with "all", the slot number, a dot and the filetype are appended. When sending or deleting, this parameter has no use but the last parameters that should be valid files. Stdout must be explicitly selected with the dash ("-"), by default nothing is written to stdout. There is nothing appended to "-" when getting multiple files. specify a pipe to another program. When getting with "all", every file is piped to this programs on its own (only for --binary and --sms). decreases verbosity by 1 use this option if a PIN code is required for access increases verbosity by 1 try to reset the phone, so it gets accessible again. It may happen that the phone does not answer on the serial interface anymore, especially with a previous user-interrupted file transfer. This simply blindly sends some special characters. print the help message print the version number removes an entry from the phone. When specified with --sms and --get, this will get'n'delete. When specified with --sms and --send, this will send'n'delete. get an entry and save it to a file. When specified with --sms and --remove, this will get'n'delete. When specified with --sms and --send, this will get'n'send. sends a file to the phone. When sending sms, you might want to take a look at the option --direct, too. When specified with --sms and --remove, this will send'n'delete. When specified with --sms and --get, this will get'n'send. collect information from the phone, --mem-info can be used as a trigger to display a more complex listing of the available memories display information about available memories and their slots and other information. It uses the same format as --mem=? (see below) and can also be use as a trigger for --info to replace the short memory listing. display status of locks. It can also be use as a trigger for --info to replace the lock name listing. specify a lock that you can enable or disable. For some locks, a password is needed (see --pin) enable e.g. a lock disable e.g. a lock dial a number (requires --number). The program returns either after 10 seconds or when the call reached the other side. hangup all currently active calls synchronize time to phone. The use of tools like ntpdate is recommended before using this. set the SMSC number (requires --number) select binary file transfer mode select phonebook transfer mode select short message service mode select a memory to access. Slot numbers may vary depending on the selected memory. See the output of --info for the supported memory types. Not using this option triggers the default behaviour (if a default behaviour was defined). There is a special string "?" that outputs in the same format as --mem-info but only for the selected mode. select a slot to access. See the output of --mem-info or --mem=?. Not using this option triggers the default behaviour (if a default behaviour was defined). The special string "all" defines the whole range of available slots for the selected memory and mode and, except with --sms, cannot be used with --send. For SMS, there are four additional special strings: "read", "unread", "sent" and "unsent". The latter two can be used with --send. For phonebook access, there is the additional special string "last". When this option is omitted with --send, scmxx tries to find an empty slot (that may or may not take long). Finding an empty slot is not supported for phonebooks, yet. When a slot was specified and also multiple files to upload, the specified slot is the starting point to search for empty slots. Overwriting multiple, non-empty slots is not supported, yet, except for the special case "all". specify content text of short message or text of the phonebook entry. For phonebook entries, the length limit may depend on the selected phonebook (see output of --mem-info or --mem=?). specify number to send the short message to or the number for the phonebook entry. Note that the number may have a leading '+' for international numbers. It is normally limited to 20 digits (without the '+') which is certainly enough. send/get short messages without storing in the phone. This is not default because you will certainly be charged for it when sending. With direct getting, SMS that are not of type DELIVER are still stored on the phone (scmxx cannot decode those messages, yet). send the short message and use UCS-2 (16bit unicode) as character set. You do not need to specify this parameter to enable unicode sms decoding. set the class0 in the data coding scheme field that is normally interpreted as "immediate display". Not all receiving entities support this. Note that a second sms of this type normally overwrites a previous one without asking! Its use is not recommended. this sets the StatusReportRequest bit in the pdutype field of the sms pdu. It depends on the SMSC if this is honored. With some providers, this produces additional costs! sort the messages on printing to chosen output. Possible sorting methods are "type", "slot" and "type,slot". "type" sorts for the type of the short message with an internal order of unsupported types first, then SMS-SUBMIT, SMS-STATUS-REPORT and SMS-DELIVER. "slot" sorts for the slot of the short message. "type,slot" does sorting like "type" first and sorts each type like "slot". Default is to not sort at all (order depends on phone). enable pin usage. Use this only if there was an error message that asks for a PIN or PUK. For a PIN, this is the corresponding "<PIN>", for a PUK, it is "<PUK>,<new PIN>". The value is only used once. Consider using the pin file (see below) instead of this option. define the system character set instead of using the return value from nl_langinfo(CODESET). This is to work around systems that do not support unicode locales like UTF-8 or when data from a different system with a different locale is used as input. Usually, you do not need this option. Examples Send an bitmap file to the phone as bitmap (logo): scmxx ="bmp" =0 myfile.bmp Get a Bitmap from the phone and save it into a new file: scmxx ="bmp" =0 =myfile.bmp Get all unread (default on get) short messages and output to stdout: scmxx =unread =- scmxx - Send a short message directly (not stored in the phone): scmxx =123 ="test" Get a phonebook and store it to a file: scmxx =SM =SM.pb Modify a specific slot (33) in phonebook memory SM: scmxx =SM =33 =123 ="test" Notes The output of text (phonebook and sms) depends on the character set of your current locale. Input is the same. This has the advantage of localization but may have the drawback that all other characters must be entered by a sequence \XXXX where X is a hex character (e.g. \20ac for EuroSign). This is a 16bit representative of the unicode value. The \XXXX is only used for output with the intention to read it again at a later time. For normal output, characters that cannot be displayed in the current local are replaced by a '?'. Using an UTF-8 based locale will make sure that all character can be converted. The newline character can be entered using the common \n and '\' must be masked with itself. In bash, this might even result in a needed input like "\\\\". Connection problems There are additional parameters --ignore-serial-bits (default) and --keep-serial-bits. Use it only when you get no response from the phone at all. Which setting is needed depends on the cable and serial port and cannot be determined automatically. If you experience timeouts on the first command, try the --start-delay=<seconds> parameter. Another parameter --device-timeout=<seconds> is provided for the case that your phone ever needs more than default value of 10 seconds to answer. Actually, this should be more than enough but one never knows. The minimum value is 1, values higher than 25 mean "forever". Security The --pin option should be used with care. The option and its argument are visible in the process list. Environment SCMXX_TTY see --device for decription SCMXX_BAUD see --baud for description Files ~/.scmxx/cache.pb this file serves as lookup file during short message output (for recipient/sender address) and for number aliasing for --number on sending a short message. The format is the same as a phonebook file (slot numbers don't matter but must be present). ~/.scmxx/config this file can contain long options (without the --), the arguments is seperated from the option name by an '='. Any amount of spaces at beginning of line, before and after the seperator are allowed. A '#' at beginning of line marks this line as comment. Examples: #choose a device to access device = /dev/ttyS0 #always send SMS using UCS-2 unicode ~/.scmxx/pin This file is used as an alternativ to the --pin command line option. The file MUST NOT be group readable/writeable or world readable/writeable! It also MUST be a regular file, not a symlink. SCMxx refuses to use the file if this is not the case. If a PUK value is requested by the phone, the corresponding PIN must also be defined. The only necessary format elements are '{', '=', ';' and '}'. Spaces and newlines are ignored. The file has the following format: sim 262031234567890 { pin = 1234 puk = 12345678; pin2 = 4321; puk2 = 87654321; } device 350123456789012 { type SIM { pin = 0000; puk = 0000; } } "sim" sections use the IMSI as identifier, "device" sections use the IMEI as identifier (see output of --info). Since the IMSI is needed, you canNOT switch the phone on with this! The "type" sub section in the device section has the following idenfifiers: SIM device code (theft protection) FSIM very first inserted SIM NET network personalization NETSUB network subset personalization SP service provider personalization CORP corporate personalization Author Hendrik Sattler post@hendrik-sattler.de scmxx-0.9.0/docs/README_WIN32.txt0000644000175000017500000000550610312616765016041 0ustar hendrikhendrikAbout scmxx: =========== scmxx is a command line utility, you can use it in shell scripts. For interactive usage, you must open a shell first and change to the folder where you installed scmxx. Help for scmxx: ============== You find localized help for some languages (en, de, it, ru) in HTML format in the help directory. You can find additional help and support at http://www.hendrik-sattler.de/scmxx How to differ between the different builds for win32 ==================================================== If a cygwin1.dll is shipped with this package, you have a cygwin build, else you have a mingw build. The differences are marked below. Where to put configuration files: ================================ The help file refers to files in "~/.scmxx". cygwin: This actually is the folder ".scmxx" in your home directory. mingw: This is the "Application data/scmxx" folder in your home folder. If it, or the files in it, do not exist, simple create them. How to select the serial Port: ============================= cygwin: The serial port is named in unix style (COM1 -> /dev/com1). mingw: The serial port is named in Windows style (COM1, COM2, ...) The default is set to COM1 (/dev/com1 for cygwin), it can be changed with the --device option: scmxx --device=COM3 See the help file, how to always set this option in the config file. For IrDA in Windows2000 and WindowsXP, you need IrComm2k[1]. For Bluetooth, you need either WindowsXP SP2 or a bluetooth stack, e.g. the one from WidComm[2]. Additionally, you must do the RFComm serial port mapping prior to using scmxx. [1] http://www.ircomm2k.de/ [2] http://www.widcomm.com/ Setting the language: ==================== You have to set _one_ of the environment variables LANG LC_MESSAGES LC_ALL Order matters (LC_ALL overrules LC_MESSAGES which overrules LANG). This is normal *nix/Linux locale behaviour. The values depend on the language you want, e.g.: set LANG=de_DE For English, you have to set nothing. For languages different from English, use the ISO639-1 2-letter abreviation[3], the underscore ('_') and the ISO 3166 country code[4]. Currently supported: de_DE - German fr_FR - French it_IT - Italian ru_RU - Russian It is essential that the working directory for scmxx is the directory, where the {lang}\LC_MESSAGES\scmxx.mo can be found with this relative path (in the distribution, that's the directory, where scmxx.exe and this README file is). Additionally, set the system charset with the --system-charset paramter: scmxx.exe --system-charset=CP1252 CP1252 is used as example and works for e.g. german (depends on the console application). See the help file, how to always set this option in the config file. [3]: http://www.loc.gov/standards/iso639-2/englangn.html [4]: http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html scmxx-0.9.0/docs/scmxx.ru.xml0000644000175000017500000011246610261543457015776 0ustar hendrikhendrik 2005-06-24 SCMxx scmxx 1 SCMxx scmxx оÑущеÑтвлÑет обмен данными Ñ Ð²Ð°ÑˆÐ¸Ð¼ мобильным телефоном Siemens scmxx уÑтройÑтво ÑкороÑть_передачи блокировка номер Ð¸Ð¼Ñ scmxx уÑтройÑтво ÑкороÑть_передачи файл канал тип_памÑти Ñлот файл... scmxx уÑтройÑтво ÑкороÑть_передачи файл канал PIN-код тип_памÑти Ñлот текÑÑ‚ номер Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»... scmxx уÑтройÑтво ÑкороÑть_передачи файл канал тип_памÑти Ñлот текÑÑ‚ номер Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»... scmxx ОпиÑание SCMxx может копировать файлы в мобильный телефон Siemens и обратно, а также удалÑть Ñохраненные файлы. Файлы могут быть прочитаны из указанного файла или получены через Ñтандартный ввод и Ñохранены в конкретном файле или переданы на Ñтандартный вывод. SMS могут быть также напрÑмую переданы или принÑты без ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² мобильном телефоне. SCMxx была протеÑтирована Ñ Ð½ÐµÑколькими мобильными телефонами, произведенными Siemens (только S25 и поздние). Опции определить отличное от вкомпилированного Ð¸Ð¼Ñ ÑƒÑтройÑтва. ÐžÐ¿Ñ†Ð¸Ñ Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ð²Ð°ÐµÑ‚ переменную Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸Ñ SCMXX_TTY и вкомпилированное значение. Ð”Ð»Ñ ÑиÑтемы linux может быть, к примеру, /dev/ttyS0 Ð´Ð»Ñ Ð¿Ð¾Ñледовательного ÑоединениÑ, /dev/ircomm0 Ð´Ð»Ñ ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ инфракраÑному порту и /dev/rfcomm0 Ð´Ð»Ñ ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ каналу bluetooth. определить ÑкороÑть уÑтройÑтва. ПодходÑщие Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð°Ð²Ð¸ÑÑÑ‚ от ÑиÑтемы, но могут быть 9600, 19200, 38400, 57600 или 115200. Значение по умолчанию 19200. Телефоны S25 и *35i работают только при ÑкороÑти 19200, вÑе поздние модели также работают при полной ÑкороÑти поÑледовательного канала. Ð¡Ð¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ инфракраÑному порту могут Ñодержать иÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð· Ñтих правил (завиÑит от реализации порта). ÐžÐ¿Ñ†Ð¸Ñ Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ð²Ð°ÐµÑ‚ значение переменной Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸Ñ SCMXX_BAUD и вкомпилированное значение. определить иÑпользуемый файл. При получении бинарных файлов Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ "all" к каждому имени файла добавлÑетÑÑ Ð½Ð¾Ð¼ÐµÑ€ Ñлота, точка и тип файла. При отправке или удалении, Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ðµ будет иÑпользоватьÑÑ, но в качеÑтве параметра должны быть указаны корректные файлы. Стандартный вывод должен быть однозначно выбран через Ð´ÐµÑ„Ð¸Ñ ("-"), по умолчанию ничего не выводитÑÑ Ð½Ð° Ñтандартный вывод. Ðичего не добавлÑетÑÑ Ðº "-", когда идет получение группы файлов. определить канал к другой программе. При получении данных Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ "all", каждый файл будет передан по каналу к Ñтим программам в отдельноÑти (только Ð´Ð»Ñ Ð¾Ð¿Ñ†Ð¸Ð¹ --binary и --sms). уменьшить Ñтепень подробноÑти вывода на 1 иÑпользовать Ñту опцию, еÑли требуетÑÑ Ð²Ð²ÐµÑти PIN код Ð´Ð»Ñ Ð´Ð¾Ñтупа увеличить Ñтепень подробноÑти вывода на 1 попытатьÑÑ ÑброÑить телефон, и он Ñнова Ñтанет доÑтупен. Это может понадобитÑÑ Ð² Ñлучае, еÑли телефон больше не отвечает по поÑледовательному интерфейÑу, оÑобенно при прерванной перед Ñтим пользователем передачи файла. Произойдет проÑто ÑÐ»ÐµÐ¿Ð°Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð° некоторых Ñпециальных Ñимволов. вывеÑти текÑÑ‚ помощи вывеÑти номер верÑии удалить запиÑÑŒ в телефоне. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --get, будут произведены получение и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --send, будут произведены отправка и удаление. получить запиÑÑŒ и Ñохранить ее в файл. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --remove, будут произведены получение и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --send, будут произведены получение и отправка. отправить файл в телефон. При отправке sms возможно иÑпользование ÑовмеÑтно Ñ Ð¾Ð¿Ñ†Ð¸ÐµÐ¹ --direct, чтобы его увидеть на Ñкране. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --remove, будут произведены отправка и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --get, будут произведены получение и отправка. Ñобрать информацию о телефоне, --mem-info может быть иÑпользована Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° между кратким и более Ñложным ÑпиÑком доÑтупных типов памÑти. отобразить информацию о доÑтупных типах памÑти и их Ñлотах, а также другую информацию. ÐžÐ¿Ñ†Ð¸Ñ Ð¸Ñпользует такой же формат, как и --mem=? (Ñмотрите ниже), и также может быть иÑпользована как переключатель Ð´Ð»Ñ --info, чтобы замеÑтить краткий ÑпиÑок типов памÑти. отобразить ÑоÑтоÑние блокировок. Может быть также иÑпользована как переключатель Ð´Ð»Ñ --info, чтобы замеÑтить вывод ÑпиÑка имен блокировок. определить блокировку, которую необходимо уÑтановить или ÑнÑть. Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… блокировок необходим пароль (Ñм. опцию --pin). уÑтановить какую-либо блокировку ÑнÑть какую-либо блокировку позвонить по заданному номеру (требуетÑÑ Ð¾Ð¿Ñ†Ð¸Ñ --number). Программа возвратитÑÑ Ð¸Ð»Ð¸ через 10 Ñекунд, или поÑле уÑтановки ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ ÑƒÐ´Ð°Ð»Ñ‘Ð½Ð½Ð¾Ð¹ Ñтороной. ÑброÑить вÑе текущие активные вызовы. Ñинхронизировать Ð²Ñ€ÐµÐ¼Ñ Ð² телефоне. РекомендуетÑÑ Ð¸Ñпользовать инÑтрументы типа ntpdate перед Ñинхронизацией. уÑтановить номер SMS-центра (требует опцию --number) выбрать режим обмена бинарными файлами выбрать режим передачи телефонной книги выбрать режим Ñлужбы коротких Ñообщений выбрать тип памÑти, к которой оÑущеÑтвлÑетÑÑ Ð´Ð¾Ñтуп. Ðомера Ñлотов могут варьироватьÑÑ Ð² завиÑимоÑти от выбранного типа памÑти. Смотрите вывод опции --info Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð¸Ð²Ð°ÐµÐ¼Ñ‹Ñ… типов памÑти. Без иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтой опции Ñрабатывает поведение по умолчанию (еÑли таковое было определено). Ð¡Ð¿ÐµÑ†Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ñтрока "?" предназначена Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° в таком же формате, как и --mem-info, но только Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð¾Ð³Ð¾ режима. выбрать Ñлот, к которому оÑущеÑтвлÑетÑÑ Ð´Ð¾Ñтуп. Смотрите вывод --mem-info или --mem=?. Без иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтой опции включаетÑÑ Ð¿Ð¾Ð²ÐµÐ´ÐµÐ½Ð¸Ðµ по умолчанию (еÑли таковое было определено). Ð¡Ð¿ÐµÑ†Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ñтрока "all" определÑет полный диапазон вÑех доÑтупных Ñлотов Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ñ‹Ñ… типа памÑти и режима, за иÑключением иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ ÑовмеÑтно Ñ --sms, и не может быть иÑпользована ÑовмеÑтно Ñ --send. Ð”Ð»Ñ SMS, доÑтупны четыре дополнительных Ñпециальных Ñтроки: "read" (прочитанные), "unread" (непрочитанные), "sent" (отправленные) и "unsent" (неотправленные). ПоÑледние два варианта могут быть иÑпользованы вмеÑте Ñ --send. Ð”Ð»Ñ Ð´Ð¾Ñтупа к телефонной книге доÑтупна Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ñтрока "last". При опущенной Ñтой опции и иÑпользовании вмеÑте Ñ --send scmxx попытаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñвободный Ñлот (что может занÑть, а может и нет, некоторое длительное времÑ). ПоиÑк пуÑтого Ñлота пока что не поддерживаетÑÑ Ð´Ð»Ñ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ñ‹Ñ… книг. Когда Ñлот и группа файлов Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ определены, необходимый Ñлот ÑвлÑетÑÑ Ñтартовой точкой Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка Ñвободных Ñлотов. ПерезапиÑÑŒ группы непуÑтых Ñлотов пока что не поддерживаетÑÑ, кроме Ñпециального ÑÐ»ÑƒÑ‡Ð°Ñ "all". определить Ñодержание текÑта короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ запиÑи телефонной книги. Ð”Ð»Ñ Ð·Ð°Ð¿Ð¸Ñей телефонной книги лимит длины может завиÑеть от выбранной книги (Ñм. вывод --mem-info или --mem=?). определить номер Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ короктого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ номер запиÑи телефонной книги. Заметьте, что номер может иметь вначале '+' Ð´Ð»Ñ Ð¼ÐµÐ¶Ð´ÑƒÐ½Ð°Ñ€Ð¾Ð´Ð½Ñ‹Ñ… номеров. Он ограничен 20 цифрами (без '+'), которых дейÑтвительно доÑтаточно. отправить/получить короткие ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð±ÐµÐ· ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² памÑти телефона. Это не выполнÑетÑÑ Ð¿Ð¾ умолчанию, так как вы будете неÑомненно занÑты Ñообщением, при отправке. При непоÑредÑтвенном получении, SMS, тип которого не ÑоответÑтвует DELIVER, вÑе еще ÑохранÑетÑÑ Ð² памÑти телефона (scmxx не может пока что декодировать такие ÑообщениÑ). переÑлать Ñообщение и ипользовать UCS-2 (16бит unicode) как таблицу Ñимволов. ÐеобÑзательно применÑть Ñту опцию Ð´Ð»Ñ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñообщений, напиÑанных в кодировке unicode. уÑтановить class0 в поле Ñхемы ÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…, что обычно интерпретируетÑÑ ÐºÐ°Ðº "немедленное отображение". Ðе вÑе принимающие аппараты дают право делать Ñто. Заметьте, что очередное sms такого типа обычно перезапиÑывает предыдущее Ñообщение без вопроÑов! Её иÑпользование не рекомендуетÑÑ. уÑтановить бит StatusReportRequest в поле pdutype из sms pdu. Это завиÑит от SMSC, еÑли Ñто принимать во внимание. С некоторыми провайдерами Ñто потребует дополнительных затрат! Ñортировать ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸ печати на выбранное уÑтройÑтво вывода. Возможными методами Ñортировки ÑвлÑÑŽÑ‚ÑÑ "type" (тип), "slot" (Ñлот) и "type,slot" (тип, Ñлот). "type" Ñортирует по типу короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ð²Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ‹Ð¼ порÑдком Ñортировки, при котором неподдерживаемые типы печатаютÑÑ Ð²Ð½Ð°Ñ‡Ð°Ð»Ðµ, затем SMS-SUBMIT, SMS-STATUS-REPORT и SMS-DELIVER. "slot" Ñортирует по Ñлоту короткого ÑообщениÑ. "type,slot" оÑущеÑтвлÑет Ñортировку вначале по "type" и затем внутри блока каждого типа по "slot". По умолчанию никакой Ñортировки не производитÑÑ (порÑдок завиÑит от телефона). включить иÑпользование pin-кода. ИÑпользуйте Ñто лишь в Ñлучае Ð²Ð¾Ð·Ð½Ð¸ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¸, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ñ‚Ñ€ÐµÐ±ÑƒÐµÑ‚ ввода PIN-кода либо PUK-кода. Ð”Ð»Ñ PIN-кода ÑоответÑтвенно передаётÑÑ "<PIN-код>", Ð´Ð»Ñ PUK-кода - "<PUK-код>,<новый PIN-код>". Значение иÑпользуетÑÑ Ð¾Ð´Ð½Ð¾ÐºÑ€Ð°Ñ‚Ð½Ð¾. РаÑÑмотрите иÑпользование pin-файла (Ñм. ниже) вмеÑто Ñтой опции. определить ÑиÑтемную таблицу Ñимволов вмеÑто иÑпользуемого значениÑ, возвращаемого функцией nl_langinfo(CODESET). Этот обходной манёвр необходим Ð´Ð»Ñ ÑиÑтем, которые не поддерживают юникодные локали, такие как UTF-8, или когда данные от другой ÑиÑтемы в отличной локали иÑпользуютÑÑ Ð½Ð° входе. Обычно Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ðµ применÑетÑÑ. Примеры Отправить файл раÑтрового Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð² телефон как Картинку (Логотип): scmxx ="bmp" =0 myfile.bmp Получить Картинку из телефона и Ñохранить ее в новом файле: scmxx ="bmp" =0 =myfile.bmp Получить вÑе непрочитанные (режим по умолчанию при get) короткие ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸ вывеÑти их на Ñтандартный вывод: scmxx =unread =- scmxx - Отправить короткое Ñообщение напрÑмую (без ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² телефоне): scmxx =123 ="теÑÑ‚" Получить телефонную книгу и Ñохранить её в файле: scmxx =SM =SM.pb Изменить указанный Ñлот (33) в памÑти SM телефонных книг: scmxx =SM =33 =123 ="теÑÑ‚" Ð—Ð°Ð¼ÐµÑ‡Ð°Ð½Ð¸Ñ Ð’Ñ‹Ð²Ð¾Ð´Ð¸Ð¼Ñ‹Ð¹ текÑÑ‚ (Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ð°Ñ ÐºÐ½Ð¸Ð³Ð° и ÑообщениÑ) завиÑит от таблицы Ñимволов текущей локали. Вводимый аналогично. Такое преимущеÑтво у локализации, но еÑть и недоÑтаток, что вÑе оÑтальные Ñимволы должны вводитьÑÑ Ñ‡ÐµÑ€ÐµÐ· поÑледовательноÑть вида \XXXX, где X - шеÑтнадцатиричный Ñимвол (например, \20ac Ð´Ð»Ñ Ð·Ð½Ð°ÐºÐ° Euro). Это 16битное предÑтавление Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ unicode. ПредÑтавление \XXXX иÑпользуетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° Ñ Ñ†ÐµÐ»ÑŒÑŽ его поÑледующего прочтениÑ. При нормальном выводе, Ñимволы, которые не могут быть отображены в текущей локали, заменÑÑŽÑ‚ÑÑ Ð½Ð° Ñимвол '?'. ИÑпользование локализации, базирующейÑÑ Ð½Ð° UTF-8, гарантирует, что вÑе Ñимволы могут быть перекодированы. Символ новой Ñтроки может быть введен, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð¾Ð±Ñ‰ÐµÐµ предÑтавление \n, а Ñимвол '\' должен быть Ñкранирован Ñам Ñобой. Ð’ bash в результате необходимо вводить Ñтроку подобно "\\\\". Проблемы ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð—Ð´ÐµÑÑŒ опиÑываютÑÑ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ðµ параметры --ignore-serial-bits (по умолчанию) и --keep-serial-bits. ИÑпользуйте его только тогда, когда вообще нет ответа от телефона. Такие уÑтановки завиÑÑÑ‚ от ÐºÐ°Ð±ÐµÐ»Ñ Ð¸ поÑледовательного порта и не могут быть определены автоматичеÑки. ЕÑли при первой команде проиÑходÑÑ‚ таймауты, Ñледует попробовать параметр --start-delay=<Ñекунды>. Другой параметр --device-timeout=<Ñекунды> предназначен Ð´Ð»Ñ ÑлучаÑ, когда телефону когда-либо потребуетÑÑ Ð±Ð¾Ð»ÑŒÑˆÐµ времени на ответ, чем определенные по умолчанию 10 Ñекунд. ДейÑтвительно, Ñто было более чем доÑтаточно, но кто знает. Минимальное значение равно 1, значениÑ, превышающие 25, подразумевают ожидание ответа до тех пор, пока он не будет получен. БезопаÑноÑть Опцию --pin необходимо иÑпользовать Ñ Ð¾ÑторожноÑтью. ÐžÐ¿Ñ†Ð¸Ñ Ð¸ ее аргумент будут видны в ÑпиÑке процеÑÑов. Переменные Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸Ñ SCMXX_TTY Ñмотрите опиÑание опции --device SCMXX_BAUD Ñмотрите опиÑание опции --baud Файлы ~/.scmxx/cache.pb Ñтот файл Ñлужит при выводе короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ (Ð´Ð»Ñ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ‹ адреÑов Ð¿Ð¾Ð»ÑƒÑ‡Ð°Ñ‚ÐµÐ»Ñ Ð¸ отправителÑ) и при отправке короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ‹ номера в опции --number. Формат файла Ñовпадает Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¾Ð¼ файла Ð´Ð»Ñ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ð¾Ð¹ книги (номера Ñлотов не имеют значениÑ, но должны приÑутÑтвовать). ~/.scmxx/config Ñтот файл может Ñодержать набор длинных опций (без --), аргументы отделÑÑŽÑ‚ÑÑ Ð¾Ñ‚ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ð¾Ð¿Ñ†Ð¸Ð¸ Ñимволом '='. Любое количеÑтво пробельных Ñимволов допуÑкаетÑÑ Ð²Ð½Ð°Ñ‡Ð°Ð»Ðµ Ñтроки, перед и поÑле разделителÑ. Символ '#' вначале Ñтроки помечает её как комментарий. Примеры: #выбрать уÑтройÑтво доÑтупа device = /dev/ttyS0 #вÑегда отправлÑть SMS Ñ Ð¸Ñпользованием UCS-2 unicode ~/.scmxx/pin Данный файл иÑпользуетÑÑ ÐºÐ°Ðº алтернатива опции командной Ñтроки --pin. Файл ÐЕ должен быть доÑтупен группе или вÑем на чтение/запиÑÑŒ! Также он ДОЛЖЕРбыть обычным файлом, не ÑимволичеÑкой ÑÑылкой. SCMxx отвергает файлы в подобных ÑлучаÑÑ…. ЕÑли значение PUK-кода запрашиваетÑÑ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð¾Ð¼, ÑоответÑтвующий PIN-код должен быть также определён. Только такие Ñлементы Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ ÑвлÑÑŽÑ‚ÑÑ Ð½ÐµÐ¾Ð±Ñ…Ð¾Ð´Ð¸Ð¼Ñ‹Ð¼Ð¸: '{', '=', ';' и '}'. Пробелы и Ñимволы новой Ñтроки игнорируютÑÑ. Файл имеет Ñледующий формат: sim 262031234567890 { pin = 1234 puk = 12345678; pin2 = 4321; puk2 = 87654321; } device 350123456789012 { type SIM { pin = 0000; puk = 0000; } } Секции "sim" иÑпользуют IMSI в качеÑтве идентификатора, Ñекции же "device" уже иÑпользуют IMEI как идентификатор (Ñм. вывод опции --info). Следовательно IMSI необходим, так как без него ÐЕЛЬЗЯ включить телефон! ПодÑÐµÐºÑ†Ð¸Ñ "type" в Ñекции device определÑет Ñледующие идентификаторы: SIMкод уÑтройÑтва (защита от кражи) FSIMÑÐ°Ð¼Ð°Ñ Ð¿ÐµÑ€Ð²Ð°Ñ ÑƒÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ð°Ñ SIM-карта NETпривÑзка к Ñети NETSUBÐ´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка к Ñети SPпривÑзка к оператору ÑвÑзи CORPпривÑзка к корпорации Ðвтор Hendrik Sattler post@hendrik-sattler.de. Перевод выполнен Andy Shevchenko andy@smile.org.ua и Irina Yeresko mecec@yandex.ru. scmxx-0.9.0/docs/smi.txt0000644000175000017500000000511710366513332015003 0ustar hendrikhendrikSiemens .smi/.smi/SMS.dat file format ===================================== Author: Hendrik Sattler .smi/.smo files: ================ Location of .smi/.smo files: .smi/.smo files can be found in the "/SMS" directory of the FlexMem (accessible by obexftp protocl) or MMC. Only phones manufactured by Siemens that have an address book may have such a file (with exception to phones with SymbianOS). The .smi/.smo files have different sizes but the most interesting part has a static size and is well-defined by ETSI SMS specs. The examples is an .smi file from a S55 with a size of 193 bytes. Format:
* magic: 2x 8bit These are at the beginning of the file: 0x0b 0x0b for .smi and .smo. version: 1x 8bit The format version of the header, not really important for us: 0x00 for SL42 0x02 for S55 header: * length: 1x 16bit The length of the header in bytes (may be 0, e.g. for SL42) fields: may be more than one, for S55 those are: 1x 8bit: count of concatenated short message parts (total) 1x 8bit: counts of parts in this file 1x 16bit: unknown meaning 7x 8bit: SCTS field copied from PDU 1x 8bit: unknown meaning entry: Since file format version 02, there can be more than one entry. status: 1x 8bit The status (implies direction) of this short message: values for .smi: 01 (read), 03 (unread) values for .smo: 05 (sent), 07 (unsent) pdu: exactly 175 octets PDU with SMSC-field as specified by ETSI, padded with 0xff SMS.dat file: ============= Location of the SMS.dat files The SMS.dat file can be found in the "/PersistentData/SMS" directory of the FlexMem (accessible by obexftp protocl) or MMC. Only phones manufactured by Siemens may have such a file (with exception to phones with SymbianOS). The .smi/.smo files have different sizes but the most interesting part has a static size and is well-defined by ETSI SMS specs. The examples is an .smi file from a S55 with a size of 17802 bytes. Format: * magic: 2x 8bit These are at the beginning of the file: 0xff 0xff entry: prefix: 2x 8bit unknown meaning but always 0x11 0x11 if this is 0xff 0xff, the "never used" part of the file is reached. status: 1x 8bit The status (implies direction) of this short message: 01 (read), 03 (unread), 05 (sent), 07 (unsent) and 00 (empty) pdu: exactly 175 octets PDU with SMSC-field as specified by ETSI, padded with 0xff scmxx-0.9.0/docs/scmxx.de.xml0000644000175000017500000006676210367522171015744 0ustar hendrikhendrik 2006-01-30 SCMxx scmxx 1 SCMxx scmxx Datenaustausch mit einem Siemens-Handy scmxx Gerätedatei Baudrate lock Nummer Name scmxx Gerätedatei Baudrate Datei Pipe Speicher Speicherplatz Datei... scmxx Gerätedatei Baudrate Datei Pipe PIN Speicher Speicherplatz Text Nummer Name Datei... scmxx Gerätedatei Baudrate Datei Pipe Speicher Speicherplatz Text Nummer Name Datei... scmxx Beschreibung SCMxx kann bestimmte Dateien zu und von einem Siemens-Handy übertragen und dort gespeicherte löschen. Die Daten werden aus einer Datei oder von der Standardeingabe gelesen, geschrieben wird in eine Datei oder auf die Standardausgabe. Kurznachrichten (SMS) können direkt gesendet und empfangen werden, also ohne daß sie auf dem Handy gespeichert werden. SCMxx wurde mit mehreren Handys von Siemens getestet (nur S25 und später). Optionen definiert eine Gerätedatei. Diese wird statt der in der Umgebungsvariable SCMXX_TTY und dem einkompilierten Wert verwendet. Für Linux-Systeme kann dies /dev/ttyS0 für eine serielle Verbindung, /dev/ircomm0 für eine Infrarot-Verbingung und /dev/rfcomm0 for eine Bluetooth-Verbingung sein. Wenn native Bluetooth-Unterstützung einkompiliert wurde, können zusätzlich die Formen bt://[xx:xx:xx:xx:xx:xx]:n oder bluetooth://[xx:xx:xx:xx:xx:xx]:n benutzt werden, um eine Bluetooth-Adresse xx:xx:xx:xx:xx:xx und einen Kanal n (Vorgabewert ist 1) anzugeben. Die Angabe des Kanals is optional, in diesem Fall muss aber auch der Doppelpunkt weggelassen werden. definiert ein Baudrate, mit der zum Gerät verbunden wird. Die gültigen Werte sind abhängig vom System, typische sind jedoch 9600, 19200, 38400, 57600 oder 115200. Der Standardwert ist 19200. Das S25 und die *35i arbeiten nur bei 19200, alle späteren Modelle arbeiten auch bei voller serieller Geschwindigkeit. Infrarotverbindungen können, abhängig vom IrDA-Modul, eine Ausnahme sein. Dies übergeht die SCMXX_BAUD-Variable und den einkompilierten Wert. definiert eine zu benutzende Datei. Wenn man Binärdatein mit "all" holt, werden die Speicherplatznummer und der Dateityp angehängt. Wenn man sendet oder löscht, hat dieser Parameter keine Wirkung aber die letzten Parameter sollten beim Senden gültige Dateien sein. Die Standardausgabe muß explizit mittel einem Bindestrich ('-') angegeben werden, sonst wird nichts auf diese geschrieben. Wenn '-' angegeben wurde, wird nicht an diesen Wert, auch beim holen von mehereren Dateien, angehängt. definiert eine Pipe zu einem anderen Programm. Wenn man mit "all" Daten holt, wird jede Datei in eine eigene Pipe geschickt (nur mit --binary und --sms). verringert die Menge der Ausgaben um 1 die Option kann man benutzen, wenn ein PIN-Code zum Zugriff erforderlich ist erhöht die Menge der Ausgaben um 1 versucht, das Handy zurückzusetzen, sodaß man wieder darauf zugreifen kann. Es kann passieren, daß das Handy nicht mehr auf der seriellen Schnittstelle antwortet, besonders nach einem vom Benutzer unterbrochenen Dateitransfer. Dies sendet einfach blind ein paar besondere Zeichen. gibt die Hilfeseite aus gibt die Version aus löscht einen Eintrag vom Handy Wenn --sms und --get mit angegeben werden, holt und löscht dies. Wenn --sms und --send mit angegeben werden, sendet und löscht dies. holt einen Eintrag und Speichert ihn in eine Datei Wenn --sms und --remove mit angegeben werden, holt und löscht dies. Wenn --sms und --send mit angegeben werden, holt und sendet dies. sendet eine Datei zum Handy Beim Senden vom Kurznachrichten könnte die Option --direct ebenfalls von Interesse sein. Wenn --sms und --remove mit angegeben werden, sendet und löscht dies. Wenn --sms und --get mit angegeben werde, holt und sendet dies. sammelt Informationen vom Handy, --mem-info kann als Schalter benutzt werden und eine komplexere Tabelle über die verfügbaren Speicher auszugeben. zeigt Informationen über verfügbare Speicher und deren Speicherplätze und andere Informationen an. Es benutzt dasselbe Format wie --mem=? und kann als Schalter für --info dienen, um die kurze Speicherauflistung zu ersetzen. zeigt den Status der Zugriffssperren (locks) an. Es kann als Schalter für --info dienen, um die kurze Speicherauflistung zu ersetzen. wählt die ein-/auszuschaltende Sperre aus. Für einige Sperren wird ein Passwort benötigt (siehe --pin). einschalten z.B. einer Sperre ausschalten z.B. einer Sperre wählt eine Nummer (erforder --number). Das Programm beendet sich entweder nach 10 Sekunden oder wenn der Anruf die angerufene Seite erreicht hat. beendet alle, momentan aktiven Gespräche gleicht die Zeit des Handy mit der des Rechners ab. Der Einsatz eines Programms wie ntpdate wird vor der Nutzung dieses Parameters empfohlen. setzt eine neue SMSC nummber (erfordert --number) wählt den Binärdateiübertragungsmodus wählt den Telefonbuchübertragungsmodus wählt den Kurznachrichtenübertragungsmodus wählt den Speicher aus, der benutzt werden soll. Speicherplatznummern hängen von dieser Wahl ab. Die Ausgabe von --info zeigt unterstützte Speicher an. Wird diese Optioen nicht benutzt, wird eine eventuell vorhandene Vorgabe benutzt. Es gibt den besonderen Wert "?", der die selbe Ausgabe wie --mem-info hat, nur daß es auf den gewählten Modus eingeschränkt wird. wählt die zu benutzende Speicherplatznummer aus. (siehe Ausgabe von --mem-info oder --mem=?). Wird diese Optioen nicht benutzt, wird eine eventuell vorhandene Vorgabe benutzt. Der besondere Wert "all" definiert the alle verfügbaren Speicherplatznummern für den gewählten Speicher und Modus (mit der Ausnahme von --sms mit --send). Für den Kurznachrichtenübertragungsmodus gibt es die besonderen Werte "read" (gelesen), "unread" (ungelesen), "sent" (bereits gesendet) und "unsent" (noch nicht gesendet). Die letzteren beiden können mit --sms und --send benutzt werden. Für den Telefonbuchmodus gibt es zusätzlich den Wert "last" (letzter). Wenn diese Option nicht angegeben wird, versucht scmxx einen leeren Speicherplatz zu finden (je nachdem kann dies auch länger dauern). Wenn ein Wert angegeben wurde und meherere Datei gesendet werden, ist die angebene Speicherplatznummer der Startpunkt für die Suche nach leeren Speicherplätzen. Mehere, nicht-leere Speicherplätze zu überscheiben wird noch nicht unterstützt, außer für den Spezialfall "all" (alle). definiert den Inhalt einer Kurzmitteilung oder eine Telefonbucheintrags. Bei Telefonbucheinträgen hängt die Länge vom gewählten Telefonbuch ab (siehe Ausgabe von --mem-info oder --mem=?). definiert die Nummber beim Senden einer Kurznachricht oder die Nummer bei einem Telefonbucheintrag. Die Nummer kann ein Prefix '+' für internationale Nummern haben und ist normalerweise auf 20 Ziffern (ohne das '+') limitiert, was genug sein sollte. sendet/holt Kurznachrichten ohne sie auf dem Handy zu speichern. Dies ist kein Standardwert, weil man für das Senden von Kurznachrichten normalerweise Geld bezahlen muß. Beim direkten Holen werden Kurznachrichten, die nicht vom Type SMS-DELIVER sind trotzdem auf dem Handy gespeichert, da diese noch nicht dekodiert werden können. sendet Kurznachrichten als UCS-2 (16bit-Unicode-Zeichensatz). Dieser Parameter muß nicht angegeben werden, um Unicode-Kurznachrichten zu dekodieren. dies setzt das Class0-Bit im DCS-Feld, was beim Empfänger normalerweise als "immediate display" (unmittelbar anzeigen) interpretiert wird. Nicht alle Empfangsgeräte unterstützen das. Man muß außerdem beachten, daß eine zweite Kurznachricht mit dieser Einstellung eine vorherige ohne Nachfrage überschreibt! Die Nutzung wirde deshalb nicht empfohlen. dies setzt das Bit StatusReportRequest (Statusreport anfordern) im pdutype-Feld der SMS-PDU. Es hängt von der SMSC ab, ob dieses Bit beachtet wird. Bei manchen Providern kosten StatusReports extra. sortiert die Kurznachrichten bei der Ausgabe. Mögliche Sortiermethoden sind "type", "slot" und "type,slot". "type" sortiert nach dem Nachrichtentyp mit einer internen Rangfolge: erst die nicht unterstützten Typen, dann SMS-SUBMIT, SMS-STATUS-REPORT und SMS-DELIVER. "slot" sortiert nach dem Speicherplatz der Kurzmitteilung. "type,slot" sortiert erst wie "type" und dann jeden Typen wie "slot". Die Vorgabe ist keine Sortierung (Reihenfolge hängt vom Handy ab). ermöglichst die Nutzung einer PIN. Diese Option sollte nur benutzt werden, wenn nach eine Fehlermeldung erscheint, die nach einer PIN oder PUK verlangt. Für eine PIN ist dies die erwartete "<PIN>", für eine PUK ist dies die erwartete "<PUK>,<new PIN>". Der Wert wird nur ein einziges Mal benutzt. Die Pin-Datei sollte, wenn möglich, stattdessen benutzt werden (siehe unten). definiert den Systemzeichensatz anstatt den Rückgabewert von nl_langinfo(CODESET) zu nutzen. Das ist eine Behelf für Systeme, die keine Unicode-Locales wie UTF-8 unterstützen oder wenn Daten von einem anderen System mit einer anderen Locale als Eingabe benutzt werden soll. Normalerweise wird diese Option nicht benötigt. Beispiele Senden einer Bitmapdatei an das Handy (Logo): scmxx ="bmp" =0 myfile.bmp Holen eines Logos vom Handy und speichern in eine neue Datei: scmxx ="bmp" =0 =myfile.bmp Holen aller ungelesenen (Vorhabe beim holen) Kurznachrichten und Ausgabe auf die Standardausgabe: scmxx =unread =- scmxx - Direkten empfangen einer Kurznachricht: scmxx =123 ="test" Holen eines Telefonbuchs und speichern in eine Datei: scmxx =SM =SM.pb Änders des Speicherplatzes 33 im Telefonbuch SM: scmxx =SM =33 =123 ="test" Besonderheiten Die Ausgabe von Text (Telefonbuch und SMS) hängt von dem Zeichensatz der gewählten Systemlocale ab, ebenso für die Eingabe. Das hat den Vorteil der Lokalisation aber auch den Nachteil, daß alle nicht von der Locale unterstützten Zeichen mit einer Sequenz \XXXX eingegeben werden müssen, wobei X ein Hexadezimalzeichen ist (z.B. \20ac für das Eurozeichen). Das ist der 16bit-Unicode-Wert. Die \XXXX-Ausgabe wird nur für Ausgaben benutzt, die normalerweise auch wieder als Eingabe dienen können. Für alle anderen Ausgabe wird ein Fragezeichen ('?') als Platzhalter genommen. Mit einer UTF-8-locale kann man sicherstellen, daß alle Zeichen konvertiert und angezeigt werden können. Das Zeichen für das Zeilenende kann als das übliche \n eingegeben werden und '\' muß sich selbst vorangestellt werden. In der bash kann dies sogar in einem "\\\\" enden. Verbindungsprobleme Es gibt die zusätzlichen Parameter --ignore-serial-bits (serielle Bits ignorieren, Vorgabe) und --keep-serial-bits (serielle Bits beibehalten). Diese sollte man nur probieren, wenn das Handy keine Antwort zu geben scheint. Welchen Einstellung die richtig ist, hängt vom Kabel und vom seriellen Port ab und kann nicht automatisch bestimmt werden. Wenn Timeouts beim ersten Kommando kommen, kann man außerdem die Option --start-delay=<seconds> (Anfangsverzögerung in Sekunden) probieren. Eine weitere Option --device-timeout=<seconds> (Gerätetimeout in Sekunden) gibt es für den Fall, daß es das Handy nicht schafft, auf ein Kommando innerhalb von 10 Sekunden zu antworten. Eigentlich sollte dies mehr als genug sein, aber man weiß ja nie. Der minimal erlaubte Wert ist 1, der höchste von 25 bedeutet "unendlich lange". Sicherheit Die --pin Option sollte man mit Vorsicht benutzen. Diese Option mitsamt Wert ist in der Prozesslist sichtbar. Umgebungsvariablen SCMXX_TTY siehe --device für eine Beschreibung SCMXX_BAUD siehe --baud für eine Beschreibung Dateien ~/.scmxx/cache.pb Diese Datei dient als Telefonbuch (für Nummer von Empfänger/Sender) während der Ausgabe von Kurznachrichten und als Alias für --number beim Senden von Kurznachrichten. Das Format ist dasselbe wie eine Telefonbuchdatei (die Speicherplatznummern sind nicht wichtig, müssen aber vorhanden sein). ~/.scmxx/config Diese Datei kann Option in der langen Form (aber ohne die --) enthalten. Der Wert is von der Option durch ein '=' getrennt. Eine beliebige Anzahl von Leerzeichen ist am Anfang der Zeile, vor und nach dem Trennzeichen erlaubt. Ein '#' am Anfang der Zeile markiert diese Zeile als Kommentar. Beispiele: #eine andere Gerätedatei festlegen device = /dev/ttyS0 #SMS immer als UCS-2 senden unicode ~/.scmxx/pin Diese Datei wird als Alternative zur --pin Kommandozeilenoption benutzt. Die Datei DARF NICHT gruppenlesbar/-schreibbar oder weltlesbar/-schreibbar sein! Es MUSS auch eine reguläre Datei sein, kein SymLink. SCMxx wird sonst die Nutzung der Datei verwehren. Wenn ein PUK-Wert vom Gerät angefordert wird, muß ein zugehöriger PIN-Wert ebenfalls definiert sein. Die einzig nötigen Formatelemente sind '{', '=', ';' und '}'. Leerzeichen und Zeilenumbrüche werden ignoriert. Die Datei hat das folgende Format: sim 262031234567890 { pin = 1234 puk = 12345678; pin2 = 4321; puk2 = 87654321; } device 350123456789012 { type SIM { pin = 0000; puk = 0000; } } "sim"-Sektionen benutzen die IMSI als Variable, "device"-Sektionen benutzen die IMEI als Variable (siehe Ausgabe von --info). Da die IMSI benötigt wird, können sie hiermit nicht das Handy einschalten. Die "type"-Untersektion in der device-Sektion hat folgende Variablen: SIM Gerätecode (Diebstahlsicherung) FSIM die zuallererst eingelegte SIM NET Netwerk-Personalisierung NETSUB Netwerk-Subset-Personalisierung SP Service-Provider-Personalisierung CORP Corporate-Personalisierung Autor Hendrik Sattler post@hendrik-sattler.de scmxx-0.9.0/docs/scmxx.it.xml0000644000175000017500000006710010265421657015757 0ustar hendrikhendrik 2005-03-11 SCMxx scmxx 1 SCMxx scmxx scambia dati con il tuo telefonino Siemens scmxx device baudrate lock numero nome scmxx device baudrate file pipe memoria slot file... scmxx device baudrate file pipe PIN memoria slot testo numero nome file... scmxx device baudrate file pipe memoria slot testo numero nome file... scmxx Descrizione SCMxx può copiare files da e verso un telefonino Siemens e inoltre può cancellare file salvati. I file possono venire letti da un determinato file o attraverso stdin e salvati in un determinato file o su stdout. Gli SMS possono essere anche direttamente mandati o ricevuti senza essere salvati nel telefonino. SCMxx è stato testato con diversi modelli della Siemens (solo S25 e successivi) e quindi verrà stampato un messaggio di avviso ogniqualvolta lo si usi con altri modelli non supportati. Opzioni specifica un device diverso da quello specificato nelle opzioni di compilazione. Sovrascriverà la variabile d'ambiente SCMXX_TTY e l'opzione di compilazione. Per sistemi linux, questo device può essere ad esempio /dev/ttyS0 per connessioni seriali, /dev/ircomm0 per connessioni via infrarosso e /dev/rfcomm0 per connessioni via bluetooth. specifica la velocità di trasmissione. Valori validi dipendono dal sistema, ma possono essere 9600, 19200, 38400, 57600 o 115200. Il valore di default è 19200. Il S25 e il *35i lavorano solo a 19200, tutti gli altri modelli successivi possono lavorare anche a piena velocità. Le connessioni via infrarosso possono essere un'eccezione a queste regole (dipende dal dongle dell'infrarosso). Questo valore sovrascriverà la variabile d'ambiente SCMXX_BAUD e l'opzione di compilazione. specifica il file da usare. Quando si prendono dei file binari con l'opzione "all", vengono accodati il numero dello slot, un punto e il tipo di file. Quando si manda o si cancella, questo parametro non viene usato, ma gli ultimi parametri devono essere dei file validi. Stdout dev'essere esplicitamente selezionato mediante il trattino ("-"), di default niente viene scritto su stdout. Non viene accodato nulla su "-" quando si prendono file multipli. specifica un pipe verso un altro programma. Quando si prendono dei file con l'opzione "all", ogni file viene mandato in pipe a questo programma singolarmente (solo per --binary e --sms). decrementa il numero dei messaggi in output usa questa opzione nel caso dovesse venire richesto un codice PIN per l'accesso. incrementa il numero dei messaggi in output cerca di resettare il telefonino, così che sia nuovamente accessibile. Potrebbe succedere che il telefonino non risponda più sull'interfaccia seriale, specialmente dopo un trasferiemnto di file interrotto dall'utente. Questo comando semplicemente ignora alcuni caratteri speciali. stampa il messaggio di aiuto. stampa il numero di versione. rimuove un record dal telefonino. Quando specificato assieme a --sms e --get, questo comando prenderà e cancellerà il messaggio. Quando specificato assieme a --sms e --send, questo comando prenderà e manderà il messaggio. prende un record e la salva su di un file. Quando specificato assieme a --sms e --remove, questo comando prenderà e cancellerà il messaggio. Quando specificato assieme a --sms e --send, questo comando prenderà e manderà il messaggio. manda un file al telefonino. Nel caso volessi mandare sms, dai un'occhiata anche all'opzione --direct. Quando specificato assieme a --sms e --remove, questo comando prenderà e cancellerà il messaggio. Quando specificato assieme a --sms e --get, questo comando prenderà e manderà. ottiene informazioni dal telefonino, --mem-info può essere usata come opzione per visualizzazre un elenco più completo delle memorie disponibili. visualizza informazioni sulle memorie disponibili e i loro slot, oltre ad altre informazioni. Usa lo stesso formato di --mem=? (vedi sotto) e può essere usato come opzione per --info così da visualizzare informazioni più complete riguardo la memoria. visualizza lo stato dei blocchi. Può anche essere usato come opzione di --info per visualizzare la lista dei nomi dei blocchi. specify a lock that you can enable or disable. For some locks, a password is needed (see --pin) enable e.g. a lock disable e.g. a lock dial a number (requires --number). The program returns either after 10 seconds or when the call reached the other side. hangup all currently active calls sincronizza l'orologio del telefonino. L'uso di comandi come ntpdate è raccomandato prima di usare questo comando. setta il numero SMSC (necessita --number) seleziona il tipo di trasferimento file in modalità binaria. seleziona il trasferimento dell'agenda telefonica. seleziona il trasferimento di sms. seleziona una memoria a cui accedere. I numeri degli slot possono variare dipendentemente dalla memoria selezionata. Vedi l'output di --info per i tipi di memoria supportata. Non usando questa opzione si modifica il comportamento di default (se un comportamento di default è stato definito). La stringa speciale "?" stampa in output nello stesso formato di --mem-info ma solo per il modo selezionato. seleziona uno slot da accedere. Vedi l'output di --mem-info o di --mem=?. Non usando questa opzione modifica il comportamento di default (se un comportamento di default è stato definito). La stringa speciale "all" definisce tutto l'intervallo di slot disponibili per la memoria selezionata e il modo e, ad eccezione di --sms, non può essere usata con --send. Per quanto riguarda gli SMS, ci sono anche altre quattro stringhe speciali: "read", "unread", "sent" e "unsent". Le ultime due possono essere usate con --send. Per l-accesso all-elenco telefonico, c'è anche la stringa speciale "last" (ultimo). Quando questa opzione viene tralasciata con --send, scmxx cerca di trovare uno slot vuoto (operazione che potrebbe anche durare molto). La ricerca di uno slot libero non è ancora supportata per l'elenco telefonico. Quando uno slot viene specificato assieme a vari file da caricare, lo slot specificato è il punto di partenza da cui cercare altri slot vuoti. La riscrittura di slot multipli non vuoti non è ancora possibile, eccetto per il caso speciale "all" (tutti). specifica il testo di un SMS o il testo di un record della rubrica. Per i record della rubrica telefonica, il limite del record dipende dalla rubrica selezionata (vedi l'output di --mem-info o di --mem=?). specifica un numero a cui mandare l'SMS o il numero del record all'interno della rubrica telefonica. Nota che il numero può avere un '+' iniziale per i numeri internazionali. E' normalmente limitato a 20 cifre (senza il '+') che di certo è a sufficienza. manda/prendi sms senza salvarli nel telefonino. Questo non è il comportamento di default in quanto vieni di certo accreditato quando spedisci un sms. Quando prendi direttamente, gli SMS che non sono di tipo DELIVER rimangono nella memoria del telefonino (scmxx non può ancora decodificare quei messaggi). spedisci l'SMS usando l'UCS-2 (16bit unicode) come set di caratteri. Non devi specificare questo parametro per rendere disponibile la decodifica di sms in formato unicode. setta la class0 nello schema di codice dei dati, che viene normalmente interpretato come "visualizza immediatamente". Non tutti i supporti riceventi lo supportano. Fai attenzione che un secondo SMS di questo tipo generalmente sovrascrive il precedente senza chiedere! Il suo uso non è consigliato. questo comando setta il bit di RichiestaReportDiStato all'interno del tipo della pdu della pdu dell'SMS. Dipende dalla SMSC se questo viene seguito. Con alcuni carrier, questo parametro porta a costi aggiuntivi! ordina i messaggi durante la stampa sull'output scelto. Alcuni metodi possibili di ordinamento sono "tipo", "slot" o "tipo, slot". "tipo" ordina per tipo di SMS con un ordine interno di tipi non supportati all'inizio, dopo SMS-SUBMIT, SMS-STATUS-REPORT e SMS-DELIVER. "slot" ordina per slot dell'SMS. "tipo, slot" ordina con "type" prima e ordina ogni SMS dello stesso tipo con "slot". Il comportamento di default non ordina affatto (l'ordine dipende dal telefonino). enable pin usage. Use this only if there was an error message that asks for a PIN or PUK. For a PIN, this is the corresponding "<PIN>", for a PUK, it is "<PUK>,<new PIN>". The value is only used once. Consider using the pin file (see below) instead of this option. definisce il set di caratteri del sistema invece di usare il valore di ritorno da nl_langinfo(CODESET). Questo è dovuto al fatto che alcuni sistemi non supportano se di caratteri unicode come UTF-8 oppure quando i dati sono stati codificati in un altro set di caratteri. In generale non dovresti aver bisogno di questa opzione. Esempi Manda un file bitmap al telefonino come bitmap (logo): scmxx ="bmp" =0 myfile.bmp Prende una Bitmap dal telefonino e la salva in un nuovo file: scmxx ="bmp" =0 =myfile.bmp Prendi tutti gli SMS non ancora letti (comportamento di default) e mandali sullo stdout: scmxx =unread =- scmxx - Spedisce un sms direttamente (senza salvarlo nel telefonino): scmxx =123 ="test" Prende una entry dell'agenda telefonica e la salva in un file: scmxx =SM =SM.pb Modifica uno slot specifico (33) nell'agenda telefonica all'interno della memoria SM: scmxx =SM =33 =123 ="test" Nota L'output testuale (elenco telefonico e SMS) dipende dal set di caratteri in uso localmente. Con l'input è lo stesso. Questo ha il vantaggio della localizzazione, ma ha anche lo svantaggio che tutti gli altri caratteri devono essere inseriti mediante una sequenza \XXXX dove X è un carattere esadecimale (ad esempio \20ac per il segno dell'Euro). Questa è una rappresentazione a 16bit del valore unicode. Il \XXXX è solo usato per l'output con l'intenzione di leggerlo nuovamente più tardi. Per l'output normale i caratteri che non possono essere visualizzati nella zona locale vengono sostituiti con un '?'. Usando una base locale UTF-8, si può essere sicuri che ogni carattere potrà essere convertito. Il carattere di nuova riga può essere inserito utilizzando il carattere comune \n e '\' dev'essere mascherato da sè stesso. Nella shell bash, questo può anche risultare in un input come "\\\\". Problemi di Connessione Ci sono parametri addizionali, come --ignore-serial-bits (default) e --keep-serial-bits. Usali solo quando non ottieni assolutamente nessuna risposta dal telefonino. La selezione di una delle due dipende dal cavo e dalla porta seriale, e non può essere determinata automaticamente. Se noti dei time-out al primo comando, prova con il parametro --start-delay=<secondi> Un altro parametro --device-timeout=<secondi> viene fornito per il caso in cui il tuo telefonino dovesse aver bisogno di più di 10 secondi per rispondere. Attualmente questo valore dovrebbe essere più che sufficiente ma non si è mai sicuri. Il valore minimo è 1, valori più alti di 25 hanno lo stesso valore di "per sempre". Sicurezza L'opzione --pin dev'essere usata con cautela. L'opzione e il suo argomento sono visibili nella lista dei processi. Ambiente SCMXX_TTY vedi --device per la descrizione SCMXX_BAUD vedi --baud per la descrizione Files ~/.scmxx/cache.pb questo file serve come file di ricerca durante l'output di SMS (per l'indirizzo del ricevente/mittente) e per creare alias dei numeri (--number) nell'invio di sms. Il formato è lo stesso di un elenco telefonico (i numeri degli slot non servono, ma devono essere presenti). ~/.scmxx/config questo file può contenere opzioni lunghe (senza il --), gli argomenti sono separati dal nome dell'opzione da un '='. Ogni spazio è permesso all'inizio di una riga, prima e dopo il separatore. Un '#' all'inizio della linea, la commenta. Esempi: #scegli un device a cui accedere device = /dev/ttyS0 #manda sempre gli SMS usando UCS-2 unicode ~/.scmxx/pin This file is used as an alternativ to the --pin command line option. The file MUST NOT be group readable/writeable or world readable/writeable! It also MUST be a regular file, not a symlink. SCMxx refuses to use the file if this is not the case. If a PUK value is requested by the phone, the corresponding PIN must also be defined. The only necessary format elements are '{', '=', ';' and '}'. Spaces and newlines are ignored. The file has the following format: sim 262031234567890 { pin = 1234 puk = 12345678; pin2 = 4321; puk2 = 87654321; } device 350123456789012 { type SIM { pin = 0000; puk = 0000; } } "sim" sections use the IMSI as identifier, "device" sections use the IMEI as identifier (see output of --info). Since the IMSI is needed, you canNOT switch the phone on with this! The "type" sub section in the device section has the following idenfifiers: SIMdevice code (theft protection) FSIMvery first inserted SIM NETnetwork personalization NETSUBnetwork subset personalization SPservice provider personalization CORPcorporate personalization Autore Andrea Benazzo andy@slacky.it scmxx-0.9.0/docs/gsmcharset.txt0000644000175000017500000001542407723512025016356 0ustar hendrikhendrikThis is the GSM character set definition (from s35_pdu_mode.pdf and completed by me). I wrote this by myself by testing all available characters (I know you can also get it from ETSI). This is only an 7bit character set. There is a problem with the GSM char @ when using the programming language C (0x00 means: end of string). In SCMxx it is solved by using 0x80(=128) instead during conversion. The * marks the characters that needs conversion. (Actually there is no way with ISO-8859 to display this file completely correctly.) Dec. Hex Char Description --------------------------------------- 00 0x00 @ * at 01 0x01 £ * pound 02 0x02 $ * dollar 03 0x03 ¥ * yen 04 0x04 è * small letter e with grave 05 0x05 é * small letter e with acute 06 0x06 ù * small letter u with grave 07 0x07 ì * small letter i with grave 08 0x08 ò * small letter o with grave 09 0x09 Ç * capital letter c with cedilla 10 0x0a line feed 11 0x0b Ø * capital letter o with stroke 12 0x0c ø * small letter o with stroke 13 0x0d carriage return 14 0x0e Å * capital letter a with ring above 15 0x0f å * small letter a with ring above 16 0x10 Ä * greek capital delta 17 0x11 _ * underscore 18 0x12 Ö * greek capital phi 19 0x13 à * greek capital gamma 20 0x14 Ë * greek capital lambda 21 0x15 Ù * greek capital omega 22 0x16 Ð * greek capital pi 23 0x17 Ø * greek capital psi 24 0x18 Ó * greek capital sigma 25 0x19 È * greek capital theta 26 0x1a Î * greek capital xi 27 0x1b * GSM extension table select 1 ------------------subtable 1 start--------------------- 20 0x14 ^ * 27 0x1b * GSM extension table select 2 ----------------subtable 2 start--------------------- ----------------subtable 2 end --------------------- 40 0x28 { * 41 0x29 } * 47 0x2f \ * 60 0x3c [ * 61 0x3d ~ * 62 0x3e ] * 64 0x40 | * vertical line 101 0x65 ¤ * EuroSign ------------------subtable 1 end --------------------- 28 0x1c Æ * capital special char AE 29 0x1d æ * small special char ae 30 0x1e ß * german letter sharp s (sz) 31 0x1f É * capital letter e with acute 32 0x20 space 33 0x21 ! exclamation mark 34 0x22 " quote 35 0x23 # ??? 36 0x24 ¤ * currency sign (translated to ° in SCMxx !!!) 37 0x25 % percent 38 0x26 & and 39 0x27 ' apostroph 40 0x28 ( opening bracket 41 0x29 ) closing bracket 42 0x2a * multiplier 43 0x2b + plus 44 0x2c , comma 45 0x2d - minus 46 0x2e . dot 47 0x2f / slash 48 0x30 0 number zero 49 0x31 1 number one 50 0x32 2 number two 51 0x33 3 number three 52 0x34 4 number four 53 0x35 5 number five 54 0x36 6 number six 55 0x37 7 number seven 56 0x38 8 number eight 57 0x39 9 number nine 58 0x3a : double point 59 0x3b ; symicolon 60 0x3c < arrow left 61 0x3d = equal 62 0x3e > arrow right 63 0x3f ? question mark 64 0x40 ¡ * inverted exclamation mark 65 0x41 A capital letter a 66 0x42 B capital letter b 67 0x43 C capital letter c 68 0x44 D capital letter d 69 0x45 E capital letter d 70 0x46 F capital letter e 71 0x47 G capital letter g 72 0x48 H capital letter h 73 0x49 I capital letter i 74 0x4a J capital letter j 75 0x4b K capital letter k 76 0x4c L capital letter l 77 0x4d M capital letter m 78 0x4e N capital letter n 79 0x4f O capital letter o 80 0x50 P capital letter p 81 0x51 Q capital letter q 82 0x52 R capital letter r 83 0x53 S capital letter s 84 0x54 T capital letter t 85 0x55 U capital letter u 86 0x56 V capital letter v 87 0x57 W capital letter w 88 0x58 X capital letter x 89 0x59 Y capital letter y 90 0x5a Z capital letter z 91 0x5b Ä * capital german letter ae (or "a) 92 0x5c Ö * capital german letter oe (or "o) 93 0x5d Ñ * capital letter n with tilde 94 0x5e Ü * capital german letter ue (or "u) 95 0x5f § * section sign 96 0x60 ¿ * inverted question mark 97 0x61 a small letter a 98 0x62 b small letter b 99 0x63 c small letter c 100 0x64 d small letter d 101 0x65 e small letter e 102 0x66 f small letter f 103 0x67 g small letter g 104 0x68 h small letter h 105 0x69 i small letter i 106 0x6a j small letter j 107 0x6b k small letter k 108 0x6c l small letter l 109 0x6d m small letter m 110 0x6e n small letter n 111 0x6f o small letter o 112 0x70 p small letter p 113 0x71 q small letter q 114 0x72 r small letter r 115 0x73 s small letter s 116 0x74 t small letter t 117 0x75 u small letter u 118 0x76 v small letter v 119 0x77 w small letter w 120 0x78 x small letter x 121 0x79 y small letter y 122 0x7a z small letter z 123 0x7b ä * small german letter ae (or "a) 124 0x7c ö * small german letter oe (or "o) 125 0x7d ñ * small letter n with tilde 126 0x7e ü * small german letter ue (or "u) 127 0x7f à * small letter a with grave scmxx-0.9.0/docs/apo.txt0000644000175000017500000002166310377435013014777 0ustar hendrikhendrikThe apo files format ==================== Since the S55, somewhere in the flexmem you have an apo/ directory somewhere. It contains several sub-directories which define the file type. Each of those contains a file named "main" (except the index dir) and 8bit hex numbered directories with the actual data files. The following file types exist: app: appointments note: notes addr: address book (empty on S55) rem: reminders task: tasks cal: call records (actually calrec) The idx (could mean index) subdir contains files in another (still unknown) format. The "main" file =============== The main files states what files are present in sub-directories. Header: format: the data format 0x61 S55/S65/M65 0x62 SL75 htype: the header type 0x31 S55: 2 bytes 0x32 S65/M65: 4 bytes additional header: 0x00 0x00 0x33 SL75: 6 bytes additional header: 0x88 0x13 maximum: maximum entry bit ever used S55/S65: bitfield (32 chunks: 1bit for each entry in a numbered subdir (count from 0) Example (first bitfield): little endian bytes: FF F7 0F 00 32bit integer: 0x000FF7FF Bits: 0000 0000 0000 1111 1111 0111 1111 1111 minor: FEDC BA98 7654 3210 FEDC BA98 7654 3210 major: <--------1--------> <--------0--------> meaning: 19 entries, entries 00/0B and 00/xx with xx>13 missing (132-hsize)*8=512 entries seem to be possible (S65) but the phone may limit it to 500? SL75: The data is located in data/// After the header follows a continuous bistream, each representing an entry. If the bit is set then the entry is present. Bitstreams do not have any endianess. Each level2 directory contains 41 entries (00-40 in decimal notation). Each level1 directory contains ?? level2 directories (00-?? in ?? notation). There can be ?? level1 directories (00-?? in ?? notation). Note: level1_max * level2_max * 41 cannot be more that 65535. Example: hex: 0xFF 0x7E 0x70 0xFF 0xFF 0xFF 0xEF 0xFF 0xFF bin: 1111111101111110011100001111111111111111111111111110111111111111 level1: <--------------------------------- 00/ ------------------------- level2: <------------ 00/ ---------------------><------------ 01/ ------ entry: ^00.................^20..............40^^00..................... The data files ============== "aligned" means 2byte-alignment on S55 and 4byte-alignment else. Header (S55/S65): The header has a fixed size of 6 bytes 0x?? 0x?? 0x?? Serial: serial of entries on the phone Entry_Count: number of entries in the file Header (SL75): The header has a fixed size of 10 bytes 0x?? 0x?? 0x?? 0x?? 0x?? 0x?? 0x?? Data: * Entry: Type: 16bit little-endian See entry type table below. Data: aligned, content dependent on type See data type list below. Entry type table: ----------------- value format meaning -------------------------------------------------------------------- 0x00 date rem:alarm time 0x01 date rem:start time 0x02 date rem:end time 0x0a date note:creation date 0x0b date note:modification date 0x0c note:??? (2byte) 0x0d text notetext (UCS-2) 0x10 apptype app,task:type 0x11 text app:description 0x12 prio task:priority 0x13 status task:status 0x14 date task:due time 0x15 date app,task:alarm time 0x16 date app:start time 0x17 task date task:closed at time 0x18 text app:voice memo filename 0x19 text app:location 0x1a date app:end time 0x1b text app:reoccurrence 0x1d number app/cal:tel num for call type 0x1e link app/cal:pointer to addr entry 0x20 link rem:appointment reference 0x21 alarm app,task:alarm 0x23 text addr:family name 0x24 text addr:given name 0x25 text addr:street 0x26 text addr:postal code 0x27 text addr:city 0x28 text addr:country 0x29 text addr:company 0x2a number addr:tel num (office) 0x2b number addr:tel num (fax 1) 0x2c number addr:tel num (mobile) 0x2d number addr:tel num (home) 0x2e text addr:e-mail 0x2f text addr:URL 0x30 date addr:birthday (in 01/12, 02/06, 02/10) 0x31 link addr:birthday app pointer 0x32 group addr:group 0x33 text addr:picture file address 0x35 text addr:title [SL75] 0x3e text addr:Wv user id [S65] 0x3f text addr:nickname [S65] 0x41 text addr:ICQ number [S65] 0x46 text addr:AIM buddy name [S65] 0x4d atype app,task:alarm type 0x4e ??? app:??? (4byte: 0x01 0x00 0x00 0x00, 0x00 0x00 0x00 0x00) 0x4f ??? app,task,note:??? (2byte: 0x21 0x00(cal), 0x23 0x00(app), 0x27 0x00(app)) 0x50 text cal:??? 0x51 date cal:??? 0x52 ??? cal:duration??? (2byte) 0x53 ??? cal:??? (2byte: 0x06 0x00) 0x54 ??? cal:??? (4byte: 0x01 0x00 0x00 0x00) 0x55 ??? cal:??? (4byte: 0x00 0x00 0x00 0x00) 0x56 ??? cal:??? (4byte: 0x01 0x00 0x00 0x00) 0x57 ??? cal:??? (4byte: 0x00 0x00 0x00 0x00) 0x58 ??? cal:??? (4byte: 0x00 0x00 0x00 0x00) 0x59 ??? cal:??? (4byte: 0x00 0x00 0x00 0x00) 0x5a ??? cal:??? (4byte: 0x00 0x00 0x00 0x00) 0x5d text addr:e-mail 2 0x5e number addr:fax 2 0x60 text addr:visible name [SL75] 0x62 number addr:number (private) [SL75] 0x63 number addr:number (office) [SL75] 0x64 number addr:number (mobile,private) [SL75] 0x65 number addr:number (mobile,office) [SL75] 0x66 text addr:ring tone file address [SL75] 0x67 text addr:ring video file address [SL75] 0x68 text addr:short message tone file address [SL75] 0x69 ??? addr:??? (4byte: 0x00 0x00 0x00 0x00) 0x6a number addr:number (fax,private) [SL75] 0x6b text addr:e-mail (private) [SL75] 0x6c text addr:note (private) [SL75] 0x6d text addr:Push-To-Talk ID [SL75] 0x6e ??? addr:??? 0x6f text addr:profession [SL75] 0x6f date app:??? (in type=birthday) 0x70 date app:??? (in type=birthday) 0x71 text addr:e-mail (office) [SL75] 0x72 text addr:e-mail 2 (office) [SL75] 0x73 text addr:URL (office) [SL75] 0x74 text addr:street (office) [SL75] 0x75 text addr:city (office) [SL75] 0x76 text addr:postal code (office) [SL75] 0x77 text addr:sub-state (office) [SL75] 0x78 text addr:country (office) [SL75] 0x79 text addr:note (office) [SL75] 0x7a text addr:wireless village ID [SL75] 0x7e text addr:note (person) [SL75] 0x7f text addr:sub-state (private) [SL75] 0x91 number addr:number (fax,office) [SL75] Data type list: --------------- date: On S55: <(8)> <(8)> fixed length (10 bytes) rweek: repeation in weeks, 0xFF=forever, 0x37=55=1year On S65: <(16)> <(16)> <(8)> <(32)> fixed length (16 bytes) text: [] len: number of bytes following for this field (rest of header + data) count: number of characters in data -> (len - 2)/count == sizeof(char) text: UCS-2LE data, padding value is 0xff number: On S55 and S65: <(8)> <(32)> On SL75: { 0x00} { 0xff} \ 0x00 0x00 0x00 0x00 (6x 0x00) flags: 0x06 ??? 0x1d ??? numtype: ETSI 23.040 number type field numlen: number of bytes that contain valid digits number: semi-octet-encoded digits (fix size of 21 bytes) numtext: digits in text representation textlen: length of text text: padding value is 0xff align: fill bytes (0x00) to align the following bytes to a 2byte boundry flen: length of the ffield ffield: bytes with 0xff group: value (S65): 0x01 VIP 0x02 office 0x03 family 0x04 individual 0x05 leisure 0x06 private 0x07 business 0x08 received 0x09 no group apptype: type: 0x01 memo 0x02 speech memo 0x04 meeting 0x08 holiday 0x10 birthday 0x20 call prio: value: 0x01 highest 0x02 high 0x03 normal 0x04 low 0x05 lowest status: value: 0x00 outstanding 0x02 done alarm: value: 0x00 disabled 0x10 enabled (S65) 0x19 enabled (S55) atype: <(16)> value: 0x00 normal 0x01 silent link: <0x??(8)> ???: the MSB has an unknown meaning (maybe: 0=master, 1=slave) addr: serial of a corresponding addr entry (but seems to be something else on S55) type: the type of the link destination: 0x0a addr 0xcc app scmxx-0.9.0/docs/scmxx.de.10000644000175000017500000004103510401301622015247 0ustar hendrikhendrik.TH scmxx 1 2006\-01\-30 SCMxx .SH NAME scmxx \- Datenaustausch mit einem Siemens\-Handy .SH SYNOPSIS \fBscmxx\fR [\fB\-\-device\fR \fBGer\(:atedatei\fR] [\fB\-\-baud\fR \fBBaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] {\fB\-\-info\fR | \fB\-\-set\-time\fR | \fB\-\-mem\-info\fR | \fB\-\-lock\-info\fR | \fB\-\-lock\fR \fBlock\fR {\fB\-\-enable\fR | \fB\-\-disable\fR} | \fB\-\-set\-smsc\fR \fB\-\-number\fR {\fBNummer\fR | \fBName\fR} } .PP \fBscmxx\fR [\fB\-\-device\fR \fBGer\(:atedatei\fR] [\fB\-\-baud\fR \fBBaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] [\fB\-\-out\fR \fBDatei\fR] [\fB\-\-pipe\fR \fBPipe\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-binary\fR] [\fB\-\-mem\fR \fBSpeicher\fR] [\fB\-\-slot\fR \fBSpeicherplatz\fR] [\fBDatei...\fR] .PP \fBscmxx\fR [\fB\-\-device\fR \fBGer\(:atedatei\fR] [\fB\-\-baud\fR \fBBaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] [\fB\-\-out\fR \fBDatei\fR] [\fB\-\-pipe\fR \fBPipe\fR] [\fB\-\-pin\fR \fBPIN\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-pbook\fR] [\fB\-\-mem\fR \fBSpeicher\fR] [\fB\-\-slot\fR \fBSpeicherplatz\fR] [\fB\-\-text\fR \fBText\fR] [ \fB\-\-number\fR {\fBNummer\fR | \fBName\fR} ] [\fBDatei...\fR] .PP \fBscmxx\fR [\fB\-\-device\fR \fBGer\(:atedatei\fR] [\fB\-\-baud\fR \fBBaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] [\fB\-\-out\fR \fBDatei\fR] [\fB\-\-pipe\fR \fBPipe\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-sms\fR] [\fB\-\-mem\fR \fBSpeicher\fR] [\fB\-\-slot\fR \fBSpeicherplatz\fR] [\fB\-\-text\fR \fBText\fR] [ \fB\-\-number\fR {\fBNummer\fR | \fBName\fR} ] [\fB\-\-direct\fR] [\fB\-\-flash\fR] [\fB\-\-srr\fR] [\fB\-\-unicode\fR] [\fBDatei...\fR] .PP \fBscmxx\fR [\fB\-\-help\fR] [\fB\-\-version\fR] .SH BESCHREIBUNG SCMxx kann bestimmte Dateien zu und von einem Siemens\-Handy \(:ubertragen und dort gespeicherte l\(:oschen. Die Daten werden aus einer Datei oder von der Standardeingabe gelesen, geschrieben wird in eine Datei oder auf die Standardausgabe. Kurznachrichten (SMS) k\(:onnen direkt gesendet und empfangen werden, also ohne da\(ss sie auf dem Handy gespeichert werden. SCMxx wurde mit mehreren Handys von Siemens getestet (nur S25 und sp\(:ater). .SH OPTIONEN .TP \fB\-\-device (\-d)\fR definiert eine Ger\(:atedatei. Diese wird statt der in der Umgebungsvariable SCMXX_TTY und dem einkompilierten Wert verwendet. F\(:ur Linux\-Systeme kann dies /dev/ttyS0 f\(:ur eine serielle Verbindung, /dev/ircomm0 f\(:ur eine Infrarot\-Verbingung und /dev/rfcomm0 for eine Bluetooth\-Verbingung sein. Wenn native Bluetooth\-Unterst\(:utzung einkompiliert wurde, k\(:onnen zus\(:atzlich die Formen bt://[xx:xx:xx:xx:xx:xx]:n oder bluetooth://[xx:xx:xx:xx:xx:xx]:n benutzt werden, um eine Bluetooth\-Adresse xx:xx:xx:xx:xx:xx und einen Kanal n (Vorgabewert ist 1) anzugeben. Die Angabe des Kanals is optional, in diesem Fall muss aber auch der Doppelpunkt weggelassen werden. .TP \fB\-\-baud (\-b)\fR definiert ein Baudrate, mit der zum Ger\(:at verbunden wird. Die g\(:ultigen Werte sind abh\(:angig vom System, typische sind jedoch 9600, 19200, 38400, 57600 oder 115200. Der Standardwert ist 19200. Das S25 und die *35i arbeiten nur bei 19200, alle sp\(:ateren Modelle arbeiten auch bei voller serieller Geschwindigkeit. Infrarotverbindungen k\(:onnen, abh\(:angig vom IrDA\-Modul, eine Ausnahme sein. Dies \(:ubergeht die SCMXX_BAUD\-Variable und den einkompilierten Wert. .TP \fB\-\-out (\-o)\fR definiert eine zu benutzende Datei. Wenn man Bin\(:ardatein mit "all" holt, werden die Speicherplatznummer und der Dateityp angeh\(:angt. Wenn man sendet oder l\(:oscht, hat dieser Parameter keine Wirkung aber die letzten Parameter sollten beim Senden g\(:ultige Dateien sein. Die Standardausgabe mu\(ss explizit mittel einem Bindestrich ('\-') angegeben werden, sonst wird nichts auf diese geschrieben. Wenn '\-' angegeben wurde, wird nicht an diesen Wert, auch beim holen von mehereren Dateien, angeh\(:angt. .TP \fB\-\-pipe (\-p)\fR definiert eine Pipe zu einem anderen Programm. Wenn man mit "all" Daten holt, wird jede Datei in eine eigene Pipe geschickt (nur mit \-\-binary und \-\-sms). .TP \fB\-\-quiet (\-q)\fR verringert die Menge der Ausgaben um 1 .TP \fB\-\-pin\fR die Option kann man benutzen, wenn ein PIN\-Code zum Zugriff erforderlich ist .TP \fB\-\-verbose (\-v)\fR erh\(:oht die Menge der Ausgaben um 1 .TP \fB\-\-reset\fR versucht, das Handy zur\(:uckzusetzen, soda\(ss man wieder darauf zugreifen kann. Es kann passieren, da\(ss das Handy nicht mehr auf der seriellen Schnittstelle antwortet, besonders nach einem vom Benutzer unterbrochenen Dateitransfer. Dies sendet einfach blind ein paar besondere Zeichen. .TP \fB\-\-help (\-h)\fR gibt die Hilfeseite aus .TP \fB\-\-version\fR gibt die Version aus .TP \fB\-\-remove (\-r)\fR l\(:oscht einen Eintrag vom Handy Wenn \-\-sms und \-\-get mit angegeben werden, holt und l\(:oscht dies. Wenn \-\-sms und \-\-send mit angegeben werden, sendet und l\(:oscht dies. .TP \fB\-\-get (\-g)\fR holt einen Eintrag und Speichert ihn in eine Datei Wenn \-\-sms und \-\-remove mit angegeben werden, holt und l\(:oscht dies. Wenn \-\-sms und \-\-send mit angegeben werden, holt und sendet dies. .TP \fB\-\-send (\-s)\fR sendet eine Datei zum Handy Beim Senden vom Kurznachrichten k\(:onnte die Option \-\-direct ebenfalls von Interesse sein. Wenn \-\-sms und \-\-remove mit angegeben werden, sendet und l\(:oscht dies. Wenn \-\-sms und \-\-get mit angegeben werde, holt und sendet dies. .TP \fB\-\-info (\-i)\fR sammelt Informationen vom Handy, \-\-mem\-info kann als Schalter benutzt werden und eine komplexere Tabelle \(:uber die verf\(:ugbaren Speicher auszugeben. .TP \fB\-\-mem\-info\fR zeigt Informationen \(:uber verf\(:ugbare Speicher und deren Speicherpl\(:atze und andere Informationen an. Es benutzt dasselbe Format wie \-\-mem=? und kann als Schalter f\(:ur \-\-info dienen, um die kurze Speicherauflistung zu ersetzen. .TP \fB\-\-lock\-info\fR zeigt den Status der Zugriffssperren (locks) an. Es kann als Schalter f\(:ur \-\-info dienen, um die kurze Speicherauflistung zu ersetzen. .TP \fB\-\-lock\fR w\(:ahlt die ein\-/auszuschaltende Sperre aus. F\(:ur einige Sperren wird ein Passwort ben\(:otigt (siehe \-\-pin). .TP \fB\-\-enable\fR einschalten z.B. einer Sperre .TP \fB\-\-disable\fR ausschalten z.B. einer Sperre .TP \fB\-\-dial\fR w\(:ahlt eine Nummer (erforder \-\-number). Das Programm beendet sich entweder nach 10 Sekunden oder wenn der Anruf die angerufene Seite erreicht hat. .TP \fB\-\-hangup\fR beendet alle, momentan aktiven Gespr\(:ache .TP \fB\-\-set\-time\fR gleicht die Zeit des Handy mit der des Rechners ab. Der Einsatz eines Programms wie ntpdate wird vor der Nutzung dieses Parameters empfohlen. .TP \fB\-\-set\-smsc\fR setzt eine neue SMSC nummber (erfordert \-\-number) .TP \fB\-\-binary (\-N)\fR w\(:ahlt den Bin\(:ardatei\(:ubertragungsmodus .TP \fB\-\-pbook (\-P)\fR w\(:ahlt den Telefonbuch\(:ubertragungsmodus .TP \fB\-\-sms (\-S)\fR w\(:ahlt den Kurznachrichten\(:ubertragungsmodus .TP \fB\-\-mem\fR w\(:ahlt den Speicher aus, der benutzt werden soll. Speicherplatznummern h\(:angen von dieser Wahl ab. Die Ausgabe von \-\-info zeigt unterst\(:utzte Speicher an. Wird diese Optioen nicht benutzt, wird eine eventuell vorhandene Vorgabe benutzt. Es gibt den besonderen Wert "?", der die selbe Ausgabe wie \-\-mem\-info hat, nur da\(ss es auf den gew\(:ahlten Modus eingeschr\(:ankt wird. .TP \fB\-\-slot\fR w\(:ahlt die zu benutzende Speicherplatznummer aus. (siehe Ausgabe von \-\-mem\-info oder \-\-mem=?). Wird diese Optioen nicht benutzt, wird eine eventuell vorhandene Vorgabe benutzt. Der besondere Wert "all" definiert the alle verf\(:ugbaren Speicherplatznummern f\(:ur den gew\(:ahlten Speicher und Modus (mit der Ausnahme von \-\-sms mit \-\-send). F\(:ur den Kurznachrichten\(:ubertragungsmodus gibt es die besonderen Werte "read" (gelesen), "unread" (ungelesen), "sent" (bereits gesendet) und "unsent" (noch nicht gesendet). Die letzteren beiden k\(:onnen mit \-\-sms und \-\-send benutzt werden. F\(:ur den Telefonbuchmodus gibt es zus\(:atzlich den Wert "last" (letzter). Wenn diese Option nicht angegeben wird, versucht scmxx einen leeren Speicherplatz zu finden (je nachdem kann dies auch l\(:anger dauern). Wenn ein Wert angegeben wurde und meherere Datei gesendet werden, ist die angebene Speicherplatznummer der Startpunkt f\(:ur die Suche nach leeren Speicherpl\(:atzen. Mehere, nicht\-leere Speicherpl\(:atze zu \(:uberscheiben wird noch nicht unterst\(:utzt, au\(sser f\(:ur den Spezialfall "all" (alle). .TP \fB\-\-text (\-t)\fR definiert den Inhalt einer Kurzmitteilung oder eine Telefonbucheintrags. Bei Telefonbucheintr\(:agen h\(:angt die L\(:ange vom gew\(:ahlten Telefonbuch ab (siehe Ausgabe von \-\-mem\-info oder \-\-mem=?). .TP \fB\-\-number (\-n)\fR definiert die Nummber beim Senden einer Kurznachricht oder die Nummer bei einem Telefonbucheintrag. Die Nummer kann ein Prefix '+' f\(:ur internationale Nummern haben und ist normalerweise auf 20 Ziffern (ohne das '+') limitiert, was genug sein sollte. .TP \fB\-\-direct\fR sendet/holt Kurznachrichten ohne sie auf dem Handy zu speichern. Dies ist kein Standardwert, weil man f\(:ur das Senden von Kurznachrichten normalerweise Geld bezahlen mu\(ss. Beim direkten Holen werden Kurznachrichten, die nicht vom Type SMS\-DELIVER sind trotzdem auf dem Handy gespeichert, da diese noch nicht dekodiert werden k\(:onnen. .TP \fB\-\-unicode\fR sendet Kurznachrichten als UCS\-2 (16bit\-Unicode\-Zeichensatz). Dieser Parameter mu\(ss nicht angegeben werden, um Unicode\-Kurznachrichten zu dekodieren. .TP \fB\-\-flash\fR dies setzt das Class0\-Bit im DCS\-Feld, was beim Empf\(:anger normalerweise als "immediate display" (unmittelbar anzeigen) interpretiert wird. Nicht alle Empfangsger\(:ate unterst\(:utzen das. Man mu\(ss au\(sserdem beachten, da\(ss eine zweite Kurznachricht mit dieser Einstellung eine vorherige ohne Nachfrage \(:uberschreibt! Die Nutzung wirde deshalb nicht empfohlen. .TP \fB\-\-srr\fR dies setzt das Bit StatusReportRequest (Statusreport anfordern) im pdutype\-Feld der SMS\-PDU. Es h\(:angt von der SMSC ab, ob dieses Bit beachtet wird. Bei manchen Providern kosten StatusReports extra. .TP \fB\-\-sort\fR sortiert die Kurznachrichten bei der Ausgabe. M\(:ogliche Sortiermethoden sind "type", "slot" und "type,slot". "type" sortiert nach dem Nachrichtentyp mit einer internen Rangfolge: erst die nicht unterst\(:utzten Typen, dann SMS\-SUBMIT, SMS\-STATUS\-REPORT und SMS\-DELIVER. "slot" sortiert nach dem Speicherplatz der Kurzmitteilung. "type,slot" sortiert erst wie "type" und dann jeden Typen wie "slot". Die Vorgabe ist keine Sortierung (Reihenfolge h\(:angt vom Handy ab). .TP \fB\-\-pin\fR erm\(:oglichst die Nutzung einer PIN. Diese Option sollte nur benutzt werden, wenn nach eine Fehlermeldung erscheint, die nach einer PIN oder PUK verlangt. F\(:ur eine PIN ist dies die erwartete "", f\(:ur eine PUK ist dies die erwartete ",". Der Wert wird nur ein einziges Mal benutzt. Die Pin\-Datei sollte, wenn m\(:oglich, stattdessen benutzt werden (siehe unten). .TP \fB\-\-system\-charset\fR definiert den Systemzeichensatz anstatt den R\(:uckgabewert von nl_langinfo(CODESET) zu nutzen. Das ist eine Behelf f\(:ur Systeme, die keine Unicode\-Locales wie UTF\-8 unterst\(:utzen oder wenn Daten von einem anderen System mit einer anderen Locale als Eingabe benutzt werden soll. Normalerweise wird diese Option nicht ben\(:otigt. .SH BEISPIELE .TP Senden einer Bitmapdatei an das Handy (Logo): scmxx \fB\-\-send\fR \fB\-\-binary\fR \fB\-\-mem\fR="bmp" \fB\-\-slot\fR=0 myfile.bmp .TP Holen eines Logos vom Handy und speichern in eine neue Datei: scmxx \fB\-\-get\fR \fB\-\-binary\fR \fB\-\-mem\fR="bmp" \fB\-\-slot\fR=0 \fB\-\-out\fR=myfile.bmp .TP Holen aller ungelesenen (Vorhabe beim holen) Kurznachrichten und Ausgabe auf die Standardausgabe: scmxx \fB\-\-get\fR \fB\-\-sms\fR \fB\-\-slot\fR=unread \fB\-\-out\fR=\- scmxx \fB\-gS\fR \fB\-o\fR\- .TP Direkten empfangen einer Kurznachricht: scmxx \fB\-\-send\fR \fB\-\-sms\fR \fB\-\-direct\fR \fB\-\-number\fR=123 \fB\-\-text\fR="test" .TP Holen eines Telefonbuchs und speichern in eine Datei: scmxx \fB\-\-get\fR \fB\-\-pbook\fR \fB\-\-mem\fR=SM \fB\-\-out\fR=SM.pb .TP \(:Anders des Speicherplatzes 33 im Telefonbuch SM: scmxx \fB\-sP\fR \fB\-\-mem\fR=SM \fB\-\-slot\fR=33 \fB\-\-number\fR=123 \fB\-\-text\fR="test" .SH BESONDERHEITEN Die Ausgabe von Text (Telefonbuch und SMS) h\(:angt von dem Zeichensatz der gew\(:ahlten Systemlocale ab, ebenso f\(:ur die Eingabe. Das hat den Vorteil der Lokalisation aber auch den Nachteil, da\(ss alle nicht von der Locale unterst\(:utzten Zeichen mit einer Sequenz \\XXXX eingegeben werden m\(:ussen, wobei X ein Hexadezimalzeichen ist (z.B. \\20ac f\(:ur das Eurozeichen). Das ist der 16bit\-Unicode\-Wert. Die \\XXXX\-Ausgabe wird nur f\(:ur Ausgaben benutzt, die normalerweise auch wieder als Eingabe dienen k\(:onnen. F\(:ur alle anderen Ausgabe wird ein Fragezeichen ('?') als Platzhalter genommen. Mit einer UTF\-8\-locale kann man sicherstellen, da\(ss alle Zeichen konvertiert und angezeigt werden k\(:onnen. Das Zeichen f\(:ur das Zeilenende kann als das \(:ubliche \\n eingegeben werden und '\\' mu\(ss sich selbst vorangestellt werden. In der bash kann dies sogar in einem "\\\\\\\\" enden. .SH VERBINDUNGSPROBLEME Es gibt die zus\(:atzlichen Parameter \-\-ignore\-serial\-bits (serielle Bits ignorieren, Vorgabe) und \-\-keep\-serial\-bits (serielle Bits beibehalten). Diese sollte man nur probieren, wenn das Handy keine Antwort zu geben scheint. Welchen Einstellung die richtig ist, h\(:angt vom Kabel und vom seriellen Port ab und kann nicht automatisch bestimmt werden. .PP Wenn Timeouts beim ersten Kommando kommen, kann man au\(sserdem die Option \-\-start\-delay= (Anfangsverz\(:ogerung in Sekunden) probieren. .PP Eine weitere Option \-\-device\-timeout= (Ger\(:atetimeout in Sekunden) gibt es f\(:ur den Fall, da\(ss es das Handy nicht schafft, auf ein Kommando innerhalb von 10 Sekunden zu antworten. Eigentlich sollte dies mehr als genug sein, aber man wei\(ss ja nie. Der minimal erlaubte Wert ist 1, der h\(:ochste von 25 bedeutet "unendlich lange". .SH SICHERHEIT Die \-\-pin Option sollte man mit Vorsicht benutzen. Diese Option mitsamt Wert ist in der Prozesslist sichtbar. .SH UMGEBUNGSVARIABLEN .TP SCMXX_TTY siehe \-\-device f\(:ur eine Beschreibung .TP SCMXX_BAUD siehe \-\-baud f\(:ur eine Beschreibung .SH DATEIEN .TP ~/.scmxx/cache.pb Diese Datei dient als Telefonbuch (f\(:ur Nummer von Empf\(:anger/Sender) w\(:ahrend der Ausgabe von Kurznachrichten und als Alias f\(:ur \-\-number beim Senden von Kurznachrichten. Das Format ist dasselbe wie eine Telefonbuchdatei (die Speicherplatznummern sind nicht wichtig, m\(:ussen aber vorhanden sein). .TP ~/.scmxx/config Diese Datei kann Option in der langen Form (aber ohne die \-\-) enthalten. Der Wert is von der Option durch ein '=' getrennt. Eine beliebige Anzahl von Leerzeichen ist am Anfang der Zeile, vor und nach dem Trennzeichen erlaubt. Ein '#' am Anfang der Zeile markiert diese Zeile als Kommentar. Beispiele: .nf #eine andere Ger\(:atedatei festlegen device = /dev/ttyS0 #SMS immer als UCS\-2 senden unicode .fi .TP ~/.scmxx/pin Diese Datei wird als Alternative zur \-\-pin Kommandozeilenoption benutzt. Die Datei DARF NICHT gruppenlesbar/\-schreibbar oder weltlesbar/\-schreibbar sein! Es MUSS auch eine regul\(:are Datei sein, kein SymLink. SCMxx wird sonst die Nutzung der Datei verwehren. Wenn ein PUK\-Wert vom Ger\(:at angefordert wird, mu\(ss ein zugeh\(:origer PIN\-Wert ebenfalls definiert sein. Die einzig n\(:otigen Formatelemente sind '{', '=', ';' und '}'. Leerzeichen und Zeilenumbr\(:uche werden ignoriert. Die Datei hat das folgende Format: .nf sim 262031234567890 { pin = 1234 puk = 12345678; pin2 = 4321; puk2 = 87654321; } device 350123456789012 { type SIM { pin = 0000; puk = 0000; } } .fi "sim"\-Sektionen benutzen die IMSI als Variable, "device"\-Sektionen benutzen die IMEI als Variable (siehe Ausgabe von \-\-info). Da die IMSI ben\(:otigt wird, k\(:onnen sie hiermit nicht das Handy einschalten. Die "type"\-Untersektion in der device\-Sektion hat folgende Variablen: .RS .TP SIM Ger\(:atecode (Diebstahlsicherung) .TP FSIM die zuallererst eingelegte SIM .TP NET Netwerk\-Personalisierung .TP NETSUB Netwerk\-Subset\-Personalisierung .TP SP Service\-Provider\-Personalisierung .TP CORP Corporate\-Personalisierung .RE .SH AUTOR Hendrik Sattler post@hendrik\-sattler.de scmxx-0.9.0/docs/scmxx.en.10000644000175000017500000003443310401301622015265 0ustar hendrikhendrik.TH scmxx 1 2006\-01\-30 SCMxx .SH NAME scmxx \- exchange data with your Siemens mobile phone .SH SYNOPSIS \fBscmxx\fR [\fB\-\-device\fR \fBdevice\fR] [\fB\-\-baud\fR \fBbaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] {\fB\-\-info\fR | \fB\-\-set\-time\fR | \fB\-\-mem\-info\fR | \fB\-\-lock\-info\fR | \fB\-\-lock\fR \fBlock\fR {\fB\-\-enable\fR | \fB\-\-disable\fR} | \fB\-\-set\-smsc\fR \fB\-\-number\fR {\fBnumber\fR | \fBname\fR} } .PP \fBscmxx\fR [\fB\-\-device\fR \fBdevice\fR] [\fB\-\-baud\fR \fBbaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] [\fB\-\-out\fR \fBfile\fR] [\fB\-\-pipe\fR \fBpipe\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-binary\fR] [\fB\-\-mem\fR \fBmemory\fR] [\fB\-\-slot\fR \fBslot\fR] [\fBfile...\fR] .PP \fBscmxx\fR [\fB\-\-device\fR \fBdevice\fR] [\fB\-\-baud\fR \fBbaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] [\fB\-\-out\fR \fBfile\fR] [\fB\-\-pipe\fR \fBpipe\fR] [\fB\-\-pin\fR \fBPIN\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-pbook\fR] [\fB\-\-mem\fR \fBmemory\fR] [\fB\-\-slot\fR \fBslot\fR] [\fB\-\-text\fR \fBtext\fR] [ \fB\-\-number\fR {\fBnumber\fR | \fBname\fR} ] [\fBfile...\fR] .PP \fBscmxx\fR [\fB\-\-device\fR \fBdevice\fR] [\fB\-\-baud\fR \fBbaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] [\fB\-\-out\fR \fBfile\fR] [\fB\-\-pipe\fR \fBpipe\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-sms\fR] [\fB\-\-mem\fR \fBmemory\fR] [\fB\-\-slot\fR \fBslot\fR] [\fB\-\-text\fR \fBtext\fR] [ \fB\-\-number\fR {\fBnumber\fR | \fBname\fR} ] [\fB\-\-direct\fR] [\fB\-\-flash\fR] [\fB\-\-srr\fR] [\fB\-\-unicode\fR] [\fBfile...\fR] .PP \fBscmxx\fR [\fB\-\-help\fR] [\fB\-\-version\fR] .SH DESCRIPTION SCMxx can copy files to and from a Siemens mobile phone and also delete stored files. Files can read from a given file or through stdin and stored to a given file or stdout. SMS can also be directly sent or received without storing in the mobile phone. SCMxx was tested with several mobile phones manufactured by Siemens (only S25 and later). .SH OPTIONS .TP \fB\-\-device (\-d)\fR specify another than the compiled in device. This overwrites the SCMXX_TTY environment variable and the compiled\-in value. For linux systems, this may be e.g. /dev/ttyS0 for serial connections, /dev/ircomm0 for infrared connections and /dev/rfcomm0 for bluetooth connections. If native bluetooth support is compiled in, you can also use the format bt://[xx:xx:xx:xx:xx:xx]:n or bluetooth://[xx:xx:xx:xx:xx:xx]:n to specify a bluetooth address xx:xx:xx:xx:xx:xx and the bluetooth channel n (default is 1). The channel is optional, omit the colon in this case, too. .TP \fB\-\-baud (\-b)\fR specify the device's speed. Valid values are dependent on the system but may be 9600, 19200, 38400, 57600 or 115200. The default value is 19200. The S25 and *35i only work at the 19200, all later phones also work at full serial speed. Infrared connections may be an exception to these rules (dependent on the infrared donle). This overwrites the SCMXX_BAUD environment variable and the compiled\-in value. .TP \fB\-\-out (\-o)\fR specify a file to use. When getting binary files with "all", the slot number, a dot and the filetype are appended. When sending or deleting, this parameter has no use but the last parameters that should be valid files. Stdout must be explicitly selected with the dash ("\-"), by default nothing is written to stdout. There is nothing appended to "\-" when getting multiple files. .TP \fB\-\-pipe (\-p)\fR specify a pipe to another program. When getting with "all", every file is piped to this programs on its own (only for \-\-binary and \-\-sms). .TP \fB\-\-quiet (\-q)\fR decreases verbosity by 1 .TP \fB\-\-pin\fR use this option if a PIN code is required for access .TP \fB\-\-verbose (\-v)\fR increases verbosity by 1 .TP \fB\-\-reset\fR try to reset the phone, so it gets accessible again. It may happen that the phone does not answer on the serial interface anymore, especially with a previous user\-interrupted file transfer. This simply blindly sends some special characters. .TP \fB\-\-help (\-h)\fR print the help message .TP \fB\-\-version\fR print the version number .TP \fB\-\-remove (\-r)\fR removes an entry from the phone. When specified with \-\-sms and \-\-get, this will get'n'delete. When specified with \-\-sms and \-\-send, this will send'n'delete. .TP \fB\-\-get (\-g)\fR get an entry and save it to a file. When specified with \-\-sms and \-\-remove, this will get'n'delete. When specified with \-\-sms and \-\-send, this will get'n'send. .TP \fB\-\-send (\-s)\fR sends a file to the phone. When sending sms, you might want to take a look at the option \-\-direct, too. When specified with \-\-sms and \-\-remove, this will send'n'delete. When specified with \-\-sms and \-\-get, this will get'n'send. .TP \fB\-\-info (\-i)\fR collect information from the phone, \-\-mem\-info can be used as a trigger to display a more complex listing of the available memories .TP \fB\-\-mem\-info\fR display information about available memories and their slots and other information. It uses the same format as \-\-mem=? (see below) and can also be use as a trigger for \-\-info to replace the short memory listing. .TP \fB\-\-lock\-info\fR display status of locks. It can also be use as a trigger for \-\-info to replace the lock name listing. .TP \fB\-\-lock\fR specify a lock that you can enable or disable. For some locks, a password is needed (see \-\-pin) .TP \fB\-\-enable\fR enable e.g. a lock .TP \fB\-\-disable\fR disable e.g. a lock .TP \fB\-\-dial\fR dial a number (requires \-\-number). The program returns either after 10 seconds or when the call reached the other side. .TP \fB\-\-hangup\fR hangup all currently active calls .TP \fB\-\-set\-time\fR synchronize time to phone. The use of tools like ntpdate is recommended before using this. .TP \fB\-\-set\-smsc\fR set the SMSC number (requires \-\-number) .TP \fB\-\-binary (\-N)\fR select binary file transfer mode .TP \fB\-\-pbook (\-P)\fR select phonebook transfer mode .TP \fB\-\-sms (\-S)\fR select short message service mode .TP \fB\-\-mem\fR select a memory to access. Slot numbers may vary depending on the selected memory. See the output of \-\-info for the supported memory types. Not using this option triggers the default behaviour (if a default behaviour was defined). There is a special string "?" that outputs in the same format as \-\-mem\-info but only for the selected mode. .TP \fB\-\-slot\fR select a slot to access. See the output of \-\-mem\-info or \-\-mem=?. Not using this option triggers the default behaviour (if a default behaviour was defined). The special string "all" defines the whole range of available slots for the selected memory and mode and, except with \-\-sms, cannot be used with \-\-send. For SMS, there are four additional special strings: "read", "unread", "sent" and "unsent". The latter two can be used with \-\-send. For phonebook access, there is the additional special string "last". When this option is omitted with \-\-send, scmxx tries to find an empty slot (that may or may not take long). Finding an empty slot is not supported for phonebooks, yet. When a slot was specified and also multiple files to upload, the specified slot is the starting point to search for empty slots. Overwriting multiple, non\-empty slots is not supported, yet, except for the special case "all". .TP \fB\-\-text (\-t)\fR specify content text of short message or text of the phonebook entry. For phonebook entries, the length limit may depend on the selected phonebook (see output of \-\-mem\-info or \-\-mem=?). .TP \fB\-\-number (\-n)\fR specify number to send the short message to or the number for the phonebook entry. Note that the number may have a leading '+' for international numbers. It is normally limited to 20 digits (without the '+') which is certainly enough. .TP \fB\-\-direct\fR send/get short messages without storing in the phone. This is not default because you will certainly be charged for it when sending. With direct getting, SMS that are not of type DELIVER are still stored on the phone (scmxx cannot decode those messages, yet). .TP \fB\-\-unicode\fR send the short message and use UCS\-2 (16bit unicode) as character set. You do not need to specify this parameter to enable unicode sms decoding. .TP \fB\-\-flash\fR set the class0 in the data coding scheme field that is normally interpreted as "immediate display". Not all receiving entities support this. Note that a second sms of this type normally overwrites a previous one without asking! Its use is not recommended. .TP \fB\-\-srr\fR this sets the StatusReportRequest bit in the pdutype field of the sms pdu. It depends on the SMSC if this is honored. With some providers, this produces additional costs! .TP \fB\-\-sort\fR sort the messages on printing to chosen output. Possible sorting methods are "type", "slot" and "type,slot". "type" sorts for the type of the short message with an internal order of unsupported types first, then SMS\-SUBMIT, SMS\-STATUS\-REPORT and SMS\-DELIVER. "slot" sorts for the slot of the short message. "type,slot" does sorting like "type" first and sorts each type like "slot". Default is to not sort at all (order depends on phone). .TP \fB\-\-pin\fR enable pin usage. Use this only if there was an error message that asks for a PIN or PUK. For a PIN, this is the corresponding "", for a PUK, it is ",". The value is only used once. Consider using the pin file (see below) instead of this option. .TP \fB\-\-system\-charset\fR define the system character set instead of using the return value from nl_langinfo(CODESET). This is to work around systems that do not support unicode locales like UTF\-8 or when data from a different system with a different locale is used as input. Usually, you do not need this option. .SH EXAMPLES .TP Send an bitmap file to the phone as bitmap (logo): scmxx \fB\-\-send\fR \fB\-\-binary\fR \fB\-\-mem\fR="bmp" \fB\-\-slot\fR=0 myfile.bmp .TP Get a Bitmap from the phone and save it into a new file: scmxx \fB\-\-get\fR \fB\-\-binary\fR \fB\-\-mem\fR="bmp" \fB\-\-slot\fR=0 \fB\-\-out\fR=myfile.bmp .TP Get all unread (default on get) short messages and output to stdout: scmxx \fB\-\-get\fR \fB\-\-sms\fR \fB\-\-slot\fR=unread \fB\-\-out\fR=\- scmxx \fB\-gS\fR \fB\-o\fR\- .TP Send a short message directly (not stored in the phone): scmxx \fB\-\-send\fR \fB\-\-sms\fR \fB\-\-direct\fR \fB\-\-number\fR=123 \fB\-\-text\fR="test" .TP Get a phonebook and store it to a file: scmxx \fB\-\-get\fR \fB\-\-pbook\fR \fB\-\-mem\fR=SM \fB\-\-out\fR=SM.pb .TP Modify a specific slot (33) in phonebook memory SM: scmxx \fB\-sP\fR \fB\-\-mem\fR=SM \fB\-\-slot\fR=33 \fB\-\-number\fR=123 \fB\-\-text\fR="test" .SH NOTES The output of text (phonebook and sms) depends on the character set of your current locale. Input is the same. This has the advantage of localization but may have the drawback that all other characters must be entered by a sequence \\XXXX where X is a hex character (e.g. \\20ac for EuroSign). This is a 16bit representative of the unicode value. The \\XXXX is only used for output with the intention to read it again at a later time. For normal output, characters that cannot be displayed in the current local are replaced by a '?'. Using an UTF\-8 based locale will make sure that all character can be converted. The newline character can be entered using the common \\n and '\\' must be masked with itself. In bash, this might even result in a needed input like "\\\\\\\\". .SH "CONNECTION PROBLEMS" There are additional parameters \-\-ignore\-serial\-bits (default) and \-\-keep\-serial\-bits. Use it only when you get no response from the phone at all. Which setting is needed depends on the cable and serial port and cannot be determined automatically. .PP If you experience timeouts on the first command, try the \-\-start\-delay= parameter. .PP Another parameter \-\-device\-timeout= is provided for the case that your phone ever needs more than default value of 10 seconds to answer. Actually, this should be more than enough but one never knows. The minimum value is 1, values higher than 25 mean "forever". .SH SECURITY The \-\-pin option should be used with care. The option and its argument are visible in the process list. .SH ENVIRONMENT .TP SCMXX_TTY see \-\-device for decription .TP SCMXX_BAUD see \-\-baud for description .SH FILES .TP ~/.scmxx/cache.pb this file serves as lookup file during short message output (for recipient/sender address) and for number aliasing for \-\-number on sending a short message. The format is the same as a phonebook file (slot numbers don't matter but must be present). .TP ~/.scmxx/config this file can contain long options (without the \-\-), the arguments is seperated from the option name by an '='. Any amount of spaces at beginning of line, before and after the seperator are allowed. A '#' at beginning of line marks this line as comment. Examples: .nf #choose a device to access device = /dev/ttyS0 #always send SMS using UCS\-2 unicode .fi .TP ~/.scmxx/pin This file is used as an alternativ to the \-\-pin command line option. The file MUST NOT be group readable/writeable or world readable/writeable! It also MUST be a regular file, not a symlink. SCMxx refuses to use the file if this is not the case. If a PUK value is requested by the phone, the corresponding PIN must also be defined. The only necessary format elements are '{', '=', ';' and '}'. Spaces and newlines are ignored. The file has the following format: .nf sim 262031234567890 { pin = 1234 puk = 12345678; pin2 = 4321; puk2 = 87654321; } device 350123456789012 { type SIM { pin = 0000; puk = 0000; } } .fi "sim" sections use the IMSI as identifier, "device" sections use the IMEI as identifier (see output of \-\-info). Since the IMSI is needed, you canNOT switch the phone on with this! The "type" sub section in the device section has the following idenfifiers: .RS .TP SIM device code (theft protection) .TP FSIM very first inserted SIM .TP NET network personalization .TP NETSUB network subset personalization .TP SP service provider personalization .TP CORP corporate personalization .RE .SH AUTHOR Hendrik Sattler post@hendrik\-sattler.de scmxx-0.9.0/docs/scmxx.it.10000644000175000017500000003744710401301623015310 0ustar hendrikhendrik.TH scmxx 1 2005\-03\-11 SCMxx .SH NOME scmxx \- scambia dati con il tuo telefonino Siemens .SH SINOSSI \fBscmxx\fR [\fB\-\-device\fR \fBdevice\fR] [\fB\-\-baud\fR \fBbaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] {\fB\-\-info\fR | \fB\-\-set\-time\fR | \fB\-\-mem\-info\fR | \fB\-\-lock\-info\fR | \fB\-\-lock\fR \fBlock\fR {\fB\-\-enable\fR | \fB\-\-disable\fR} | \fB\-\-set\-smsc\fR \fB\-\-number\fR {\fBnumero\fR | \fBnome\fR} } .PP \fBscmxx\fR [\fB\-\-device\fR \fBdevice\fR] [\fB\-\-baud\fR \fBbaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-out\fR \fBfile\fR] [\fB\-\-pipe\fR \fBpipe\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-binary\fR] [\fB\-\-mem\fR \fBmemoria\fR] [\fB\-\-slot\fR \fBslot\fR] [\fBfile...\fR] .PP \fBscmxx\fR [\fB\-\-device\fR \fBdevice\fR] [\fB\-\-baud\fR \fBbaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-out\fR \fBfile\fR] [\fB\-\-pipe\fR \fBpipe\fR] [\fB\-\-pin\fR \fBPIN\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-pbook\fR] [\fB\-\-mem\fR \fBmemoria\fR] [\fB\-\-slot\fR \fBslot\fR] [\fB\-\-text\fR \fBtesto\fR] [ \fB\-\-number\fR {\fBnumero\fR | \fBnome\fR} ] [\fBfile...\fR] .PP \fBscmxx\fR [\fB\-\-device\fR \fBdevice\fR] [\fB\-\-baud\fR \fBbaudrate\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-out\fR \fBfile\fR] [\fB\-\-pipe\fR \fBpipe\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-sms\fR] [\fB\-\-mem\fR \fBmemoria\fR] [\fB\-\-slot\fR \fBslot\fR] [\fB\-\-text\fR \fBtesto\fR] [ \fB\-\-number\fR {\fBnumero\fR | \fBnome\fR} ] [\fB\-\-direct\fR] [\fB\-\-flash\fR] [\fB\-\-srr\fR] [\fB\-\-unicode\fR] [\fBfile...\fR] .PP \fBscmxx\fR [\fB\-\-help\fR] [\fB\-\-version\fR] .SH DESCRIZIONE SCMxx pu\(`o copiare files da e verso un telefonino Siemens e inoltre pu\(`o cancellare file salvati. I file possono venire letti da un determinato file o attraverso stdin e salvati in un determinato file o su stdout. Gli SMS possono essere anche direttamente mandati o ricevuti senza essere salvati nel telefonino. SCMxx \(`e stato testato con diversi modelli della Siemens (solo S25 e successivi) e quindi verr\(`a stampato un messaggio di avviso ogniqualvolta lo si usi con altri modelli non supportati. .SH OPZIONI .TP \fB\-\-device (\-d)\fR specifica un device diverso da quello specificato nelle opzioni di compilazione. Sovrascriver\(`a la variabile d'ambiente SCMXX_TTY e l'opzione di compilazione. Per sistemi linux, questo device pu\(`o essere ad esempio /dev/ttyS0 per connessioni seriali, /dev/ircomm0 per connessioni via infrarosso e /dev/rfcomm0 per connessioni via bluetooth. .TP \fB\-\-baud (\-b)\fR specifica la velocit\(`a di trasmissione. Valori validi dipendono dal sistema, ma possono essere 9600, 19200, 38400, 57600 o 115200. Il valore di default \(`e 19200. Il S25 e il *35i lavorano solo a 19200, tutti gli altri modelli successivi possono lavorare anche a piena velocit\(`a. Le connessioni via infrarosso possono essere un'eccezione a queste regole (dipende dal dongle dell'infrarosso). Questo valore sovrascriver\(`a la variabile d'ambiente SCMXX_BAUD e l'opzione di compilazione. .TP \fB\-\-out (\-o)\fR specifica il file da usare. Quando si prendono dei file binari con l'opzione "all", vengono accodati il numero dello slot, un punto e il tipo di file. Quando si manda o si cancella, questo parametro non viene usato, ma gli ultimi parametri devono essere dei file validi. Stdout dev'essere esplicitamente selezionato mediante il trattino ("\-"), di default niente viene scritto su stdout. Non viene accodato nulla su "\-" quando si prendono file multipli. .TP \fB\-\-pipe (\-p)\fR specifica un pipe verso un altro programma. Quando si prendono dei file con l'opzione "all", ogni file viene mandato in pipe a questo programma singolarmente (solo per \-\-binary e \-\-sms). .TP \fB\-\-quiet (\-q)\fR decrementa il numero dei messaggi in output .TP \fB\-\-pin\fR usa questa opzione nel caso dovesse venire richesto un codice PIN per l'accesso. .TP \fB\-\-verbose (\-v)\fR incrementa il numero dei messaggi in output .TP \fB\-\-reset\fR cerca di resettare il telefonino, cos\(`i che sia nuovamente accessibile. Potrebbe succedere che il telefonino non risponda pi\(`u sull'interfaccia seriale, specialmente dopo un trasferiemnto di file interrotto dall'utente. Questo comando semplicemente ignora alcuni caratteri speciali. .TP \fB\-\-help (\-h)\fR stampa il messaggio di aiuto. .TP \fB\-\-version\fR stampa il numero di versione. .TP \fB\-\-remove (\-r)\fR rimuove un record dal telefonino. Quando specificato assieme a \-\-sms e \-\-get, questo comando prender\(`a e canceller\(`a il messaggio. Quando specificato assieme a \-\-sms e \-\-send, questo comando prender\(`a e mander\(`a il messaggio. .TP \fB\-\-get (\-g)\fR prende un record e la salva su di un file. Quando specificato assieme a \-\-sms e \-\-remove, questo comando prender\(`a e canceller\(`a il messaggio. Quando specificato assieme a \-\-sms e \-\-send, questo comando prender\(`a e mander\(`a il messaggio. .TP \fB\-\-send (\-s)\fR manda un file al telefonino. Nel caso volessi mandare sms, dai un'occhiata anche all'opzione \-\-direct. Quando specificato assieme a \-\-sms e \-\-remove, questo comando prender\(`a e canceller\(`a il messaggio. Quando specificato assieme a \-\-sms e \-\-get, questo comando prender\(`a e mander\(`a. .TP \fB\-\-info (\-i)\fR ottiene informazioni dal telefonino, \-\-mem\-info pu\(`o essere usata come opzione per visualizzazre un elenco pi\(`u completo delle memorie disponibili. .TP \fB\-\-mem\-info\fR visualizza informazioni sulle memorie disponibili e i loro slot, oltre ad altre informazioni. Usa lo stesso formato di \-\-mem=? (vedi sotto) e pu\(`o essere usato come opzione per \-\-info cos\(`i da visualizzare informazioni pi\(`u complete riguardo la memoria. .TP \fB\-\-lock\-info\fR visualizza lo stato dei blocchi. Pu\(`o anche essere usato come opzione di \-\-info per visualizzare la lista dei nomi dei blocchi. .TP \fB\-\-lock\fR specify a lock that you can enable or disable. For some locks, a password is needed (see \-\-pin) .TP \fB\-\-enable\fR enable e.g. a lock .TP \fB\-\-disable\fR disable e.g. a lock .TP \fB\-\-dial\fR dial a number (requires \-\-number). The program returns either after 10 seconds or when the call reached the other side. .TP \fB\-\-hangup\fR hangup all currently active calls .TP \fB\-\-set\-time\fR sincronizza l'orologio del telefonino. L'uso di comandi come ntpdate \(`e raccomandato prima di usare questo comando. .TP \fB\-\-set\-smsc\fR setta il numero SMSC (necessita \-\-number) .TP \fB\-\-binary (\-N)\fR seleziona il tipo di trasferimento file in modalit\(`a binaria. .TP \fB\-\-pbook (\-P)\fR seleziona il trasferimento dell'agenda telefonica. .TP \fB\-\-sms (\-S)\fR seleziona il trasferimento di sms. .TP \fB\-\-mem\fR seleziona una memoria a cui accedere. I numeri degli slot possono variare dipendentemente dalla memoria selezionata. Vedi l'output di \-\-info per i tipi di memoria supportata. Non usando questa opzione si modifica il comportamento di default (se un comportamento di default \(`e stato definito). La stringa speciale "?" stampa in output nello stesso formato di \-\-mem\-info ma solo per il modo selezionato. .TP \fB\-\-slot\fR seleziona uno slot da accedere. Vedi l'output di \-\-mem\-info o di \-\-mem=?. Non usando questa opzione modifica il comportamento di default (se un comportamento di default \(`e stato definito). La stringa speciale "all" definisce tutto l'intervallo di slot disponibili per la memoria selezionata e il modo e, ad eccezione di \-\-sms, non pu\(`o essere usata con \-\-send. Per quanto riguarda gli SMS, ci sono anche altre quattro stringhe speciali: "read", "unread", "sent" e "unsent". Le ultime due possono essere usate con \-\-send. Per l\-accesso all\-elenco telefonico, c'\(`e anche la stringa speciale "last" (ultimo). Quando questa opzione viene tralasciata con \-\-send, scmxx cerca di trovare uno slot vuoto (operazione che potrebbe anche durare molto). La ricerca di uno slot libero non \(`e ancora supportata per l'elenco telefonico. Quando uno slot viene specificato assieme a vari file da caricare, lo slot specificato \(`e il punto di partenza da cui cercare altri slot vuoti. La riscrittura di slot multipli non vuoti non \(`e ancora possibile, eccetto per il caso speciale "all" (tutti). .TP \fB\-\-text (\-t)\fR specifica il testo di un SMS o il testo di un record della rubrica. Per i record della rubrica telefonica, il limite del record dipende dalla rubrica selezionata (vedi l'output di \-\-mem\-info o di \-\-mem=?). .TP \fB\-\-number (\-n)\fR specifica un numero a cui mandare l'SMS o il numero del record all'interno della rubrica telefonica. Nota che il numero pu\(`o avere un '+' iniziale per i numeri internazionali. E' normalmente limitato a 20 cifre (senza il '+') che di certo \(`e a sufficienza. .TP \fB\-\-direct\fR manda/prendi sms senza salvarli nel telefonino. Questo non \(`e il comportamento di default in quanto vieni di certo accreditato quando spedisci un sms. Quando prendi direttamente, gli SMS che non sono di tipo DELIVER rimangono nella memoria del telefonino (scmxx non pu\(`o ancora decodificare quei messaggi). .TP \fB\-\-unicode\fR spedisci l'SMS usando l'UCS\-2 (16bit unicode) come set di caratteri. Non devi specificare questo parametro per rendere disponibile la decodifica di sms in formato unicode. .TP \fB\-\-flash\fR setta la class0 nello schema di codice dei dati, che viene normalmente interpretato come "visualizza immediatamente". Non tutti i supporti riceventi lo supportano. Fai attenzione che un secondo SMS di questo tipo generalmente sovrascrive il precedente senza chiedere! Il suo uso non \(`e consigliato. .TP \fB\-\-srr\fR questo comando setta il bit di RichiestaReportDiStato all'interno del tipo della pdu della pdu dell'SMS. Dipende dalla SMSC se questo viene seguito. Con alcuni carrier, questo parametro porta a costi aggiuntivi! .TP \fB\-\-sort\fR ordina i messaggi durante la stampa sull'output scelto. Alcuni metodi possibili di ordinamento sono "tipo", "slot" o "tipo, slot". "tipo" ordina per tipo di SMS con un ordine interno di tipi non supportati all'inizio, dopo SMS\-SUBMIT, SMS\-STATUS\-REPORT e SMS\-DELIVER. "slot" ordina per slot dell'SMS. "tipo, slot" ordina con "type" prima e ordina ogni SMS dello stesso tipo con "slot". Il comportamento di default non ordina affatto (l'ordine dipende dal telefonino). .TP \fB\-\-pin\fR enable pin usage. Use this only if there was an error message that asks for a PIN or PUK. For a PIN, this is the corresponding "", for a PUK, it is ",". The value is only used once. Consider using the pin file (see below) instead of this option. .TP \fB\-\-system\-charset\fR definisce il set di caratteri del sistema invece di usare il valore di ritorno da nl_langinfo(CODESET). Questo \(`e dovuto al fatto che alcuni sistemi non supportano se di caratteri unicode come UTF\-8 oppure quando i dati sono stati codificati in un altro set di caratteri. In generale non dovresti aver bisogno di questa opzione. .SH ESEMPI .TP Manda un file bitmap al telefonino come bitmap (logo): scmxx \fB\-\-send\fR \fB\-\-binary\fR \fB\-\-mem\fR="bmp" \fB\-\-slot\fR=0 myfile.bmp .TP Prende una Bitmap dal telefonino e la salva in un nuovo file: scmxx \fB\-\-get\fR \fB\-\-binary\fR \fB\-\-mem\fR="bmp" \fB\-\-slot\fR=0 \fB\-\-out\fR=myfile.bmp .TP Prendi tutti gli SMS non ancora letti (comportamento di default) e mandali sullo stdout: scmxx \fB\-\-get\fR \fB\-\-sms\fR \fB\-\-slot\fR=unread \fB\-\-out\fR=\- scmxx \fB\-gS\fR \fB\-o\fR\- .TP Spedisce un sms direttamente (senza salvarlo nel telefonino): scmxx \fB\-\-send\fR \fB\-\-sms\fR \fB\-\-direct\fR \fB\-\-number\fR=123 \fB\-\-text\fR="test" .TP Prende una entry dell'agenda telefonica e la salva in un file: scmxx \fB\-\-get\fR \fB\-\-pbook\fR \fB\-\-mem\fR=SM \fB\-\-out\fR=SM.pb .TP Modifica uno slot specifico (33) nell'agenda telefonica all'interno della memoria SM: scmxx \fB\-sP\fR \fB\-\-mem\fR=SM \fB\-\-slot\fR=33 \fB\-\-number\fR=123 \fB\-\-text\fR="test" .SH NOTA L'output testuale (elenco telefonico e SMS) dipende dal set di caratteri in uso localmente. Con l'input \(`e lo stesso. Questo ha il vantaggio della localizzazione, ma ha anche lo svantaggio che tutti gli altri caratteri devono essere inseriti mediante una sequenza \\XXXX dove X \(`e un carattere esadecimale (ad esempio \\20ac per il segno dell'Euro). Questa \(`e una rappresentazione a 16bit del valore unicode. Il \\XXXX \(`e solo usato per l'output con l'intenzione di leggerlo nuovamente pi\(`u tardi. Per l'output normale i caratteri che non possono essere visualizzati nella zona locale vengono sostituiti con un '?'. Usando una base locale UTF\-8, si pu\(`o essere sicuri che ogni carattere potr\(`a essere convertito. Il carattere di nuova riga pu\(`o essere inserito utilizzando il carattere comune \\n e '\\' dev'essere mascherato da s\(`e stesso. Nella shell bash, questo pu\(`o anche risultare in un input come "\\\\\\\\". .SH "PROBLEMI DI CONNESSIONE" Ci sono parametri addizionali, come \-\-ignore\-serial\-bits (default) e \-\-keep\-serial\-bits. Usali solo quando non ottieni assolutamente nessuna risposta dal telefonino. La selezione di una delle due dipende dal cavo e dalla porta seriale, e non pu\(`o essere determinata automaticamente. .PP Se noti dei time\-out al primo comando, prova con il parametro \-\-start\-delay= .PP Un altro parametro \-\-device\-timeout= viene fornito per il caso in cui il tuo telefonino dovesse aver bisogno di pi\(`u di 10 secondi per rispondere. Attualmente questo valore dovrebbe essere pi\(`u che sufficiente ma non si \(`e mai sicuri. Il valore minimo \(`e 1, valori pi\(`u alti di 25 hanno lo stesso valore di "per sempre". .SH SICUREZZA L'opzione \-\-pin dev'essere usata con cautela. L'opzione e il suo argomento sono visibili nella lista dei processi. .SH AMBIENTE .TP SCMXX_TTY vedi \-\-device per la descrizione .TP SCMXX_BAUD vedi \-\-baud per la descrizione .SH FILES .TP ~/.scmxx/cache.pb questo file serve come file di ricerca durante l'output di SMS (per l'indirizzo del ricevente/mittente) e per creare alias dei numeri (\-\-number) nell'invio di sms. Il formato \(`e lo stesso di un elenco telefonico (i numeri degli slot non servono, ma devono essere presenti). .TP ~/.scmxx/config questo file pu\(`o contenere opzioni lunghe (senza il \-\-), gli argomenti sono separati dal nome dell'opzione da un '='. Ogni spazio \(`e permesso all'inizio di una riga, prima e dopo il separatore. Un '#' all'inizio della linea, la commenta. Esempi: .nf #scegli un device a cui accedere device = /dev/ttyS0 #manda sempre gli SMS usando UCS\-2 unicode .fi .TP ~/.scmxx/pin This file is used as an alternativ to the \-\-pin command line option. The file MUST NOT be group readable/writeable or world readable/writeable! It also MUST be a regular file, not a symlink. SCMxx refuses to use the file if this is not the case. If a PUK value is requested by the phone, the corresponding PIN must also be defined. The only necessary format elements are '{', '=', ';' and '}'. Spaces and newlines are ignored. The file has the following format: .nf sim 262031234567890 { pin = 1234 puk = 12345678; pin2 = 4321; puk2 = 87654321; } device 350123456789012 { type SIM { pin = 0000; puk = 0000; } } .fi "sim" sections use the IMSI as identifier, "device" sections use the IMEI as identifier (see output of \-\-info). Since the IMSI is needed, you canNOT switch the phone on with this! The "type" sub section in the device section has the following idenfifiers: .RS .TP SIM device code (theft protection) .TP FSIM very first inserted SIM .TP NET network personalization .TP NETSUB network subset personalization .TP SP service provider personalization .TP CORP corporate personalization .RE .SH AUTORE Andrea Benazzo andy@slacky.it scmxx-0.9.0/docs/scmxx.ru.10000644000175000017500000006301410401301624015310 0ustar hendrikhendrik.TH scmxx 1 2005\-06\-24 SCMxx .SH ÐÐЗВÐÐИЕ scmxx \- оÑущеÑтвлÑет обмен данными Ñ Ð²Ð°ÑˆÐ¸Ð¼ мобильным телефоном Siemens .SH СИÐТÐКСИС \fBscmxx\fR [\fB\-\-device\fR \fBуÑтройÑтво\fR] [\fB\-\-baud\fR \fBÑкороÑть_передачи\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-reset\fR] {\fB\-\-info\fR | \fB\-\-set\-time\fR | \fB\-\-mem\-info\fR | \fB\-\-lock\-info\fR | \fB\-\-lock\fR \fBблокировка\fR {\fB\-\-enable\fR | \fB\-\-disable\fR} | \fB\-\-set\-smsc\fR \fB\-\-number\fR {\fBномер\fR | \fBимÑ\fR} } .PP \fBscmxx\fR [\fB\-\-device\fR \fBуÑтройÑтво\fR] [\fB\-\-baud\fR \fBÑкороÑть_передачи\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-out\fR \fBфайл\fR] [\fB\-\-pipe\fR \fBканал\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-binary\fR] [\fB\-\-mem\fR \fBтип_памÑти\fR] [\fB\-\-slot\fR \fBÑлот\fR] [\fBфайл...\fR] .PP \fBscmxx\fR [\fB\-\-device\fR \fBуÑтройÑтво\fR] [\fB\-\-baud\fR \fBÑкороÑть_передачи\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-out\fR \fBфайл\fR] [\fB\-\-pipe\fR \fBканал\fR] [\fB\-\-pin\fR \fBPIN\-код\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-pbook\fR] [\fB\-\-mem\fR \fBтип_памÑти\fR] [\fB\-\-slot\fR \fBÑлот\fR] [\fB\-\-text\fR \fBтекÑÑ‚\fR] [ \fB\-\-number\fR {\fBномер\fR | \fBимÑ\fR} ] [\fBфайл...\fR] .PP \fBscmxx\fR [\fB\-\-device\fR \fBуÑтройÑтво\fR] [\fB\-\-baud\fR \fBÑкороÑть_передачи\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR] [\fB\-\-out\fR \fBфайл\fR] [\fB\-\-pipe\fR \fBканал\fR] {\fB\-\-remove\fR | \fB\-\-send\fR | \fB\-\-get\fR} [\fB\-\-sms\fR] [\fB\-\-mem\fR \fBтип_памÑти\fR] [\fB\-\-slot\fR \fBÑлот\fR] [\fB\-\-text\fR \fBтекÑÑ‚\fR] [ \fB\-\-number\fR {\fBномер\fR | \fBимÑ\fR} ] [\fB\-\-direct\fR] [\fB\-\-flash\fR] [\fB\-\-srr\fR] [\fB\-\-unicode\fR] [\fBфайл...\fR] .PP \fBscmxx\fR [\fB\-\-help\fR] [\fB\-\-version\fR] .SH ОПИСÐÐИЕ SCMxx может копировать файлы в мобильный телефон Siemens и обратно, а также удалÑть Ñохраненные файлы. Файлы могут быть прочитаны из указанного файла или получены через Ñтандартный ввод и Ñохранены в конкретном файле или переданы на Ñтандартный вывод. SMS могут быть также напрÑмую переданы или принÑты без ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² мобильном телефоне. SCMxx была протеÑтирована Ñ Ð½ÐµÑколькими мобильными телефонами, произведенными Siemens (только S25 и поздние). .SH ОПЦИИ .TP \fB\-\-device (\-d)\fR определить отличное от вкомпилированного Ð¸Ð¼Ñ ÑƒÑтройÑтва. ÐžÐ¿Ñ†Ð¸Ñ Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ð²Ð°ÐµÑ‚ переменную Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸Ñ SCMXX_TTY и вкомпилированное значение. Ð”Ð»Ñ ÑиÑтемы linux может быть, к примеру, /dev/ttyS0 Ð´Ð»Ñ Ð¿Ð¾Ñледовательного ÑоединениÑ, /dev/ircomm0 Ð´Ð»Ñ ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ инфракраÑному порту и /dev/rfcomm0 Ð´Ð»Ñ ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ каналу bluetooth. .TP \fB\-\-baud (\-b)\fR определить ÑкороÑть уÑтройÑтва. ПодходÑщие Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð°Ð²Ð¸ÑÑÑ‚ от ÑиÑтемы, но могут быть 9600, 19200, 38400, 57600 или 115200. Значение по умолчанию 19200. Телефоны S25 и *35i работают только при ÑкороÑти 19200, вÑе поздние модели также работают при полной ÑкороÑти поÑледовательного канала. Ð¡Ð¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ инфракраÑному порту могут Ñодержать иÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð· Ñтих правил (завиÑит от реализации порта). ÐžÐ¿Ñ†Ð¸Ñ Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ð²Ð°ÐµÑ‚ значение переменной Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸Ñ SCMXX_BAUD и вкомпилированное значение. .TP \fB\-\-out (\-o)\fR определить иÑпользуемый файл. При получении бинарных файлов Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ "all" к каждому имени файла добавлÑетÑÑ Ð½Ð¾Ð¼ÐµÑ€ Ñлота, точка и тип файла. При отправке или удалении, Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ðµ будет иÑпользоватьÑÑ, но в качеÑтве параметра должны быть указаны корректные файлы. Стандартный вывод должен быть однозначно выбран через Ð´ÐµÑ„Ð¸Ñ ("\-"), по умолчанию ничего не выводитÑÑ Ð½Ð° Ñтандартный вывод. Ðичего не добавлÑетÑÑ Ðº "\-", когда идет получение группы файлов. .TP \fB\-\-pipe (\-p)\fR определить канал к другой программе. При получении данных Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ "all", каждый файл будет передан по каналу к Ñтим программам в отдельноÑти (только Ð´Ð»Ñ Ð¾Ð¿Ñ†Ð¸Ð¹ \-\-binary и \-\-sms). .TP \fB\-\-quiet (\-q)\fR уменьшить Ñтепень подробноÑти вывода на 1 .TP \fB\-\-pin\fR иÑпользовать Ñту опцию, еÑли требуетÑÑ Ð²Ð²ÐµÑти PIN код Ð´Ð»Ñ Ð´Ð¾Ñтупа .TP \fB\-\-verbose (\-v)\fR увеличить Ñтепень подробноÑти вывода на 1 .TP \fB\-\-reset\fR попытатьÑÑ ÑброÑить телефон, и он Ñнова Ñтанет доÑтупен. Это может понадобитÑÑ Ð² Ñлучае, еÑли телефон больше не отвечает по поÑледовательному интерфейÑу, оÑобенно при прерванной перед Ñтим пользователем передачи файла. Произойдет проÑто ÑÐ»ÐµÐ¿Ð°Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð° некоторых Ñпециальных Ñимволов. .TP \fB\-\-help (\-h)\fR вывеÑти текÑÑ‚ помощи .TP \fB\-\-version\fR вывеÑти номер верÑии .TP \fB\-\-remove (\-r)\fR удалить запиÑÑŒ в телефоне. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми \-\-sms и \-\-get, будут произведены получение и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми \-\-sms и \-\-send, будут произведены отправка и удаление. .TP \fB\-\-get (\-g)\fR получить запиÑÑŒ и Ñохранить ее в файл. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми \-\-sms и \-\-remove, будут произведены получение и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми \-\-sms и \-\-send, будут произведены получение и отправка. .TP \fB\-\-send (\-s)\fR отправить файл в телефон. При отправке sms возможно иÑпользование ÑовмеÑтно Ñ Ð¾Ð¿Ñ†Ð¸ÐµÐ¹ \-\-direct, чтобы его увидеть на Ñкране. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми \-\-sms и \-\-remove, будут произведены отправка и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми \-\-sms и \-\-get, будут произведены получение и отправка. .TP \fB\-\-info (\-i)\fR Ñобрать информацию о телефоне, \-\-mem\-info может быть иÑпользована Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° между кратким и более Ñложным ÑпиÑком доÑтупных типов памÑти. .TP \fB\-\-mem\-info\fR отобразить информацию о доÑтупных типах памÑти и их Ñлотах, а также другую информацию. ÐžÐ¿Ñ†Ð¸Ñ Ð¸Ñпользует такой же формат, как и \-\-mem=? (Ñмотрите ниже), и также может быть иÑпользована как переключатель Ð´Ð»Ñ \-\-info, чтобы замеÑтить краткий ÑпиÑок типов памÑти. .TP \fB\-\-lock\-info\fR отобразить ÑоÑтоÑние блокировок. Может быть также иÑпользована как переключатель Ð´Ð»Ñ \-\-info, чтобы замеÑтить вывод ÑпиÑка имен блокировок. .TP \fB\-\-lock\fR определить блокировку, которую необходимо уÑтановить или ÑнÑть. Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… блокировок необходим пароль (Ñм. опцию \-\-pin). .TP \fB\-\-enable\fR уÑтановить какую\-либо блокировку .TP \fB\-\-disable\fR ÑнÑть какую\-либо блокировку .TP \fB\-\-dial\fR позвонить по заданному номеру (требуетÑÑ Ð¾Ð¿Ñ†Ð¸Ñ \-\-number). Программа возвратитÑÑ Ð¸Ð»Ð¸ через 10 Ñекунд, или поÑле уÑтановки ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ ÑƒÐ´Ð°Ð»Ñ‘Ð½Ð½Ð¾Ð¹ Ñтороной. .TP \fB\-\-hangup\fR ÑброÑить вÑе текущие активные вызовы. .TP \fB\-\-set\-time\fR Ñинхронизировать Ð²Ñ€ÐµÐ¼Ñ Ð² телефоне. РекомендуетÑÑ Ð¸Ñпользовать инÑтрументы типа ntpdate перед Ñинхронизацией. .TP \fB\-\-set\-smsc\fR уÑтановить номер SMS\-центра (требует опцию \-\-number) .TP \fB\-\-binary (\-N)\fR выбрать режим обмена бинарными файлами .TP \fB\-\-pbook (\-P)\fR выбрать режим передачи телефонной книги .TP \fB\-\-sms (\-S)\fR выбрать режим Ñлужбы коротких Ñообщений .TP \fB\-\-mem\fR выбрать тип памÑти, к которой оÑущеÑтвлÑетÑÑ Ð´Ð¾Ñтуп. Ðомера Ñлотов могут варьироватьÑÑ Ð² завиÑимоÑти от выбранного типа памÑти. Смотрите вывод опции \-\-info Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð¸Ð²Ð°ÐµÐ¼Ñ‹Ñ… типов памÑти. Без иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтой опции Ñрабатывает поведение по умолчанию (еÑли таковое было определено). Ð¡Ð¿ÐµÑ†Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ñтрока "?" предназначена Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° в таком же формате, как и \-\-mem\-info, но только Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð¾Ð³Ð¾ режима. .TP \fB\-\-slot\fR выбрать Ñлот, к которому оÑущеÑтвлÑетÑÑ Ð´Ð¾Ñтуп. Смотрите вывод \-\-mem\-info или \-\-mem=?. Без иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтой опции включаетÑÑ Ð¿Ð¾Ð²ÐµÐ´ÐµÐ½Ð¸Ðµ по умолчанию (еÑли таковое было определено). Ð¡Ð¿ÐµÑ†Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ñтрока "all" определÑет полный диапазон вÑех доÑтупных Ñлотов Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ñ‹Ñ… типа памÑти и режима, за иÑключением иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ ÑовмеÑтно Ñ \-\-sms, и не может быть иÑпользована ÑовмеÑтно Ñ \-\-send. Ð”Ð»Ñ SMS, доÑтупны четыре дополнительных Ñпециальных Ñтроки: "read" (прочитанные), "unread" (непрочитанные), "sent" (отправленные) и "unsent" (неотправленные). ПоÑледние два варианта могут быть иÑпользованы вмеÑте Ñ \-\-send. Ð”Ð»Ñ Ð´Ð¾Ñтупа к телефонной книге доÑтупна Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ñтрока "last". При опущенной Ñтой опции и иÑпользовании вмеÑте Ñ \-\-send scmxx попытаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñвободный Ñлот (что может занÑть, а может и нет, некоторое длительное времÑ). ПоиÑк пуÑтого Ñлота пока что не поддерживаетÑÑ Ð´Ð»Ñ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ñ‹Ñ… книг. Когда Ñлот и группа файлов Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ определены, необходимый Ñлот ÑвлÑетÑÑ Ñтартовой точкой Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка Ñвободных Ñлотов. ПерезапиÑÑŒ группы непуÑтых Ñлотов пока что не поддерживаетÑÑ, кроме Ñпециального ÑÐ»ÑƒÑ‡Ð°Ñ "all". .TP \fB\-\-text (\-t)\fR определить Ñодержание текÑта короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ запиÑи телефонной книги. Ð”Ð»Ñ Ð·Ð°Ð¿Ð¸Ñей телефонной книги лимит длины может завиÑеть от выбранной книги (Ñм. вывод \-\-mem\-info или \-\-mem=?). .TP \fB\-\-number (\-n)\fR определить номер Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ короктого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ номер запиÑи телефонной книги. Заметьте, что номер может иметь вначале '+' Ð´Ð»Ñ Ð¼ÐµÐ¶Ð´ÑƒÐ½Ð°Ñ€Ð¾Ð´Ð½Ñ‹Ñ… номеров. Он ограничен 20 цифрами (без '+'), которых дейÑтвительно доÑтаточно. .TP \fB\-\-direct\fR отправить/получить короткие ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð±ÐµÐ· ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² памÑти телефона. Это не выполнÑетÑÑ Ð¿Ð¾ умолчанию, так как вы будете неÑомненно занÑты Ñообщением, при отправке. При непоÑредÑтвенном получении, SMS, тип которого не ÑоответÑтвует DELIVER, вÑе еще ÑохранÑетÑÑ Ð² памÑти телефона (scmxx не может пока что декодировать такие ÑообщениÑ). .TP \fB\-\-unicode\fR переÑлать Ñообщение и ипользовать UCS\-2 (16бит unicode) как таблицу Ñимволов. ÐеобÑзательно применÑть Ñту опцию Ð´Ð»Ñ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñообщений, напиÑанных в кодировке unicode. .TP \fB\-\-flash\fR уÑтановить class0 в поле Ñхемы ÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…, что обычно интерпретируетÑÑ ÐºÐ°Ðº "немедленное отображение". Ðе вÑе принимающие аппараты дают право делать Ñто. Заметьте, что очередное sms такого типа обычно перезапиÑывает предыдущее Ñообщение без вопроÑов! Её иÑпользование не рекомендуетÑÑ. .TP \fB\-\-srr\fR уÑтановить бит StatusReportRequest в поле pdutype из sms pdu. Это завиÑит от SMSC, еÑли Ñто принимать во внимание. С некоторыми провайдерами Ñто потребует дополнительных затрат! .TP \fB\-\-sort\fR Ñортировать ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸ печати на выбранное уÑтройÑтво вывода. Возможными методами Ñортировки ÑвлÑÑŽÑ‚ÑÑ "type" (тип), "slot" (Ñлот) и "type,slot" (тип, Ñлот). "type" Ñортирует по типу короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ð²Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ‹Ð¼ порÑдком Ñортировки, при котором неподдерживаемые типы печатаютÑÑ Ð²Ð½Ð°Ñ‡Ð°Ð»Ðµ, затем SMS\-SUBMIT, SMS\-STATUS\-REPORT и SMS\-DELIVER. "slot" Ñортирует по Ñлоту короткого ÑообщениÑ. "type,slot" оÑущеÑтвлÑет Ñортировку вначале по "type" и затем внутри блока каждого типа по "slot". По умолчанию никакой Ñортировки не производитÑÑ (порÑдок завиÑит от телефона). .TP \fB\-\-pin\fR включить иÑпользование pin\-кода. ИÑпользуйте Ñто лишь в Ñлучае Ð²Ð¾Ð·Ð½Ð¸ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¸, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ñ‚Ñ€ÐµÐ±ÑƒÐµÑ‚ ввода PIN\-кода либо PUK\-кода. Ð”Ð»Ñ PIN\-кода ÑоответÑтвенно передаётÑÑ "", Ð´Ð»Ñ PUK\-кода \- ",<новый PIN\-код>". Значение иÑпользуетÑÑ Ð¾Ð´Ð½Ð¾ÐºÑ€Ð°Ñ‚Ð½Ð¾. РаÑÑмотрите иÑпользование pin\-файла (Ñм. ниже) вмеÑто Ñтой опции. .TP \fB\-\-system\-charset\fR определить ÑиÑтемную таблицу Ñимволов вмеÑто иÑпользуемого значениÑ, возвращаемого функцией nl_langinfo(CODESET). Этот обходной манёвр необходим Ð´Ð»Ñ ÑиÑтем, которые не поддерживают юникодные локали, такие как UTF\-8, или когда данные от другой ÑиÑтемы в отличной локали иÑпользуютÑÑ Ð½Ð° входе. Обычно Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ðµ применÑетÑÑ. .SH ПРИМЕРЫ .TP Отправить файл раÑтрового Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð² телефон как Картинку (Логотип): scmxx \fB\-\-send\fR \fB\-\-binary\fR \fB\-\-mem\fR="bmp" \fB\-\-slot\fR=0 myfile.bmp .TP Получить Картинку из телефона и Ñохранить ее в новом файле: scmxx \fB\-\-get\fR \fB\-\-binary\fR \fB\-\-mem\fR="bmp" \fB\-\-slot\fR=0 \fB\-\-out\fR=myfile.bmp .TP Получить вÑе непрочитанные (режим по умолчанию при get) короткие ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸ вывеÑти их на Ñтандартный вывод: scmxx \fB\-\-get\fR \fB\-\-sms\fR \fB\-\-slot\fR=unread \fB\-\-out\fR=\- scmxx \fB\-gS\fR \fB\-o\fR\- .TP Отправить короткое Ñообщение напрÑмую (без ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² телефоне): scmxx \fB\-\-send\fR \fB\-\-sms\fR \fB\-\-direct\fR \fB\-\-number\fR=123 \fB\-\-text\fR="теÑÑ‚" .TP Получить телефонную книгу и Ñохранить её в файле: scmxx \fB\-\-get\fR \fB\-\-pbook\fR \fB\-\-mem\fR=SM \fB\-\-out\fR=SM.pb .TP Изменить указанный Ñлот (33) в памÑти SM телефонных книг: scmxx \fB\-sP\fR \fB\-\-mem\fR=SM \fB\-\-slot\fR=33 \fB\-\-number\fR=123 \fB\-\-text\fR="теÑÑ‚" .SH ЗÐМЕЧÐÐИЯ Выводимый текÑÑ‚ (Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ð°Ñ ÐºÐ½Ð¸Ð³Ð° и ÑообщениÑ) завиÑит от таблицы Ñимволов текущей локали. Вводимый аналогично. Такое преимущеÑтво у локализации, но еÑть и недоÑтаток, что вÑе оÑтальные Ñимволы должны вводитьÑÑ Ñ‡ÐµÑ€ÐµÐ· поÑледовательноÑть вида \\XXXX, где X \- шеÑтнадцатиричный Ñимвол (например, \\20ac Ð´Ð»Ñ Ð·Ð½Ð°ÐºÐ° Euro). Это 16битное предÑтавление Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ unicode. ПредÑтавление \\XXXX иÑпользуетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° Ñ Ñ†ÐµÐ»ÑŒÑŽ его поÑледующего прочтениÑ. При нормальном выводе, Ñимволы, которые не могут быть отображены в текущей локали, заменÑÑŽÑ‚ÑÑ Ð½Ð° Ñимвол \&'?'. ИÑпользование локализации, базирующейÑÑ Ð½Ð° UTF\-8, гарантирует, что вÑе Ñимволы могут быть перекодированы. Символ новой Ñтроки может быть введен, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð¾Ð±Ñ‰ÐµÐµ предÑтавление \\n, а Ñимвол '\\' должен быть Ñкранирован Ñам Ñобой. Ð’ bash в результате необходимо вводить Ñтроку подобно "\\\\\\\\". .SH "ПРОБЛЕМЫ СОЕДИÐЕÐИЯ" ЗдеÑÑŒ опиÑываютÑÑ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ðµ параметры \-\-ignore\-serial\-bits (по умолчанию) и \-\-keep\-serial\-bits. ИÑпользуйте его только тогда, когда вообще нет ответа от телефона. Такие уÑтановки завиÑÑÑ‚ от ÐºÐ°Ð±ÐµÐ»Ñ Ð¸ поÑледовательного порта и не могут быть определены автоматичеÑки. .PP ЕÑли при первой команде проиÑходÑÑ‚ таймауты, Ñледует попробовать параметр \-\-start\-delay=<Ñекунды>. .PP Другой параметр \-\-device\-timeout=<Ñекунды> предназначен Ð´Ð»Ñ ÑлучаÑ, когда телефону когда\-либо потребуетÑÑ Ð±Ð¾Ð»ÑŒÑˆÐµ времени на ответ, чем определенные по умолчанию 10 Ñекунд. ДейÑтвительно, Ñто было более чем доÑтаточно, но кто знает. Минимальное значение равно 1, значениÑ, превышающие 25, подразумевают ожидание ответа до тех пор, пока он не будет получен. .SH БЕЗОПÐСÐОСТЬ Опцию \-\-pin необходимо иÑпользовать Ñ Ð¾ÑторожноÑтью. ÐžÐ¿Ñ†Ð¸Ñ Ð¸ ее аргумент будут видны в ÑпиÑке процеÑÑов. .SH "ПЕРЕМЕÐÐЫЕ ОКРУЖЕÐИЯ" .TP SCMXX_TTY Ñмотрите опиÑание опции \-\-device .TP SCMXX_BAUD Ñмотрите опиÑание опции \-\-baud .SH ФÐЙЛЫ .TP ~/.scmxx/cache.pb Ñтот файл Ñлужит при выводе короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ (Ð´Ð»Ñ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ‹ адреÑов Ð¿Ð¾Ð»ÑƒÑ‡Ð°Ñ‚ÐµÐ»Ñ Ð¸ отправителÑ) и при отправке короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ‹ номера в опции \-\-number. Формат файла Ñовпадает Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¾Ð¼ файла Ð´Ð»Ñ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ð¾Ð¹ книги (номера Ñлотов не имеют значениÑ, но должны приÑутÑтвовать). .TP ~/.scmxx/config Ñтот файл может Ñодержать набор длинных опций (без \-\-), аргументы отделÑÑŽÑ‚ÑÑ Ð¾Ñ‚ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ð¾Ð¿Ñ†Ð¸Ð¸ Ñимволом '='. Любое количеÑтво пробельных Ñимволов допуÑкаетÑÑ Ð²Ð½Ð°Ñ‡Ð°Ð»Ðµ Ñтроки, перед и поÑле разделителÑ. Символ '#' вначале Ñтроки помечает её как комментарий. Примеры: .nf #выбрать уÑтройÑтво доÑтупа device = /dev/ttyS0 #вÑегда отправлÑть SMS Ñ Ð¸Ñпользованием UCS\-2 unicode .fi .TP ~/.scmxx/pin Данный файл иÑпользуетÑÑ ÐºÐ°Ðº алтернатива опции командной Ñтроки \-\-pin. Файл ÐЕ должен быть доÑтупен группе или вÑем на чтение/запиÑÑŒ! Также он ДОЛЖЕРбыть обычным файлом, не ÑимволичеÑкой ÑÑылкой. SCMxx отвергает файлы в подобных ÑлучаÑÑ…. ЕÑли значение PUK\-кода запрашиваетÑÑ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð¾Ð¼, ÑоответÑтвующий PIN\-код должен быть также определён. Только такие Ñлементы Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ ÑвлÑÑŽÑ‚ÑÑ Ð½ÐµÐ¾Ð±Ñ…Ð¾Ð´Ð¸Ð¼Ñ‹Ð¼Ð¸: '{', \&'=', ';' и '}'. Пробелы и Ñимволы новой Ñтроки игнорируютÑÑ. Файл имеет Ñледующий формат: .nf sim 262031234567890 { pin = 1234 puk = 12345678; pin2 = 4321; puk2 = 87654321; } device 350123456789012 { type SIM { pin = 0000; puk = 0000; } } .fi Секции "sim" иÑпользуют IMSI в качеÑтве идентификатора, Ñекции же "device" уже иÑпользуют IMEI как идентификатор (Ñм. вывод опции \-\-info). Следовательно IMSI необходим, так как без него ÐЕЛЬЗЯ включить телефон! ПодÑÐµÐºÑ†Ð¸Ñ "type" в Ñекции device определÑет Ñледующие идентификаторы: .RS .TP SIM код уÑтройÑтва (защита от кражи) .TP FSIM ÑÐ°Ð¼Ð°Ñ Ð¿ÐµÑ€Ð²Ð°Ñ ÑƒÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ð°Ñ SIM\-карта .TP NET привÑзка к Ñети .TP NETSUB Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка к Ñети .TP SP привÑзка к оператору ÑвÑзи .TP CORP привÑзка к корпорации .RE .SH ÐВТОР Hendrik Sattler post@hendrik\-sattler.de. Перевод выполнен Andy Shevchenko andy@smile.org.ua и Irina Yeresko mecec@yandex.ru. scmxx-0.9.0/docs/scmxx.de.html0000644000175000017500000006371410401301630016062 0ustar hendrikhendrik scmxx

Name

scmxx — Datenaustausch mit einem Siemens-Handy

Synopsis

scmxx [--device Gerätedatei] [--baud Baudrate] [--quiet] [--verbose] [--reset] {[--info] | [--set-time] | [--mem-info] | [--lock-info] | [ --lock lock {[--enable] | [--disable]} ] | [ --set-smsc --number { Nummer | Name } ]}

scmxx [--device Gerätedatei] [--baud Baudrate] [--quiet] [--verbose] [--reset] [--out Datei] [--pipe Pipe] {[--remove] | [--send] | [--get]} [--binary] [--mem Speicher] [--slot Speicherplatz] [Datei...]

scmxx [--device Gerätedatei] [--baud Baudrate] [--quiet] [--verbose] [--reset] [--out Datei] [--pipe Pipe] [--pin PIN] {[--remove] | [--send] | [--get]} [--pbook] [--mem Speicher] [--slot Speicherplatz] [--text Text] [ --number { Nummer | Name } ] [Datei...]

scmxx [--device Gerätedatei] [--baud Baudrate] [--quiet] [--verbose] [--reset] [--out Datei] [--pipe Pipe] {[--remove] | [--send] | [--get]} [--sms] [--mem Speicher] [--slot Speicherplatz] [--text Text] [ --number { Nummer | Name } ] [--direct] [--flash] [--srr] [--unicode] [Datei...]

scmxx [--help] [--version]

Beschreibung

SCMxx kann bestimmte Dateien zu und von einem Siemens-Handy übertragen und dort gespeicherte löschen. Die Daten werden aus einer Datei oder von der Standardeingabe gelesen, geschrieben wird in eine Datei oder auf die Standardausgabe. Kurznachrichten (SMS) können direkt gesendet und empfangen werden, also ohne daß sie auf dem Handy gespeichert werden. SCMxx wurde mit mehreren Handys von Siemens getestet (nur S25 und später).

Optionen

--device (-d)

definiert eine Gerätedatei. Diese wird statt der in der Umgebungsvariable SCMXX_TTY und dem einkompilierten Wert verwendet. Für Linux-Systeme kann dies /dev/ttyS0 für eine serielle Verbindung, /dev/ircomm0 für eine Infrarot-Verbingung und /dev/rfcomm0 for eine Bluetooth-Verbingung sein. Wenn native Bluetooth-Unterstützung einkompiliert wurde, können zusätzlich die Formen bt://[xx:xx:xx:xx:xx:xx]:n oder bluetooth://[xx:xx:xx:xx:xx:xx]:n benutzt werden, um eine Bluetooth-Adresse xx:xx:xx:xx:xx:xx und einen Kanal n (Vorgabewert ist 1) anzugeben. Die Angabe des Kanals is optional, in diesem Fall muss aber auch der Doppelpunkt weggelassen werden.

--baud (-b)

definiert ein Baudrate, mit der zum Gerät verbunden wird. Die gültigen Werte sind abhängig vom System, typische sind jedoch 9600, 19200, 38400, 57600 oder 115200. Der Standardwert ist 19200. Das S25 und die *35i arbeiten nur bei 19200, alle späteren Modelle arbeiten auch bei voller serieller Geschwindigkeit. Infrarotverbindungen können, abhängig vom IrDA-Modul, eine Ausnahme sein. Dies übergeht die SCMXX_BAUD-Variable und den einkompilierten Wert.

--out (-o)

definiert eine zu benutzende Datei. Wenn man Binärdatein mit "all" holt, werden die Speicherplatznummer und der Dateityp angehängt. Wenn man sendet oder löscht, hat dieser Parameter keine Wirkung aber die letzten Parameter sollten beim Senden gültige Dateien sein. Die Standardausgabe muß explizit mittel einem Bindestrich ('-') angegeben werden, sonst wird nichts auf diese geschrieben. Wenn '-' angegeben wurde, wird nicht an diesen Wert, auch beim holen von mehereren Dateien, angehängt.

--pipe (-p)

definiert eine Pipe zu einem anderen Programm. Wenn man mit "all" Daten holt, wird jede Datei in eine eigene Pipe geschickt (nur mit --binary und --sms).

--quiet (-q)

verringert die Menge der Ausgaben um 1

--pin

die Option kann man benutzen, wenn ein PIN-Code zum Zugriff erforderlich ist

--verbose (-v)

erhöht die Menge der Ausgaben um 1

--reset

versucht, das Handy zurückzusetzen, sodaß man wieder darauf zugreifen kann. Es kann passieren, daß das Handy nicht mehr auf der seriellen Schnittstelle antwortet, besonders nach einem vom Benutzer unterbrochenen Dateitransfer. Dies sendet einfach blind ein paar besondere Zeichen.

--help (-h)

gibt die Hilfeseite aus

--version

gibt die Version aus

--remove (-r)

löscht einen Eintrag vom Handy Wenn --sms und --get mit angegeben werden, holt und löscht dies. Wenn --sms und --send mit angegeben werden, sendet und löscht dies.

--get (-g)

holt einen Eintrag und Speichert ihn in eine Datei Wenn --sms und --remove mit angegeben werden, holt und löscht dies. Wenn --sms und --send mit angegeben werden, holt und sendet dies.

--send (-s)

sendet eine Datei zum Handy Beim Senden vom Kurznachrichten könnte die Option --direct ebenfalls von Interesse sein. Wenn --sms und --remove mit angegeben werden, sendet und löscht dies. Wenn --sms und --get mit angegeben werde, holt und sendet dies.

--info (-i)

sammelt Informationen vom Handy, --mem-info kann als Schalter benutzt werden und eine komplexere Tabelle über die verfügbaren Speicher auszugeben.

--mem-info

zeigt Informationen über verfügbare Speicher und deren Speicherplätze und andere Informationen an. Es benutzt dasselbe Format wie --mem=? und kann als Schalter für --info dienen, um die kurze Speicherauflistung zu ersetzen.

--lock-info

zeigt den Status der Zugriffssperren (locks) an. Es kann als Schalter für --info dienen, um die kurze Speicherauflistung zu ersetzen.

--lock

wählt die ein-/auszuschaltende Sperre aus. Für einige Sperren wird ein Passwort benötigt (siehe --pin).

--enable

einschalten z.B. einer Sperre

--disable

ausschalten z.B. einer Sperre

--dial

wählt eine Nummer (erforder --number). Das Programm beendet sich entweder nach 10 Sekunden oder wenn der Anruf die angerufene Seite erreicht hat.

--hangup

beendet alle, momentan aktiven Gespräche

--set-time

gleicht die Zeit des Handy mit der des Rechners ab. Der Einsatz eines Programms wie ntpdate wird vor der Nutzung dieses Parameters empfohlen.

--set-smsc

setzt eine neue SMSC nummber (erfordert --number)

--binary (-N)

wählt den Binärdateiübertragungsmodus

--pbook (-P)

wählt den Telefonbuchübertragungsmodus

--sms (-S)

wählt den Kurznachrichtenübertragungsmodus

--mem

wählt den Speicher aus, der benutzt werden soll. Speicherplatznummern hängen von dieser Wahl ab. Die Ausgabe von --info zeigt unterstützte Speicher an. Wird diese Optioen nicht benutzt, wird eine eventuell vorhandene Vorgabe benutzt. Es gibt den besonderen Wert "?", der die selbe Ausgabe wie --mem-info hat, nur daß es auf den gewählten Modus eingeschränkt wird.

--slot

wählt die zu benutzende Speicherplatznummer aus. (siehe Ausgabe von --mem-info oder --mem=?). Wird diese Optioen nicht benutzt, wird eine eventuell vorhandene Vorgabe benutzt. Der besondere Wert "all" definiert the alle verfügbaren Speicherplatznummern für den gewählten Speicher und Modus (mit der Ausnahme von --sms mit --send). Für den Kurznachrichtenübertragungsmodus gibt es die besonderen Werte "read" (gelesen), "unread" (ungelesen), "sent" (bereits gesendet) und "unsent" (noch nicht gesendet). Die letzteren beiden können mit --sms und --send benutzt werden. Für den Telefonbuchmodus gibt es zusätzlich den Wert "last" (letzter). Wenn diese Option nicht angegeben wird, versucht scmxx einen leeren Speicherplatz zu finden (je nachdem kann dies auch länger dauern). Wenn ein Wert angegeben wurde und meherere Datei gesendet werden, ist die angebene Speicherplatznummer der Startpunkt für die Suche nach leeren Speicherplätzen. Mehere, nicht-leere Speicherplätze zu überscheiben wird noch nicht unterstützt, außer für den Spezialfall "all" (alle).

--text (-t)

definiert den Inhalt einer Kurzmitteilung oder eine Telefonbucheintrags. Bei Telefonbucheinträgen hängt die Länge vom gewählten Telefonbuch ab (siehe Ausgabe von --mem-info oder --mem=?).

--number (-n)

definiert die Nummber beim Senden einer Kurznachricht oder die Nummer bei einem Telefonbucheintrag. Die Nummer kann ein Prefix '+' für internationale Nummern haben und ist normalerweise auf 20 Ziffern (ohne das '+') limitiert, was genug sein sollte.

--direct

sendet/holt Kurznachrichten ohne sie auf dem Handy zu speichern. Dies ist kein Standardwert, weil man für das Senden von Kurznachrichten normalerweise Geld bezahlen muß. Beim direkten Holen werden Kurznachrichten, die nicht vom Type SMS-DELIVER sind trotzdem auf dem Handy gespeichert, da diese noch nicht dekodiert werden können.

--unicode

sendet Kurznachrichten als UCS-2 (16bit-Unicode-Zeichensatz). Dieser Parameter muß nicht angegeben werden, um Unicode-Kurznachrichten zu dekodieren.

--flash

dies setzt das Class0-Bit im DCS-Feld, was beim Empfänger normalerweise als "immediate display" (unmittelbar anzeigen) interpretiert wird. Nicht alle Empfangsgeräte unterstützen das. Man muß außerdem beachten, daß eine zweite Kurznachricht mit dieser Einstellung eine vorherige ohne Nachfrage überschreibt! Die Nutzung wirde deshalb nicht empfohlen.

--srr

dies setzt das Bit StatusReportRequest (Statusreport anfordern) im pdutype-Feld der SMS-PDU. Es hängt von der SMSC ab, ob dieses Bit beachtet wird. Bei manchen Providern kosten StatusReports extra.

--sort

sortiert die Kurznachrichten bei der Ausgabe. Mögliche Sortiermethoden sind "type", "slot" und "type,slot". "type" sortiert nach dem Nachrichtentyp mit einer internen Rangfolge: erst die nicht unterstützten Typen, dann SMS-SUBMIT, SMS-STATUS-REPORT und SMS-DELIVER. "slot" sortiert nach dem Speicherplatz der Kurzmitteilung. "type,slot" sortiert erst wie "type" und dann jeden Typen wie "slot". Die Vorgabe ist keine Sortierung (Reihenfolge hängt vom Handy ab).

--pin

ermöglichst die Nutzung einer PIN. Diese Option sollte nur benutzt werden, wenn nach eine Fehlermeldung erscheint, die nach einer PIN oder PUK verlangt. Für eine PIN ist dies die erwartete "<PIN>", für eine PUK ist dies die erwartete "<PUK>,<new PIN>". Der Wert wird nur ein einziges Mal benutzt. Die Pin-Datei sollte, wenn möglich, stattdessen benutzt werden (siehe unten).

--system-charset

definiert den Systemzeichensatz anstatt den Rückgabewert von nl_langinfo(CODESET) zu nutzen. Das ist eine Behelf für Systeme, die keine Unicode-Locales wie UTF-8 unterstützen oder wenn Daten von einem anderen System mit einer anderen Locale als Eingabe benutzt werden soll. Normalerweise wird diese Option nicht benötigt.

Beispiele

Senden einer Bitmapdatei an das Handy (Logo):

scmxx --send --binary --mem="bmp" --slot=0 myfile.bmp

Holen eines Logos vom Handy und speichern in eine neue Datei:

scmxx --get --binary --mem="bmp" --slot=0 --out=myfile.bmp

Holen aller ungelesenen (Vorhabe beim holen) Kurznachrichten und Ausgabe auf die Standardausgabe:

scmxx --get --sms --slot=unread --out=-

scmxx -gS -o-

Direkten empfangen einer Kurznachricht:

scmxx --send --sms --direct --number=123 --text="test"

Holen eines Telefonbuchs und speichern in eine Datei:

scmxx --get --pbook --mem=SM --out=SM.pb

Änders des Speicherplatzes 33 im Telefonbuch SM:

scmxx -sP --mem=SM --slot=33 --number=123 --text="test"

Besonderheiten

Die Ausgabe von Text (Telefonbuch und SMS) hängt von dem Zeichensatz der gewählten Systemlocale ab, ebenso für die Eingabe. Das hat den Vorteil der Lokalisation aber auch den Nachteil, daß alle nicht von der Locale unterstützten Zeichen mit einer Sequenz \XXXX eingegeben werden müssen, wobei X ein Hexadezimalzeichen ist (z.B. \20ac für das Eurozeichen). Das ist der 16bit-Unicode-Wert. Die \XXXX-Ausgabe wird nur für Ausgaben benutzt, die normalerweise auch wieder als Eingabe dienen können. Für alle anderen Ausgabe wird ein Fragezeichen ('?') als Platzhalter genommen. Mit einer UTF-8-locale kann man sicherstellen, daß alle Zeichen konvertiert und angezeigt werden können. Das Zeichen für das Zeilenende kann als das übliche \n eingegeben werden und '\' muß sich selbst vorangestellt werden. In der bash kann dies sogar in einem "\\\\" enden.

Verbindungsprobleme

Es gibt die zusätzlichen Parameter --ignore-serial-bits (serielle Bits ignorieren, Vorgabe) und --keep-serial-bits (serielle Bits beibehalten). Diese sollte man nur probieren, wenn das Handy keine Antwort zu geben scheint. Welchen Einstellung die richtig ist, hängt vom Kabel und vom seriellen Port ab und kann nicht automatisch bestimmt werden.

Wenn Timeouts beim ersten Kommando kommen, kann man außerdem die Option --start-delay=<seconds> (Anfangsverzögerung in Sekunden) probieren.

Eine weitere Option --device-timeout=<seconds> (Gerätetimeout in Sekunden) gibt es für den Fall, daß es das Handy nicht schafft, auf ein Kommando innerhalb von 10 Sekunden zu antworten. Eigentlich sollte dies mehr als genug sein, aber man weiß ja nie. Der minimal erlaubte Wert ist 1, der höchste von 25 bedeutet "unendlich lange".

Sicherheit

Die --pin Option sollte man mit Vorsicht benutzen. Diese Option mitsamt Wert ist in der Prozesslist sichtbar.

Umgebungsvariablen

SCMXX_TTY

siehe --device für eine Beschreibung

SCMXX_BAUD

siehe --baud für eine Beschreibung

Dateien

~/.scmxx/cache.pb

Diese Datei dient als Telefonbuch (für Nummer von Empfänger/Sender) während der Ausgabe von Kurznachrichten und als Alias für --number beim Senden von Kurznachrichten. Das Format ist dasselbe wie eine Telefonbuchdatei (die Speicherplatznummern sind nicht wichtig, müssen aber vorhanden sein).

~/.scmxx/config

Diese Datei kann Option in der langen Form (aber ohne die --) enthalten. Der Wert is von der Option durch ein '=' getrennt. Eine beliebige Anzahl von Leerzeichen ist am Anfang der Zeile, vor und nach dem Trennzeichen erlaubt. Ein '#' am Anfang der Zeile markiert diese Zeile als Kommentar. Beispiele:


          #eine andere Gerätedatei festlegen
          device  =  /dev/ttyS0
          #SMS immer als UCS-2 senden
          unicode
  

~/.scmxx/pin

Diese Datei wird als Alternative zur --pin Kommandozeilenoption benutzt. Die Datei DARF NICHT gruppenlesbar/-schreibbar oder weltlesbar/-schreibbar sein! Es MUSS auch eine reguläre Datei sein, kein SymLink. SCMxx wird sonst die Nutzung der Datei verwehren. Wenn ein PUK-Wert vom Gerät angefordert wird, muß ein zugehöriger PIN-Wert ebenfalls definiert sein. Die einzig nötigen Formatelemente sind '{', '=', ';' und '}'. Leerzeichen und Zeilenumbrüche werden ignoriert. Die Datei hat das folgende Format:


          sim 262031234567890 {
            pin = 1234
            puk = 12345678;
            pin2 = 4321;
            puk2 = 87654321;
          }
          device 350123456789012 {
            type SIM {
              pin = 0000;
              puk = 0000;
            }
          }
  

"sim"-Sektionen benutzen die IMSI als Variable, "device"-Sektionen benutzen die IMEI als Variable (siehe Ausgabe von --info). Da die IMSI benötigt wird, können sie hiermit nicht das Handy einschalten. Die "type"-Untersektion in der device-Sektion hat folgende Variablen:

SIM

Gerätecode (Diebstahlsicherung)

FSIM

die zuallererst eingelegte SIM

NET

Netwerk-Personalisierung

NETSUB

Netwerk-Subset-Personalisierung

SP

Service-Provider-Personalisierung

CORP

Corporate-Personalisierung

Autor

Hendrik Sattler

scmxx-0.9.0/docs/scmxx.en.html0000644000175000017500000006116710401301633016077 0ustar hendrikhendrik scmxx

Name

scmxx — exchange data with your Siemens mobile phone

Synopsis

scmxx [--device device] [--baud baudrate] [--quiet] [--verbose] [--reset] {[--info] | [--set-time] | [--mem-info] | [--lock-info] | [ --lock lock {[--enable] | [--disable]} ] | [ --set-smsc --number { number | name } ]}

scmxx [--device device] [--baud baudrate] [--quiet] [--verbose] [--reset] [--out file] [--pipe pipe] {[--remove] | [--send] | [--get]} [--binary] [--mem memory] [--slot slot] [file...]

scmxx [--device device] [--baud baudrate] [--quiet] [--verbose] [--reset] [--out file] [--pipe pipe] [--pin PIN] {[--remove] | [--send] | [--get]} [--pbook] [--mem memory] [--slot slot] [--text text] [ --number { number | name } ] [file...]

scmxx [--device device] [--baud baudrate] [--quiet] [--verbose] [--reset] [--out file] [--pipe pipe] {[--remove] | [--send] | [--get]} [--sms] [--mem memory] [--slot slot] [--text text] [ --number { number | name } ] [--direct] [--flash] [--srr] [--unicode] [file...]

scmxx [--help] [--version]

Description

SCMxx can copy files to and from a Siemens mobile phone and also delete stored files. Files can read from a given file or through stdin and stored to a given file or stdout. SMS can also be directly sent or received without storing in the mobile phone. SCMxx was tested with several mobile phones manufactured by Siemens (only S25 and later).

Options

--device (-d)

specify another than the compiled in device. This overwrites the SCMXX_TTY environment variable and the compiled-in value. For linux systems, this may be e.g. /dev/ttyS0 for serial connections, /dev/ircomm0 for infrared connections and /dev/rfcomm0 for bluetooth connections. If native bluetooth support is compiled in, you can also use the format bt://[xx:xx:xx:xx:xx:xx]:n or bluetooth://[xx:xx:xx:xx:xx:xx]:n to specify a bluetooth address xx:xx:xx:xx:xx:xx and the bluetooth channel n (default is 1). The channel is optional, omit the colon in this case, too.

--baud (-b)

specify the device's speed. Valid values are dependent on the system but may be 9600, 19200, 38400, 57600 or 115200. The default value is 19200. The S25 and *35i only work at the 19200, all later phones also work at full serial speed. Infrared connections may be an exception to these rules (dependent on the infrared donle). This overwrites the SCMXX_BAUD environment variable and the compiled-in value.

--out (-o)

specify a file to use. When getting binary files with "all", the slot number, a dot and the filetype are appended. When sending or deleting, this parameter has no use but the last parameters that should be valid files. Stdout must be explicitly selected with the dash ("-"), by default nothing is written to stdout. There is nothing appended to "-" when getting multiple files.

--pipe (-p)

specify a pipe to another program. When getting with "all", every file is piped to this programs on its own (only for --binary and --sms).

--quiet (-q)

decreases verbosity by 1

--pin

use this option if a PIN code is required for access

--verbose (-v)

increases verbosity by 1

--reset

try to reset the phone, so it gets accessible again. It may happen that the phone does not answer on the serial interface anymore, especially with a previous user-interrupted file transfer. This simply blindly sends some special characters.

--help (-h)

print the help message

--version

print the version number

--remove (-r)

removes an entry from the phone. When specified with --sms and --get, this will get'n'delete. When specified with --sms and --send, this will send'n'delete.

--get (-g)

get an entry and save it to a file. When specified with --sms and --remove, this will get'n'delete. When specified with --sms and --send, this will get'n'send.

--send (-s)

sends a file to the phone. When sending sms, you might want to take a look at the option --direct, too. When specified with --sms and --remove, this will send'n'delete. When specified with --sms and --get, this will get'n'send.

--info (-i)

collect information from the phone, --mem-info can be used as a trigger to display a more complex listing of the available memories

--mem-info

display information about available memories and their slots and other information. It uses the same format as --mem=? (see below) and can also be use as a trigger for --info to replace the short memory listing.

--lock-info

display status of locks. It can also be use as a trigger for --info to replace the lock name listing.

--lock

specify a lock that you can enable or disable. For some locks, a password is needed (see --pin)

--enable

enable e.g. a lock

--disable

disable e.g. a lock

--dial

dial a number (requires --number). The program returns either after 10 seconds or when the call reached the other side.

--hangup

hangup all currently active calls

--set-time

synchronize time to phone. The use of tools like ntpdate is recommended before using this.

--set-smsc

set the SMSC number (requires --number)

--binary (-N)

select binary file transfer mode

--pbook (-P)

select phonebook transfer mode

--sms (-S)

select short message service mode

--mem

select a memory to access. Slot numbers may vary depending on the selected memory. See the output of --info for the supported memory types. Not using this option triggers the default behaviour (if a default behaviour was defined). There is a special string "?" that outputs in the same format as --mem-info but only for the selected mode.

--slot

select a slot to access. See the output of --mem-info or --mem=?. Not using this option triggers the default behaviour (if a default behaviour was defined). The special string "all" defines the whole range of available slots for the selected memory and mode and, except with --sms, cannot be used with --send. For SMS, there are four additional special strings: "read", "unread", "sent" and "unsent". The latter two can be used with --send. For phonebook access, there is the additional special string "last". When this option is omitted with --send, scmxx tries to find an empty slot (that may or may not take long). Finding an empty slot is not supported for phonebooks, yet. When a slot was specified and also multiple files to upload, the specified slot is the starting point to search for empty slots. Overwriting multiple, non-empty slots is not supported, yet, except for the special case "all".

--text (-t)

specify content text of short message or text of the phonebook entry. For phonebook entries, the length limit may depend on the selected phonebook (see output of --mem-info or --mem=?).

--number (-n)

specify number to send the short message to or the number for the phonebook entry. Note that the number may have a leading '+' for international numbers. It is normally limited to 20 digits (without the '+') which is certainly enough.

--direct

send/get short messages without storing in the phone. This is not default because you will certainly be charged for it when sending. With direct getting, SMS that are not of type DELIVER are still stored on the phone (scmxx cannot decode those messages, yet).

--unicode

send the short message and use UCS-2 (16bit unicode) as character set. You do not need to specify this parameter to enable unicode sms decoding.

--flash

set the class0 in the data coding scheme field that is normally interpreted as "immediate display". Not all receiving entities support this. Note that a second sms of this type normally overwrites a previous one without asking! Its use is not recommended.

--srr

this sets the StatusReportRequest bit in the pdutype field of the sms pdu. It depends on the SMSC if this is honored. With some providers, this produces additional costs!

--sort

sort the messages on printing to chosen output. Possible sorting methods are "type", "slot" and "type,slot". "type" sorts for the type of the short message with an internal order of unsupported types first, then SMS-SUBMIT, SMS-STATUS-REPORT and SMS-DELIVER. "slot" sorts for the slot of the short message. "type,slot" does sorting like "type" first and sorts each type like "slot". Default is to not sort at all (order depends on phone).

--pin

enable pin usage. Use this only if there was an error message that asks for a PIN or PUK. For a PIN, this is the corresponding "<PIN>", for a PUK, it is "<PUK>,<new PIN>". The value is only used once. Consider using the pin file (see below) instead of this option.

--system-charset

define the system character set instead of using the return value from nl_langinfo(CODESET). This is to work around systems that do not support unicode locales like UTF-8 or when data from a different system with a different locale is used as input. Usually, you do not need this option.

Examples

Send an bitmap file to the phone as bitmap (logo):

scmxx --send --binary --mem="bmp" --slot=0 myfile.bmp

Get a Bitmap from the phone and save it into a new file:

scmxx --get --binary --mem="bmp" --slot=0 --out=myfile.bmp

Get all unread (default on get) short messages and output to stdout:

scmxx --get --sms --slot=unread --out=-

scmxx -gS -o-

Send a short message directly (not stored in the phone):

scmxx --send --sms --direct --number=123 --text="test"

Get a phonebook and store it to a file:

scmxx --get --pbook --mem=SM --out=SM.pb

Modify a specific slot (33) in phonebook memory SM:

scmxx -sP --mem=SM --slot=33 --number=123 --text="test"

Notes

The output of text (phonebook and sms) depends on the character set of your current locale. Input is the same. This has the advantage of localization but may have the drawback that all other characters must be entered by a sequence \XXXX where X is a hex character (e.g. \20ac for EuroSign). This is a 16bit representative of the unicode value. The \XXXX is only used for output with the intention to read it again at a later time. For normal output, characters that cannot be displayed in the current local are replaced by a '?'. Using an UTF-8 based locale will make sure that all character can be converted. The newline character can be entered using the common \n and '\' must be masked with itself. In bash, this might even result in a needed input like "\\\\".

Connection problems

There are additional parameters --ignore-serial-bits (default) and --keep-serial-bits. Use it only when you get no response from the phone at all. Which setting is needed depends on the cable and serial port and cannot be determined automatically.

If you experience timeouts on the first command, try the --start-delay=<seconds> parameter.

Another parameter --device-timeout=<seconds> is provided for the case that your phone ever needs more than default value of 10 seconds to answer. Actually, this should be more than enough but one never knows. The minimum value is 1, values higher than 25 mean "forever".

Security

The --pin option should be used with care. The option and its argument are visible in the process list.

Environment

SCMXX_TTY

see --device for decription

SCMXX_BAUD

see --baud for description

Files

~/.scmxx/cache.pb

this file serves as lookup file during short message output (for recipient/sender address) and for number aliasing for --number on sending a short message. The format is the same as a phonebook file (slot numbers don't matter but must be present).

~/.scmxx/config

this file can contain long options (without the --), the arguments is seperated from the option name by an '='. Any amount of spaces at beginning of line, before and after the seperator are allowed. A '#' at beginning of line marks this line as comment. Examples:


          #choose a device to access
          device  =  /dev/ttyS0
          #always send SMS using UCS-2
          unicode
  

~/.scmxx/pin

This file is used as an alternativ to the --pin command line option. The file MUST NOT be group readable/writeable or world readable/writeable! It also MUST be a regular file, not a symlink. SCMxx refuses to use the file if this is not the case. If a PUK value is requested by the phone, the corresponding PIN must also be defined. The only necessary format elements are '{', '=', ';' and '}'. Spaces and newlines are ignored. The file has the following format:


          sim 262031234567890 {
            pin = 1234
            puk = 12345678;
            pin2 = 4321;
            puk2 = 87654321;
          }
          device 350123456789012 {
            type SIM {
              pin = 0000;
              puk = 0000;
            }
          }
  

"sim" sections use the IMSI as identifier, "device" sections use the IMEI as identifier (see output of --info). Since the IMSI is needed, you canNOT switch the phone on with this! The "type" sub section in the device section has the following idenfifiers:

SIM

device code (theft protection)

FSIM

very first inserted SIM

NET

network personalization

NETSUB

network subset personalization

SP

service provider personalization

CORP

corporate personalization

Author

Hendrik Sattler

scmxx-0.9.0/docs/scmxx.it.html0000644000175000017500000006422610401301635016112 0ustar hendrikhendrik scmxx

Nome

scmxx — scambia dati con il tuo telefonino Siemens

Sinossi

scmxx [--device device] [--baud baudrate] [--quiet] [--verbose] [--reset] {[--info] | [--set-time] | [--mem-info] | [--lock-info] | [ --lock lock {[--enable] | [--disable]} ] | [ --set-smsc --number { numero | nome } ]}

scmxx [--device device] [--baud baudrate] [--quiet] [--verbose] [--out file] [--pipe pipe] {[--remove] | [--send] | [--get]} [--binary] [--mem memoria] [--slot slot] [file...]

scmxx [--device device] [--baud baudrate] [--quiet] [--verbose] [--out file] [--pipe pipe] [--pin PIN] {[--remove] | [--send] | [--get]} [--pbook] [--mem memoria] [--slot slot] [--text testo] [ --number { numero | nome } ] [file...]

scmxx [--device device] [--baud baudrate] [--quiet] [--verbose] [--out file] [--pipe pipe] {[--remove] | [--send] | [--get]} [--sms] [--mem memoria] [--slot slot] [--text testo] [ --number { numero | nome } ] [--direct] [--flash] [--srr] [--unicode] [file...]

scmxx [--help] [--version]

Descrizione

SCMxx può copiare files da e verso un telefonino Siemens e inoltre può cancellare file salvati. I file possono venire letti da un determinato file o attraverso stdin e salvati in un determinato file o su stdout. Gli SMS possono essere anche direttamente mandati o ricevuti senza essere salvati nel telefonino. SCMxx è stato testato con diversi modelli della Siemens (solo S25 e successivi) e quindi verrà stampato un messaggio di avviso ogniqualvolta lo si usi con altri modelli non supportati.

Opzioni

--device (-d)

specifica un device diverso da quello specificato nelle opzioni di compilazione. Sovrascriverà la variabile d'ambiente SCMXX_TTY e l'opzione di compilazione. Per sistemi linux, questo device può essere ad esempio /dev/ttyS0 per connessioni seriali, /dev/ircomm0 per connessioni via infrarosso e /dev/rfcomm0 per connessioni via bluetooth.

--baud (-b)

specifica la velocità di trasmissione. Valori validi dipendono dal sistema, ma possono essere 9600, 19200, 38400, 57600 o 115200. Il valore di default è 19200. Il S25 e il *35i lavorano solo a 19200, tutti gli altri modelli successivi possono lavorare anche a piena velocità. Le connessioni via infrarosso possono essere un'eccezione a queste regole (dipende dal dongle dell'infrarosso). Questo valore sovrascriverà la variabile d'ambiente SCMXX_BAUD e l'opzione di compilazione.

--out (-o)

specifica il file da usare. Quando si prendono dei file binari con l'opzione "all", vengono accodati il numero dello slot, un punto e il tipo di file. Quando si manda o si cancella, questo parametro non viene usato, ma gli ultimi parametri devono essere dei file validi. Stdout dev'essere esplicitamente selezionato mediante il trattino ("-"), di default niente viene scritto su stdout. Non viene accodato nulla su "-" quando si prendono file multipli.

--pipe (-p)

specifica un pipe verso un altro programma. Quando si prendono dei file con l'opzione "all", ogni file viene mandato in pipe a questo programma singolarmente (solo per --binary e --sms).

--quiet (-q)

decrementa il numero dei messaggi in output

--pin

usa questa opzione nel caso dovesse venire richesto un codice PIN per l'accesso.

--verbose (-v)

incrementa il numero dei messaggi in output

--reset

cerca di resettare il telefonino, così che sia nuovamente accessibile. Potrebbe succedere che il telefonino non risponda più sull'interfaccia seriale, specialmente dopo un trasferiemnto di file interrotto dall'utente. Questo comando semplicemente ignora alcuni caratteri speciali.

--help (-h)

stampa il messaggio di aiuto.

--version

stampa il numero di versione.

--remove (-r)

rimuove un record dal telefonino. Quando specificato assieme a --sms e --get, questo comando prenderà e cancellerà il messaggio. Quando specificato assieme a --sms e --send, questo comando prenderà e manderà il messaggio.

--get (-g)

prende un record e la salva su di un file. Quando specificato assieme a --sms e --remove, questo comando prenderà e cancellerà il messaggio. Quando specificato assieme a --sms e --send, questo comando prenderà e manderà il messaggio.

--send (-s)

manda un file al telefonino. Nel caso volessi mandare sms, dai un'occhiata anche all'opzione --direct. Quando specificato assieme a --sms e --remove, questo comando prenderà e cancellerà il messaggio. Quando specificato assieme a --sms e --get, questo comando prenderà e manderà.

--info (-i)

ottiene informazioni dal telefonino, --mem-info può essere usata come opzione per visualizzazre un elenco più completo delle memorie disponibili.

--mem-info

visualizza informazioni sulle memorie disponibili e i loro slot, oltre ad altre informazioni. Usa lo stesso formato di --mem=? (vedi sotto) e può essere usato come opzione per --info così da visualizzare informazioni più complete riguardo la memoria.

--lock-info

visualizza lo stato dei blocchi. Può anche essere usato come opzione di --info per visualizzare la lista dei nomi dei blocchi.

--lock

specify a lock that you can enable or disable. For some locks, a password is needed (see --pin)

--enable

enable e.g. a lock

--disable

disable e.g. a lock

--dial

dial a number (requires --number). The program returns either after 10 seconds or when the call reached the other side.

--hangup

hangup all currently active calls

--set-time

sincronizza l'orologio del telefonino. L'uso di comandi come ntpdate è raccomandato prima di usare questo comando.

--set-smsc

setta il numero SMSC (necessita --number)

--binary (-N)

seleziona il tipo di trasferimento file in modalità binaria.

--pbook (-P)

seleziona il trasferimento dell'agenda telefonica.

--sms (-S)

seleziona il trasferimento di sms.

--mem

seleziona una memoria a cui accedere. I numeri degli slot possono variare dipendentemente dalla memoria selezionata. Vedi l'output di --info per i tipi di memoria supportata. Non usando questa opzione si modifica il comportamento di default (se un comportamento di default è stato definito). La stringa speciale "?" stampa in output nello stesso formato di --mem-info ma solo per il modo selezionato.

--slot

seleziona uno slot da accedere. Vedi l'output di --mem-info o di --mem=?. Non usando questa opzione modifica il comportamento di default (se un comportamento di default è stato definito). La stringa speciale "all" definisce tutto l'intervallo di slot disponibili per la memoria selezionata e il modo e, ad eccezione di --sms, non può essere usata con --send. Per quanto riguarda gli SMS, ci sono anche altre quattro stringhe speciali: "read", "unread", "sent" e "unsent". Le ultime due possono essere usate con --send. Per l-accesso all-elenco telefonico, c'è anche la stringa speciale "last" (ultimo). Quando questa opzione viene tralasciata con --send, scmxx cerca di trovare uno slot vuoto (operazione che potrebbe anche durare molto). La ricerca di uno slot libero non è ancora supportata per l'elenco telefonico. Quando uno slot viene specificato assieme a vari file da caricare, lo slot specificato è il punto di partenza da cui cercare altri slot vuoti. La riscrittura di slot multipli non vuoti non è ancora possibile, eccetto per il caso speciale "all" (tutti).

--text (-t)

specifica il testo di un SMS o il testo di un record della rubrica. Per i record della rubrica telefonica, il limite del record dipende dalla rubrica selezionata (vedi l'output di --mem-info o di --mem=?).

--number (-n)

specifica un numero a cui mandare l'SMS o il numero del record all'interno della rubrica telefonica. Nota che il numero può avere un '+' iniziale per i numeri internazionali. E' normalmente limitato a 20 cifre (senza il '+') che di certo è a sufficienza.

--direct

manda/prendi sms senza salvarli nel telefonino. Questo non è il comportamento di default in quanto vieni di certo accreditato quando spedisci un sms. Quando prendi direttamente, gli SMS che non sono di tipo DELIVER rimangono nella memoria del telefonino (scmxx non può ancora decodificare quei messaggi).

--unicode

spedisci l'SMS usando l'UCS-2 (16bit unicode) come set di caratteri. Non devi specificare questo parametro per rendere disponibile la decodifica di sms in formato unicode.

--flash

setta la class0 nello schema di codice dei dati, che viene normalmente interpretato come "visualizza immediatamente". Non tutti i supporti riceventi lo supportano. Fai attenzione che un secondo SMS di questo tipo generalmente sovrascrive il precedente senza chiedere! Il suo uso non è consigliato.

--srr

questo comando setta il bit di RichiestaReportDiStato all'interno del tipo della pdu della pdu dell'SMS. Dipende dalla SMSC se questo viene seguito. Con alcuni carrier, questo parametro porta a costi aggiuntivi!

--sort

ordina i messaggi durante la stampa sull'output scelto. Alcuni metodi possibili di ordinamento sono "tipo", "slot" o "tipo, slot". "tipo" ordina per tipo di SMS con un ordine interno di tipi non supportati all'inizio, dopo SMS-SUBMIT, SMS-STATUS-REPORT e SMS-DELIVER. "slot" ordina per slot dell'SMS. "tipo, slot" ordina con "type" prima e ordina ogni SMS dello stesso tipo con "slot". Il comportamento di default non ordina affatto (l'ordine dipende dal telefonino).

--pin

enable pin usage. Use this only if there was an error message that asks for a PIN or PUK. For a PIN, this is the corresponding "<PIN>", for a PUK, it is "<PUK>,<new PIN>". The value is only used once. Consider using the pin file (see below) instead of this option.

--system-charset

definisce il set di caratteri del sistema invece di usare il valore di ritorno da nl_langinfo(CODESET). Questo è dovuto al fatto che alcuni sistemi non supportano se di caratteri unicode come UTF-8 oppure quando i dati sono stati codificati in un altro set di caratteri. In generale non dovresti aver bisogno di questa opzione.

Esempi

Manda un file bitmap al telefonino come bitmap (logo):

scmxx --send --binary --mem="bmp" --slot=0 myfile.bmp

Prende una Bitmap dal telefonino e la salva in un nuovo file:

scmxx --get --binary --mem="bmp" --slot=0 --out=myfile.bmp

Prendi tutti gli SMS non ancora letti (comportamento di default) e mandali sullo stdout:

scmxx --get --sms --slot=unread --out=-

scmxx -gS -o-

Spedisce un sms direttamente (senza salvarlo nel telefonino):

scmxx --send --sms --direct --number=123 --text="test"

Prende una entry dell'agenda telefonica e la salva in un file:

scmxx --get --pbook --mem=SM --out=SM.pb

Modifica uno slot specifico (33) nell'agenda telefonica all'interno della memoria SM:

scmxx -sP --mem=SM --slot=33 --number=123 --text="test"

Nota

L'output testuale (elenco telefonico e SMS) dipende dal set di caratteri in uso localmente. Con l'input è lo stesso. Questo ha il vantaggio della localizzazione, ma ha anche lo svantaggio che tutti gli altri caratteri devono essere inseriti mediante una sequenza \XXXX dove X è un carattere esadecimale (ad esempio \20ac per il segno dell'Euro). Questa è una rappresentazione a 16bit del valore unicode. Il \XXXX è solo usato per l'output con l'intenzione di leggerlo nuovamente più tardi. Per l'output normale i caratteri che non possono essere visualizzati nella zona locale vengono sostituiti con un '?'. Usando una base locale UTF-8, si può essere sicuri che ogni carattere potrà essere convertito. Il carattere di nuova riga può essere inserito utilizzando il carattere comune \n e '\' dev'essere mascherato da sè stesso. Nella shell bash, questo può anche risultare in un input come "\\\\".

Problemi di Connessione

Ci sono parametri addizionali, come --ignore-serial-bits (default) e --keep-serial-bits. Usali solo quando non ottieni assolutamente nessuna risposta dal telefonino. La selezione di una delle due dipende dal cavo e dalla porta seriale, e non può essere determinata automaticamente.

Se noti dei time-out al primo comando, prova con il parametro --start-delay=<secondi>

Un altro parametro --device-timeout=<secondi> viene fornito per il caso in cui il tuo telefonino dovesse aver bisogno di più di 10 secondi per rispondere. Attualmente questo valore dovrebbe essere più che sufficiente ma non si è mai sicuri. Il valore minimo è 1, valori più alti di 25 hanno lo stesso valore di "per sempre".

Sicurezza

L'opzione --pin dev'essere usata con cautela. L'opzione e il suo argomento sono visibili nella lista dei processi.

Ambiente

SCMXX_TTY

vedi --device per la descrizione

SCMXX_BAUD

vedi --baud per la descrizione

Files

~/.scmxx/cache.pb

questo file serve come file di ricerca durante l'output di SMS (per l'indirizzo del ricevente/mittente) e per creare alias dei numeri (--number) nell'invio di sms. Il formato è lo stesso di un elenco telefonico (i numeri degli slot non servono, ma devono essere presenti).

~/.scmxx/config

questo file può contenere opzioni lunghe (senza il --), gli argomenti sono separati dal nome dell'opzione da un '='. Ogni spazio è permesso all'inizio di una riga, prima e dopo il separatore. Un '#' all'inizio della linea, la commenta. Esempi:


          #scegli un device a cui accedere
          device  =  /dev/ttyS0
          #manda sempre gli SMS usando UCS-2
          unicode
  

~/.scmxx/pin

This file is used as an alternativ to the --pin command line option. The file MUST NOT be group readable/writeable or world readable/writeable! It also MUST be a regular file, not a symlink. SCMxx refuses to use the file if this is not the case. If a PUK value is requested by the phone, the corresponding PIN must also be defined. The only necessary format elements are '{', '=', ';' and '}'. Spaces and newlines are ignored. The file has the following format:


          sim 262031234567890 {
            pin = 1234
            puk = 12345678;
            pin2 = 4321;
            puk2 = 87654321;
          }
          device 350123456789012 {
            type SIM {
              pin = 0000;
              puk = 0000;
            }
          }
  

"sim" sections use the IMSI as identifier, "device" sections use the IMEI as identifier (see output of --info). Since the IMSI is needed, you canNOT switch the phone on with this! The "type" sub section in the device section has the following idenfifiers:

SIM
device code (theft protection)
FSIM
very first inserted SIM
NET
network personalization
NETSUB
network subset personalization
SP
service provider personalization
CORP
corporate personalization

Autore

Andrea Benazzo

scmxx-0.9.0/docs/scmxx.ru.html0000644000175000017500000010774310401301640016122 0ustar hendrikhendrik scmxx

Ðазвание

scmxx — оÑущеÑтвлÑет обмен данными Ñ Ð²Ð°ÑˆÐ¸Ð¼ мобильным телефоном Siemens

СинтакÑиÑ

scmxx [--device уÑтройÑтво] [--baud ÑкороÑть_передачи] [--quiet] [--verbose] [--reset] {[--info] | [--set-time] | [--mem-info] | [--lock-info] | [ --lock блокировка {[--enable] | [--disable]} ] | [ --set-smsc --number { номер | Ð¸Ð¼Ñ } ]}

scmxx [--device уÑтройÑтво] [--baud ÑкороÑть_передачи] [--quiet] [--verbose] [--out файл] [--pipe канал] {[--remove] | [--send] | [--get]} [--binary] [--mem тип_памÑти] [--slot Ñлот] [файл...]

scmxx [--device уÑтройÑтво] [--baud ÑкороÑть_передачи] [--quiet] [--verbose] [--out файл] [--pipe канал] [--pin PIN-код] {[--remove] | [--send] | [--get]} [--pbook] [--mem тип_памÑти] [--slot Ñлот] [--text текÑÑ‚] [ --number { номер | Ð¸Ð¼Ñ } ] [файл...]

scmxx [--device уÑтройÑтво] [--baud ÑкороÑть_передачи] [--quiet] [--verbose] [--out файл] [--pipe канал] {[--remove] | [--send] | [--get]} [--sms] [--mem тип_памÑти] [--slot Ñлот] [--text текÑÑ‚] [ --number { номер | Ð¸Ð¼Ñ } ] [--direct] [--flash] [--srr] [--unicode] [файл...]

scmxx [--help] [--version]

ОпиÑание

SCMxx может копировать файлы в мобильный телефон Siemens и обратно, а также удалÑть Ñохраненные файлы. Файлы могут быть прочитаны из указанного файла или получены через Ñтандартный ввод и Ñохранены в конкретном файле или переданы на Ñтандартный вывод. SMS могут быть также напрÑмую переданы или принÑты без ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² мобильном телефоне. SCMxx была протеÑтирована Ñ Ð½ÐµÑколькими мобильными телефонами, произведенными Siemens (только S25 и поздние).

Опции

--device (-d)

определить отличное от вкомпилированного Ð¸Ð¼Ñ ÑƒÑтройÑтва. ÐžÐ¿Ñ†Ð¸Ñ Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ð²Ð°ÐµÑ‚ переменную Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸Ñ SCMXX_TTY и вкомпилированное значение. Ð”Ð»Ñ ÑиÑтемы linux может быть, к примеру, /dev/ttyS0 Ð´Ð»Ñ Ð¿Ð¾Ñледовательного ÑоединениÑ, /dev/ircomm0 Ð´Ð»Ñ ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ инфракраÑному порту и /dev/rfcomm0 Ð´Ð»Ñ ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ каналу bluetooth.

--baud (-b)

определить ÑкороÑть уÑтройÑтва. ПодходÑщие Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð°Ð²Ð¸ÑÑÑ‚ от ÑиÑтемы, но могут быть 9600, 19200, 38400, 57600 или 115200. Значение по умолчанию 19200. Телефоны S25 и *35i работают только при ÑкороÑти 19200, вÑе поздние модели также работают при полной ÑкороÑти поÑледовательного канала. Ð¡Ð¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾ инфракраÑному порту могут Ñодержать иÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð· Ñтих правил (завиÑит от реализации порта). ÐžÐ¿Ñ†Ð¸Ñ Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ð²Ð°ÐµÑ‚ значение переменной Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸Ñ SCMXX_BAUD и вкомпилированное значение.

--out (-o)

определить иÑпользуемый файл. При получении бинарных файлов Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ "all" к каждому имени файла добавлÑетÑÑ Ð½Ð¾Ð¼ÐµÑ€ Ñлота, точка и тип файла. При отправке или удалении, Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ðµ будет иÑпользоватьÑÑ, но в качеÑтве параметра должны быть указаны корректные файлы. Стандартный вывод должен быть однозначно выбран через Ð´ÐµÑ„Ð¸Ñ ("-"), по умолчанию ничего не выводитÑÑ Ð½Ð° Ñтандартный вывод. Ðичего не добавлÑетÑÑ Ðº "-", когда идет получение группы файлов.

--pipe (-p)

определить канал к другой программе. При получении данных Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ "all", каждый файл будет передан по каналу к Ñтим программам в отдельноÑти (только Ð´Ð»Ñ Ð¾Ð¿Ñ†Ð¸Ð¹ --binary и --sms).

--quiet (-q)

уменьшить Ñтепень подробноÑти вывода на 1

--pin

иÑпользовать Ñту опцию, еÑли требуетÑÑ Ð²Ð²ÐµÑти PIN код Ð´Ð»Ñ Ð´Ð¾Ñтупа

--verbose (-v)

увеличить Ñтепень подробноÑти вывода на 1

--reset

попытатьÑÑ ÑброÑить телефон, и он Ñнова Ñтанет доÑтупен. Это может понадобитÑÑ Ð² Ñлучае, еÑли телефон больше не отвечает по поÑледовательному интерфейÑу, оÑобенно при прерванной перед Ñтим пользователем передачи файла. Произойдет проÑто ÑÐ»ÐµÐ¿Ð°Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð° некоторых Ñпециальных Ñимволов.

--help (-h)

вывеÑти текÑÑ‚ помощи

--version

вывеÑти номер верÑии

--remove (-r)

удалить запиÑÑŒ в телефоне. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --get, будут произведены получение и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --send, будут произведены отправка и удаление.

--get (-g)

получить запиÑÑŒ и Ñохранить ее в файл. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --remove, будут произведены получение и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --send, будут произведены получение и отправка.

--send (-s)

отправить файл в телефон. При отправке sms возможно иÑпользование ÑовмеÑтно Ñ Ð¾Ð¿Ñ†Ð¸ÐµÐ¹ --direct, чтобы его увидеть на Ñкране. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --remove, будут произведены отправка и удаление. Когда Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð° Ñ Ð¾Ð¿Ñ†Ð¸Ñми --sms и --get, будут произведены получение и отправка.

--info (-i)

Ñобрать информацию о телефоне, --mem-info может быть иÑпользована Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° между кратким и более Ñложным ÑпиÑком доÑтупных типов памÑти.

--mem-info

отобразить информацию о доÑтупных типах памÑти и их Ñлотах, а также другую информацию. ÐžÐ¿Ñ†Ð¸Ñ Ð¸Ñпользует такой же формат, как и --mem=? (Ñмотрите ниже), и также может быть иÑпользована как переключатель Ð´Ð»Ñ --info, чтобы замеÑтить краткий ÑпиÑок типов памÑти.

--lock-info

отобразить ÑоÑтоÑние блокировок. Может быть также иÑпользована как переключатель Ð´Ð»Ñ --info, чтобы замеÑтить вывод ÑпиÑка имен блокировок.

--lock

определить блокировку, которую необходимо уÑтановить или ÑнÑть. Ð”Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… блокировок необходим пароль (Ñм. опцию --pin).

--enable

уÑтановить какую-либо блокировку

--disable

ÑнÑть какую-либо блокировку

--dial

позвонить по заданному номеру (требуетÑÑ Ð¾Ð¿Ñ†Ð¸Ñ --number). Программа возвратитÑÑ Ð¸Ð»Ð¸ через 10 Ñекунд, или поÑле уÑтановки ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ ÑƒÐ´Ð°Ð»Ñ‘Ð½Ð½Ð¾Ð¹ Ñтороной.

--hangup

ÑброÑить вÑе текущие активные вызовы.

--set-time

Ñинхронизировать Ð²Ñ€ÐµÐ¼Ñ Ð² телефоне. РекомендуетÑÑ Ð¸Ñпользовать инÑтрументы типа ntpdate перед Ñинхронизацией.

--set-smsc

уÑтановить номер SMS-центра (требует опцию --number)

--binary (-N)

выбрать режим обмена бинарными файлами

--pbook (-P)

выбрать режим передачи телефонной книги

--sms (-S)

выбрать режим Ñлужбы коротких Ñообщений

--mem

выбрать тип памÑти, к которой оÑущеÑтвлÑетÑÑ Ð´Ð¾Ñтуп. Ðомера Ñлотов могут варьироватьÑÑ Ð² завиÑимоÑти от выбранного типа памÑти. Смотрите вывод опции --info Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð¸Ð²Ð°ÐµÐ¼Ñ‹Ñ… типов памÑти. Без иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтой опции Ñрабатывает поведение по умолчанию (еÑли таковое было определено). Ð¡Ð¿ÐµÑ†Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ñтрока "?" предназначена Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° в таком же формате, как и --mem-info, но только Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð¾Ð³Ð¾ режима.

--slot

выбрать Ñлот, к которому оÑущеÑтвлÑетÑÑ Ð´Ð¾Ñтуп. Смотрите вывод --mem-info или --mem=?. Без иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтой опции включаетÑÑ Ð¿Ð¾Ð²ÐµÐ´ÐµÐ½Ð¸Ðµ по умолчанию (еÑли таковое было определено). Ð¡Ð¿ÐµÑ†Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ñтрока "all" определÑет полный диапазон вÑех доÑтупных Ñлотов Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ñ‹Ñ… типа памÑти и режима, за иÑключением иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ ÑовмеÑтно Ñ --sms, и не может быть иÑпользована ÑовмеÑтно Ñ --send. Ð”Ð»Ñ SMS, доÑтупны четыре дополнительных Ñпециальных Ñтроки: "read" (прочитанные), "unread" (непрочитанные), "sent" (отправленные) и "unsent" (неотправленные). ПоÑледние два варианта могут быть иÑпользованы вмеÑте Ñ --send. Ð”Ð»Ñ Ð´Ð¾Ñтупа к телефонной книге доÑтупна Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ñтрока "last". При опущенной Ñтой опции и иÑпользовании вмеÑте Ñ --send scmxx попытаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñвободный Ñлот (что может занÑть, а может и нет, некоторое длительное времÑ). ПоиÑк пуÑтого Ñлота пока что не поддерживаетÑÑ Ð´Ð»Ñ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ñ‹Ñ… книг. Когда Ñлот и группа файлов Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ определены, необходимый Ñлот ÑвлÑетÑÑ Ñтартовой точкой Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка Ñвободных Ñлотов. ПерезапиÑÑŒ группы непуÑтых Ñлотов пока что не поддерживаетÑÑ, кроме Ñпециального ÑÐ»ÑƒÑ‡Ð°Ñ "all".

--text (-t)

определить Ñодержание текÑта короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ запиÑи телефонной книги. Ð”Ð»Ñ Ð·Ð°Ð¿Ð¸Ñей телефонной книги лимит длины может завиÑеть от выбранной книги (Ñм. вывод --mem-info или --mem=?).

--number (-n)

определить номер Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ короктого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ номер запиÑи телефонной книги. Заметьте, что номер может иметь вначале '+' Ð´Ð»Ñ Ð¼ÐµÐ¶Ð´ÑƒÐ½Ð°Ñ€Ð¾Ð´Ð½Ñ‹Ñ… номеров. Он ограничен 20 цифрами (без '+'), которых дейÑтвительно доÑтаточно.

--direct

отправить/получить короткие ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð±ÐµÐ· ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² памÑти телефона. Это не выполнÑетÑÑ Ð¿Ð¾ умолчанию, так как вы будете неÑомненно занÑты Ñообщением, при отправке. При непоÑредÑтвенном получении, SMS, тип которого не ÑоответÑтвует DELIVER, вÑе еще ÑохранÑетÑÑ Ð² памÑти телефона (scmxx не может пока что декодировать такие ÑообщениÑ).

--unicode

переÑлать Ñообщение и ипользовать UCS-2 (16бит unicode) как таблицу Ñимволов. ÐеобÑзательно применÑть Ñту опцию Ð´Ð»Ñ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñообщений, напиÑанных в кодировке unicode.

--flash

уÑтановить class0 в поле Ñхемы ÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…, что обычно интерпретируетÑÑ ÐºÐ°Ðº "немедленное отображение". Ðе вÑе принимающие аппараты дают право делать Ñто. Заметьте, что очередное sms такого типа обычно перезапиÑывает предыдущее Ñообщение без вопроÑов! Её иÑпользование не рекомендуетÑÑ.

--srr

уÑтановить бит StatusReportRequest в поле pdutype из sms pdu. Это завиÑит от SMSC, еÑли Ñто принимать во внимание. С некоторыми провайдерами Ñто потребует дополнительных затрат!

--sort

Ñортировать ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸ печати на выбранное уÑтройÑтво вывода. Возможными методами Ñортировки ÑвлÑÑŽÑ‚ÑÑ "type" (тип), "slot" (Ñлот) и "type,slot" (тип, Ñлот). "type" Ñортирует по типу короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ð²Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ‹Ð¼ порÑдком Ñортировки, при котором неподдерживаемые типы печатаютÑÑ Ð²Ð½Ð°Ñ‡Ð°Ð»Ðµ, затем SMS-SUBMIT, SMS-STATUS-REPORT и SMS-DELIVER. "slot" Ñортирует по Ñлоту короткого ÑообщениÑ. "type,slot" оÑущеÑтвлÑет Ñортировку вначале по "type" и затем внутри блока каждого типа по "slot". По умолчанию никакой Ñортировки не производитÑÑ (порÑдок завиÑит от телефона).

--pin

включить иÑпользование pin-кода. ИÑпользуйте Ñто лишь в Ñлучае Ð²Ð¾Ð·Ð½Ð¸ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¸, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ñ‚Ñ€ÐµÐ±ÑƒÐµÑ‚ ввода PIN-кода либо PUK-кода. Ð”Ð»Ñ PIN-кода ÑоответÑтвенно передаётÑÑ "<PIN-код>", Ð´Ð»Ñ PUK-кода - "<PUK-код>,<новый PIN-код>". Значение иÑпользуетÑÑ Ð¾Ð´Ð½Ð¾ÐºÑ€Ð°Ñ‚Ð½Ð¾. РаÑÑмотрите иÑпользование pin-файла (Ñм. ниже) вмеÑто Ñтой опции.

--system-charset

определить ÑиÑтемную таблицу Ñимволов вмеÑто иÑпользуемого значениÑ, возвращаемого функцией nl_langinfo(CODESET). Этот обходной манёвр необходим Ð´Ð»Ñ ÑиÑтем, которые не поддерживают юникодные локали, такие как UTF-8, или когда данные от другой ÑиÑтемы в отличной локали иÑпользуютÑÑ Ð½Ð° входе. Обычно Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ðµ применÑетÑÑ.

Примеры

Отправить файл раÑтрового Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð² телефон как Картинку (Логотип):

scmxx --send --binary --mem="bmp" --slot=0 myfile.bmp

Получить Картинку из телефона и Ñохранить ее в новом файле:

scmxx --get --binary --mem="bmp" --slot=0 --out=myfile.bmp

Получить вÑе непрочитанные (режим по умолчанию при get) короткие ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸ вывеÑти их на Ñтандартный вывод:

scmxx --get --sms --slot=unread --out=-

scmxx -gS -o-

Отправить короткое Ñообщение напрÑмую (без ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² телефоне):

scmxx --send --sms --direct --number=123 --text="теÑÑ‚"

Получить телефонную книгу и Ñохранить её в файле:

scmxx --get --pbook --mem=SM --out=SM.pb

Изменить указанный Ñлот (33) в памÑти SM телефонных книг:

scmxx -sP --mem=SM --slot=33 --number=123 --text="теÑÑ‚"

ЗамечаниÑ

Выводимый текÑÑ‚ (Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ð°Ñ ÐºÐ½Ð¸Ð³Ð° и ÑообщениÑ) завиÑит от таблицы Ñимволов текущей локали. Вводимый аналогично. Такое преимущеÑтво у локализации, но еÑть и недоÑтаток, что вÑе оÑтальные Ñимволы должны вводитьÑÑ Ñ‡ÐµÑ€ÐµÐ· поÑледовательноÑть вида \XXXX, где X - шеÑтнадцатиричный Ñимвол (например, \20ac Ð´Ð»Ñ Ð·Ð½Ð°ÐºÐ° Euro). Это 16битное предÑтавление Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ unicode. ПредÑтавление \XXXX иÑпользуетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° Ñ Ñ†ÐµÐ»ÑŒÑŽ его поÑледующего прочтениÑ. При нормальном выводе, Ñимволы, которые не могут быть отображены в текущей локали, заменÑÑŽÑ‚ÑÑ Ð½Ð° Ñимвол '?'. ИÑпользование локализации, базирующейÑÑ Ð½Ð° UTF-8, гарантирует, что вÑе Ñимволы могут быть перекодированы. Символ новой Ñтроки может быть введен, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð¾Ð±Ñ‰ÐµÐµ предÑтавление \n, а Ñимвол '\' должен быть Ñкранирован Ñам Ñобой. Ð’ bash в результате необходимо вводить Ñтроку подобно "\\\\".

Проблемы ÑоединениÑ

ЗдеÑÑŒ опиÑываютÑÑ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ðµ параметры --ignore-serial-bits (по умолчанию) и --keep-serial-bits. ИÑпользуйте его только тогда, когда вообще нет ответа от телефона. Такие уÑтановки завиÑÑÑ‚ от ÐºÐ°Ð±ÐµÐ»Ñ Ð¸ поÑледовательного порта и не могут быть определены автоматичеÑки.

ЕÑли при первой команде проиÑходÑÑ‚ таймауты, Ñледует попробовать параметр --start-delay=<Ñекунды>.

Другой параметр --device-timeout=<Ñекунды> предназначен Ð´Ð»Ñ ÑлучаÑ, когда телефону когда-либо потребуетÑÑ Ð±Ð¾Ð»ÑŒÑˆÐµ времени на ответ, чем определенные по умолчанию 10 Ñекунд. ДейÑтвительно, Ñто было более чем доÑтаточно, но кто знает. Минимальное значение равно 1, значениÑ, превышающие 25, подразумевают ожидание ответа до тех пор, пока он не будет получен.

БезопаÑноÑть

Опцию --pin необходимо иÑпользовать Ñ Ð¾ÑторожноÑтью. ÐžÐ¿Ñ†Ð¸Ñ Ð¸ ее аргумент будут видны в ÑпиÑке процеÑÑов.

Переменные окружениÑ

SCMXX_TTY

Ñмотрите опиÑание опции --device

SCMXX_BAUD

Ñмотрите опиÑание опции --baud

Файлы

~/.scmxx/cache.pb

Ñтот файл Ñлужит при выводе короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ (Ð´Ð»Ñ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ‹ адреÑов Ð¿Ð¾Ð»ÑƒÑ‡Ð°Ñ‚ÐµÐ»Ñ Ð¸ отправителÑ) и при отправке короткого ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ‹ номера в опции --number. Формат файла Ñовпадает Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¾Ð¼ файла Ð´Ð»Ñ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð½Ð¾Ð¹ книги (номера Ñлотов не имеют значениÑ, но должны приÑутÑтвовать).

~/.scmxx/config

Ñтот файл может Ñодержать набор длинных опций (без --), аргументы отделÑÑŽÑ‚ÑÑ Ð¾Ñ‚ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ð¾Ð¿Ñ†Ð¸Ð¸ Ñимволом '='. Любое количеÑтво пробельных Ñимволов допуÑкаетÑÑ Ð²Ð½Ð°Ñ‡Ð°Ð»Ðµ Ñтроки, перед и поÑле разделителÑ. Символ '#' вначале Ñтроки помечает её как комментарий. Примеры:


          #выбрать уÑтройÑтво доÑтупа
          device  =  /dev/ttyS0
          #вÑегда отправлÑть SMS Ñ иÑпользованием UCS-2
          unicode
  

~/.scmxx/pin

Данный файл иÑпользуетÑÑ ÐºÐ°Ðº алтернатива опции командной Ñтроки --pin. Файл ÐЕ должен быть доÑтупен группе или вÑем на чтение/запиÑÑŒ! Также он ДОЛЖЕРбыть обычным файлом, не ÑимволичеÑкой ÑÑылкой. SCMxx отвергает файлы в подобных ÑлучаÑÑ…. ЕÑли значение PUK-кода запрашиваетÑÑ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð¾Ð¼, ÑоответÑтвующий PIN-код должен быть также определён. Только такие Ñлементы Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ ÑвлÑÑŽÑ‚ÑÑ Ð½ÐµÐ¾Ð±Ñ…Ð¾Ð´Ð¸Ð¼Ñ‹Ð¼Ð¸: '{', '=', ';' и '}'. Пробелы и Ñимволы новой Ñтроки игнорируютÑÑ. Файл имеет Ñледующий формат:


          sim 262031234567890 {
            pin = 1234
            puk = 12345678;
            pin2 = 4321;
            puk2 = 87654321;
          }
          device 350123456789012 {
            type SIM {
              pin = 0000;
              puk = 0000;
            }
          }
  

Секции "sim" иÑпользуют IMSI в качеÑтве идентификатора, Ñекции же "device" уже иÑпользуют IMEI как идентификатор (Ñм. вывод опции --info). Следовательно IMSI необходим, так как без него ÐЕЛЬЗЯ включить телефон! ПодÑÐµÐºÑ†Ð¸Ñ "type" в Ñекции device определÑет Ñледующие идентификаторы:

SIM
код уÑтройÑтва (защита от кражи)
FSIM
ÑÐ°Ð¼Ð°Ñ Ð¿ÐµÑ€Ð²Ð°Ñ ÑƒÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ð°Ñ SIM-карта
NET
привÑзка к Ñети
NETSUB
Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка к Ñети
SP
привÑзка к оператору ÑвÑзи
CORP
привÑзка к корпорации

Ðвтор

Hendrik Sattler . Перевод выполнен Andy Shevchenko и Irina Yeresko .

scmxx-0.9.0/winsetup-mingw.iss.in0000644000175000017500000000502210367004715016640 0ustar hendrikhendrik; Script for Inno Setup (http://www.jrsoftware.org/) ; CygWin is expected to be installed unter C:\cygwin [Setup] AppName=SCMxx AppVerName=SCMxx CVS snapshot AppPublisher=Hendrik Sattler AppPublisherURL=http://www.hendrik-sattler.de AppSupportURL=http://www.hendrik-sattler.de/scmxx AppUpdatesURL=http://sourceforge.net/project/showfiles.php?group_id=88510&package_id=92540 AppReadmeFile={app}\ReadMe.txt DefaultDirName={pf}\SCMxx DefaultGroupName=SCMxx AllowNoIcons=yes LicenseFile=LICENSE OutputBaseFilename=scmxx-cvs-win32-setup Compression=lzma SolidCompression=yes [Types] Name: "full"; Description: "Full installation" Name: "custom"; Description: "Custom installation"; Flags: iscustom [Components] Name: "scmxx"; Description: "the main binary"; Types: full custom; Flags: fixed Name: "flexmem"; Description: "utils to decode files from the Flexible Memory"; Types: full custom; Flags: fixed Name: "libs"; Description: "libraries"; Types: full custom; Flags: fixed Name: "translation"; Description: "translation files"; Types: full custom Name: "help"; Description: "HTML help files"; Types: full custom [Files] Source: "scmxx.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "scmxx" Source: "smi.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem" Source: "adr2vcf.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem" Source: "apoconv.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem" Source: "LICENSE"; DestDir: "{app}"; DestName: "License.txt"; Flags: ignoreversion; Components: "scmxx" Source: "docs\README_WIN32.txt"; DestDir: "{app}"; DestName: "ReadMe.txt"; Flags: ignoreversion isreadme; Components: "scmxx" Source: "libiconv-2.dll"; DestDir: "{app}"; Components: "libs" Source: "libintl-3.dll"; DestDir: "{app}"; Components: "libs" Source: "docs\*.html"; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "help" Source: "po\de.mo"; DestDir: "{app}\locale\de\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\fr.mo"; DestDir: "{app}\locale\fr\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\it.mo"; DestDir: "{app}\locale\it\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\ru.mo"; DestDir: "{app}\locale\ru\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" scmxx-0.9.0/Makefile.dist0000644000175000017500000000555410377447315015142 0ustar hendrikhendrikPROJECT=scmxx VERSION=$(shell ./configure --version | grep ^$(PROJECT) | cut -f 3 -d " ") OLDDIR=$(shell basename `readlink -f .`) NEWDIR=$(PROJECT)-$(VERSION) .PHONY: all all: tar_gz tar_bz2 rpm exe .PHONY: prepare prepare: Makefile.cvs @if [ $(OLDDIR) != $(NEWDIR) ]; then \ if [ ! -d ../$(NEWDIR) ]; then \ echo "Renaming: $(OLDDIR) => $(NEWDIR)"; \ mv ../$(OLDDIR) ../$(NEWDIR); \ else \ echo "ERROR: ../$(NEWDIR) already exists"; \ false; \ fi \ fi @$(MAKE) -f Makefile.cvs Makefile @$(MAKE) -C docs/ all @$(MAKE) -f Makefile.cvs clean # # Pure source archives # .PHONY: tar_gz tar_gz: ../$(NEWDIR).tar.gz ../$(NEWDIR).tar.gz: prepare @echo "Building ../$(NEWDIR).tar.gz..." @tar --directory .. --create --gzip --file $@ $(NEWDIR) .PHONY: tar_bz2 tar_bz2: ../$(NEWDIR).tar.bz2 ../$(NEWDIR).tar.bz2: prepare @echo "Building ../$(NEWDIR).tar.bz2..." @tar --directory .. --create --bzip2 --file $@ $(NEWDIR) # # RPM package creation # It can handle old (<4.1) and new (>=4.1) versions of rpm. # ARCH=$(shell uname -m) RPM=$(shell which rpmbuild || which rpm) RPM_ROOT=$(shell echo $(shell $(RPM) --showrc | grep -E "_topdir[[:space:]]+") | cut -f 3 -d " ") .PHONY: rpm rpm: ../$(NEWDIR).tar.bz2 # using RPM as user really SUCKS :-( # The RPM programmers never learned about good command line options, obviously. @test $(RPM) || echo "You need rpmbuild or rpm to build the .rpm files." # actually build the package files $(RPM) -ta --clean --target $(ARCH) $< @if [ "$(RPM_ROOT)" ]; then \ mv $(RPM_ROOT)/RPMS/$(ARCH)/$(NEWDIR)-*.$(ARCH).rpm ..; \ mv $(RPM_ROOT)/SRPMS/$(NEWDIR)-*.src.rpm ..; \ else \ echo "You have to manually move the packages from your rpm build root."; \ fi # # Debian package creation. # You need a debian/ subdir, e.g. the one from Debian. # .PHONY: deb deb: debian/rules -dpkg-buildpackage -rfakeroot -b -uc -us # # Windows installer creation using Inno Setup # Define $INNODIR if the Inno Setup installation dir is not in your path. # This variable MUST have a trailing (back)slash. # SYSTEM_TYPE=$(shell ./config.guess | cut -f 3 -d "-") ISSFILE=winsetup-$(SYSTEM_TYPE).iss CONFIGURE=./configure ifeq '$(SYSTEM_TYPE)' 'cygwin' #compiling with CygWin EXELIBS=cygwin1.dll cygiconv-2.dll cygintl-3.dll else #compiling with MingW32 or cross-compiling ISSFILE=winsetup-mingw.iss EXELIBS=libiconv-2.dll libintl-3.dll ifeq '$(SYSTEM_TYPE)' 'linux' #this is for Debians mingw32 package GCC_EXEC_PREFIX=i586-mingw32msvc- CONFIGURE=cross-configure endif endif %.dll: test "$(shell which $@)" && cp $(shell which $@) . $(PROJECT).exe: $(MAKE) -f Makefile.cvs $(CONFIGURE) $(MAKE) clean $(MAKE) UNIX2DOS=unix2dos ISCC=$(INNODIR)iscc .PHONY: exe exe: $(ISSFILE) $(PROJECT).exe $(EXELIBS) $(UNIX2DOS) docs/README_WIN32.txt #Does stripping work with cygwin libs? $(GCC_EXEC_PREFIX)strip *.exe $(EXELIBS) $(ISCC) /O.. $(ISSFILE) scmxx-0.9.0/Makefile.in0000644000175000017500000000106210256767015014571 0ustar hendrikhendrikSHELL=@SHELL@ .PHONY: %-all %-all: @$(MAKE) -C $* all .PHONY:all all: src-all po-all docs-all .PHONY: %-install %-install: @$(MAKE) -C $* install .PHONY:install install: src-install po-install docs-install .PHONY: %-uninstall %-uninstall: @$(MAKE) -C $* uninstall .PHONY:uninstall uninstall: src-uninstall po-uninstall docs-uninstall .PHONY: %-clean %-clean: @$(MAKE) -C $* clean .PHONY:clean clean: src-clean po-clean .PHONY: %-distclean %-distclean: @$(MAKE) -C $* distclean .PHONY:distclean distclean: src-distclean po-distclean docs-distclean scmxx-0.9.0/LICENSE0000644000175000017500000004313110222001333013505 0ustar hendrikhendrik GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. scmxx-0.9.0/AUTHORS0000644000175000017500000000114310201161676013563 0ustar hendrikhendrikC code, docs and examples: Hendrik Sattler (me) Good ideas and russian (partial) translation: Andy Shevchenko A better Makefile contributed by Manfred Fandel and patched by Klaus Klein and again for autoconf by Michael Banck autoconf/autoheader files and debian files: Michael Banck and me OS/2 port provided by Alex Samorukov Thanks to all people that submitted good ideas,bug reports or even patches and did a lot of testing. scmxx-0.9.0/configure.in0000644000175000017500000001270410401277032015025 0ustar hendrikhendrikAC_INIT([scmxx],[0.9.0],[Hendrik Sattler ]) AC_REVISION($Revision: 529 $) AC_PREREQ(2.59) AC_CONFIG_HEADER([src/config.h src/timeincl.h src/intincl.h src/gtincl.h]) AC_CANONICAL_HOST CFLAGS="${CFLAGS} -D_GNU_SOURCE -D_REENTRANT -W -Wall -Wno-format-y2k" CPPFLAGS="${CPPFLAGS} ${CFLAGS}" AC_PROG_CC AC_PROG_CPP AC_CHECK_TOOL(LD,ld,:) AC_PROG_INSTALL AC_HEADER_STDC AC_HEADER_TIME AC_CHECK_HEADERS(arpa/inet.h) AC_C_BIGENDIAN() AH_TEMPLATE( [NO_CFMAKERAW], [define this to include own cfmakeraw()] ) AC_CHECK_FUNC( cfmakeraw, [], [AC_DEFINE(NO_CFMAKERAW)] ) AC_CHECK_HEADERS(math.h) AC_CHECK_LIB(m,log10) AC_CHECK_FUNCS(log10 labs) AC_CHECK_HEADERS(langinfo.h) AH_TEMPLATE( [NO_NL_LANGINFO], [define this to include nl_langinfo() replacement] ) AC_CHECK_FUNC( nl_langinfo, [], [AC_DEFINE(NO_NL_LANGINFO) AC_MSG_NOTICE(Input/output is limited to ASCII.) ] ) MY_SEARCH_PARSELIB AC_CHECK_HEADERS( iconv.h, [AC_CHECK_LIB( [iconv], [libiconv], [], [AC_CHECK_FUNC( iconv, [], [AC_MSG_ERROR(You need to get libiconv or a newer GNU libc.)] )] ) MY_DECL_ICONV_CONST ], [AC_MSG_ERROR(You need to get libiconv or a newer GNU libc.)] ) AC_CHECK_HEADERS( libintl.h, [AC_SEARCH_LIBS(gettext, intl, [AC_PATH_PROG(MSGFMT,msgfmt) AC_PATH_PROG(MSGINIT,msginit) AC_PATH_PROG(MSGMERGE,msgmerge) AC_PATH_PROG(XGETTEXT,xgettext) ], [AC_MSG_NOTICE(No translation will be available during runtime.)] ) ], [AC_MSG_NOTICE(No translation will be available during runtime.)] ) AC_PATH_PROG(DB2X_XSLTPROC,db2x_xsltproc) AC_PATH_PROG(DB2X_MANXML,db2x_manxml) AC_PATH_PROG(XSLTPROC,xsltproc) AH_TEMPLATE( [GETTEXT_DIRNAME], [This defines the dirname for bindtextdomain] ) if [[ "${prefix}" = "NONE" ]]; then \ prefix=${ac_default_prefix}; \ fi GETTEXT_DIRNAME="$(eval echo $datadir/locale)" AC_DEFINE_UNQUOTED(GETTEXT_DIRNAME,"$GETTEXT_DIRNAME") AH_TEMPLATE( [TTYPORT], [This defines the default device to open parameter --device which overwrites this setting] ) AC_ARG_WITH( [device], AS_HELP_STRING(--with-device=DEV,Use DEV as default else value depends on system), [device=$withval], [case $host in *-*-linux*) device="/dev/ttyS0" BLUETOOTH_LIBS="" AH_TEMPLATE([HAVE_LIBBLUETOOTH],[define this if you want to use and link to libbluetooth]) LIBSOLD=$LIBS AC_CHECK_HEADERS(bluetooth/bluetooth.h, [AC_CHECK_LIB(bluetooth, str2ba, BLUETOOTH_LIBS="-lbluetooth $BLUETOOTH_LIBS" AC_DEFINE(HAVE_LIBBLUETOOTH) ) ], AC_MSG_NOTICE(Bluetooth header files not found) ) LIBS=$LIBSOLD ;; *-*-cygwin*) device="/dev/com1" ;; *-*-mingw32*) device="COM1" CFLAGS="${CFLAGS} -DWINDOWS_API" LIBS="${LIBS} -lshlwapi -lws2_32" AC_CHECK_HEADERS(windows.h shlobj.h shlwapi.h winsock2.h, [], [AC_MSG_ERROR(You need to get the w32api mingw package.)] ) AC_CHECK_HEADERS(ws2bth.h,[],[],[ #include ] ) ;; *-*-os2*) dnl For further OS/2 support, see INSTALL.OS2 device="COM1" CFLAGS="${CFLAGS} -DOS2_API" ;; *-*-sunos* | *-*-solaris*) dnl The values below may not be fully correct. dnl I only know Solaris8/Sparc, maybe Solaris for x86 is different. device="/dev/ttya" ;; *-*-freebsd*) dnl FreeBSD value is for x86. device="/dev/tty00" LIBSOLD=$LIBS AC_CHECK_HEADERS(sys/bitstring.h netgraph/bluetooth/include/ng_btsocket.h bluetooth.h, [AC_CHECK_LIB(bluetooth, bt_aton, BLUETOOTH_LIBS="-lbluetooth $BLUETOOTH_LIBS" AC_DEFINE(HAVE_LIBBLUETOOTH) ) ] ) LIBS=$LIBSOLD ;; *-*-netbsd*) dnl NetBSD is guessed. device="/dev/tty00" ;; *-*-openbsd*) dnl Values that people told me. If you know better, tell me. dnl OpenBSD value refers to OpenBSD/Sparc. device="/dev/ttya" ;; *) dnl The default value defaults to the first non-numbered tty device AC_MSG_WARN(System $host not known.) device=`ls -1 /dev/tty[^0-9]* | head -n 1` AC_MSG_WARN(Guessing: ${device}) ;; esac ] ) AC_MSG_NOTICE(Using $device as default device.) AC_DEFINE_UNQUOTED(TTYPORT,"$device") AH_TEMPLATE( [TTYSPEED], [This defines the default serial baudrate, valid values may depend on system] ) AC_ARG_WITH( [baudrate], AS_HELP_STRING(--with-baudrate=SPEED,Set baud rate to SPEED @<:@19200@:>@), [baudrate=$withval], [baudrate=19200] ) AC_MSG_NOTICE(Using $baudrate as default baudrate.) AC_DEFINE_UNQUOTED(TTYSPEED,"$baudrate") AC_SUBST(LD) AC_SUBST(GETTEXT_DIRNAME) AC_SUBST(PACKAGE_NAME) AC_SUBST(PARSELIB) AC_SUBST(LIBS) AC_SUBST(BLUETOOTH_LIBS) AC_SUBST(OBJEXT) AC_SUBST(EXEEXT) AC_CONFIG_FILES(Makefile src/Makefile src/Makefile.sub docs/Makefile po/Makefile) AC_OUTPUT scmxx-0.9.0/acsite.m40000644000175000017500000000311510342343015014221 0ustar hendrikhendrikAC_DEFUN( MY_DECL_ICONV_CONST, [ AH_TEMPLATE( [ICONV_CAST], [Define as const if the declaration of iconv() needs const] ) AC_MSG_CHECKING([if parameter 2 of iconv() is declared const]) AC_LANG(C) AC_COMPILE_IFELSE( AC_LANG_PROGRAM( [ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char** inbuf, size_t* inbytesleft, char** outbuf, size_t* outbytesleft); #else size_t iconv(); #endif ], [] ), [AC_MSG_RESULT(no) AC_DEFINE_UNQUOTED(ICONV_CAST,char**)], [AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(ICONV_CAST,const char**)] ) ] ) AC_DEFUN( MY_LIB_POPT, [ AC_SEARCH_LIBS( poptGetContext, popt, [AC_DEFINE_UNQUOTED(PARSELIB,2)], [AC_MSG_ERROR(You need getopt_long or libpopt.)] ) ] ) AC_DEFUN( MY_HEADER_POPT, [ AC_CHECK_HEADERS( popt.h, [MY_LIB_POPT], [AC_MSG_ERROR(You need getopt_long or libpopt.)] ) ] ) AC_DEFUN( MY_LIB_GETOPT, [ AC_SEARCH_LIBS( getopt_long, getopt, [AC_DEFINE_UNQUOTED(PARSELIB,1)], [MY_HEADER_POPT] ) ] ) AC_DEFUN( MY_HEADER_GNUGETOPT_GETOPT, [ AC_CHECK_HEADERS( [gnugetopt/getopt.h], [MY_LIB_GETOPT], [MY_HEADER_POPT] ) ] ) AC_DEFUN( MY_HEADER_GETOPT, [ AC_CHECK_HEADERS( getopt.h, [MY_LIB_GETOPT], [MY_HEADER_GNUGETOPT_GETOPT] ) ] ) AC_DEFUN( MY_SEARCH_PARSELIB, [ AH_TEMPLATE( [PARSELIB], [Define as 1 to use getopt or as 2 to use libpopt] ) MY_HEADER_GETOPT ] ) scmxx-0.9.0/CHANGELOG0000644000175000017500000006062110377447354013751 0ustar hendrikhendrikChangelog for SCMxx: 0.9.0 adr2vcf: added (previously in flexmem), supports *45 and *55 apoconv: added, supports at least S55, M65, S65, CX75 and SL75 smi: added (previously smi2txt and smi2csv in flexmem) scmxx: add bluez bluetooth support scmxx: add windows bluetooth support (untested) advanced status bar 0.8.2 complete rework of help output (adapt to width of terminal) new progress bar implementation (used by phonebook code) several bugs fixed: * sms memory selection segfault * phonebook deletion range bug * time display issue device blacklisting support, SF65 added to that list 0.8.1 fixes some compilation and installation issues with *BSD (thanks to Mohacsi Janos) fixes binary memory info output automatically chooses the proper charset when sending short messages make some more long options available as short options mention all options in the help output and sort it alphabetically mingw compile environment support (Windows) Addition to 0.8.0 changelog: reset now switches phone from transparent to RCCP mode (fixes debian bug #224965) included german PO file update from debian BTS (fixes debian bug #313918) 0.8.0 SMS code now support multipart message encoding on sending use Docbook XML for man pages (with HTML output) pin file (~/.scmxx/pin) support new option: --lock new option: --enable new option: --disable new option: --hangup --dial now waits until the phone connected to the remote side fixes for all gcc4 warnings fixes for starting connection with reset now being inline if requested fixes for file upload (not obex!) to S55 (now marked as supported) add binary slot number filter (fixes debian bug #145570) for *45 and S55 0.7.5 fix: transparent pin processing was broken fix: direct sms receive mode was broken extended direct sms receive mode to also get status report messages support for finding empty phonebook slot add support for OS/2 (thanks to Alex Samorukov) new special string "last" for phonebooks enabled direct receiving of short message status reports new option --system-charset italian translation for rpm spec file, manpage and gettext messages (thanks to Andrea Benazzo) 0.7.4 support for configuration file (.scmxx/config in home directory) support for gettext if found by configure adds Makefiles and po subdir to easily add new translations (see file po/README) add lock listing to --info new option --lock-info to show status of locks and as switch for --info new option --toggle-lock to toggle status of a lock new option --dial to dial a number using remote keypad access german translation for rpm specfile, manpage and gettext strings russian translation: updated manpage and partially gettext 0.7.3 support for decoding status reports (with matching to outgoing message if stored) support for name-number cache for getting and sending of short messages (.scmxx/cache.pb in home directory) new option --sort to sort short messages on getting german translation of manpage 0.7.2 add decoding of multi-part (concatenated) short messages new at command function layer moves some files into subdirs (for code-sharing with flexmem-utils) move some messages to a higher verbose level phonebook code mostly rewritten make --pbook aware of --slot on delete make --pbook aware of --slot, --number and --text on send add vcf to available (read-only) phonebooks if supported by the phone 0.7.1 work-around for *BSD on SMS time decoding fixes some sms decoding bugs fixes crash on sending sms directly from a slot 0.7.0 !!!!! Syntax changed !!!!! many internal changes: - no need for system's wchar_t support anymore (wchar_t was previously used but that was wrong) - iconvtest() is gone - completely rewritten command line parsing, now supporting getopt_long _and_ popt (configure decides which one to use) - configure checks for getopt and popt - configure check for declaration of iconv russian manpage included, again properly support Solaris (see popt above, compiler warning fixes) make iconv code work with non-GNU implementations (e.g. Solaris) updated README and INSTALL new parameter --binary (-N) new parameter --mem new parameter --slot -B, -M, -C and -F (and the long options for them) are now obsolete, use -N instead with --mem instead parameter to -P is now obsolete, use --mem instead parameter to -S is now obsolete, use --slot instead "SM" is now default phonebook memory (if none was specified) SMS outputs none-printable characters as '?' instead of hexcode the memory list output was changed in --info (may break programs that depend on it) add parameter --mem-info as trigger to --info to display more information about available memories make --mem recognize "?" to show same information as in --mem-info but only for the specified memory type (faster) rewritten phonebook file read-in with more syntax checking before actually sending the first entry update english manpage new parameter --start-delay (see manpage) simply do not change sms status on getting instead of complaining rewrote SMS decoding functions 0.6.4.1 fix crash on getting phonebook entries with empty text field added SMS timezone conversion work-around for buggy strptime() in cygwin (for SMS dates) added test to better usage of iconv (less dependent on nl_langinfo()) deal with a S55 strangeness (still does NOT meant that S55 is fully supported), thanks to Ole Langbehn --ignore-serial-bits is now default added parameter --keep-serial-bits (to get previous behaviour) updated manpage 0.6.4 added UCS-2 phonebook transfer mode by deafult with GSM fallback (thanks to Alexander Kochetkov) correctly gets range for phonebook CS and RD again and request only 5 entries at once to prevent timeouts with slow phones/SIM-cards (thanks to Alexander Kochetkov) fixes some small bugs 0.6.3.8 "RING" catched fixed sms type identification enable unicode sms sending (patch by Andy Shevchenko) update man page change flash sms coding to work with unicode setting in parallel fix content length output for unicode sms added russian man page translation (sent in by Andy Shevchenko) small change in unicode.c to stop gcc3.3 complain trying to avoid some error messages about syntax 0.6.3.7 fixed the GPRS info segfault issue some command errors are not really a reason to about - fixed that fixed gcc-3.2 warnings fixed Makefiles to actually use chosen compiler rewrote/reordered main() 0.6.3.6 rewrote parts of src/Makefile (warning: only the use of GNU make is supported although others may also work, see short comment in src/Makefile) changed (src/)Makefile target "dist-clean" to "distclean" removed src/Makefile maintainer-clean target added wchar.h/stddef.h configure check and depincludes rules added file dep_wcslen.c with depincludes rule (see top of file) added wcslen check (also in libwcs) call automake in ./maintainer-prep to create install-sh check getop.h or getopt/getopt.h presence moving header includes from common.h to the .c files do not make use of mktime as this is often broken remove configure mktime check added another flavour of M50 to supported phones open port with O_NONBLOCK and disable O_NONBLOCK when device is open add option --ignore-serial-bits to make some phones/cables work add option --device-timeout= print exact type of unsupported sms pdus to stderr reindented all code 0.6.3.5 fix segfault run phone_init (thus fixing direct sms receive) 0.6.3.4 removing a lot of bugs about uninitialized variables that turned into segmentation faults (thanks to Ronald Wahl for showing up my programming errors) fixed some other small bugs that made show up wrong data (network status, network gprs status) remove caching code for vendor and model as it crashes e.g. with CygWin (maybe their compiler again?) 0.6.3.3 replacing cfmakeraw by redefining the function (instead of a code block replacement) and adjust configure.in do not open device non-blocking set termios read counter to 10 seconds and character counter to 0 make repeating of last at command generic rewritten tty_read method with split-off tty_readline method interpret the bit error rate value on info output replace "ATZ" init string with "\rATZ" apply the fix from 0.6.3.2 correctly create scmxx.spec from scmxx.spec.in by maintainer-prep script 0.6.3.2 add S46 to supported phones include fix from http://bugs.debian.org/171217 exchange 'make' with '$(MAKE)' in toplevel Makefile 0.6.3.1 fix one character in scmxx.c to get output again fixed Makefile.in to install the man page 0.6.3 first usage of wchar_t and iconv which makes several input/output charsets possible and even compatible enabling generic charsets for phonebook upload and download enabling generic charsets for sms sending and decoding enabling special sequences \XXXX for generic characters and \n for and \\ for '\' added local date format output for SMS and info fix sms resend bug fix a lot of sms decoding bugs and clean up the SMS header code added UCS2 decoding of SMS added status report request option --srr changes --file (-f) to --out (-o) 0.6.2 fix configure.in to check for Win32 specialties fix Makefile.in to make use of Win32 specialties add SL45i (SLIK) to known phones decreased maximum PDU size for file upload to 175 to fix SL4x v23 VCF upload rearrange info() output 0.6.1.6 fixed a bug in the info() method that strangely only showed up in cygwin added flose to close the opened file handle added method that shows network status, area code and cell id 0.6.1.5 add capability to specify "all" as slot for sending to force overwriting starting from minimum slot change in message on which slot is used --info now stores the information in the file specified with --file; if non was specified it prints them to stdout do not hardcode the standard file descriptors 0.6.1.4 (was only available as patch) add configure entry that looks for cfmakeraw() (not in cygwin) make cfmakeraw() work-around available if cfmakeraw() is not present fix slots min/max that may differ between readable and writable make arguement to --vcard really optional (in 0.6.1.3-3: fixed spec file for file and dir permissions) 0.6.1.3 exported the sms functions and structures to their own header file write is now non-blocking compliant fix for a lost '@' in some sms 0.6.1.2 fixes small typo in code that prevented direct sms sending the port is now opened non-blocking small fix in read_mytty method 0.6.1.1 fixes command line interpreting for sending sms with text from file sending sms per status to the number specified at the command line (was ignored in 0.6.1) 0.6.1 code cleanup in sms methods moved SMS settings bit so it is not the default file type by accident some error messages if no action was taken or no file type was specified added info about possible different SMS storage places (this is more than only "SM" since S45/ME45 V21) added parameter --smsmem to select the sms storage memory automatically select SMS storage "MT" (="ME"+"SM") if available and none was selected, otherwhise default to "SM" if none was selected check for maximum pdu size for file getting to detect data that got scrambled by the phone (mainly midi files on S45/ME45 V21) fixed: error message when sms memory is full gprs info methods added by Jarek Kruza (poczta@jarek.kruza.pl) get and remove can be used at the same time (SMS only) remove can now handle the sms status types (so e.g. deleting all messages of type "unsent" works) verbose description of sms status when getting (instead of the status number) send can now handle the sms status types (so e.g. sending all messages of type "unsent" works) added updated man page updated rpm spec file moved docs/README -> docs/doc_sources.txt removed contrib/vcsconvert 0.6.0 (2002-04-05) THIS IS NOT THE C++ VERSION AS PERVIOUSLY STATED AS GOAL ON THE WEBSITE! !!!!! Syntax changed !!!!! all timezone values in the time fields can now be decoded correctly added debian_with_scmxx.bmp to examples dir various other code cleanups: rewrite of checkslots and info methods and some others removed com2_mytty method giving transfer methods the proper parameters to not use global variables anymore removing most of the global variables unified some global variables to bitvalues of a local variable or structs better usage of C pointers and some dynamic memory allocation new (requested) parameter --version that prints the version number multiple file upload support (adding only) multiple file deletion support --pipe support for getting sms (indirect, too) and files --pipe and --file are now independent of each other printing to stdout must now be requested with "-f -" removed the need for TTYPORTMAXLENGTH, malloc is now used. multiple file download support (with filename expanding) 0.5.16.2 (2002-03-29) moved "File transfer..." message to be displayed after reading the file fixed bug in file read-in for file transfer (3rd package and above) print message when input comes from a tty (and how to finish it) on reading for file transfer, only read second block if first is full (needed, so you do not have to close input from a tty twice) 0.5.16.1 (2002-03-28) changed some variable name to be C89 compliant (see stdin(3)) thanks to Klaus Klein for pointing at this direct messages to stderr instead of stdout so only data goes to stdout thanks to Klaus Klein for pointing at this print a slot number message line when receiving bmp,mid,vcs,vcf (especially with "all") 0.5.16 (2002-03-27) new parameter --reset which resets the phone if it does not respond after a user-aborted file transfer lots of code cleanups changed the read_mytty method to be more cleaner and work with raw mode added read_mytty_limited to read to a boundry instead of a lines end change sending code (sms and files) to makes use of raw mode, so data is really only sent, when no error occurs added is_number method to be more specific than atoi added "all" to file deleting and getting added pipe ability to file getting method do not try to decode unsupported PDU types rearranged this file (now with release dates from this version on) added C45 to the list of supported phones 0.5.15 a full phone buffer when sending files can now be deleted (thanks to Marjan Erzen) free slot detection changed to work for bmp,mid,vcf,vcs (getting only) new paramter --flash for sending flash sms instead of normal ones (works only if supported by the reveiving mobile entity) 0.5.14 fix crash when build with optimizations fix include of present CFLAGS env decode some known sms user data header fields and display this information show 8bit and 16bit sms messages as hexstring (instead of nothing) addon: changed hexstr2int to not used atoi anymore (can give segfaults at runtime) 0.5.13 fix phonebook text field length check for the new casted characters we now use autoconf and autoheader to create the build files config.h and Makefile (thanks to Michael Banck ) specfile updated (thanks to Kri¨tof Petr ) 0.5.12 new parameter pair --greek and --nogreek (dependent on compile settings) see docs greekchars.txt for details clean-up of the functions in gsmcodes.c 0.5.11 complete GSM charset compliance (more input characters than the S35i provides!) change sms input definition: greek character must be masked with a prepended '\' which enables all greek characters instead of only the non-coliding ones renamed device.h to config.h change config.h to defines and declare variables in common.h and init them in scmxx.c:main by calling the set methods added docs/specialchars.txt and docs/greekchars.txt 0.5.10 fix sms '@' bug in sending (thanks to Nuno Miguel Fernandes Sucena Almeida ) 0.5.9 changed from strcmp to strcasecmp for "cme error: invalid index" check in pbook code Merged the variable baudrate patches from Klaus Klein and Klaus Singvogel to make it work better with the ME45 Merged Makefile patch from Klaus Klein to make it compile better on NetBSD Simplyfied serial setup a bit (use already present system functions) Changes Package description (.deb and .rpm) and added SL45 and S45 to supported phones in scmxx.c Moved --pipe in --help output 0.5.8 added "" around date in at command (bug report) 7Bit-GSM message with user data header (like multipart text messages) can now be decoded correctly (the UDH gets not decoded) 0.5.7 changed the serial parameters (I hope they work now). 0.5.6 fix the previously added VCF support 0.5.5 add VCF support for phones newer that the 35-series 0.5.4 fix OA if length of OA is wrongly created by SMSC (cut trailing F) moving some routines to smspdu.c code cleanup done by using -Wall use TCIOFLUSH instead of TCIFLUSH and do that before every ATZ retry removed fstat for files: This should now work for all kernel versions but uses a somewhat odd method. I hope this does not break it for anyone. 0.5.3 fixed SMSC number display cut (last digit) fixed DCS decoding (11xxxxxx) decoding of characters from the GSM extension table typo in open_myFile_rw [stdin/stdout] when phone not answers to ATZ resend the command up to 2 times do not close stdout/file when receiving SMS directly (don't throw this file descriptor away) check the size of the created user data to catch the case that some characters need 14bits (or more) instead of 7bits (GSM extension tables) remove fstat for in SMS method because it does not work for kernel 2.4 replaced by another method which does not work for files, though => files and stdin are not possible with kernel 2.4, only kernel 2.2 new feature --pipe: on direct receiving the SMS can _additionally_ be processed by a program that gets the SMS on stdin 0.5.2 8bit SMS are not displayed any more: it is only binary junk anyway this remains until SMS support is complete SMS can now be received directly by setting "-gS --direct" SMS output shows more decoding details GMT offset display is omitted when value unknown changed output when sending files (not so hard on the eye with large files) fixed display bug with reading of uneven length of SMSC number fully decode DCS field (displayed) changed 7bit detection in DCS field (more messages can be decoded!) find all 8bit and unicode messages (not decoded, yet) extract and show user data header decode when origin is alphanumeric (Thnx Fabio Coatti for the hint) fixing international number to do it right now GMT offset display looks at MSB to differ - and + 0.5.1 fixed bug with null-byte in message left out => junk fixed bug when trying to send 158-160 characters SMS number check and error catching on sending show SMS-slot on output to make deleting easier incomplete phonebook files can now be sent only fixed the entry displayed and the error message fixed segfaults on syntactically wrong phonebook file lines make add_at_command handle all cases and change all occurences made many string sizes one char larger and changed code to adopt new length remove/replace some unnessary variables delete code that does not get used anymore add environment variable SCMXX_TTY to set device in yet another way to show which one is used, the device is now printed 0.5 added parameter --pin and made pin handling transparent to functions => FD is now writable added signal quality info to info output the SMSC can now be set with --set-smsc -n fixed bug in sending piped files (unsigned char instead of char) fixed bug in sending piped sms (memset missing) fixed pbook routines for those bugs (just in case) 0.4.6 fixed vcs auto detection which broke in 0.4.5 the hexstring of 8bit messages is now converted to bytes fixed segmentation fault when no sms number was given SMS text can now be specified in a file or stdin 0.4.5 again, bug fixes in character conversion: ß is fixd, \n can now be used as newline in SMS text on command line, Euro symbol phone error compensation (an e as next char needed) but not for vCals changed behaviour of -v and -q to be more flexible autodetection of available slots instead of hardcoding => allowing all Siemens phones by default but display a warning 0.4.4 a new Makefile from Manfred Fandel a note from Andreas Wegmann: the phone does not use RTS/CTS handshake and it does not work with self-build cables when set -> I disabled it but I could not test it. If it makes trouble, just comment out the line in common.c the argument to the "--vcal" parameter is now obsolete on sending. if it is omitted, auto detection finds the next free slot the letter size of phonebooks does not matter anymore 0.4.3 SMS of type SMS-SUBMIT can now be read from the phone the output was adjusted the message part of an 8bit message does not get converted. the argument of parameter for bitmap and midi is now optional like for SMS, they have the default of 0 thanks to Manfred Fandel for tips for making version number handling much easier :-) 0.4.2 stdin now possible with bitmap, midi and vcs 0.4.1 fixed bug which made overwriting existing file (by accident???) possible added PDU decoding routine fixed iso2gsm to only allow GSM chartacters very strictly stdin/stdout are now usable instead of a file added hexstr2int routine and changed other routines to use it added stdout/stdin support add SMS getting routine (slot or status) this only includes status read and unread because they are always of type SMS-DELIVER. sent, unsent and all will follow added SMS deleting routine (slot only) removed parameter --sms-slot which should be and is now an option of --sms (also take a look at the file BUGS!!!) 0.4 tweaked phonebook support to access all Siemens specific phonebooks, too the last dialed memory can now also be deleted storing and sending of SMS is now possible (actually functioning totally equal) :-)) options: only text and number (the rest are reasonable defaults) SMS length of 160 chars is supported (7bit encoding) non-GSM chars are ignored sending of stored SMS supported (SMS slot must be known) fixed serial support for upload of Bitmap, Midi and vCalendar C35i and M35i are now recognized (Bitmap size might be different from S35i) 0.3.1 phonebook file format was changed a bit (includes empty entries now) sending and deleting of phonebooks possible now (not single entries, only whole phonebook) be aware that it will delete without further asking!!! added iso2gsm routine three greek characters cannot be converted on sending (this will fit the need for unicode) add GSM character set for reference fixed gsm2iso routine to handle ALL characters now (correctly) 0.3 added reading all possible phonebooks (sanity checks does the phone) and saving them to a file Note: File format is incompatible with ln-s25 (but can easily made compatible by hand). I saw no reason for the 3rd field. changed info output to show possible phonebooks and file slots changed read routine to handle @ conversion problem added gsm2iso routine for character conversion (should handle all characters) (does anyone has a complete GSM char table?) 0.2.2 change file access routines for sending files (same as getting now) added "--info" paramater and routine added "--set-time" parameter and routine change help text a little bit serial cable connections do not work properly, yet. added Makefile (not optimal though) 0.2.1 receive bitmap, midi and vcs 0.2 first public release detect type of mobile phone delete bitmap, midi and vcs send bitmap, midi and vcs scmxx-0.9.0/contrib/0002755000175000017500000000000010401301601014140 5ustar hendrikhendrikscmxx-0.9.0/contrib/sms2mail0000755000175000017500000000040207723512025015630 0ustar hendrikhendrik#!/bin/bash SCMXX=/usr/bin/scmxx MAILPROG=/usr/bin/mail MAILPARAMS="-s 'SMS mail' $1" LOGFILE=~/.scmxx-errors if [ $# -eq 0 ]; then echo "Syntax: $0 <>"; exit 1; fi exec $SCMXX -gS --direct --pipe "$MAILPROG $MAILPARAMS" 2>$LOGFILE & scmxx-0.9.0/contrib/smssend0000755000175000017500000000024407723512025015561 0ustar hendrikhendrik#!/bin/bash if [ "$#" -lt "2" ]; then echo "Syntax: $0 <> \"<>\"";exit 1; fi number=$1 shift scmxx --send --sms --direct --number $number --text "$@" scmxx-0.9.0/BUGS0000644000175000017500000000056310265423434013206 0ustar hendrikhendrik### please report bugs to post@hendrik-sattler.de ### - on S45 and ME45 (seen with firmware 21) you can get midi files from empty slots - uploaded vCalendars might not have the status 'activated' - downloaded vCards might be incomplete. This is a firmware bug (seen with S/ME45) - S55 rejects vCards with unknown fields (work-around: reduce to minimum supported) scmxx-0.9.0/config.guess0000755000175000017500000012475310312620200015032 0ustar hendrikhendrik#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-08-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: scmxx-0.9.0/config.sub0000755000175000017500000007577710312620200014510 0ustar hendrikhendrik#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ms1 \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | ms1-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: scmxx-0.9.0/README0000644000175000017500000000366010221476323013401 0ustar hendrikhendrikSome more information concerning SCMxx and Siemens mobile phones: For further information, see the SCMxx website at: http://www.hendrik-sattler.de/scmxx You can change the default port with the configure program or at runtime. As an alternative, you can set the environment variable SCMXX_TTY to choose the device. It will override the compiled in. The command line parameter --device overrides both! You can also change the speed of the port. This is either done with configure, the SCMXX_BAUD environment variable or the --baud parameter. versit file (vCard, vCalendar) specification can be found at http://www.imc.org/pdi The Euro character usage is broken in some phones itself and the usage is discouraged. It works for phonebook and SMS but it would be very inefficient for to completely parse versit file. Sometimes, some phone's internal parser only accept files that do contain no other fields than the supported ones. The adress book is represented by vCards. Depending on your phone, vCard 1.0 or 2.1 is used. There are no specs available for vCard version 1.0. The above file types are only transfered to/from the phone. No creation or other means of editing is done. The phone often applies filters, so do not expect to get exactly the same data that you have sent. For phonebooks, UCS-2 encoded transfer is tried per default, GSM encoded transfer is used as fallback. Not all phonebooks are writeable/deleteable. Short message service: Raw PDU transfer is not supported, yet. All below applies mainly to S35i: - the bitmap format has 1 bit color depth (b/w) with at least 97x26 pixels, maximum is 101x43 pixels for the S35i. Larger bitmaps will simply be cut down to the maximum size. - bitmap 1 is only displayed temporarily but fullscreen it's good for testing logos - the midi format must be standard midi format 0 without polyphony specification according to http://www.midi.org - midi 0 has the number 43 in the mobile phone scmxx-0.9.0/TRANSLATION0000644000175000017500000000141510215243246014235 0ustar hendrikhendrikWhat to do to translate this package ==================================== (with {lang} being the ISO 639 language code, e.g. de for german) 1. Change to the po/ subdir and see the README file there. 2. Change to the docs/ subdir and copy scmxx.en.xml to scmxx.{lang}.xml and edit the new file: - change the encoding in the first line to a common one for lang or to UTF-8 (make sure you really use UTF-8 in this case) - change the lang= attribute in the root property to {lang} 3. Edit the scmxx.spec.in (NOT scmxx.spec) and translate Summary and %description as done for "de". You MUST use UTF-8 as encoding! Send the new files from po/ and docs/ subdirs and the diff of scmxx.spec.in (use option -u) to me. If you cannot update from time to time, _tell_ me. scmxx-0.9.0/Makefile.cvs0000644000175000017500000000352110367002145014745 0ustar hendrikhendrikPROJECT=scmxx ACCONFIGHEADERSOUT=$(shell grep ^AC_CONFIG_HEADER configure.in | cut -f 2 -d'[' | cut -f 1 -d']') ACCONFIGHEADERSIN=$(patsubst %, %.in, $(ACCONFIGHEADERSOUT)) ACCONFIGFILESOUT=$(shell grep ^AC_CONFIG_FILES configure.in | cut -f 2 -d'(' | cut -f 1 -d')') ACCONFIGFILESIN=$(patsubst %, %.in, $(ACCONFIGHEADERSOUT)) AHCONFIGFILE=$(shell echo $(ACCONFIGHEADERSIN) | cut -f 1 -d " ") .PHONY: all all: configure $(AHCONFIGFILE) $(PROJECT).spec winsetup-cygwin.iss winsetup-mingw.iss aclocal.m4: aclocal --force configure: configure.in acsite.m4 autoconf -Wall @rm -rf autom4te.cache config.status: configure config.guess config.sub install-sh $(AHCONFIGFILE) ./configure --no-create $(CONFIG_OPTS) $(AHCONFIGFILE): configure.in acsite.m4 autoheader -Wall @touch $@ @rm -rf autom4te.cache .INTERMEDIATE: version.txt version.txt: configure echo -n $(shell ./configure --version | grep ^$(PROJECT) | cut -f 3 -d " ") >$@ $(PROJECT).spec: version.txt $(PROJECT).spec.in sed -e 's/^Version:.*$$/Version: $(shell cat version.txt)/' $@.in >$@ %.iss: version.txt %.iss.in sed -e 's/^AppVerName.*$$/AppVerName=SCMxx $(shell cat version.txt)/' \ -e 's/^OutputBaseFilename=.*$$/OutputBaseFilename=scmxx-$(shell cat version.txt)-win32-setup/' \ $@.in >$@ .PHONY: run-config.status run-config.status: config.status $(ACCONFIGHEADERSIN) $(ACCONFIGFILESIN) ./config.status $(ACCONFIGFILESOUT): config.status ./config.status .PHONY: clean clean: Makefile -$(MAKE) clean -rm -f *~ -rm -rf autom4te.cache config.cache config.log config.status -rm -f $(ACCONFIGHEADERSOUT) -rm -f $(ACCONFIGFILESOUT) .PHONY: distclean distclean: Makefile -$(MAKE) distclean -rm -f *~ -rm -rf autom4te.cache config.cache config.log config.status -rm -f $(ACCONFIGHEADERSOUT) -rm -f $(ACCONFIGFILESOUT) -rm -f configure $(AHCONFIGFILE) $(PROJECT).spec scmxx-0.9.0/INSTALL0000644000175000017500000000356610400165706013556 0ustar hendrikhendrikIf you got these sources from CVS, run make -f Makefile.cvs If you want more automatism, run make -f Makefile.cvs Makefile and it will also run everything around configure. You can set CONFIG_OPTS for configure options and the usual options like LDFLAGS and CFLAGS. If you want to package it, run make -f Makefile.dist This builds the tar.gz, tar.bz2, src.rpm and .rpm To see what compile options are available, do a ./configure --help and choose your settings. Optionally add special search paths for libraries and includes: CFLAGS="-I/path/to/includes" LDFLAGS="-L/path/to/libs" Read in the manual of your shell how to set environment variables and the compiler manual for other options. Then run ./configure There is a sensible default for the device port for many systems. There are dependencies on libraries: 1. libc with iconv included (Linux or NetBSD > 1.6.x) or libiconv (all other systems) 2. Either libc with getopt_long included (Linux and NetBSD) or libgnugetopt (FreeBSD) or libpopt (all other systems) 3. libc with gettext included (Linux) or libintl (all other systems) or no gettext support (if you do not want translation) 4. bluez (linux, optional) There are build dependencies on some programs: Required: 1. make and gcc build environment for the program itself Optional: 2. gettext utils to create the message catalogs 3. docbook2x OR xsltproc to create the manpage files (you MUST NOT have docbook2x installed when you want to only use xsltproc) 4. xsltproc to create the HTML documentation configure will try to detect what is present on your system (in the order mentioned above). Then finally build and install it: make and optionally make install For the parameters to run the program: scmxx --help or man scmxx scmxx-0.9.0/TODO0000644000175000017500000000031710254642401013203 0ustar hendrikhendrik * raw SMS-TPDU uploading (option name?) and downloading (format? maybe csv?) * smspdu: decode and print more short message user data headers * ability to set/change/remove password to a lock (dangerous!) scmxx-0.9.0/scmxx.spec.in0000644000175000017500000000724410366761531015156 0ustar hendrikhendrikSummary: exchange data with Siemens mobile phones Summary(de): Datenaustausch mit Siemens-Handys Summary(it): Scambia dati con telefonini Siemens Name: scmxx Version: %%version%% Release: 1 Group: console License: GPL Vendor: Hendrik Sattler Url: http://www.hendrik-sattler.de/scmxx Packager: Hendrik Sattler Source0: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-root %description SCMxx is a console program that allows you to exchange certain types of data with mobile phones made by Siemens. Some of the data types that can be exchanged are logos, ring tones, vCalendars, phonebook entries, and short messages. Other actions like setting the time and dialling a number are also possible. SCMxx works with the following models: S25, S35i, M35i, C35i, SL4x, S45, ME45, C45, M50, MT50 and probably others. It basically uses the AT command set published by Siemens (with some other, additional resources). See the website %{url} for details. %description -l de SCMxx ist ein Konsolenprogramm das es ermöglicht, bestimmte Daten mit Handys von Siemens auszutauschen. Einige der Daten, die transferiert werden können, sind Logos, Klingeltöne, vCalendars, Telefonbucheinträge, und Kurznachrichten. Andere Aktionen wie das Setzen der Zeit und da Wählen von Rufnummer ist ebenso möglich. SCMxx kann mit folgenden Modellen umgehen: S25, S35i, M35i, C35i, SL4x, S45, ME45, C45, M50, MT50 und eventuell anderen. Es wird hauptsächlich das von Siemens veröffentlichte AT-Kommando-Set (zusammen mit anderen, zusätzlichen Resourcen) verwendet. Weitere Details finden man auf der Webseite %{url}. %description -l it SCMxx è un programma da console che ti permette di scambiare alcuti tipi di dati con telefonini Siemens. Questi dati possono essere loghi, suonerie, vCalendars, record dell'agenda telefonica e sms. E' anche possibile modificare l'ora o comporre un numero. SCMxx funziona con i modelli seguenti: S25, S35i, M35i, C35i, SL4x, S45, ME45, C45, M50, MT50 e probabilmente altri. Si basa sul set di comandi AT pubblicati da Siemens (e su altre risorse aggiuntive). Visita il sito %{url} per dettagli. %prep %setup -q %build %configure %{__make} %install %{__make} install DESTDIR=$RPM_BUILD_ROOT %clean %{__make} distclean %files %defattr(-,root,root) %doc AUTHORS BUGS CHANGELOG INSTALL README TODO TRANSLATION examples docs/*.txt %attr(0755,-,-) %{_bindir}/* %attr(0644,-,-) %{_mandir}/man1/%{name}.1* %attr(0644,-,-) %{_mandir}/*/man1/%{name}.1* %attr(0644,-,-) %{_datadir}/locale/*/LC_MESSAGES/%{name}.mo %changelog * Sat Jan 28 2006 Hendrik Sattler - Change Copyright tag to License tag: this makes it incompatible with rpm-3.x but is needed for current rpm - include all binaries as there is now more than one * Tue Aug 24 2004 Hendrik Sattler - install all translation of the manpage - install all gettext files - reformat and extend description - add german summary and german description - use default configure command instead of custom invocation - remove x-flag from all non-executable files - remove old url from Source0 field * Mon Nov 18 2002 Hendrik Sattler - added manpage to package * Sat Jul 1 2002 Hendrik Sattler - changed defattr, so dirs get their x-flag * Sat May 14 2002 Hendrik Sattler - extensive usage of environment variables in the spec file - moved/renamed files in docdir * Sat Feb 9 2002 Petr Kri¹tof - RPM spec update * Sat Nov 17 2001 Hendrik Sattler - Initial RPM release scmxx-0.9.0/examples/0002755000175000017500000000000010401301601014316 5ustar hendrikhendrikscmxx-0.9.0/examples/vCard.vcf0000644000175000017500000000035507723512025016077 0ustar hendrikhendrikBEGIN:VCARD VERSION:1.0 REV:20021024T203353 N:LastName;FirstName ADR:;;Street;Town;;12345;Germany TEL;HOME:+493012345671 TEL;WORK:+493012345672 TEL;CELL:+493012345673 EMAIL;INTERNET:example@domain.tld URL:http://www.domain.tld END:VCARD scmxx-0.9.0/examples/sms.txt0000644000175000017500000000020307723512025015673 0ustar hendrikhendrikABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 ¤£$¥äàÄÇéèÉìöñòÖÑßüùÜ æøåÆØ Å*/()<=>%° +-.,:?¿!¡"';_#@&§ {[]}~\\\nscmxx-0.9.0/examples/vCalendar.vcs0000644000175000017500000000025507723512025016753 0ustar hendrikhendrikBEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT CATEGORIES:MISCELLANEOUS DALARM:20020601T120000 DTSTART:20020601T120000 RRULE:D7 DESCRIPTION:example event END:VEVENT END:VCALENDAR scmxx-0.9.0/examples/debian_with_scmxx.bmp0000644000175000017500000000135607723512025020541 0ustar hendrikhendrikBMî>(e+°ë ë ÿÿÿÿÿÿÿÿÿ¶/dev/null) POT_FILE=$(PACKAGE_NAME).pot PO_FILES=$(shell ls -1 *.po 2>/dev/null) MO_FILES=$(patsubst %.po, %.mo, $(PO_FILES)) .PHONY:all all: $(MO_FILES) %.mo: %.po @if ( test "$(MSGFMT)" ); then \ echo -n "$@: "; \ $(MSGFMT) -v -o $@ $<; \ fi %.po: $(POT_FILE) @if ( ! test -e $@ ); then \ if ( test "$(MSGINIT)" ); then \ $(MSGINIT) -i $< -o $@; \ fi \ else \ if ( test -e $< ) ; then \ if ( test "$(MSGMERGE)" ); then \ echo -n "$@: Merging from $<"; \ $(MSGMERGE) $(MSGMERGE_OPTS) $@ $<; \ touch $@; \ fi \ fi \ fi .PHONY: update update: @$(MAKE) template $(PO_FILES) .PHONY:template template: @if ( test "$(XGETTEXT)" ); then \ if (test -e $(POT_FILE)); then rm -f $(POT_FILE); fi; \ echo -n "Creating gettext template file $(POT_FILE)"; \ touch $(POT_FILE); \ for i in $(SOURCE_FILES); do \ $(XGETTEXT) $(XGETTEXT_OPTS) -o $(POT_FILE) $$i; \ echo -n "."; \ done; \ echo "done"; \ fi $(POT_FILE): $(SOURCE_FILES) @$(MAKE) template .PHONY:install-%.mo install-%.mo: %.mo $(INSTALL) -d $(DESTDIR)$(GETTEXTDIR)/$*/LC_MESSAGES; \ $(INSTALL) -m 644 $< $(DESTDIR)$(GETTEXTDIR)/$*/LC_MESSAGES/$(PACKAGE_NAME).mo; \ .PHONY:install install: $(patsubst %,install-%,$(MO_FILES)) .PHONY:uninstall uninstall: -rm -f $(DESTDIR)$(GETTEXTDIR)/*/LC_MESSAGES/$(PACKAGE_NAME).mo; .PHONY:clean clean: -rm -f *.mo .PHONY: distclean distclean: clean -rm -f $(POT_FILE) scmxx-0.9.0/po/ru.po0000644000175000017500000013577710401300375014135 0ustar hendrikhendrik# translation of ru.po to Russian # This file is distributed under the same license as the PACKAGE package. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER. # Andy Shevchenko , 2004, 2005, 2006. # msgid "" msgstr "" "Project-Id-Version: ru\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-01 12:06+0100\n" "PO-Revision-Date: 2006-02-10 14:11+0200\n" "Last-Translator: Andy Shevchenko \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: KBabel 1.10.2\n" #: ../src/helper/mem.c:29 msgid "Memory allocation failure" msgstr "Ошибка Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð¼Ñти" #: ../src/helper/file.c:42 #, c-format msgid "Could not access %s: %s\n" msgstr "Ðевозможно получить доÑтуп к %s: %s\n" #: ../src/helper/file.c:48 #, c-format msgid "Accessing %s\n" msgstr "ОÑущеÑтвлÑетÑÑ Ð´Ð¾Ñтуп к %s\n" #: ../src/helper/file.c:50 msgid "Please input the data and finish with Ctrl-D on an empty line" msgstr "Введите данные и закончите ввод нажатием Ctrl-D на пуÑтой Ñтроке" #: ../src/helper/file.c:62 #, c-format msgid "%s could not be created: %s\n" msgstr "%s не может быть Ñоздано: %s\n" #: ../src/helper/file.c:64 #, c-format msgid "%s created.\n" msgstr "%s Ñоздано.\n" #: ../src/helper/file.c:99 #, c-format msgid "%s has %d byte.\n" msgid_plural "%s has %d bytes.\n" msgstr[0] "%s Ñодержит %d байт.\n" msgstr[1] "%s Ñодержит %d байта.\n" msgstr[2] "%s Ñодержит %d байт.\n" #: ../src/adr2vcf/opt.c:61 ../src/smi/opt.c:53 ../src/scmxx/scmxx_opt.c:206 msgid "options" msgstr "опции" #: ../src/adr2vcf/opt.c:76 ../src/smi/opt.c:62 ../src/scmxx/scmxx_opt.c:285 msgid "charset" msgstr "таблица Ñимволов" #: ../src/options/common.c:129 msgid "Syntax" msgstr "СинтакÑиÑ" #: ../src/scmxx/tty_bluetooth.c:100 ../src/scmxx/tty_serial.c:161 #: ../src/scmxx/tty_serial.c:250 ../src/scmxx/tty_serial.c:255 #: ../src/scmxx/tty_serial.c:262 msgid "system error code" msgstr "" #: ../src/scmxx/tty_bluetooth.c:156 msgid "protocol not implemented" msgstr "протокол не внедрён" #: ../src/scmxx/actions.c:90 msgid "Sending reset frame" msgstr "Отправка команды ÑброÑа" #: ../src/scmxx/actions.c:107 ../src/scmxx/ttyaccess.c:53 #: ../src/scmxx/pbookphone.c:76 ../src/scmxx/pbookphone.c:82 msgid "done" msgstr "готово" #: ../src/scmxx/actions.c:197 msgid "no charset specified." msgstr "не определена таблица Ñимволов." #: ../src/scmxx/actions.c:214 msgid "no number specified." msgstr "номер не определен." #: ../src/scmxx/actions.c:216 msgid "no valid number specified." msgstr "корректный номер не определен." #: ../src/scmxx/actions.c:222 #, c-format msgid "SMS server number was set to %s\n" msgstr "Ðомер SMS Ñервера был уÑтановлен в %s\n" #: ../src/scmxx/actions.c:224 ../src/scmxx/s35_files.c:221 #: ../src/scmxx/s35_files.c:234 ../src/scmxx/s35_sms.c:463 msgid "unknown cause" msgstr "неизвеÑÑ‚Ð½Ð°Ñ Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð°" #: ../src/scmxx/actions.c:260 msgid "Time was synchronized" msgstr "Ð’Ñ€ÐµÐ¼Ñ Ñинхронизировано" #: ../src/scmxx/actions.c:262 msgid "Time could not be synchronized" msgstr "Ð’Ñ€ÐµÐ¼Ñ Ð½Ðµ может быть Ñинхронизировано" #: ../src/scmxx/actions.c:450 msgid "not checked in, not seeking" msgstr "" #: ../src/scmxx/actions.c:451 msgid "checked in" msgstr "" #: ../src/scmxx/actions.c:452 msgid "not checked in, but seeking a network" msgstr "" #: ../src/scmxx/actions.c:453 msgid "check-in denied by network" msgstr "" #: ../src/scmxx/actions.c:454 ../src/scmxx/actions.c:498 msgid "registered, roaming" msgstr "зарегиÑтрирован, роуминг" #: ../src/scmxx/actions.c:455 ../src/scmxx/actions.c:499 msgid "unknown status" msgstr "неизвеÑтный ÑтатуÑ" #: ../src/scmxx/actions.c:494 msgid "not registered, not searching" msgstr "не зарегиÑтрирован, поиÑк не ведетÑÑ" #: ../src/scmxx/actions.c:495 msgid "registered, home network" msgstr "зарегеÑтрирован, домашнÑÑ Ñеть" #: ../src/scmxx/actions.c:496 msgid "not registered, searching" msgstr "не зарегиÑтрирован, ведетÑÑ Ð¿Ð¾Ð¸Ñк" #: ../src/scmxx/actions.c:497 msgid "registration denied by network" msgstr "региÑÑ‚Ñ€Ð°Ñ†Ð¸Ñ Ð·Ð°Ð¿Ñ€ÐµÑ‰ÐµÐ½Ð° Ñетью" #: ../src/scmxx/actions.c:550 msgid "Vendor" msgstr "Производитель" #: ../src/scmxx/actions.c:551 msgid "Model" msgstr "Модель" #: ../src/scmxx/actions.c:552 msgid "Revision" msgstr "РевизиÑ" #: ../src/scmxx/actions.c:554 msgid "Battery" msgstr "БатареÑ" #: ../src/scmxx/actions.c:555 msgid "Charsets" msgstr "Таблицы Ñимволов" #: ../src/scmxx/actions.c:556 msgid "Time" msgstr "ВремÑ" #: ../src/scmxx/actions.c:558 msgid "card ID" msgstr "Идентификатор карты" #: ../src/scmxx/actions.c:559 msgid "Status" msgstr "СтатуÑ" #: ../src/scmxx/actions.c:560 msgid "Area code" msgstr "Код региона" #: ../src/scmxx/actions.c:561 msgid "Cell ID" msgstr "Идентификатор Ñоты" #: ../src/scmxx/actions.c:562 msgid "Operator" msgstr "Оператор" #: ../src/scmxx/actions.c:563 msgid "SMS server" msgstr "SMS Ñервер" #: ../src/scmxx/actions.c:564 msgid "Signal" msgstr "Сигнал" #: ../src/scmxx/actions.c:566 msgid "GPRS class" msgstr "КлаÑÑ GPRS" #: ../src/scmxx/actions.c:567 msgid "GRPS status" msgstr "Ð¡Ñ‚Ð°Ñ‚ÑƒÑ GPRS" #: ../src/scmxx/actions.c:576 msgid "Phone related information" msgstr "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ ÐºÐ°Ñательно телефона" #: ../src/scmxx/actions.c:605 ../src/scmxx/memtypes.c:411 #: ../src/scmxx/memtypes.c:412 ../src/scmxx/memtypes.c:458 #: ../src/scmxx/memtypes.c:460 ../src/scmxx/memtypes.c:665 #: ../src/scmxx/memtypes.c:666 #, c-format msgid "none" msgstr "" #: ../src/scmxx/actions.c:630 msgid "SIM card related information" msgstr "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ ÐºÐ°Ñательно SIM карты" #: ../src/scmxx/actions.c:645 msgid "Network related information" msgstr "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ ÐºÐ°Ñательно Ñети" #: ../src/scmxx/actions.c:707 msgid "detached" msgstr "отÑоединено" #: ../src/scmxx/actions.c:709 msgid "attached" msgstr "приÑоединено" #: ../src/scmxx/actions.c:719 msgid "Binary files" msgstr "Бинарные файлы" #: ../src/scmxx/actions.c:720 msgid "Phonebooks" msgstr "Телефонные книги" #: ../src/scmxx/actions.c:721 msgid "SMS storages" msgstr "МаÑÑивы SMS" #: ../src/scmxx/actions.c:751 msgid "Available memories" msgstr "ДоÑтупные банки памÑти" #: ../src/scmxx/actions.c:756 ../src/smspdu/smspdu_print.c:223 #: ../src/smspdu/smspdu_print.c:235 msgid "Settings" msgstr "УÑтановки" #: ../src/scmxx/scmxx.c:78 msgid "[files...]" msgstr "" #: ../src/scmxx/scmxx.c:91 ../src/scmxx/scmxx.c:95 msgid "Malformed bluetooth address" msgstr "" #: ../src/scmxx/scmxx.c:114 msgid "OK, a modem device is present." msgstr "" #: ../src/scmxx/scmxx.c:116 msgid "cannot communicate with device." msgstr "" #: ../src/scmxx/scmxx.c:135 #, c-format msgid "Detected %s %s\n" msgstr "" #: ../src/scmxx/scmxx.c:137 #, c-format msgid "Comparing to registered model %s\n" msgstr "" #: ../src/scmxx/scmxx.c:144 msgid "this model was not confirmed to be working with this software." msgstr "" #: ../src/scmxx/scmxx.c:148 msgid "" "phones from this vendor were not confirmed to be working with this software!" msgstr "" #: ../src/scmxx/scmxx.c:160 msgid "you must define a number with the --number option." msgstr "" #: ../src/scmxx/scmxx.c:176 msgid "you must specifiy a valid memory type." msgstr "необходимо указать корректный тип памÑти." #: ../src/scmxx/ttyaccess.c:37 #, c-format msgid "Accessing device %s..." msgstr "ОÑущеÑтвлÑетÑÑ Ð´Ð¾Ñтуп к уÑтройÑтву %s..." #: ../src/scmxx/ttyaccess.c:49 #, c-format msgid "Cannot open %s\n" msgstr "Ðевозможно открыть %s\n" #: ../src/scmxx/ttyaccess.c:58 #, c-format msgid "Waiting for %d seconds as requested...\n" msgstr "" #: ../src/scmxx/memtypes.c:181 msgid "bitmap" msgstr "картинка" #: ../src/scmxx/memtypes.c:183 msgid "midi" msgstr "мелодиÑ" #: ../src/scmxx/memtypes.c:185 msgid "vCalendar" msgstr "vCalendar (календарь)" #: ../src/scmxx/memtypes.c:187 msgid "vCard (address book)" msgstr "vCard (адреÑÐ½Ð°Ñ ÐºÐ½Ð¸Ð³Ð°)" #: ../src/scmxx/memtypes.c:189 msgid "EMS animation" msgstr "EMS анимациÑ" #: ../src/scmxx/memtypes.c:191 msgid "T9 database" msgstr "Словарь T9" #: ../src/scmxx/memtypes.c:193 msgid "UCS-2 encoded dir name" msgstr "Ð˜Ð¼Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð° в UCS-2" #: ../src/scmxx/memtypes.c:234 ../src/scmxx/memtypes.c:400 #: ../src/scmxx/memtypes.c:618 ../src/scmxx/scmxx_opt.c:249 msgid "mem" msgstr "памÑть" #: ../src/scmxx/memtypes.c:235 msgid "readable" msgstr "на чтение" #: ../src/scmxx/memtypes.c:236 ../src/scmxx/memtypes.c:402 msgid "writable" msgstr "на запиÑÑŒ" #: ../src/scmxx/memtypes.c:237 ../src/scmxx/memtypes.c:405 #: ../src/scmxx/memtypes.c:621 ../src/scmxx/lock.c:219 msgid "description" msgstr "опиÑание" #: ../src/scmxx/memtypes.c:401 ../src/scmxx/memtypes.c:619 msgid "slots" msgstr "Ñлоты" #: ../src/scmxx/memtypes.c:403 msgid "digits" msgstr "цифры" #: ../src/scmxx/memtypes.c:404 msgid "chars" msgstr "Ñимволы" #: ../src/scmxx/memtypes.c:413 ../src/scmxx/memtypes.c:414 #: ../src/scmxx/memtypes.c:472 ../src/scmxx/memtypes.c:474 msgid "yes" msgstr "да" #: ../src/scmxx/memtypes.c:415 ../src/scmxx/memtypes.c:416 #: ../src/scmxx/memtypes.c:477 ../src/scmxx/memtypes.c:479 msgid "no" msgstr "нет" #: ../src/scmxx/memtypes.c:440 #, c-format msgid "could not get limits of phonebook %s.\n" msgstr "невозможно получить лимиты на тел. книгу %s.\n" #: ../src/scmxx/memtypes.c:504 msgid "SIM fix-dialing phonebook" msgstr "" #: ../src/scmxx/memtypes.c:506 msgid "SIM phonebook" msgstr "Тел. книга SIM" #: ../src/scmxx/memtypes.c:509 msgid "last calls (mobile)" msgstr "поÑледние вызовы (телефон)" #: ../src/scmxx/memtypes.c:511 msgid "last calls (SIM)" msgstr "поÑледние вызовы (SIM)" #: ../src/scmxx/memtypes.c:514 msgid "own numbers" msgstr "ÑобÑтвенные номера" #: ../src/scmxx/memtypes.c:516 msgid "mobile equipment phonebook" msgstr "тел. книга во вÑтроенной памÑти" #: ../src/scmxx/memtypes.c:518 msgid "barred numbers" msgstr "" #: ../src/scmxx/memtypes.c:520 msgid "service numbers" msgstr "ÑервиÑные номера" #: ../src/scmxx/memtypes.c:523 msgid "missed calls" msgstr "пропущенные вызовы" #: ../src/scmxx/memtypes.c:526 msgid "callback numbers" msgstr "номера обратного вызова" #: ../src/scmxx/memtypes.c:528 msgid "blacklist numbers" msgstr "номера чёрного ÑпиÑка" #: ../src/scmxx/memtypes.c:530 msgid "mailbox numbers" msgstr "номера почтового Ñщика" #: ../src/scmxx/memtypes.c:532 msgid "red book (VIP in CS)" msgstr "краÑÐ½Ð°Ñ ÐºÐ½Ð¸Ð³Ð° (VIP в CS)" #: ../src/scmxx/memtypes.c:534 msgid "common sortable (FD+SM+ME)" msgstr "общие Ñортируемые (FD+SM+ME)" #: ../src/scmxx/memtypes.c:536 msgid "address book numbers" msgstr "номера адреÑной книги" #: ../src/scmxx/memtypes.c:620 msgid "used" msgstr "иÑпользовано" #: ../src/scmxx/memtypes.c:681 msgid "SIM memory" msgstr "памÑть SIM" #: ../src/scmxx/memtypes.c:683 msgid "mobile equipment memory" msgstr "вÑÑ‚Ñ€Ð¾ÐµÐ½Ð½Ð°Ñ Ð¿Ð°Ð¼Ñть" #: ../src/scmxx/s35_pbook.c:108 ../src/scmxx/s35_pbook.c:128 #: ../src/scmxx/s35_pbook.c:185 msgid "something went wrong with sending the phonebook entries" msgstr "" #: ../src/scmxx/s35_pbook.c:121 #, c-format msgid "invalid phonebook file %s.\n" msgstr "" #: ../src/scmxx/s35_pbook.c:124 #, c-format msgid "empty phonebook file %s.\n" msgstr "" #: ../src/scmxx/s35_pbook.c:148 msgid "Nothing to get." msgstr "" #: ../src/scmxx/s35_pbook.c:170 #, c-format msgid "%s deleted.\n" msgstr "%s удалено.\n" #: ../src/scmxx/s35_pbook.c:172 msgid "Possible data corruption!" msgstr "Ð’Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð°Ñ Ð¿Ð¾Ñ€Ñ‡Ð° данных!" #: ../src/scmxx/s35_pbook.c:188 msgid "the selected phonebook is not writable" msgstr "Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ Ñ‚ÐµÐ». книга не Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи" #: ../src/scmxx/s35_pbook.c:282 ../src/scmxx/s35_files.c:48 #: ../src/scmxx/s35_sms.c:53 msgid "You must specify a valid action." msgstr "Ðеобходимо указать корректное дейÑтвие." #: ../src/scmxx/s35_pbook.c:286 #, c-format msgid "Cannot select memory %s\n" msgstr "Ðевозможно выбрать памÑть %s\n" #: ../src/scmxx/s35_pbook.c:293 msgid "could not determine last slot." msgstr "невозможно определить поÑледний Ñлот." #: ../src/scmxx/s35_pbook.c:298 ../src/scmxx/s35_files.c:79 msgid "You must specify exactly one operation." msgstr "Ðеобходимо указать ровно одну операцию." #: ../src/scmxx/s35_pbook.c:312 msgid "invalid slot defined" msgstr "определён неверный Ñлот" #: ../src/scmxx/pbookphone.c:54 ../src/scmxx/pbookphone.c:240 #: ../src/scmxx/pbookphone.c:287 #, c-format msgid "getting limits of phonebook %s failed.\n" msgstr "ошибка Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð»Ð¸Ð¼Ð¸Ñ‚Ð¾Ð² телю книги %s.\n" #: ../src/scmxx/pbookphone.c:59 #, c-format msgid "slot %d is out of range %d-%d.\n" msgstr "Ñлот %d за пределами диапазона %d-%d.\n" #: ../src/scmxx/pbookphone.c:64 #, c-format msgid "too many entries (max. %d).\n" msgstr "очень много запиÑей (макÑ. %d).\n" #: ../src/scmxx/pbookphone.c:68 #, c-format msgid "Updating entries %s(%d-%d)...\n" msgstr "Обновление запиÑей %s(%d-%d)...\n" #: ../src/scmxx/pbookphone.c:79 #, c-format msgid "Updating one entry in slot %d of memory %s..." msgstr "Обновление одной запиÑи в Ñлоте %d памÑти %s..." #: ../src/scmxx/pbookphone.c:183 ../src/scmxx/pbookphone.c:212 #, c-format msgid "reading from phonebook %s failed: %s\n" msgstr "ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¸Ð· тел. книги %s: %s\n" #: ../src/scmxx/pbookphone.c:192 #, c-format msgid "parsing entry failed: %s\n" msgstr "ошибка разбора запиÑи: %s\n" #: ../src/scmxx/pbookphone.c:195 #, c-format msgid "phone returned unexpected entry %u\n" msgstr "телефон вернул неожиданную запиÑÑŒ %u\n" #: ../src/scmxx/pbookphone.c:249 ../src/scmxx/s35_files.c:207 msgid "Trying to find an empty slot..." msgstr "Попытка найти пуÑтой Ñлот..." #: ../src/scmxx/pbookphone.c:260 ../src/scmxx/s35_files.c:151 #, c-format msgid "Detected empty slot %d\n" msgstr "Ðайден пуÑтой Ñлот %d\n" #: ../src/scmxx/pbookphone.c:295 msgid "Receiving phonebook entries..." msgstr "ПринимаютÑÑ Ð·Ð°Ð¿Ð¸Ñи тел. книги..." #: ../src/scmxx/dial.c:114 #, c-format msgid "Using dialing sequence %s.\n" msgstr "ИÑпользуетÑÑ Ð¿Ð¾ÑледовательноÑть Ð´Ð»Ñ Ð½Ð°Ð±Ð¾Ñ€Ð° %s.\n" #: ../src/scmxx/dial.c:117 msgid "dialing failed" msgstr "ошибка набора" #: ../src/scmxx/tty_serial.c:98 ../src/scmxx/tty_serial.c:261 #: ../src/scmxx/tty_serial.c:283 ../src/scmxx/tty_serial.c:307 msgid "Error in setting port attributes" msgstr "Ошибка при уÑтановке атрибутов порта" #: ../src/scmxx/tty_serial.c:108 msgid "Error in setting transmission speed" msgstr "Ошибка при уÑтановке ÑкороÑти передачи" #: ../src/scmxx/tty_serial.c:126 ../src/scmxx/tty_serial.c:160 #: ../src/scmxx/tty_serial.c:194 msgid "Error in flushing buffers" msgstr "Ошибка при очиÑтке буферов" #: ../src/scmxx/tty_serial.c:254 ../src/scmxx/tty_serial.c:290 msgid "Error in getting port attributes" msgstr "Ошибка при получении атрибутов порта" #: ../src/scmxx/scmxx_opt.c:207 msgid "actions" msgstr "дейÑтвиÑ" #: ../src/scmxx/scmxx_opt.c:208 msgid "memory types" msgstr "типы памÑти" #: ../src/scmxx/scmxx_opt.c:209 msgid "memory type options" msgstr "опции типа памÑти" #: ../src/scmxx/scmxx_opt.c:210 msgid "SMS options" msgstr "Опции SMS" #: ../src/scmxx/scmxx_opt.c:215 msgid "rate" msgstr "коÑффициент" #: ../src/scmxx/scmxx_opt.c:216 msgid "specify another than the compiled in baudrate" msgstr "указать отличную от вÑтроенной ÑкороÑть обмена" #: ../src/scmxx/scmxx_opt.c:218 msgid "binary file transfer" msgstr "Ð±Ð¸Ð½Ð°Ñ€Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð° файла" #: ../src/scmxx/scmxx_opt.c:219 msgid "device" msgstr "уÑтройÑтво" #: ../src/scmxx/scmxx_opt.c:220 msgid "specify another than the compiled in device" msgstr "указать отличное от вÑтроенного уÑтройÑтво" #: ../src/scmxx/scmxx_opt.c:221 ../src/scmxx/scmxx_opt.c:283 msgid "seconds" msgstr "Ñекунды" #: ../src/scmxx/scmxx_opt.c:222 msgid "return after this time if there is no answer" msgstr "возвратитьÑÑ Ð¿Ð¾Ñле Ñтого времени еÑли не было ответа" #: ../src/scmxx/scmxx_opt.c:224 msgid "dials a number (requires option -n)" msgstr "набрать номер (требует опцию -n)" #: ../src/scmxx/scmxx_opt.c:226 msgid "send/receive without storing in the phone" msgstr "отправить/получить без ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² телефоне" #: ../src/scmxx/scmxx_opt.c:228 msgid "disable e.g. a lock" msgstr "" #: ../src/scmxx/scmxx_opt.c:230 msgid "enable e.g. a lock" msgstr "" #: ../src/scmxx/scmxx_opt.c:232 #, fuzzy msgid "make the sms appear directly (if supported by the receiving entity)" msgstr "make the sms appear directly (еÑли поддерживаетÑÑ receiving entity)" #: ../src/scmxx/scmxx_opt.c:234 msgid "get something from the phone" msgstr "получить что-либо от телефона" #: ../src/scmxx/scmxx_opt.c:236 msgid "hangup all active calls" msgstr "прервать вÑе активные вызовы" #: ../src/scmxx/scmxx_opt.c:238 msgid "print this message" msgstr "вывеÑти Ñто Ñообщение" #: ../src/scmxx/scmxx_opt.c:240 msgid "do not use current serial port settings as base (default)" msgstr "" "не иÑпользовать текущие наÑтройки поÑледовательного порта за оÑнову (по " "умолчанию)" #: ../src/scmxx/scmxx_opt.c:242 msgid "show various information" msgstr "показать различную информацию" #: ../src/scmxx/scmxx_opt.c:244 msgid "use current serial port settings as base" msgstr "иÑпользовать текущие уÑтановки поÑледовательного порта за оÑнову" #: ../src/scmxx/scmxx_opt.c:245 ../src/scmxx/lock.c:217 msgid "lock" msgstr "блокировка" #: ../src/scmxx/scmxx_opt.c:246 msgid "selects a lock to change (might need option --pin)" msgstr "" #: ../src/scmxx/scmxx_opt.c:248 msgid "show lock information" msgstr "показать информацию о блокировке" #: ../src/scmxx/scmxx_opt.c:250 msgid "select a memory" msgstr "выбрать памÑть" #: ../src/scmxx/scmxx_opt.c:252 msgid "show memory information" msgstr "показать информацию о памÑти" #: ../src/scmxx/scmxx_opt.c:253 msgid "number" msgstr "номер" #: ../src/scmxx/scmxx_opt.c:254 msgid "specify number on send" msgstr "определить номер Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸" #: ../src/scmxx/scmxx_opt.c:255 msgid "file" msgstr "файл" #: ../src/scmxx/scmxx_opt.c:256 msgid "specify a file when getting ('-' for stdout)" msgstr "определить файл при получении ('-' Ð´Ð»Ñ Ñтандартного ввода)" #: ../src/scmxx/scmxx_opt.c:258 msgid "phonebook" msgstr "тел. книга" #: ../src/scmxx/scmxx_opt.c:260 msgid "use this pin if one is needed" msgstr "иÑпользуйте Ñтот pin, еÑли нужно" #: ../src/scmxx/scmxx_opt.c:261 msgid "program" msgstr "программа" #: ../src/scmxx/scmxx_opt.c:262 msgid "specify a pipe to use" msgstr "определить иÑпользуемый конвейер" #: ../src/scmxx/scmxx_opt.c:264 #, fuzzy msgid "decreases verbosity by 1" msgstr "уменьшить " #: ../src/scmxx/scmxx_opt.c:266 msgid "removes something from the phone" msgstr "удалить что-либо из телефона" #: ../src/scmxx/scmxx_opt.c:268 msgid "sends some special characters" msgstr "отправить некоторые ÑпецÑимволы" #: ../src/scmxx/scmxx_opt.c:270 msgid "sends something to the phone" msgstr "отправить что-либо в телефон" #: ../src/scmxx/scmxx_opt.c:272 msgid "set the SMSC number (requires option -n)" msgstr "" #: ../src/scmxx/scmxx_opt.c:274 msgid "synchronize time on phone" msgstr "Ñинхронизировать Ð²Ñ€ÐµÐ¼Ñ Ð½Ð° телефоне" #: ../src/scmxx/scmxx_opt.c:275 msgid "slot" msgstr "Ñлот" #: ../src/scmxx/scmxx_opt.c:276 msgid "select a slot or slot group" msgstr "выбрать Ñлот или группу Ñлота" #: ../src/scmxx/scmxx_opt.c:278 msgid "short messages" msgstr "короткие ÑообщениÑ" #: ../src/scmxx/scmxx_opt.c:279 msgid "method" msgstr "метод" #: ../src/scmxx/scmxx_opt.c:280 msgid "sort short message on getting([type,][slot|time])" msgstr "" #: ../src/scmxx/scmxx_opt.c:282 msgid "request a status report from the SMSC" msgstr "" #: ../src/scmxx/scmxx_opt.c:284 msgid "wait this time after opening device" msgstr "" #: ../src/scmxx/scmxx_opt.c:286 msgid "use charset for input/output from/to system" msgstr "" #: ../src/scmxx/scmxx_opt.c:287 msgid "text" msgstr "" #: ../src/scmxx/scmxx_opt.c:288 msgid "specify content on send" msgstr "определить Ñодержимое Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸" #: ../src/scmxx/scmxx_opt.c:290 msgid "use UCS-2 (unicode) as charset" msgstr "" #: ../src/scmxx/scmxx_opt.c:292 #, fuzzy msgid "increases verbosity by 1" msgstr "увеличить" #: ../src/scmxx/scmxx_opt.c:294 msgid "print the version number" msgstr "вывеÑти номер верÑии" #: ../src/scmxx/pinfile.c:37 ../src/scmxx/pinfile.c:42 #: ../src/scmxx/pinfile.c:48 msgid "File check failed" msgstr "Ошибка проверки файла" #: ../src/scmxx/pinfile.c:42 msgid "file is not a regular file" msgstr "необычный файл" #: ../src/scmxx/pinfile.c:48 msgid "file is group or world accessible" msgstr "файл Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ð¾Ð²Ñ‹Ð¼ или общим доÑтупом" #: ../src/scmxx/pinfile.c:62 msgid "File read failed" msgstr "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð°" #: ../src/scmxx/pinfile.c:193 #, c-format msgid "Looking for %s for %s %s, %s %s in %s..." msgstr "ПоиÑк %s Ð´Ð»Ñ %s %s, %s %s в %s..." #: ../src/scmxx/pinfile.c:196 #, c-format msgid "Looking for %s for %s %s in %s..." msgstr "ПоиÑк %s Ð´Ð»Ñ %s %s в %s..." #: ../src/scmxx/pinfile.c:208 ../src/scmxx/pinfile.c:218 #: ../src/scmxx/pinfile.c:237 msgid "not found" msgstr "не найдено" #: ../src/scmxx/pinfile.c:240 msgid "found" msgstr "найдено" #: ../src/scmxx/lock.c:23 msgid "phone locked to SIM (device code)" msgstr "телефон заблокирован на SIM (код уÑтройÑтва)" #: ../src/scmxx/lock.c:25 msgid "SIM card (PIN)" msgstr "SIM-карта (PIN)" #: ../src/scmxx/lock.c:29 msgid "FDN lock" msgstr "Блокировка FDN" #: ../src/scmxx/lock.c:31 msgid "bar all outgoing calls" msgstr "запрет вÑех иÑходÑщих" #: ../src/scmxx/lock.c:33 msgid "bar outgoing international calls" msgstr "запрет международных иÑходÑщих" #: ../src/scmxx/lock.c:35 #, fuzzy msgid "bar outgoing international calls except to home country" msgstr "запрет международных иÑходÑщих кроме домашней Ñтраны" #: ../src/scmxx/lock.c:37 msgid "bar all incoming calls" msgstr "запрет вÑех входÑщих" #: ../src/scmxx/lock.c:39 msgid "bar incoming calls when roaming outside the home country" msgstr "запрет входÑщих во Ð²Ñ€ÐµÐ¼Ñ Ñ€Ð¾ÑƒÐ¼Ð¸Ð½Ð³Ð° за пределами домашней Ñтраны" #: ../src/scmxx/lock.c:41 msgid "all barring services" msgstr "" #: ../src/scmxx/lock.c:43 msgid "all outgoing barring services" msgstr "" #: ../src/scmxx/lock.c:45 msgid "all incoming barring services" msgstr "" #: ../src/scmxx/lock.c:47 msgid "network personalization" msgstr "" #: ../src/scmxx/lock.c:49 msgid "corporate personalization" msgstr "" #: ../src/scmxx/lock.c:51 msgid "network subset personalization" msgstr "" #: ../src/scmxx/lock.c:53 msgid "service provider personalization" msgstr "" #: ../src/scmxx/lock.c:55 msgid "phone locked to very first inserted SIM" msgstr "телефон заблокирован на первую вÑтавленную SIM-карту" #: ../src/scmxx/lock.c:57 msgid "keyboard" msgstr "клавиатура" #: ../src/scmxx/lock.c:84 msgid "" "Be beware of phone internal passwort counters that are normally set to 3 " "failures!" msgstr "" #: ../src/scmxx/lock.c:85 msgid "The current failure count cannot be read!" msgstr "Ðевозможно прочитать текущий Ñчётчик ошибок!" #: ../src/scmxx/lock.c:86 msgid "Setting new password FAILED!" msgstr "ОШИБКРуÑтановки нового паролÑ!" #: ../src/scmxx/lock.c:165 msgid "Lock status change failed." msgstr "Ошибка Ñмены ÑтатуÑа блокировки." #: ../src/scmxx/lock.c:167 #, c-format msgid "Lock %s successfully %s.\n" msgstr "Блокировка %s уÑпешно %s.\n" #: ../src/scmxx/lock.c:168 msgid "disabled" msgstr "ÑнÑта" #: ../src/scmxx/lock.c:168 msgid "enabled" msgstr "уÑтановлена" #: ../src/scmxx/lock.c:210 msgid "Locks" msgstr "Блокировки" #: ../src/scmxx/lock.c:218 msgid "status" msgstr "ÑтатуÑ" #: ../src/scmxx/lock.c:240 msgid "Lock" msgstr "Блокировка" #: ../src/scmxx/lock.c:242 msgid "getting lock status failed." msgstr "ошибка Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ ÑтатуÑа блокировки." #: ../src/scmxx/lock.c:246 msgid "on" msgstr "вкл." #: ../src/scmxx/lock.c:246 msgid "off" msgstr "выкл." #: ../src/scmxx/s35_files.c:40 msgid "You must define a memory to use." msgstr "Ðеобходимо указать тип иÑпользуемой памÑти." #: ../src/scmxx/s35_files.c:54 msgid "You must define either a valid slot, nothing or \"all\"." msgstr "Ðеобходимо указать либо корректный Ñлот, либо ничего или \"all\"." #: ../src/scmxx/s35_files.c:59 msgid "this phone does not support file exchange." msgstr "данный телефон не поддерживает обмен файлами." #: ../src/scmxx/s35_files.c:71 #, c-format msgid "%s values can only be %d to %d.\n" msgstr "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ %s могут быть от %d до %d.\n" #: ../src/scmxx/s35_files.c:73 #, c-format msgid "%s value can only be %d.\n" msgstr "Значение %s может быть только %d.\n" #: ../src/scmxx/s35_files.c:87 msgid "You must define a valid slot or \"all\"." msgstr "Ðеобходимо указать корректный Ñлот или \"all\"." #: ../src/scmxx/s35_files.c:128 #, c-format msgid "Using slot %d\n" msgstr "ИÑпользуетÑÑ Ñлот %d\n" #: ../src/scmxx/s35_files.c:149 msgid "No free slot found." msgstr "Свободный Ñлот не найден." #: ../src/scmxx/s35_files.c:175 msgid "You must specify a file name prefix (can be \"\")." msgstr "Ðеобходимо указать Ð¿Ñ€ÐµÑ„Ð¸ÐºÑ Ð¸Ð¼ÐµÐ½Ð¸ файла (возможно \"\")." #: ../src/scmxx/s35_files.c:194 #, c-format msgid "%s %d deleted.\n" msgstr "%s %d удалено.\n" #: ../src/scmxx/s35_files.c:196 #, c-format msgid "%s %d NOT deleted, something went wrong: %s\n" msgstr "%s %d ÐЕ удалено, что-то пришло иÑпорченным: %s\n" #: ../src/scmxx/s35_files.c:286 msgid "File transfer..." msgstr "Передача файла..." #: ../src/scmxx/s35_files.c:314 ../src/scmxx/s35_sms.c:316 msgid "Waiting for data request..." msgstr "Ожидание запроÑа данных..." #: ../src/scmxx/s35_files.c:319 msgid "Packet buffer seems to be filled with something else, clearing..." msgstr "Буфер пакета похоже заполнен каким-то муÑором, очиÑтка..." #: ../src/scmxx/s35_files.c:333 #, c-format msgid "" "\n" "Sending %d Bytes in packet %d\n" msgstr "" "\n" "ПередаётÑÑ %d байт в пакете %d\n" #: ../src/scmxx/s35_files.c:335 ../src/scmxx/s35_sms.c:320 msgid "Sending data..." msgstr "Передача данных..." #: ../src/scmxx/s35_files.c:342 #, c-format msgid "Packet %d sent\n" msgstr "Пакет %d передан\n" #: ../src/scmxx/s35_files.c:344 msgid "Wrong data format" msgstr "Ðеверный формат данных" #: ../src/scmxx/s35_files.c:351 msgid "File transfer complete." msgstr "Передача файла завершена." #: ../src/scmxx/s35_files.c:353 msgid "Nothing to transfer." msgstr "Ðичего нет Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð¸." #: ../src/scmxx/s35_files.c:382 #, c-format msgid "%s slot %lu" msgstr "%s Ñлот %lu" #: ../src/scmxx/s35_files.c:411 #, c-format msgid "parsing answer from phone failed: \"%s\"\n" msgstr "ошибка разбора ответа телефона: \"%s\"\n" #: ../src/scmxx/s35_files.c:428 #, c-format msgid "writing to file \"%s\" failed: %s\n" msgstr "" #: ../src/scmxx/s35_files.c:435 #, c-format msgid "writing to pipe \"%s\" failed.\n" msgstr "" #: ../src/scmxx/s35_files.c:448 ../src/scmxx/s35_sms.c:559 #, c-format msgid "closing pipe \"%s\" failed.\n" msgstr "" #: ../src/scmxx/s35_sms.c:64 msgid "" "If you want to remove short messages or mix actions, you must define a slot " "or slot type." msgstr "" #: ../src/scmxx/s35_sms.c:97 #, c-format msgid "SMS storage type \"%s\" could not be selected.\n" msgstr "" #: ../src/scmxx/s35_sms.c:147 msgid "Hmm, nothing to send?" msgstr "" #: ../src/scmxx/s35_sms.c:191 #, c-format msgid "SMS slot %d was deleted.\n" msgstr "" #: ../src/scmxx/s35_sms.c:193 ../src/scmxx/s35_sms.c:284 #: ../src/scmxx/s35_sms.c:467 msgid "This slot is not available." msgstr "Этот Ñлот не доÑтупен." #: ../src/scmxx/s35_sms.c:199 msgid "You must specify a valid slot number." msgstr "Ðеобходимо указать корректный номер Ñлота." #: ../src/scmxx/s35_sms.c:231 msgid "" "Argument to --number is not a number but phonebook cache is not present." msgstr "" #: ../src/scmxx/s35_sms.c:247 #, c-format msgid "no cache entry for \"%s\" found.\n" msgstr "" #: ../src/scmxx/s35_sms.c:249 #, c-format msgid "no unique hit in cache for search term \"%s\":\n" msgstr "" #: ../src/scmxx/s35_sms.c:279 msgid "zero-length number" msgstr "номер нулевой длины" #: ../src/scmxx/s35_sms.c:288 ../src/scmxx/s35_sms.c:327 msgid "The message was sent." msgstr "Сообщение отправлено." #: ../src/scmxx/s35_sms.c:288 ../src/scmxx/s35_sms.c:327 #: ../src/smspdu/smspdu_print.c:339 ../src/smspdu/smspdu_print.c:344 msgid "Message reference" msgstr "" #: ../src/scmxx/s35_sms.c:291 ../src/scmxx/s35_sms.c:333 msgid "The phone returned" msgstr "Телефон вернул" #: ../src/scmxx/s35_sms.c:324 #, c-format msgid "An error occured on sending the SMS: %s\n" msgstr "" #: ../src/scmxx/s35_sms.c:329 #, c-format msgid "The message was saved to SMS memory slot %s\n" msgstr "" #: ../src/scmxx/s35_sms.c:336 msgid "An unknown error occured." msgstr "Ð’ÑтретилаÑÑŒ неизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°." #: ../src/scmxx/s35_sms.c:338 msgid "There is no slot free to store the sms." msgstr "Ðет Ñвободных Ñлотов Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ sms." #: ../src/scmxx/s35_sms.c:355 #, c-format msgid "Trying to send SMS from slot %d...\n" msgstr "" #: ../src/scmxx/s35_sms.c:358 msgid "Sending is only possible with SMS of outgoing type." msgstr "" #: ../src/scmxx/s35_sms.c:384 msgid "No SMS text found (or zero length)." msgstr "Ðе найден текÑÑ‚ SMS (или Ð½ÑƒÐ»ÐµÐ²Ð°Ñ Ð´Ð»Ð¸Ð½Ð°)." #: ../src/scmxx/s35_sms.c:391 msgid "Creating PDU..." msgstr "Создание PDU..." #: ../src/scmxx/s35_sms.c:397 msgid "short message encoding failed" msgstr "ошибка кодировки короткого ÑообщениÑ" #: ../src/scmxx/s35_sms.c:434 ../src/scmxx/s35_sms.c:450 msgid "You must define an output target." msgstr "Ðеобходимо определить цель Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð°." #: ../src/scmxx/s35_sms.c:476 ../src/scmxx/s35_sms.c:519 msgid "sent" msgstr "" #: ../src/scmxx/s35_sms.c:477 ../src/scmxx/s35_sms.c:518 msgid "unsent" msgstr "" #: ../src/scmxx/s35_sms.c:478 ../src/scmxx/s35_sms.c:517 msgid "read" msgstr "" #: ../src/scmxx/s35_sms.c:479 ../src/scmxx/s35_sms.c:516 msgid "unread" msgstr "" #: ../src/scmxx/s35_sms.c:482 #, c-format msgid "There are no %s short messages on the phone.\n" msgstr "" #: ../src/scmxx/s35_sms.c:484 msgid "There are no short messages on the phone.\n" msgstr "" #: ../src/scmxx/s35_sms.c:491 msgid "Looking for SMS of specified type..." msgstr "" #: ../src/scmxx/s35_sms.c:501 msgid "Output parsing error." msgstr "" #: ../src/scmxx/s35_sms.c:513 #, c-format msgid "Slot %u is empty.\n" msgstr "" #: ../src/scmxx/s35_sms.c:516 ../src/scmxx/s35_sms.c:517 msgid "incoming" msgstr "" #: ../src/scmxx/s35_sms.c:518 ../src/scmxx/s35_sms.c:519 msgid "outgoing" msgstr "" #: ../src/scmxx/s35_sms.c:523 #, c-format msgid "Found %s, %s SMS in slot %u.\n" msgstr "" #: ../src/scmxx/s35_sms.c:526 #, c-format msgid "Found SMS of unknown type in slot %u.\n" msgstr "" #: ../src/scmxx/s35_sms.c:530 msgid "Returned PDU exceeds buffer size." msgstr "" #: ../src/scmxx/s35_sms.c:638 msgid "Concatenated messages cannot be reassembled." msgstr "" #: ../src/scmxx/s35_sms.c:670 #, c-format msgid "" "\n" "No cache hit for number \"%s\" with match size %d\n" msgstr "" #: ../src/scmxx/s35_sms.c:673 #, c-format msgid "" "\n" "Cache hit for number \"%s\" with match size %d\n" msgstr "" #: ../src/scmxx/s35_sms.c:677 #, c-format msgid "" "\n" "No unique hit in cache for number \"%s\" with match size %d\n" msgstr "" #: ../src/scmxx/s35_sms.c:720 msgid "No output method was specified." msgstr "" #: ../src/scmxx/s35_sms.c:730 msgid "Could not set Phase 2+ compatible mode." msgstr "" #: ../src/scmxx/s35_sms.c:739 msgid "Could not set direct mode." msgstr "" #: ../src/scmxx/s35_sms.c:771 msgid "Failed to decode PDU." msgstr "" #: ../src/scmxx/s35_sms.c:785 msgid "SMS ACK should have been ok but was not." msgstr "" #: ../src/scmxx/s35_sms.c:790 msgid "A new message was stored in the phone." msgstr "" #: ../src/atcommand/common.c:64 msgid "Cannot read from device" msgstr "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¸Ð· уÑтройÑтва" #: ../src/atcommand/common.c:83 msgid "Received" msgstr "ПринÑто" #: ../src/atcommand/common.c:124 msgid "Use the --pin parameter or edit the pin file." msgstr "ИÑпользуйте параметр --pin или иÑправьте pin-файл." #: ../src/atcommand/common.c:136 msgid "Using PIN failed" msgstr "ИÑпользуемый PIN неверен" #: ../src/atcommand/common.c:161 ../src/atcommand/common.c:187 msgid "" "\n" "Sending command" msgstr "" "\n" "Отправка команды" #: ../src/atcommand/common.c:174 ../src/atcommand/common.c:193 msgid "Cannot send at command" msgstr "Ошибка отправки команды" #: ../src/atcommand/common.c:277 msgid "command return value" msgstr "команда вернула значение" #: ../src/atcommand/common.c:283 msgid "nothing" msgstr "ничего" #: ../src/atcommand/common.c:286 #, c-format msgid "Value matched %s.\n" msgstr "Значение Ñовпало Ñ %s.\n" #: ../src/smspdu/smspdu_print.c:43 msgid "Slot" msgstr "Слот" #: ../src/smspdu/smspdu_print.c:58 msgid "To" msgstr "Кому" #: ../src/smspdu/smspdu_print.c:59 msgid "From" msgstr "От" #: ../src/smspdu/smspdu_print.c:60 msgid "Original To" msgstr "" #: ../src/smspdu/smspdu_print.c:101 msgid "Valid for" msgstr "" #: ../src/smspdu/smspdu_print.c:102 msgid "week" msgid_plural "weeks" msgstr[0] "неделÑ" msgstr[1] "недели" msgstr[2] "недель" #: ../src/smspdu/smspdu_print.c:103 msgid "day" msgid_plural "days" msgstr[0] "день" msgstr[1] "днÑ" msgstr[2] "дней" #: ../src/smspdu/smspdu_print.c:104 msgid "hour" msgid_plural "hours" msgstr[0] "чаÑ" msgstr[1] "чаÑа" msgstr[2] "чаÑов" #: ../src/smspdu/smspdu_print.c:105 msgid "minute" msgid_plural "minutes" msgstr[0] "минута" msgstr[1] "минуты" msgstr[2] "минут" #: ../src/smspdu/smspdu_print.c:106 msgid "second" msgid_plural "seconds" msgstr[0] "Ñекунда" msgstr[1] "Ñекунды" msgstr[2] "Ñекунд" #: ../src/smspdu/smspdu_print.c:116 #, fuzzy msgid "Valid until" msgstr "Валидно до" #: ../src/smspdu/smspdu_print.c:117 msgid "Date" msgstr "Дата" #: ../src/smspdu/smspdu_print.c:118 msgid "Message status time" msgstr "" #: ../src/smspdu/smspdu_print.c:132 msgid "SMSC number" msgstr "Ðомер SMSC" #: ../src/smspdu/smspdu_print.c:153 msgid "PDU type" msgstr "Тип PDU" #: ../src/smspdu/smspdu_print.c:159 msgid "PDU flags" msgstr "Флаги PDU" #: ../src/smspdu/smspdu_print.c:160 msgid "StatusRequest" msgstr "" #: ../src/smspdu/smspdu_print.c:162 msgid "RejectDuplicate" msgstr "" #: ../src/smspdu/smspdu_print.c:165 msgid "MoreMessagesToSend" msgstr "" #: ../src/smspdu/smspdu_print.c:169 msgid "ReplyPath" msgstr "" #: ../src/smspdu/smspdu_print.c:180 msgid "Protocol ID" msgstr "ID протокола" #: ../src/smspdu/smspdu_print.c:183 msgid "service-center-specific use" msgstr "" #: ../src/smspdu/smspdu_print.c:187 #, c-format msgid "replace short message type %d" msgstr "" #: ../src/smspdu/smspdu_print.c:190 msgid "short message type 0" msgstr "короткое Ñообщение типа 0" #: ../src/smspdu/smspdu_print.c:191 msgid "obsolete EMS mark" msgstr "" #: ../src/smspdu/smspdu_print.c:192 msgid "return call message" msgstr "" #: ../src/smspdu/smspdu_print.c:194 msgid "ME data download" msgstr "" #: ../src/smspdu/smspdu_print.c:195 msgid "ME de-personalization short message" msgstr "" #: ../src/smspdu/smspdu_print.c:196 msgid "(U)SIM data download" msgstr "" #: ../src/smspdu/smspdu_print.c:202 msgid "SMS-to-SME protocol" msgstr "" #: ../src/smspdu/smspdu_print.c:204 msgid "telematic interworking" msgstr "" #: ../src/smspdu/smspdu_print.c:224 msgid "compressed" msgstr "Ñжато" #: ../src/smspdu/smspdu_print.c:231 #, c-format msgid " (class %d)" msgstr " (клаÑÑ %d)" #: ../src/smspdu/smspdu_print.c:233 msgid "marked as auto-delete" msgstr "помечено как автоудаление" #: ../src/smspdu/smspdu_print.c:241 ../src/smspdu/smsudh.c:45 msgid "Indication" msgstr "" #: ../src/smspdu/smspdu_print.c:243 ../src/smspdu/smsudh.c:47 msgid "voicemail" msgstr "голоÑÐ¾Ð²Ð°Ñ Ð¿Ð¾Ñ‡Ñ‚Ð°" #: ../src/smspdu/smspdu_print.c:244 ../src/smspdu/smsudh.c:48 msgid "fax" msgstr "факÑ" #: ../src/smspdu/smspdu_print.c:245 ../src/smspdu/smsudh.c:49 msgid "e-mail" msgstr "" #: ../src/smspdu/smspdu_print.c:246 ../src/smspdu/smsudh.c:50 msgid "misc." msgstr "разное" #: ../src/smspdu/smspdu_print.c:249 #, c-format msgid "new %s message(s) waiting" msgstr "" #: ../src/smspdu/smspdu_print.c:251 #, c-format msgid "no more %s messages waiting" msgstr "" #: ../src/smspdu/smspdu_print.c:268 msgid "Message length" msgstr "Длина ÑообщениÑ" #: ../src/smspdu/smspdu_print.c:292 msgid "transaction completed" msgstr "Ñ‚Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ð¸Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð°" #: ../src/smspdu/smspdu_print.c:296 msgid "SC still trying to transfer short message" msgstr "" #: ../src/smspdu/smspdu_print.c:299 msgid "received by SME" msgstr "получено SME" #: ../src/smspdu/smspdu_print.c:300 msgid "forwarded to SME but delivery cannot be confirmed" msgstr "" #: ../src/smspdu/smspdu_print.c:301 msgid "replaced" msgstr "заменено" #: ../src/smspdu/smspdu_print.c:303 msgid "congestion" msgstr "" #: ../src/smspdu/smspdu_print.c:305 msgid "SME busy" msgstr "SME занÑÑ‚" #: ../src/smspdu/smspdu_print.c:307 msgid "no response from SME" msgstr "" #: ../src/smspdu/smspdu_print.c:309 ../src/smspdu/smspdu_print.c:325 msgid "service rejected" msgstr "" #: ../src/smspdu/smspdu_print.c:312 msgid "QoS not available" msgstr "QoS не доÑтупен" #: ../src/smspdu/smspdu_print.c:314 msgid "error in SME" msgstr "ошибка в SME" #: ../src/smspdu/smspdu_print.c:315 msgid "remote procedure error" msgstr "" #: ../src/smspdu/smspdu_print.c:316 msgid "incompatible destination" msgstr "" #: ../src/smspdu/smspdu_print.c:317 msgid "connection rejected by SME" msgstr "Ñоединение отвергнуто SME" #: ../src/smspdu/smspdu_print.c:318 msgid "not obtainable" msgstr "не доÑтижимо" #: ../src/smspdu/smspdu_print.c:319 msgid "no interworking available" msgstr "" #: ../src/smspdu/smspdu_print.c:320 msgid "validity period expired" msgstr "" #: ../src/smspdu/smspdu_print.c:321 msgid "deleted by sender" msgstr "" #: ../src/smspdu/smspdu_print.c:322 msgid "deleted by service center" msgstr "" #: ../src/smspdu/smspdu_print.c:323 msgid "message does not exist" msgstr "" #: ../src/smspdu/smspdu_print.c:327 msgid "Message status" msgstr "" #: ../src/smspdu/smspdu_print.c:328 msgid "Message status reason" msgstr "" #: ../src/smspdu/smspdu_print.c:428 ../src/smspdu/smspdu_dec.c:602 msgid "Unsupported pdu type" msgstr "" #: ../src/smspdu/smspdu_enc.c:78 ../src/smspdu/smspdu_enc.c:86 #: ../src/smspdu/smsud_enc.c:237 ../src/smspdu/smsud_enc.c:239 #: ../src/charsets/ucs2.c:34 ../src/charsets/ucs4.c:36 #: ../src/charsets/ucs4_dec.c:78 ../src/charsets/ucs4_dec.c:157 #: ../src/charsets/ucs4_dec.c:168 msgid "Error" msgstr "Ошибка" #: ../src/smspdu/smspdu_enc.c:78 msgid "No valid number specified." msgstr "" #: ../src/smspdu/smspdu_enc.c:86 #, c-format msgid "%s: sms number cannot have more than %lu digits.\n" msgstr "" #: ../src/smspdu/smspdu_enc.c:161 ../src/smspdu/smsud_enc.c:211 #: ../src/helper.h:38 msgid "Notice" msgstr "Замечание" #: ../src/smspdu/smspdu_enc.c:161 msgid "Selecting UCS-2 character set." msgstr "" #: ../src/smspdu/smsud_enc.c:169 #, c-format msgid "Delaying for %2d seconds, press Ctrl+C to abort." msgstr "" #: ../src/smspdu/smsud_enc.c:213 #, c-format msgid "This message has %lu character" msgid_plural "This message has %lu characters" msgstr[0] "" msgstr[1] "" msgstr[2] "" #: ../src/smspdu/smsud_enc.c:219 #, c-format msgid "and will use %u part.\n" msgid_plural "and will use %u parts.\n" msgstr[0] "" msgstr[1] "" msgstr[2] "" #: ../src/smspdu/smsud_enc.c:224 #, c-format msgid "%s: The suggested maximum parts count is %d.\n" msgstr "" #: ../src/smspdu/smsud_enc.c:225 ../src/helper.h:37 msgid "Warning" msgstr "Предупреждение" #: ../src/smspdu/smsud_enc.c:236 #, c-format msgid "%s: message part count exceeds maximum of 255\n" msgstr "" #: ../src/smspdu/smsud_enc.c:238 #, c-format msgid "%s: SMS text is too long (max. %d characters).\n" msgstr "" #: ../src/smspdu/smsud_enc.c:243 msgid "" "Please be aware that some characters are encoded as 14bit (instead of 7bit), " "e.g. the euro character." msgstr "" #: ../src/smspdu/smsudh.c:52 #, c-format msgid "%d %s message waiting" msgid_plural "%d %s messages waiting" msgstr[0] "" msgstr[1] "" #: ../src/smspdu/smsudh.c:59 msgid "Wireless control message protocol data unit" msgstr "" #: ../src/smspdu/smsudh.c:65 #, c-format msgid "SIM toolkit security header" msgstr "" #: ../src/smspdu/smsudh.c:70 ../src/smspdu/smsudh.c:76 #, c-format msgid "Multipart message: sequence number = %d, part %d of %d" msgstr "" #: ../src/smspdu/smsudh.c:82 ../src/smspdu/smsudh.c:88 #, c-format msgid "Application port: destination port = %d, originator port = %d" msgstr "" #: ../src/smspdu/smsudh.c:94 msgid "The following headers were created by" msgstr "Следующие заголовки были Ñозданы" #: ../src/smspdu/smsudh.c:97 msgid "original sender" msgstr "оригинальный отправитель" #: ../src/smspdu/smsudh.c:100 msgid "original receiver" msgstr "оригинальный получатель" #: ../src/smspdu/smsudh.c:106 #, c-format msgid "(unknown value %d)" msgstr "(неизвеÑтное значение %d)" #: ../src/smspdu/smsudh.c:125 #, c-format msgid "Ignored header type 0x%02x" msgstr "Игнорируемый тип заголовка 0x%02x" #: ../src/smspdu/smsudh.c:146 msgid "Message header" msgstr "Заголовок ÑообщениÑ" #: ../src/charsets/gsm_dec.c:38 #, c-format msgid "Ups, value 0x%02x not found in list of valid GSM characters.\n" msgstr "Значение 0x%02x не найдено в ÑпиÑке возможных Ñимволом GSM.\n" #: ../src/charsets/ucs4_enc.c:38 msgid "Error on text conversion" msgstr "" #: ../src/charsets/ucs4_enc.c:47 ../src/charsets/ucs4_dec.c:120 #, c-format msgid "Error on text conversion from charset \"%s\" to charset \"%s\": %s\n" msgstr "" #: ../src/charsets/local_dec.c:62 #, c-format msgid "%s: character %ld is not a hexdigit.\n" msgstr "%s: Ñимвол %ld не шеÑÑ‚Ð½Ð°Ð´Ñ†Ð°Ñ‚Ð¸Ñ€Ð¸Ñ‡Ð½Ð°Ñ Ñ†Ð¸Ñ„Ñ€Ð°.\n" #: ../src/charsets/local_dec.c:63 ../src/charsets/local_dec.c:70 msgid "Error on text conversion to internal charset" msgstr "Ошибка в конвертировании текÑта во внутреннюю таблицу Ñимволов" #: ../src/charsets/local_dec.c:69 #, c-format msgid "%s: character %ld is not ACSII.\n" msgstr "%s: Ñимвол %ld не ACSII.\n" #: ../src/charsets/gsm_enc.c:40 #, c-format msgid "Unicode value 0x%04lx is not a GSM character\n" msgstr "Значение юникода 0x%04lx не ÑвлÑетÑÑ Ñимволом GSM\n" #: ../src/charsets/ucs2.c:34 ../src/charsets/ucs4.c:36 #, c-format msgid "%s: the iconv implementation of this system does not support %s" msgstr "" #: ../src/charsets/ucs4_dec.c:78 #, c-format msgid "%s: Unicode character 0x%lx cannot be converted.\n" msgstr "" #: ../src/charsets/ucs4_dec.c:158 msgid "insufficient memory on unicode decoding." msgstr "недоÑтаточно памÑти Ð´Ð»Ñ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ ÑŽÐ½Ð¸ÐºÐ¾Ð´Ð°." #: ../src/charsets/ucs4_dec.c:159 msgid "Please report as bug." msgstr "Отправьте, пожалуйÑта, отчёт об ошибке." #: ../src/charsets/ucs4_dec.c:164 msgid "Error with internal charset" msgstr "" #: ../src/charsets/local.c:70 #, c-format msgid "Using \"%s\" as system character set." msgstr "ИÑпользуетÑÑ \"%s\" как ÑиÑÑ‚ÐµÐ¼Ð½Ð°Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ð° Ñимволов." #: ../src/helper.h:36 msgid "" "\n" "Error" msgstr "" "\n" "Ошибка" #: ../src/helper.h:39 msgid "Debug" msgstr "Отладка" scmxx-0.9.0/po/fr.po0000644000175000017500000013406010401300375014076 0ustar hendrikhendrik# French translations for scmxx package # Traduction anglaise du package scmxx. # Copyright (C) 2004 THE scmxx'S COPYRIGHT HOLDER # This file is distributed under the same license as the scmxx package. # , 2004. # msgid "" msgstr "" "Project-Id-Version: scmxx 0.7.4pre1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-01 12:06+0100\n" "PO-Revision-Date: 2005-07-14 10:58+0200\n" "Last-Translator: \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../src/helper/mem.c:29 msgid "Memory allocation failure" msgstr "Erreur lors de l'allocation mémoire" #: ../src/helper/file.c:42 #, fuzzy, c-format msgid "Could not access %s: %s\n" msgstr "Erreur, impossible d'accéder à %s : %s\n" #: ../src/helper/file.c:48 #, c-format msgid "Accessing %s\n" msgstr "%s en cours d'accès\n" #: ../src/helper/file.c:50 msgid "Please input the data and finish with Ctrl-D on an empty line" msgstr "" "Merci detaper Ctrl-D sur une ligne vide à l'issue de l'introduction des " "données" #: ../src/helper/file.c:62 #, c-format msgid "%s could not be created: %s\n" msgstr "Impossible de créer %s : %s\n" #: ../src/helper/file.c:64 #, c-format msgid "%s created.\n" msgstr "%s créé.\n" #: ../src/helper/file.c:99 #, fuzzy, c-format msgid "%s has %d byte.\n" msgid_plural "%s has %d bytes.\n" msgstr[0] "%s comporte %d octets.\n" msgstr[1] "%s comporte %d octets.\n" #: ../src/adr2vcf/opt.c:61 ../src/smi/opt.c:53 ../src/scmxx/scmxx_opt.c:206 #, fuzzy msgid "options" msgstr "Options" #: ../src/adr2vcf/opt.c:76 ../src/smi/opt.c:62 ../src/scmxx/scmxx_opt.c:285 #, fuzzy msgid "charset" msgstr "caractères" #: ../src/options/common.c:129 msgid "Syntax" msgstr "" #: ../src/scmxx/tty_bluetooth.c:100 ../src/scmxx/tty_serial.c:161 #: ../src/scmxx/tty_serial.c:250 ../src/scmxx/tty_serial.c:255 #: ../src/scmxx/tty_serial.c:262 msgid "system error code" msgstr "" #: ../src/scmxx/tty_bluetooth.c:156 msgid "protocol not implemented" msgstr "" #: ../src/scmxx/actions.c:90 msgid "Sending reset frame" msgstr "Expédition d'une trame de réinitialisation" #: ../src/scmxx/actions.c:107 ../src/scmxx/ttyaccess.c:53 #: ../src/scmxx/pbookphone.c:76 ../src/scmxx/pbookphone.c:82 msgid "done" msgstr "fait" #: ../src/scmxx/actions.c:197 msgid "no charset specified." msgstr "Vous n'avez pas précisé de jeu de caractères" #: ../src/scmxx/actions.c:214 msgid "no number specified." msgstr "Il manque le numéro de téléphone" #: ../src/scmxx/actions.c:216 msgid "no valid number specified." msgstr "Numéro de téléphone incorrect" #: ../src/scmxx/actions.c:222 #, c-format msgid "SMS server number was set to %s\n" msgstr "Le numéro du centre de services est désormais : %s\n" #: ../src/scmxx/actions.c:224 ../src/scmxx/s35_files.c:221 #: ../src/scmxx/s35_files.c:234 ../src/scmxx/s35_sms.c:463 msgid "unknown cause" msgstr "Cause inconnue" #: ../src/scmxx/actions.c:260 msgid "Time was synchronized" msgstr "L'horloge est synchronisée" #: ../src/scmxx/actions.c:262 msgid "Time could not be synchronized" msgstr "L'horloge n'a pas pu être synchronisée" #: ../src/scmxx/actions.c:450 msgid "not checked in, not seeking" msgstr "pas d'association, pas de recherche de réseau" #: ../src/scmxx/actions.c:451 msgid "checked in" msgstr "associé" #: ../src/scmxx/actions.c:452 msgid "not checked in, but seeking a network" msgstr "pas associé mais recherche un réseau" #: ../src/scmxx/actions.c:453 msgid "check-in denied by network" msgstr "association refusée par le réseau" #: ../src/scmxx/actions.c:454 ../src/scmxx/actions.c:498 msgid "registered, roaming" msgstr "enregistré auprès du réseau" #: ../src/scmxx/actions.c:455 ../src/scmxx/actions.c:499 msgid "unknown status" msgstr "état indéterminé" #: ../src/scmxx/actions.c:494 msgid "not registered, not searching" msgstr "non enregistré, pas de recherche" #: ../src/scmxx/actions.c:495 msgid "registered, home network" msgstr "enregistré, réseau d'accueil" #: ../src/scmxx/actions.c:496 msgid "not registered, searching" msgstr "non enregistré, recherche d'un réseau" #: ../src/scmxx/actions.c:497 msgid "registration denied by network" msgstr "enregistrement refusé par le réseau" #: ../src/scmxx/actions.c:550 msgid "Vendor" msgstr "Vendeur" #: ../src/scmxx/actions.c:551 msgid "Model" msgstr "Modèle" #: ../src/scmxx/actions.c:552 msgid "Revision" msgstr "Révision" #: ../src/scmxx/actions.c:554 msgid "Battery" msgstr "Batterie" #: ../src/scmxx/actions.c:555 msgid "Charsets" msgstr "Jeux de caractères" #: ../src/scmxx/actions.c:556 msgid "Time" msgstr "Heure" #: ../src/scmxx/actions.c:558 msgid "card ID" msgstr "Identifiant de la carte SIM" #: ../src/scmxx/actions.c:559 msgid "Status" msgstr "Etat" #: ../src/scmxx/actions.c:560 msgid "Area code" msgstr "Préfixe" #: ../src/scmxx/actions.c:561 msgid "Cell ID" msgstr "Identifiant de cellule" #: ../src/scmxx/actions.c:562 msgid "Operator" msgstr "Opérateur" #: ../src/scmxx/actions.c:563 msgid "SMS server" msgstr "Centre de services" #: ../src/scmxx/actions.c:564 msgid "Signal" msgstr "Signal" #: ../src/scmxx/actions.c:566 msgid "GPRS class" msgstr "Classe GPRS" #: ../src/scmxx/actions.c:567 msgid "GRPS status" msgstr "Etat GPRS" #: ../src/scmxx/actions.c:576 msgid "Phone related information" msgstr "Informations propres au combiné" #: ../src/scmxx/actions.c:605 ../src/scmxx/memtypes.c:411 #: ../src/scmxx/memtypes.c:412 ../src/scmxx/memtypes.c:458 #: ../src/scmxx/memtypes.c:460 ../src/scmxx/memtypes.c:665 #: ../src/scmxx/memtypes.c:666 #, c-format msgid "none" msgstr "aucun" #: ../src/scmxx/actions.c:630 msgid "SIM card related information" msgstr "Informations propores à la SIM" #: ../src/scmxx/actions.c:645 msgid "Network related information" msgstr "Informations propres au réseau" #: ../src/scmxx/actions.c:707 msgid "detached" msgstr "détaché" #: ../src/scmxx/actions.c:709 msgid "attached" msgstr "attaché" #: ../src/scmxx/actions.c:719 msgid "Binary files" msgstr "Fichiers binaires" #: ../src/scmxx/actions.c:720 msgid "Phonebooks" msgstr "Annuaires" #: ../src/scmxx/actions.c:721 msgid "SMS storages" msgstr "Zones de stockage SMS" #: ../src/scmxx/actions.c:751 msgid "Available memories" msgstr "Mémoires disponibles" #: ../src/scmxx/actions.c:756 ../src/smspdu/smspdu_print.c:223 #: ../src/smspdu/smspdu_print.c:235 msgid "Settings" msgstr "Réglagles" #: ../src/scmxx/scmxx.c:78 msgid "[files...]" msgstr "" #: ../src/scmxx/scmxx.c:91 ../src/scmxx/scmxx.c:95 msgid "Malformed bluetooth address" msgstr "" #: ../src/scmxx/scmxx.c:114 msgid "OK, a modem device is present." msgstr "Ok, modem téléphonique présent." #: ../src/scmxx/scmxx.c:116 msgid "cannot communicate with device." msgstr "Impossible de joindre l'appareil." #: ../src/scmxx/scmxx.c:135 #, c-format msgid "Detected %s %s\n" msgstr "%s détecté : %s\n" #: ../src/scmxx/scmxx.c:137 #, c-format msgid "Comparing to registered model %s\n" msgstr "Comparaison avec le modèle enregistré : %s\n" #: ../src/scmxx/scmxx.c:144 #, fuzzy msgid "this model was not confirmed to be working with this software." msgstr "Ce téléphone n'a pas été validé avec ce logiciel." #: ../src/scmxx/scmxx.c:148 msgid "" "phones from this vendor were not confirmed to be working with this software!" msgstr "Les téléphone de cette marque n'ont pas été validés avec ce logiciel." #: ../src/scmxx/scmxx.c:160 msgid "you must define a number with the --number option." msgstr "Vous devez préciser un numéro de téléphone avec l'option --number." #: ../src/scmxx/scmxx.c:176 msgid "you must specifiy a valid memory type." msgstr "Vous devez préciser un type de mémoire valide." #: ../src/scmxx/ttyaccess.c:37 #, fuzzy, c-format msgid "Accessing device %s..." msgstr "%s en cours d'accès\n" #: ../src/scmxx/ttyaccess.c:49 #, fuzzy, c-format msgid "Cannot open %s\n" msgstr "Erreur, impossible d'accéder à %s : %s\n" #: ../src/scmxx/ttyaccess.c:58 #, fuzzy, c-format msgid "Waiting for %d seconds as requested...\n" msgstr "En attente de requête de données ..." #: ../src/scmxx/memtypes.c:181 msgid "bitmap" msgstr "bitmap" #: ../src/scmxx/memtypes.c:183 msgid "midi" msgstr "midi" #: ../src/scmxx/memtypes.c:185 msgid "vCalendar" msgstr "vCalendar" #: ../src/scmxx/memtypes.c:187 msgid "vCard (address book)" msgstr "vCard (annuaire)" #: ../src/scmxx/memtypes.c:189 msgid "EMS animation" msgstr "animation EMS" #: ../src/scmxx/memtypes.c:191 msgid "T9 database" msgstr "base de données T9" #: ../src/scmxx/memtypes.c:193 msgid "UCS-2 encoded dir name" msgstr "nom de répertoire encodé en UCS-2" #: ../src/scmxx/memtypes.c:234 ../src/scmxx/memtypes.c:400 #: ../src/scmxx/memtypes.c:618 ../src/scmxx/scmxx_opt.c:249 msgid "mem" msgstr "mémoire" #: ../src/scmxx/memtypes.c:235 msgid "readable" msgstr "lisible" #: ../src/scmxx/memtypes.c:236 ../src/scmxx/memtypes.c:402 msgid "writable" msgstr "inscriptible" #: ../src/scmxx/memtypes.c:237 ../src/scmxx/memtypes.c:405 #: ../src/scmxx/memtypes.c:621 ../src/scmxx/lock.c:219 msgid "description" msgstr "description" #: ../src/scmxx/memtypes.c:401 ../src/scmxx/memtypes.c:619 msgid "slots" msgstr "emplacements mémoire" #: ../src/scmxx/memtypes.c:403 msgid "digits" msgstr "caractères numériques" #: ../src/scmxx/memtypes.c:404 msgid "chars" msgstr "caractères" #: ../src/scmxx/memtypes.c:413 ../src/scmxx/memtypes.c:414 #: ../src/scmxx/memtypes.c:472 ../src/scmxx/memtypes.c:474 msgid "yes" msgstr "oui" #: ../src/scmxx/memtypes.c:415 ../src/scmxx/memtypes.c:416 #: ../src/scmxx/memtypes.c:477 ../src/scmxx/memtypes.c:479 msgid "no" msgstr "non" #: ../src/scmxx/memtypes.c:440 #, c-format msgid "could not get limits of phonebook %s.\n" msgstr "impossible de déterminer les limites de l'annuaire %s.\n" #: ../src/scmxx/memtypes.c:504 msgid "SIM fix-dialing phonebook" msgstr "annuaire fixe de la SIM" #: ../src/scmxx/memtypes.c:506 msgid "SIM phonebook" msgstr "annuaire de la SIM" #: ../src/scmxx/memtypes.c:509 msgid "last calls (mobile)" msgstr "derniers appels (téléphone)" #: ../src/scmxx/memtypes.c:511 msgid "last calls (SIM)" msgstr "derniers appels (SIM)" #: ../src/scmxx/memtypes.c:514 msgid "own numbers" msgstr "numéros personnels" #: ../src/scmxx/memtypes.c:516 msgid "mobile equipment phonebook" msgstr "annuaire de l'équipement mobile" #: ../src/scmxx/memtypes.c:518 msgid "barred numbers" msgstr "numéros interdits" #: ../src/scmxx/memtypes.c:520 msgid "service numbers" msgstr "numéros de service" #: ../src/scmxx/memtypes.c:523 msgid "missed calls" msgstr "appels perdus" #: ../src/scmxx/memtypes.c:526 msgid "callback numbers" msgstr "numéros de rappel" #: ../src/scmxx/memtypes.c:528 msgid "blacklist numbers" msgstr "liste noire" #: ../src/scmxx/memtypes.c:530 msgid "mailbox numbers" msgstr "numéros de boîtes aux lettres" #: ../src/scmxx/memtypes.c:532 msgid "red book (VIP in CS)" msgstr "liste rouge (VIP)" #: ../src/scmxx/memtypes.c:534 msgid "common sortable (FD+SM+ME)" msgstr "mémoire commune pouvant être triée (FD + SM + ME)" #: ../src/scmxx/memtypes.c:536 msgid "address book numbers" msgstr "numéros de l'annuaire" #: ../src/scmxx/memtypes.c:620 msgid "used" msgstr "utilisé" #: ../src/scmxx/memtypes.c:681 msgid "SIM memory" msgstr "mémoire SIM" #: ../src/scmxx/memtypes.c:683 msgid "mobile equipment memory" msgstr "mémoire de l'équipement mobile" #: ../src/scmxx/s35_pbook.c:108 ../src/scmxx/s35_pbook.c:128 #: ../src/scmxx/s35_pbook.c:185 msgid "something went wrong with sending the phonebook entries" msgstr "quelque chose s'est mal déroulé lors de la mise à jour de l'annuaire" #: ../src/scmxx/s35_pbook.c:121 #, c-format msgid "invalid phonebook file %s.\n" msgstr "fichier annuaire %s invalide.\n" #: ../src/scmxx/s35_pbook.c:124 #, c-format msgid "empty phonebook file %s.\n" msgstr "fichier annuaire %s vide.\n" #: ../src/scmxx/s35_pbook.c:148 msgid "Nothing to get." msgstr "Rien à extraire." #: ../src/scmxx/s35_pbook.c:170 #, c-format msgid "%s deleted.\n" msgstr "%s effacé.\n" #: ../src/scmxx/s35_pbook.c:172 msgid "Possible data corruption!" msgstr "Possibilité de données corrompues !" #: ../src/scmxx/s35_pbook.c:188 msgid "the selected phonebook is not writable" msgstr "" #: ../src/scmxx/s35_pbook.c:282 ../src/scmxx/s35_files.c:48 #: ../src/scmxx/s35_sms.c:53 msgid "You must specify a valid action." msgstr "Vous devez préciser une action valide." #: ../src/scmxx/s35_pbook.c:286 #, c-format msgid "Cannot select memory %s\n" msgstr "Impossible de sélectionner mémoire %s\n" #: ../src/scmxx/s35_pbook.c:293 #, fuzzy msgid "could not determine last slot." msgstr "Impossible de paramétrer le mode direct." #: ../src/scmxx/s35_pbook.c:298 ../src/scmxx/s35_files.c:79 msgid "You must specify exactly one operation." msgstr "Vous ne pouvez préciser qu'une seule opération à la fois." #: ../src/scmxx/s35_pbook.c:312 msgid "invalid slot defined" msgstr "" #: ../src/scmxx/pbookphone.c:54 ../src/scmxx/pbookphone.c:240 #: ../src/scmxx/pbookphone.c:287 #, fuzzy, c-format msgid "getting limits of phonebook %s failed.\n" msgstr "Erreur lors de la détermination des limites de l'annuaire %s.\n" #: ../src/scmxx/pbookphone.c:59 #, c-format msgid "slot %d is out of range %d-%d.\n" msgstr "l'emplacement %d est en dehors de la fourchette %d-%d.\n" #: ../src/scmxx/pbookphone.c:64 #, c-format msgid "too many entries (max. %d).\n" msgstr "" #: ../src/scmxx/pbookphone.c:68 #, c-format msgid "Updating entries %s(%d-%d)...\n" msgstr "Mise à jour des entrées %s(%d-%d) ...\n" #: ../src/scmxx/pbookphone.c:79 #, c-format msgid "Updating one entry in slot %d of memory %s..." msgstr "Mise à jour d'une entrée de l'emplacement %d de la mémoire %s ..." #: ../src/scmxx/pbookphone.c:183 ../src/scmxx/pbookphone.c:212 #, fuzzy, c-format msgid "reading from phonebook %s failed: %s\n" msgstr "Erreur à la lecture de l'annuaire %s : %s\n" #: ../src/scmxx/pbookphone.c:192 #, fuzzy, c-format msgid "parsing entry failed: %s\n" msgstr "Erreur lors du traitement de l'entrée : %s\n" #: ../src/scmxx/pbookphone.c:195 #, c-format msgid "phone returned unexpected entry %u\n" msgstr "le téléphone a retourné l'entrée inattendue %u\n" #: ../src/scmxx/pbookphone.c:249 ../src/scmxx/s35_files.c:207 msgid "Trying to find an empty slot..." msgstr "Tentative de trouver un emplacement vide ..." #: ../src/scmxx/pbookphone.c:260 ../src/scmxx/s35_files.c:151 #, c-format msgid "Detected empty slot %d\n" msgstr "L'emplacement %d est vide\n" #: ../src/scmxx/pbookphone.c:295 #, fuzzy msgid "Receiving phonebook entries..." msgstr "Réception des entrées de l'annuaire %s(%d-%d) ...\n" #: ../src/scmxx/dial.c:114 #, c-format msgid "Using dialing sequence %s.\n" msgstr "Usage de la séquence %s.\n" #: ../src/scmxx/dial.c:117 msgid "dialing failed" msgstr "" #: ../src/scmxx/tty_serial.c:98 ../src/scmxx/tty_serial.c:261 #: ../src/scmxx/tty_serial.c:283 ../src/scmxx/tty_serial.c:307 msgid "Error in setting port attributes" msgstr "" #: ../src/scmxx/tty_serial.c:108 msgid "Error in setting transmission speed" msgstr "" #: ../src/scmxx/tty_serial.c:126 ../src/scmxx/tty_serial.c:160 #: ../src/scmxx/tty_serial.c:194 msgid "Error in flushing buffers" msgstr "" #: ../src/scmxx/tty_serial.c:254 ../src/scmxx/tty_serial.c:290 msgid "Error in getting port attributes" msgstr "" #: ../src/scmxx/scmxx_opt.c:207 #, fuzzy msgid "actions" msgstr "Actions" #: ../src/scmxx/scmxx_opt.c:208 #, fuzzy msgid "memory types" msgstr "Types de mémoire " #: ../src/scmxx/scmxx_opt.c:209 #, fuzzy msgid "memory type options" msgstr "Options de type mémoire " #: ../src/scmxx/scmxx_opt.c:210 msgid "SMS options" msgstr "Options SMS " #: ../src/scmxx/scmxx_opt.c:215 msgid "rate" msgstr "" #: ../src/scmxx/scmxx_opt.c:216 msgid "specify another than the compiled in baudrate" msgstr "Précise un autre débit" #: ../src/scmxx/scmxx_opt.c:218 msgid "binary file transfer" msgstr "tranfert de fichier binaire" #: ../src/scmxx/scmxx_opt.c:219 msgid "device" msgstr "" #: ../src/scmxx/scmxx_opt.c:220 msgid "specify another than the compiled in device" msgstr "Précise un autre périphérique" #: ../src/scmxx/scmxx_opt.c:221 ../src/scmxx/scmxx_opt.c:283 #, fuzzy msgid "seconds" msgstr "seconde" #: ../src/scmxx/scmxx_opt.c:222 msgid "return after this time if there is no answer" msgstr "" #: ../src/scmxx/scmxx_opt.c:224 #, fuzzy msgid "dials a number (requires option -n)" msgstr "précise le numéro du centre de services (requiert l'option -n)" #: ../src/scmxx/scmxx_opt.c:226 msgid "send/receive without storing in the phone" msgstr "envoi/reçoit sans stocker dans le téléphone" #: ../src/scmxx/scmxx_opt.c:228 msgid "disable e.g. a lock" msgstr "" #: ../src/scmxx/scmxx_opt.c:230 msgid "enable e.g. a lock" msgstr "" #: ../src/scmxx/scmxx_opt.c:232 msgid "make the sms appear directly (if supported by the receiving entity)" msgstr "" "fait en sorte que le SMS apparaisse directement (si cela est supporté par " "l'appareil du destinaire)" #: ../src/scmxx/scmxx_opt.c:234 msgid "get something from the phone" msgstr "récupère quelque chose dans le téléphone" #: ../src/scmxx/scmxx_opt.c:236 #, fuzzy msgid "hangup all active calls" msgstr "refuse tous les appels sortants" #: ../src/scmxx/scmxx_opt.c:238 msgid "print this message" msgstr "affiche ce messae" #: ../src/scmxx/scmxx_opt.c:240 msgid "do not use current serial port settings as base (default)" msgstr "" #: ../src/scmxx/scmxx_opt.c:242 msgid "show various information" msgstr "affiche différentes informations" #: ../src/scmxx/scmxx_opt.c:244 msgid "use current serial port settings as base" msgstr "" #: ../src/scmxx/scmxx_opt.c:245 ../src/scmxx/lock.c:217 msgid "lock" msgstr "verrouillage" #: ../src/scmxx/scmxx_opt.c:246 #, fuzzy msgid "selects a lock to change (might need option --pin)" msgstr "modifie l'état du verrouillage (peut réclamer l'option --pin)" #: ../src/scmxx/scmxx_opt.c:248 msgid "show lock information" msgstr "affiche les informations de verrouillage" #: ../src/scmxx/scmxx_opt.c:250 msgid "select a memory" msgstr "sélectionne une mémoire" #: ../src/scmxx/scmxx_opt.c:252 msgid "show memory information" msgstr "affiche des informations mémoire" #: ../src/scmxx/scmxx_opt.c:253 #, fuzzy msgid "number" msgstr "numéros personnels" #: ../src/scmxx/scmxx_opt.c:254 msgid "specify number on send" msgstr "précise le numéro du correspondant" #: ../src/scmxx/scmxx_opt.c:255 msgid "file" msgstr "" #: ../src/scmxx/scmxx_opt.c:256 msgid "specify a file when getting ('-' for stdout)" msgstr "" "Précise le fichier de sortie lors de la récupération ( '-' pour le fichier " "standard )" #: ../src/scmxx/scmxx_opt.c:258 msgid "phonebook" msgstr "annuaire" #: ../src/scmxx/scmxx_opt.c:260 msgid "use this pin if one is needed" msgstr "utilise ce pin code si nécessaire" #: ../src/scmxx/scmxx_opt.c:261 msgid "program" msgstr "" #: ../src/scmxx/scmxx_opt.c:262 msgid "specify a pipe to use" msgstr "Précise un programme de traitement de la sortie" #: ../src/scmxx/scmxx_opt.c:264 msgid "decreases verbosity by 1" msgstr "décrémente le niveau d'aide d'un" #: ../src/scmxx/scmxx_opt.c:266 msgid "removes something from the phone" msgstr "supprime quelque chose du téléphone" #: ../src/scmxx/scmxx_opt.c:268 #, fuzzy msgid "sends some special characters" msgstr "envoi quelques caractères spéciaux et sort" #: ../src/scmxx/scmxx_opt.c:270 msgid "sends something to the phone" msgstr "expédie quelque chose vers téléphone" #: ../src/scmxx/scmxx_opt.c:272 msgid "set the SMSC number (requires option -n)" msgstr "précise le numéro du centre de services (requiert l'option -n)" #: ../src/scmxx/scmxx_opt.c:274 msgid "synchronize time on phone" msgstr "synchronise l'horloge du téléphone " #: ../src/scmxx/scmxx_opt.c:275 #, fuzzy msgid "slot" msgstr "emplacements mémoire" #: ../src/scmxx/scmxx_opt.c:276 msgid "select a slot or slot group" msgstr "sélectionne un emplacement mémoire ou un groupe d'emplacements" #: ../src/scmxx/scmxx_opt.c:278 msgid "short messages" msgstr "messages courts" #: ../src/scmxx/scmxx_opt.c:279 msgid "method" msgstr "" #: ../src/scmxx/scmxx_opt.c:280 #, fuzzy msgid "sort short message on getting([type,][slot|time])" msgstr "trie les SMS à la récupération (type ou emplacement)" #: ../src/scmxx/scmxx_opt.c:282 msgid "request a status report from the SMSC" msgstr "réclame un compte rendu au centre de services" #: ../src/scmxx/scmxx_opt.c:284 msgid "wait this time after opening device" msgstr "" #: ../src/scmxx/scmxx_opt.c:286 msgid "use charset for input/output from/to system" msgstr "" #: ../src/scmxx/scmxx_opt.c:287 msgid "text" msgstr "" #: ../src/scmxx/scmxx_opt.c:288 msgid "specify content on send" msgstr "précise le contenu à expédier" #: ../src/scmxx/scmxx_opt.c:290 msgid "use UCS-2 (unicode) as charset" msgstr "utilise le jeu de caractères UCS-2 (unicode)" #: ../src/scmxx/scmxx_opt.c:292 msgid "increases verbosity by 1" msgstr "augmente le niveau d'aide d'un" #: ../src/scmxx/scmxx_opt.c:294 msgid "print the version number" msgstr "affiche la version" #: ../src/scmxx/pinfile.c:37 ../src/scmxx/pinfile.c:42 #: ../src/scmxx/pinfile.c:48 msgid "File check failed" msgstr "" #: ../src/scmxx/pinfile.c:42 msgid "file is not a regular file" msgstr "" #: ../src/scmxx/pinfile.c:48 msgid "file is group or world accessible" msgstr "" #: ../src/scmxx/pinfile.c:62 msgid "File read failed" msgstr "" #: ../src/scmxx/pinfile.c:193 #, c-format msgid "Looking for %s for %s %s, %s %s in %s..." msgstr "" #: ../src/scmxx/pinfile.c:196 #, fuzzy, c-format msgid "Looking for %s for %s %s in %s..." msgstr "Recherche d'un SMS du type précisé ..." #: ../src/scmxx/pinfile.c:208 ../src/scmxx/pinfile.c:218 #: ../src/scmxx/pinfile.c:237 msgid "not found" msgstr "" #: ../src/scmxx/pinfile.c:240 #, fuzzy msgid "found" msgstr "Trouvé" #: ../src/scmxx/lock.c:23 #, fuzzy msgid "phone locked to SIM (device code)" msgstr "téléphone verrouillé (nécessite le code PIN)" #: ../src/scmxx/lock.c:25 #, fuzzy msgid "SIM card (PIN)" msgstr "La carte SIM réclame le code PIN" #: ../src/scmxx/lock.c:29 msgid "FDN lock" msgstr "verrouillage FDN" #: ../src/scmxx/lock.c:31 msgid "bar all outgoing calls" msgstr "refuse tous les appels sortants" #: ../src/scmxx/lock.c:33 msgid "bar outgoing international calls" msgstr "refuse les appels sortants internationaux" #: ../src/scmxx/lock.c:35 msgid "bar outgoing international calls except to home country" msgstr "refuse les appels sortants internationnaux sauf vers le pays d'origine" #: ../src/scmxx/lock.c:37 msgid "bar all incoming calls" msgstr "refus tous les appels entrants" #: ../src/scmxx/lock.c:39 msgid "bar incoming calls when roaming outside the home country" msgstr "" "refuse les appels entrants lors d'un déplacement en dehors du pays d'origine" #: ../src/scmxx/lock.c:41 msgid "all barring services" msgstr "tous les services de refus" #: ../src/scmxx/lock.c:43 msgid "all outgoing barring services" msgstr "tous les services de refus d'appel sortant" #: ../src/scmxx/lock.c:45 msgid "all incoming barring services" msgstr "tous les services de refus d'appel entrant" #: ../src/scmxx/lock.c:47 msgid "network personalization" msgstr "personnalisation du réseau" #: ../src/scmxx/lock.c:49 msgid "corporate personalization" msgstr "personnalisation entreprise" #: ../src/scmxx/lock.c:51 msgid "network subset personalization" msgstr "personnalisation d'un sous-ensemble du réseau" #: ../src/scmxx/lock.c:53 msgid "service provider personalization" msgstr "personnalisation d'un fournisseur de service" #: ../src/scmxx/lock.c:55 msgid "phone locked to very first inserted SIM" msgstr "téléphone verrouillé sur la première SIM" #: ../src/scmxx/lock.c:57 msgid "keyboard" msgstr "clavier" #: ../src/scmxx/lock.c:84 msgid "" "Be beware of phone internal passwort counters that are normally set to 3 " "failures!" msgstr "" #: ../src/scmxx/lock.c:85 msgid "The current failure count cannot be read!" msgstr "" #: ../src/scmxx/lock.c:86 msgid "Setting new password FAILED!" msgstr "" #: ../src/scmxx/lock.c:165 msgid "Lock status change failed." msgstr "Echec lors du changement de l'état de verrouillage " #: ../src/scmxx/lock.c:167 #, c-format msgid "Lock %s successfully %s.\n" msgstr "Verrouillage %s réalisé avec succès %s.\n" #: ../src/scmxx/lock.c:168 msgid "disabled" msgstr "désactivé" #: ../src/scmxx/lock.c:168 msgid "enabled" msgstr "activé" #: ../src/scmxx/lock.c:210 msgid "Locks" msgstr "Verrouillages" #: ../src/scmxx/lock.c:218 msgid "status" msgstr "état" #: ../src/scmxx/lock.c:240 msgid "Lock" msgstr "Verrouillages" #: ../src/scmxx/lock.c:242 #, fuzzy msgid "getting lock status failed." msgstr "Echec lors du changement de l'état de verrouillage " #: ../src/scmxx/lock.c:246 msgid "on" msgstr "allumé" #: ../src/scmxx/lock.c:246 msgid "off" msgstr "éteint" #: ../src/scmxx/s35_files.c:40 msgid "You must define a memory to use." msgstr "Vosu devez préciser une mémoire." #: ../src/scmxx/s35_files.c:54 msgid "You must define either a valid slot, nothing or \"all\"." msgstr "Vous ne pouvez préciser qu'un emplacement valide, rien ou \"all\"." #: ../src/scmxx/s35_files.c:59 msgid "this phone does not support file exchange." msgstr "ce téléphone ne supporte pas le transfert de fichiers." #: ../src/scmxx/s35_files.c:71 #, c-format msgid "%s values can only be %d to %d.\n" msgstr "Les valeurs de %s peuvent uniquement courir de %d à %d.\n" #: ../src/scmxx/s35_files.c:73 #, c-format msgid "%s value can only be %d.\n" msgstr "La valeur de %s peut uniquement être %d.\n" #: ../src/scmxx/s35_files.c:87 msgid "You must define a valid slot or \"all\"." msgstr "Vous devez préciser un emplacement valide ou \"all\"." #: ../src/scmxx/s35_files.c:128 #, c-format msgid "Using slot %d\n" msgstr "L'emplacement n° %d sera utilisé\n" #: ../src/scmxx/s35_files.c:149 msgid "No free slot found." msgstr "Aucun emplacement vide découvert." #: ../src/scmxx/s35_files.c:175 msgid "You must specify a file name prefix (can be \"\")." msgstr "Vous devez préciser un préfixe de fichier (cela peut être \"\")." #: ../src/scmxx/s35_files.c:194 #, c-format msgid "%s %d deleted.\n" msgstr "%s %d effacé.\n" #: ../src/scmxx/s35_files.c:196 #, c-format msgid "%s %d NOT deleted, something went wrong: %s\n" msgstr "%s %d non effacé suite à erreur : %s\n" #: ../src/scmxx/s35_files.c:286 msgid "File transfer..." msgstr "Transfert de fichier ..." #: ../src/scmxx/s35_files.c:314 ../src/scmxx/s35_sms.c:316 msgid "Waiting for data request..." msgstr "En attente de requête de données ..." #: ../src/scmxx/s35_files.c:319 msgid "Packet buffer seems to be filled with something else, clearing..." msgstr "" "Le tampon semble avoir été rempli avec autre chose, en cours d'effacement ..." #: ../src/scmxx/s35_files.c:333 #, c-format msgid "" "\n" "Sending %d Bytes in packet %d\n" msgstr "" "\n" "Expédition de %d octets du paquet %d\n" #: ../src/scmxx/s35_files.c:335 ../src/scmxx/s35_sms.c:320 msgid "Sending data..." msgstr "Transmission en cours ..." #: ../src/scmxx/s35_files.c:342 #, c-format msgid "Packet %d sent\n" msgstr "Paquet n° %d expédié\n" #: ../src/scmxx/s35_files.c:344 msgid "Wrong data format" msgstr "Format de donnée erroné." #: ../src/scmxx/s35_files.c:351 msgid "File transfer complete." msgstr "Transfert de fichier terminé." #: ../src/scmxx/s35_files.c:353 msgid "Nothing to transfer." msgstr "Rien à transférer." #: ../src/scmxx/s35_files.c:382 #, fuzzy, c-format msgid "%s slot %lu" msgstr "L'emplacement n° %d sera utilisé\n" #: ../src/scmxx/s35_files.c:411 #, fuzzy, c-format msgid "parsing answer from phone failed: \"%s\"\n" msgstr "Erreur à la lecture de l'annuaire %s : %s\n" #: ../src/scmxx/s35_files.c:428 #, fuzzy, c-format msgid "writing to file \"%s\" failed: %s\n" msgstr "Erreur à l'écriture sur %s : %s\n" #: ../src/scmxx/s35_files.c:435 #, fuzzy, c-format msgid "writing to pipe \"%s\" failed.\n" msgstr "Erreur lors de l'écriture sur le pipe \"%s\".\n" #: ../src/scmxx/s35_files.c:448 ../src/scmxx/s35_sms.c:559 #, fuzzy, c-format msgid "closing pipe \"%s\" failed.\n" msgstr "Erreur à la fermeture du pipe \"%s\".\n" #: ../src/scmxx/s35_sms.c:64 msgid "" "If you want to remove short messages or mix actions, you must define a slot " "or slot type." msgstr "" "Si vous souhaitez effacer des SMS ou réaliser des actions combinées, vous " "devez préciser un emplacement mémoire ou un type d'emplacement." #: ../src/scmxx/s35_sms.c:97 #, c-format msgid "SMS storage type \"%s\" could not be selected.\n" msgstr "Le type de stockage SMS \"%s\" n'a pas pu être sélectionné.\n" #: ../src/scmxx/s35_sms.c:147 msgid "Hmm, nothing to send?" msgstr "Ahem, rien à expédier ?" #: ../src/scmxx/s35_sms.c:191 #, c-format msgid "SMS slot %d was deleted.\n" msgstr "Le contenu de l'emplacement SMS n° %d a été effacé.\n" #: ../src/scmxx/s35_sms.c:193 ../src/scmxx/s35_sms.c:284 #: ../src/scmxx/s35_sms.c:467 msgid "This slot is not available." msgstr "Ce slot n'est pas disponible." #: ../src/scmxx/s35_sms.c:199 msgid "You must specify a valid slot number." msgstr "Vosu devez spécifier un numéro d'emplacement valide." #: ../src/scmxx/s35_sms.c:231 msgid "" "Argument to --number is not a number but phonebook cache is not present." msgstr "" "l'argument 'numéro' n'est pas un numéro mais le cache d'annuaire n'est pas " "présent." #: ../src/scmxx/s35_sms.c:247 #, c-format msgid "no cache entry for \"%s\" found.\n" msgstr "pas d'entrée dans le cache pour \"%s\".\n" #: ../src/scmxx/s35_sms.c:249 #, c-format msgid "no unique hit in cache for search term \"%s\":\n" msgstr "pas de correspondance unique dans le cache pour l'expression \"%s\":\n" #: ../src/scmxx/s35_sms.c:279 msgid "zero-length number" msgstr "numéro de longueur nulle" #: ../src/scmxx/s35_sms.c:288 ../src/scmxx/s35_sms.c:327 msgid "The message was sent." msgstr "Le message a été expédié." #: ../src/scmxx/s35_sms.c:288 ../src/scmxx/s35_sms.c:327 #: ../src/smspdu/smspdu_print.c:339 ../src/smspdu/smspdu_print.c:344 msgid "Message reference" msgstr "Référence du message " #: ../src/scmxx/s35_sms.c:291 ../src/scmxx/s35_sms.c:333 msgid "The phone returned" msgstr "Le téléphone a renvoyé " #: ../src/scmxx/s35_sms.c:324 #, c-format msgid "An error occured on sending the SMS: %s\n" msgstr "Une erreur est survenue durant l'expédition du SMS : %s\n" #: ../src/scmxx/s35_sms.c:329 #, c-format msgid "The message was saved to SMS memory slot %s\n" msgstr "Le message a été sauvegardé dans l'emplacement de mémoire SMS n° %s\n" #: ../src/scmxx/s35_sms.c:336 msgid "An unknown error occured." msgstr "Une erreur inconnue est survenue." #: ../src/scmxx/s35_sms.c:338 msgid "There is no slot free to store the sms." msgstr "Il n'y a pas d'emplacement mémoire disponible pour sotcker le SMS." #: ../src/scmxx/s35_sms.c:355 #, c-format msgid "Trying to send SMS from slot %d...\n" msgstr "Tentative d'expédition des SMS à partir de l'emplacement %d ...\n" #: ../src/scmxx/s35_sms.c:358 msgid "Sending is only possible with SMS of outgoing type." msgstr "L'expédition n'est supportée qu'avec des SMS de type sortant." #: ../src/scmxx/s35_sms.c:384 msgid "No SMS text found (or zero length)." msgstr "Pas de SMS trouvé (ou alors il est de taille nulle)." #: ../src/scmxx/s35_sms.c:391 msgid "Creating PDU..." msgstr "Création du PDU ..." #: ../src/scmxx/s35_sms.c:397 #, fuzzy msgid "short message encoding failed" msgstr "messages courts" #: ../src/scmxx/s35_sms.c:434 ../src/scmxx/s35_sms.c:450 #, fuzzy msgid "You must define an output target." msgstr "Vosu devez préciser une mémoire." #: ../src/scmxx/s35_sms.c:476 ../src/scmxx/s35_sms.c:519 msgid "sent" msgstr "expédié" #: ../src/scmxx/s35_sms.c:477 ../src/scmxx/s35_sms.c:518 msgid "unsent" msgstr "non expédié" #: ../src/scmxx/s35_sms.c:478 ../src/scmxx/s35_sms.c:517 msgid "read" msgstr "lu" #: ../src/scmxx/s35_sms.c:479 ../src/scmxx/s35_sms.c:516 msgid "unread" msgstr "non lu" #: ../src/scmxx/s35_sms.c:482 #, c-format msgid "There are no %s short messages on the phone.\n" msgstr "Il n'y a pas de SMS %s dans le téléphone.\n" #: ../src/scmxx/s35_sms.c:484 msgid "There are no short messages on the phone.\n" msgstr "Il n'y a pas de SMS dans le téléphone.\n" #: ../src/scmxx/s35_sms.c:491 msgid "Looking for SMS of specified type..." msgstr "Recherche d'un SMS du type précisé ..." #: ../src/scmxx/s35_sms.c:501 msgid "Output parsing error." msgstr "Erreur de traitement de la sortie." #: ../src/scmxx/s35_sms.c:513 #, fuzzy, c-format msgid "Slot %u is empty.\n" msgstr "Le slot %d est vide.\n" #: ../src/scmxx/s35_sms.c:516 ../src/scmxx/s35_sms.c:517 msgid "incoming" msgstr "entrant" #: ../src/scmxx/s35_sms.c:518 ../src/scmxx/s35_sms.c:519 msgid "outgoing" msgstr "sortant" #: ../src/scmxx/s35_sms.c:523 #, fuzzy, c-format msgid "Found %s, %s SMS in slot %u.\n" msgstr "SMS de type inconnu" #: ../src/scmxx/s35_sms.c:526 #, fuzzy, c-format msgid "Found SMS of unknown type in slot %u.\n" msgstr "SMS de type inconnu" #: ../src/scmxx/s35_sms.c:530 msgid "Returned PDU exceeds buffer size." msgstr "Le PDU renvoyé dépasse la taille du tampon." #: ../src/scmxx/s35_sms.c:638 msgid "Concatenated messages cannot be reassembled." msgstr "Les messages morcelés ne peuvent pas être réassemblés." #: ../src/scmxx/s35_sms.c:670 #, c-format msgid "" "\n" "No cache hit for number \"%s\" with match size %d\n" msgstr "" "\n" "Pas de correspondance pour le numéro \"%s\" avec la longueur %d\n" #: ../src/scmxx/s35_sms.c:673 #, c-format msgid "" "\n" "Cache hit for number \"%s\" with match size %d\n" msgstr "" "\n" "Correspondance trouvée pour le numéro \"%s\" et la longueur %d\n" #: ../src/scmxx/s35_sms.c:677 #, c-format msgid "" "\n" "No unique hit in cache for number \"%s\" with match size %d\n" msgstr "" "\n" "Pas de correspondance unique pour le numéro \"%s\" avec la longueur %d\n" #: ../src/scmxx/s35_sms.c:720 msgid "No output method was specified." msgstr "Aucune méthode de sortie n'a été précisée." #: ../src/scmxx/s35_sms.c:730 msgid "Could not set Phase 2+ compatible mode." msgstr "Impossible de paramétrer le mode compatible Phase 2+" #: ../src/scmxx/s35_sms.c:739 msgid "Could not set direct mode." msgstr "Impossible de paramétrer le mode direct." #: ../src/scmxx/s35_sms.c:771 msgid "Failed to decode PDU." msgstr "Impossible de décoder le PDU." #: ../src/scmxx/s35_sms.c:785 msgid "SMS ACK should have been ok but was not." msgstr "SMS ACK aurait dû être accepté mais ce ne fût pas le cas." #: ../src/scmxx/s35_sms.c:790 #, fuzzy msgid "A new message was stored in the phone." msgstr "Le message a été expédié." #: ../src/atcommand/common.c:64 #, fuzzy msgid "Cannot read from device" msgstr "Erreur à la lecture de l'appareil : %s\n" #: ../src/atcommand/common.c:83 msgid "Received" msgstr "" #: ../src/atcommand/common.c:124 msgid "Use the --pin parameter or edit the pin file." msgstr "" #: ../src/atcommand/common.c:136 msgid "Using PIN failed" msgstr "" #: ../src/atcommand/common.c:161 ../src/atcommand/common.c:187 #, fuzzy msgid "" "\n" "Sending command" msgstr "Transmission en cours ..." #: ../src/atcommand/common.c:174 ../src/atcommand/common.c:193 #, fuzzy msgid "Cannot send at command" msgstr "Erreur lors de l'expédition des données : %s\n" #: ../src/atcommand/common.c:277 msgid "command return value" msgstr "" #: ../src/atcommand/common.c:283 #, fuzzy msgid "nothing" msgstr "sortant" #: ../src/atcommand/common.c:286 #, c-format msgid "Value matched %s.\n" msgstr "" #: ../src/smspdu/smspdu_print.c:43 msgid "Slot" msgstr "emplacements mémoire" #: ../src/smspdu/smspdu_print.c:58 msgid "To" msgstr "" #: ../src/smspdu/smspdu_print.c:59 msgid "From" msgstr "" #: ../src/smspdu/smspdu_print.c:60 msgid "Original To" msgstr "" #: ../src/smspdu/smspdu_print.c:101 msgid "Valid for" msgstr "" #: ../src/smspdu/smspdu_print.c:102 msgid "week" msgid_plural "weeks" msgstr[0] "semaine" msgstr[1] "semaines" #: ../src/smspdu/smspdu_print.c:103 msgid "day" msgid_plural "days" msgstr[0] "jour" msgstr[1] "jours" #: ../src/smspdu/smspdu_print.c:104 msgid "hour" msgid_plural "hours" msgstr[0] "heure" msgstr[1] "heures" #: ../src/smspdu/smspdu_print.c:105 msgid "minute" msgid_plural "minutes" msgstr[0] "minute" msgstr[1] "minutes" #: ../src/smspdu/smspdu_print.c:106 msgid "second" msgid_plural "seconds" msgstr[0] "seconde" msgstr[1] "secondes" #: ../src/smspdu/smspdu_print.c:116 msgid "Valid until" msgstr "" #: ../src/smspdu/smspdu_print.c:117 msgid "Date" msgstr "" #: ../src/smspdu/smspdu_print.c:118 msgid "Message status time" msgstr "" #: ../src/smspdu/smspdu_print.c:132 #, fuzzy msgid "SMSC number" msgstr "numéros personnels" #: ../src/smspdu/smspdu_print.c:153 msgid "PDU type" msgstr "" #: ../src/smspdu/smspdu_print.c:159 msgid "PDU flags" msgstr "" #: ../src/smspdu/smspdu_print.c:160 #, fuzzy msgid "StatusRequest" msgstr "Etat" #: ../src/smspdu/smspdu_print.c:162 msgid "RejectDuplicate" msgstr "" #: ../src/smspdu/smspdu_print.c:165 msgid "MoreMessagesToSend" msgstr "" #: ../src/smspdu/smspdu_print.c:169 msgid "ReplyPath" msgstr "" #: ../src/smspdu/smspdu_print.c:180 msgid "Protocol ID" msgstr "" #: ../src/smspdu/smspdu_print.c:183 msgid "service-center-specific use" msgstr "" #: ../src/smspdu/smspdu_print.c:187 #, fuzzy, c-format msgid "replace short message type %d" msgstr "messages courts" #: ../src/smspdu/smspdu_print.c:190 #, fuzzy msgid "short message type 0" msgstr "messages courts" #: ../src/smspdu/smspdu_print.c:191 msgid "obsolete EMS mark" msgstr "" #: ../src/smspdu/smspdu_print.c:192 #, fuzzy msgid "return call message" msgstr "messages courts" #: ../src/smspdu/smspdu_print.c:194 msgid "ME data download" msgstr "" #: ../src/smspdu/smspdu_print.c:195 msgid "ME de-personalization short message" msgstr "" #: ../src/smspdu/smspdu_print.c:196 msgid "(U)SIM data download" msgstr "" #: ../src/smspdu/smspdu_print.c:202 msgid "SMS-to-SME protocol" msgstr "" #: ../src/smspdu/smspdu_print.c:204 msgid "telematic interworking" msgstr "" #: ../src/smspdu/smspdu_print.c:224 msgid "compressed" msgstr "" #: ../src/smspdu/smspdu_print.c:231 #, c-format msgid " (class %d)" msgstr "" #: ../src/smspdu/smspdu_print.c:233 msgid "marked as auto-delete" msgstr "" #: ../src/smspdu/smspdu_print.c:241 ../src/smspdu/smsudh.c:45 msgid "Indication" msgstr "Indication" #: ../src/smspdu/smspdu_print.c:243 ../src/smspdu/smsudh.c:47 msgid "voicemail" msgstr "" #: ../src/smspdu/smspdu_print.c:244 ../src/smspdu/smsudh.c:48 msgid "fax" msgstr "" #: ../src/smspdu/smspdu_print.c:245 ../src/smspdu/smsudh.c:49 msgid "e-mail" msgstr "" #: ../src/smspdu/smspdu_print.c:246 ../src/smspdu/smsudh.c:50 msgid "misc." msgstr "" #: ../src/smspdu/smspdu_print.c:249 #, fuzzy, c-format msgid "new %s message(s) waiting" msgstr "Le message a été expédié." #: ../src/smspdu/smspdu_print.c:251 #, fuzzy, c-format msgid "no more %s messages waiting" msgstr "Le message a été expédié." #: ../src/smspdu/smspdu_print.c:268 #, fuzzy msgid "Message length" msgstr "Référence du message " #: ../src/smspdu/smspdu_print.c:292 #, fuzzy msgid "transaction completed" msgstr "Transfert de fichier terminé." #: ../src/smspdu/smspdu_print.c:296 msgid "SC still trying to transfer short message" msgstr "" #: ../src/smspdu/smspdu_print.c:299 msgid "received by SME" msgstr "" #: ../src/smspdu/smspdu_print.c:300 msgid "forwarded to SME but delivery cannot be confirmed" msgstr "" #: ../src/smspdu/smspdu_print.c:301 #, fuzzy msgid "replaced" msgstr "lu" #: ../src/smspdu/smspdu_print.c:303 msgid "congestion" msgstr "" #: ../src/smspdu/smspdu_print.c:305 msgid "SME busy" msgstr "" #: ../src/smspdu/smspdu_print.c:307 msgid "no response from SME" msgstr "" #: ../src/smspdu/smspdu_print.c:309 ../src/smspdu/smspdu_print.c:325 msgid "service rejected" msgstr "" #: ../src/smspdu/smspdu_print.c:312 #, fuzzy msgid "QoS not available" msgstr "Ce slot n'est pas disponible." #: ../src/smspdu/smspdu_print.c:314 msgid "error in SME" msgstr "" #: ../src/smspdu/smspdu_print.c:315 msgid "remote procedure error" msgstr "" #: ../src/smspdu/smspdu_print.c:316 #, fuzzy msgid "incompatible destination" msgstr "personnalisation entreprise" #: ../src/smspdu/smspdu_print.c:317 msgid "connection rejected by SME" msgstr "" #: ../src/smspdu/smspdu_print.c:318 msgid "not obtainable" msgstr "" #: ../src/smspdu/smspdu_print.c:319 #, fuzzy msgid "no interworking available" msgstr "Cet index n'est pas disponible." #: ../src/smspdu/smspdu_print.c:320 msgid "validity period expired" msgstr "" #: ../src/smspdu/smspdu_print.c:321 msgid "deleted by sender" msgstr "" #: ../src/smspdu/smspdu_print.c:322 msgid "deleted by service center" msgstr "" #: ../src/smspdu/smspdu_print.c:323 msgid "message does not exist" msgstr "" #: ../src/smspdu/smspdu_print.c:327 #, fuzzy msgid "Message status" msgstr "état" #: ../src/smspdu/smspdu_print.c:328 msgid "Message status reason" msgstr "" #: ../src/smspdu/smspdu_print.c:428 ../src/smspdu/smspdu_dec.c:602 msgid "Unsupported pdu type" msgstr "" #: ../src/smspdu/smspdu_enc.c:78 ../src/smspdu/smspdu_enc.c:86 #: ../src/smspdu/smsud_enc.c:237 ../src/smspdu/smsud_enc.c:239 #: ../src/charsets/ucs2.c:34 ../src/charsets/ucs4.c:36 #: ../src/charsets/ucs4_dec.c:78 ../src/charsets/ucs4_dec.c:157 #: ../src/charsets/ucs4_dec.c:168 msgid "Error" msgstr "Erreur" #: ../src/smspdu/smspdu_enc.c:78 msgid "No valid number specified." msgstr "Le Numéro n'est pas valide." #: ../src/smspdu/smspdu_enc.c:86 #, c-format msgid "%s: sms number cannot have more than %lu digits.\n" msgstr "" #: ../src/smspdu/smspdu_enc.c:161 ../src/smspdu/smsud_enc.c:211 #: ../src/helper.h:38 msgid "Notice" msgstr "Note" #: ../src/smspdu/smspdu_enc.c:161 msgid "Selecting UCS-2 character set." msgstr "" #: ../src/smspdu/smsud_enc.c:169 #, c-format msgid "Delaying for %2d seconds, press Ctrl+C to abort." msgstr "" #: ../src/smspdu/smsud_enc.c:213 #, fuzzy, c-format msgid "This message has %lu character" msgid_plural "This message has %lu characters" msgstr[0] "Le message a été expédié." msgstr[1] "Le message a été expédié." #: ../src/smspdu/smsud_enc.c:219 #, c-format msgid "and will use %u part.\n" msgid_plural "and will use %u parts.\n" msgstr[0] "" msgstr[1] "" #: ../src/smspdu/smsud_enc.c:224 #, c-format msgid "%s: The suggested maximum parts count is %d.\n" msgstr "" #: ../src/smspdu/smsud_enc.c:225 ../src/helper.h:37 msgid "Warning" msgstr "Attention" #: ../src/smspdu/smsud_enc.c:236 #, c-format msgid "%s: message part count exceeds maximum of 255\n" msgstr "" #: ../src/smspdu/smsud_enc.c:238 #, c-format msgid "%s: SMS text is too long (max. %d characters).\n" msgstr "" #: ../src/smspdu/smsud_enc.c:243 msgid "" "Please be aware that some characters are encoded as 14bit (instead of 7bit), " "e.g. the euro character." msgstr "" #: ../src/smspdu/smsudh.c:52 #, c-format msgid "%d %s message waiting" msgid_plural "%d %s messages waiting" msgstr[0] "" msgstr[1] "" #: ../src/smspdu/smsudh.c:59 msgid "Wireless control message protocol data unit" msgstr "" #: ../src/smspdu/smsudh.c:65 #, c-format msgid "SIM toolkit security header" msgstr "" #: ../src/smspdu/smsudh.c:70 ../src/smspdu/smsudh.c:76 #, c-format msgid "Multipart message: sequence number = %d, part %d of %d" msgstr "" #: ../src/smspdu/smsudh.c:82 ../src/smspdu/smsudh.c:88 #, c-format msgid "Application port: destination port = %d, originator port = %d" msgstr "" #: ../src/smspdu/smsudh.c:94 msgid "The following headers were created by" msgstr "" #: ../src/smspdu/smsudh.c:97 msgid "original sender" msgstr "" #: ../src/smspdu/smsudh.c:100 msgid "original receiver" msgstr "" #: ../src/smspdu/smsudh.c:106 #, fuzzy, c-format msgid "(unknown value %d)" msgstr "Cause inconnue" #: ../src/smspdu/smsudh.c:125 #, c-format msgid "Ignored header type 0x%02x" msgstr "" #: ../src/smspdu/smsudh.c:146 #, fuzzy msgid "Message header" msgstr "Référence du message " #: ../src/charsets/gsm_dec.c:38 #, c-format msgid "Ups, value 0x%02x not found in list of valid GSM characters.\n" msgstr "" #: ../src/charsets/ucs4_enc.c:38 #, fuzzy msgid "Error on text conversion" msgstr "Erreur à la fermeture du pipe " #: ../src/charsets/ucs4_enc.c:47 ../src/charsets/ucs4_dec.c:120 #, c-format msgid "Error on text conversion from charset \"%s\" to charset \"%s\": %s\n" msgstr "" #: ../src/charsets/local_dec.c:62 #, c-format msgid "%s: character %ld is not a hexdigit.\n" msgstr "" #: ../src/charsets/local_dec.c:63 ../src/charsets/local_dec.c:70 msgid "Error on text conversion to internal charset" msgstr "" #: ../src/charsets/local_dec.c:69 #, c-format msgid "%s: character %ld is not ACSII.\n" msgstr "" #: ../src/charsets/gsm_enc.c:40 #, c-format msgid "Unicode value 0x%04lx is not a GSM character\n" msgstr "" #: ../src/charsets/ucs2.c:34 ../src/charsets/ucs4.c:36 #, c-format msgid "%s: the iconv implementation of this system does not support %s" msgstr "" #: ../src/charsets/ucs4_dec.c:78 #, c-format msgid "%s: Unicode character 0x%lx cannot be converted.\n" msgstr "" #: ../src/charsets/ucs4_dec.c:158 msgid "insufficient memory on unicode decoding." msgstr "" #: ../src/charsets/ucs4_dec.c:159 msgid "Please report as bug." msgstr "" #: ../src/charsets/ucs4_dec.c:164 msgid "Error with internal charset" msgstr "" #: ../src/charsets/local.c:70 #, c-format msgid "Using \"%s\" as system character set." msgstr "" #: ../src/helper.h:36 msgid "" "\n" "Error" msgstr "" "\n" "Erreur" #: ../src/helper.h:39 msgid "Debug" msgstr "" #, fuzzy #~ msgid "Failed to send data: %s\n" #~ msgstr "Erreur lors de l'expédition des données : %s\n" #, fuzzy #~ msgid "sending data failed: %s\n" #~ msgstr "Erreur lors de l'expédition des données : %s\n" #, fuzzy #~ msgid "reading from device failed: %s\n" #~ msgstr "Erreur à la lecture de l'appareil : %s\n" #~ msgid "You need a phone made by Siemens to get an useful result." #~ msgstr "" #~ "IL est nécessaire de disposer d'un téléphone Siemens afin d'obtenir des " #~ "résultats concluants." #~ msgid "See man page for more detailed information." #~ msgstr "Voir le manuel pour des informations plus détaillées." #~ msgid "This is a program written by %s\n" #~ msgstr "" #~ "Ce programme a été écrit par %s\n" #~ "La traduction française est réalisée par Dominique Blas \n" #~ msgid "This program is licenced with the GPL." #~ msgstr "Ce programme est sous licence GPL." #~ msgid "Use at your own risk!" #~ msgstr "Faites-en usage à vos propres risques !" #~ msgid "Accessing stdin" #~ msgstr "Fichier standard d'entrée en cours d'accès" #~ msgid "Slot %d...\n" #~ msgstr "Emplacement %d ...\n" #~ msgid "Empty slot: nothing to get\n" #~ msgstr "Emplacement vide : rien à récupérer\n" #~ msgid "Receiving packet %d of %d...\n" #~ msgstr "Réception du paquet %d sur %d ...\n" #~ msgid "Syntax: %s [options] action [mem type] [sms options] [file...]\n" #~ msgstr "" #~ "Syntaxe : %s [options] action [type mémoire] [options sms] [fichier...]\n" #~ msgid "SMS-PDU creation options" #~ msgstr "Options de création des SMS-PDU " scmxx-0.9.0/po/de.po0000644000175000017500000013677010401300375014071 0ustar hendrikhendrik# German translations for scmxx package # German messages for scmxx. # Copyright (C) 2004 THE scmxx'S COPYRIGHT HOLDER # This file is distributed under the same license as the scmxx package. # Hendrik Sattler , 2004, 2005. # msgid "" msgstr "" "Project-Id-Version: scmxx 0.8.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-01 12:06+0100\n" "PO-Revision-Date: 2006-02-23 23:46+0100\n" "Last-Translator: Hendrik Sattler \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../src/helper/mem.c:29 msgid "Memory allocation failure" msgstr "Speicherzuweisungsfehler" #: ../src/helper/file.c:42 #, c-format msgid "Could not access %s: %s\n" msgstr "auf %s kann nicht zugegriffen werden: %s\n" #: ../src/helper/file.c:48 #, c-format msgid "Accessing %s\n" msgstr "Öffne %s\n" #: ../src/helper/file.c:50 msgid "Please input the data and finish with Ctrl-D on an empty line" msgstr "" "Bitte die Daten eingeben und mit Strg-D auf einer sonst leeren Zeile " "abschließen" #: ../src/helper/file.c:62 #, c-format msgid "%s could not be created: %s\n" msgstr "%s konnt nicht erstellt werden: %s\n" #: ../src/helper/file.c:64 #, c-format msgid "%s created.\n" msgstr "%s wurde erstellt.\n" #: ../src/helper/file.c:99 #, c-format msgid "%s has %d byte.\n" msgid_plural "%s has %d bytes.\n" msgstr[0] "%s hat %d Byte.\n" msgstr[1] "%s hat %d Bytes.\n" #: ../src/adr2vcf/opt.c:61 ../src/smi/opt.c:53 ../src/scmxx/scmxx_opt.c:206 msgid "options" msgstr "Optionen" #: ../src/adr2vcf/opt.c:76 ../src/smi/opt.c:62 ../src/scmxx/scmxx_opt.c:285 msgid "charset" msgstr "Zeichensatz" #: ../src/options/common.c:129 msgid "Syntax" msgstr "Syntax" #: ../src/scmxx/tty_bluetooth.c:100 ../src/scmxx/tty_serial.c:161 #: ../src/scmxx/tty_serial.c:250 ../src/scmxx/tty_serial.c:255 #: ../src/scmxx/tty_serial.c:262 msgid "system error code" msgstr "Systemfehlercode" #: ../src/scmxx/tty_bluetooth.c:156 msgid "protocol not implemented" msgstr "Protokoll nicht implementiert" #: ../src/scmxx/actions.c:90 msgid "Sending reset frame" msgstr "Senden des Reset-Rahmens" #: ../src/scmxx/actions.c:107 ../src/scmxx/ttyaccess.c:53 #: ../src/scmxx/pbookphone.c:76 ../src/scmxx/pbookphone.c:82 msgid "done" msgstr "fertig" #: ../src/scmxx/actions.c:197 msgid "no charset specified." msgstr "es wurde kein Zeichensatz angegeben." #: ../src/scmxx/actions.c:214 msgid "no number specified." msgstr "es wurde kein Nummer angegeben." #: ../src/scmxx/actions.c:216 msgid "no valid number specified." msgstr "es wurde kein gültige Nummer angegeben." #: ../src/scmxx/actions.c:222 #, c-format msgid "SMS server number was set to %s\n" msgstr "Die Nummer des SMS-Servers wurde auf %s gesetzt\n" #: ../src/scmxx/actions.c:224 ../src/scmxx/s35_files.c:221 #: ../src/scmxx/s35_files.c:234 ../src/scmxx/s35_sms.c:463 msgid "unknown cause" msgstr "unbekannter Grund" #: ../src/scmxx/actions.c:260 msgid "Time was synchronized" msgstr "Die Zeit wurde synchronisiert" #: ../src/scmxx/actions.c:262 msgid "Time could not be synchronized" msgstr "Die Zeit konnte nicht synchronisiert werden" #: ../src/scmxx/actions.c:450 msgid "not checked in, not seeking" msgstr "nicht eingebucht, es wird nicht gesucht" #: ../src/scmxx/actions.c:451 msgid "checked in" msgstr "eingebucht" #: ../src/scmxx/actions.c:452 msgid "not checked in, but seeking a network" msgstr "nicht eingebucht, aber es nach einem Netzwerk gesucht" #: ../src/scmxx/actions.c:453 msgid "check-in denied by network" msgstr "Anmeldung vom Netzwerk zurückgewiesen" #: ../src/scmxx/actions.c:454 ../src/scmxx/actions.c:498 msgid "registered, roaming" msgstr "registiert, Roaming aktiviert" #: ../src/scmxx/actions.c:455 ../src/scmxx/actions.c:499 msgid "unknown status" msgstr "unbekannter Status" #: ../src/scmxx/actions.c:494 msgid "not registered, not searching" msgstr "nicht registriert, es wird nicht gesucht" #: ../src/scmxx/actions.c:495 msgid "registered, home network" msgstr "registriert, Heimatnetz" #: ../src/scmxx/actions.c:496 msgid "not registered, searching" msgstr "nicht registriert, es wird gesucht" #: ../src/scmxx/actions.c:497 msgid "registration denied by network" msgstr "Anmeldung vom Netzwerk zurückgewiesen" #: ../src/scmxx/actions.c:550 msgid "Vendor" msgstr "Hersteller" #: ../src/scmxx/actions.c:551 msgid "Model" msgstr "Modell" #: ../src/scmxx/actions.c:552 msgid "Revision" msgstr "Revision" #: ../src/scmxx/actions.c:554 msgid "Battery" msgstr "Batterie" #: ../src/scmxx/actions.c:555 msgid "Charsets" msgstr "Zeichensätze" #: ../src/scmxx/actions.c:556 msgid "Time" msgstr "Zeit" #: ../src/scmxx/actions.c:558 msgid "card ID" msgstr "Karten-ID" #: ../src/scmxx/actions.c:559 msgid "Status" msgstr "Status" #: ../src/scmxx/actions.c:560 msgid "Area code" msgstr "Zonencode" #: ../src/scmxx/actions.c:561 msgid "Cell ID" msgstr "Zellen-ID" #: ../src/scmxx/actions.c:562 msgid "Operator" msgstr "Betreiber" #: ../src/scmxx/actions.c:563 msgid "SMS server" msgstr "SMS-Server" #: ../src/scmxx/actions.c:564 msgid "Signal" msgstr "Signal" #: ../src/scmxx/actions.c:566 msgid "GPRS class" msgstr "GPRS-Klasse" #: ../src/scmxx/actions.c:567 msgid "GRPS status" msgstr "GPRS-Status" #: ../src/scmxx/actions.c:576 msgid "Phone related information" msgstr "Informationen über das Gerät" #: ../src/scmxx/actions.c:605 ../src/scmxx/memtypes.c:411 #: ../src/scmxx/memtypes.c:412 ../src/scmxx/memtypes.c:458 #: ../src/scmxx/memtypes.c:460 ../src/scmxx/memtypes.c:665 #: ../src/scmxx/memtypes.c:666 #, c-format msgid "none" msgstr "keine" #: ../src/scmxx/actions.c:630 msgid "SIM card related information" msgstr "Informationen über die SIM-Karte" #: ../src/scmxx/actions.c:645 msgid "Network related information" msgstr "Informationen über das Netz" #: ../src/scmxx/actions.c:707 msgid "detached" msgstr "nicht verbunden" #: ../src/scmxx/actions.c:709 msgid "attached" msgstr "verbunden" #: ../src/scmxx/actions.c:719 msgid "Binary files" msgstr "Binärdateien" #: ../src/scmxx/actions.c:720 msgid "Phonebooks" msgstr "Telefonbücher" #: ../src/scmxx/actions.c:721 msgid "SMS storages" msgstr "SMS-Speicher" #: ../src/scmxx/actions.c:751 msgid "Available memories" msgstr "Verfügbare Speicher" #: ../src/scmxx/actions.c:756 ../src/smspdu/smspdu_print.c:223 #: ../src/smspdu/smspdu_print.c:235 msgid "Settings" msgstr "Einstellungen" #: ../src/scmxx/scmxx.c:78 msgid "[files...]" msgstr "[Dateien...]" #: ../src/scmxx/scmxx.c:91 ../src/scmxx/scmxx.c:95 msgid "Malformed bluetooth address" msgstr "Falschformatierte Bluetooth-Adresse" #: ../src/scmxx/scmxx.c:114 msgid "OK, a modem device is present." msgstr "OK, eine Modem-Gerät ist vorhanden." #: ../src/scmxx/scmxx.c:116 msgid "cannot communicate with device." msgstr "mit dem Gerät kann nicht kommuniziert werden." #: ../src/scmxx/scmxx.c:135 #, c-format msgid "Detected %s %s\n" msgstr "%s %s gefunden\n" #: ../src/scmxx/scmxx.c:137 #, c-format msgid "Comparing to registered model %s\n" msgstr "Vergleiche mit bekanntem Modell %s\n" #: ../src/scmxx/scmxx.c:144 msgid "this model was not confirmed to be working with this software." msgstr "" "es wurde nicht bestätigt, daß dieses Modell mit dieser Software funktioniert." #: ../src/scmxx/scmxx.c:148 msgid "" "phones from this vendor were not confirmed to be working with this software!" msgstr "" "es wurde nicht bestätigt, daß Geräte von diesem Hersteller mit dieser " "Software funktionieren!" #: ../src/scmxx/scmxx.c:160 msgid "you must define a number with the --number option." msgstr "es muss ein Nummer mittels --number angegeben werden." #: ../src/scmxx/scmxx.c:176 msgid "you must specifiy a valid memory type." msgstr "es muss ein gültiger Speichertyp angegeben werden." #: ../src/scmxx/ttyaccess.c:37 #, c-format msgid "Accessing device %s..." msgstr "Öffne Gerät %s..." #: ../src/scmxx/ttyaccess.c:49 #, c-format msgid "Cannot open %s\n" msgstr "Kann %s nicht öffnen\n" #: ../src/scmxx/ttyaccess.c:58 #, c-format msgid "Waiting for %d seconds as requested...\n" msgstr "Warte die angegebenen %d Sekunden...\n" #: ../src/scmxx/memtypes.c:181 msgid "bitmap" msgstr "Bitmap" #: ../src/scmxx/memtypes.c:183 msgid "midi" msgstr "Midi" #: ../src/scmxx/memtypes.c:185 msgid "vCalendar" msgstr "vCalendar" #: ../src/scmxx/memtypes.c:187 msgid "vCard (address book)" msgstr "vCard (Adressbuch)" #: ../src/scmxx/memtypes.c:189 msgid "EMS animation" msgstr "EMS-Animation" #: ../src/scmxx/memtypes.c:191 msgid "T9 database" msgstr "T9-Datenbank" #: ../src/scmxx/memtypes.c:193 msgid "UCS-2 encoded dir name" msgstr "UCS-2 kodierter Verzeichnisname" #: ../src/scmxx/memtypes.c:234 ../src/scmxx/memtypes.c:400 #: ../src/scmxx/memtypes.c:618 ../src/scmxx/scmxx_opt.c:249 msgid "mem" msgstr "Speicher" #: ../src/scmxx/memtypes.c:235 msgid "readable" msgstr "lesbar" #: ../src/scmxx/memtypes.c:236 ../src/scmxx/memtypes.c:402 msgid "writable" msgstr "schreibbar" #: ../src/scmxx/memtypes.c:237 ../src/scmxx/memtypes.c:405 #: ../src/scmxx/memtypes.c:621 ../src/scmxx/lock.c:219 msgid "description" msgstr "Beschreibung" #: ../src/scmxx/memtypes.c:401 ../src/scmxx/memtypes.c:619 msgid "slots" msgstr "Speicherplatz" #: ../src/scmxx/memtypes.c:403 msgid "digits" msgstr "Ziffern" #: ../src/scmxx/memtypes.c:404 msgid "chars" msgstr "Zeichen" #: ../src/scmxx/memtypes.c:413 ../src/scmxx/memtypes.c:414 #: ../src/scmxx/memtypes.c:472 ../src/scmxx/memtypes.c:474 msgid "yes" msgstr "ja" #: ../src/scmxx/memtypes.c:415 ../src/scmxx/memtypes.c:416 #: ../src/scmxx/memtypes.c:477 ../src/scmxx/memtypes.c:479 msgid "no" msgstr "nein" #: ../src/scmxx/memtypes.c:440 #, c-format msgid "could not get limits of phonebook %s.\n" msgstr "" "die Möglichkeiten des Telefonbuchs %s konnten nicht ausgelesen werden.\n" #: ../src/scmxx/memtypes.c:504 msgid "SIM fix-dialing phonebook" msgstr "Feste Nummern des SIM-Telefonbuchs" #: ../src/scmxx/memtypes.c:506 msgid "SIM phonebook" msgstr "SIM-Telefonbuch" #: ../src/scmxx/memtypes.c:509 msgid "last calls (mobile)" msgstr "letzte Telefongespräche (Gerät)" #: ../src/scmxx/memtypes.c:511 msgid "last calls (SIM)" msgstr "letzte Telefongespräche (SIM)" #: ../src/scmxx/memtypes.c:514 msgid "own numbers" msgstr "eigene Nummern" #: ../src/scmxx/memtypes.c:516 msgid "mobile equipment phonebook" msgstr "Gerätetelefonbuch" #: ../src/scmxx/memtypes.c:518 msgid "barred numbers" msgstr "gesperrte Nummern" #: ../src/scmxx/memtypes.c:520 msgid "service numbers" msgstr "Servicenummern" #: ../src/scmxx/memtypes.c:523 msgid "missed calls" msgstr "verpaßte Anrufe" #: ../src/scmxx/memtypes.c:526 msgid "callback numbers" msgstr "Rückrufnummern" #: ../src/scmxx/memtypes.c:528 msgid "blacklist numbers" msgstr "Nummern der Blacklist" #: ../src/scmxx/memtypes.c:530 msgid "mailbox numbers" msgstr "Mobilbox-Nummern" #: ../src/scmxx/memtypes.c:532 msgid "red book (VIP in CS)" msgstr "wichtige Nummern (VIP im CS)" #: ../src/scmxx/memtypes.c:534 msgid "common sortable (FD+SM+ME)" msgstr "alle, sortiert (FD+SM+ME)" #: ../src/scmxx/memtypes.c:536 msgid "address book numbers" msgstr "Adressbuchnummern" #: ../src/scmxx/memtypes.c:620 msgid "used" msgstr "benutzt" #: ../src/scmxx/memtypes.c:681 msgid "SIM memory" msgstr "SIM-Speicher" #: ../src/scmxx/memtypes.c:683 msgid "mobile equipment memory" msgstr "Gerätespeicher" #: ../src/scmxx/s35_pbook.c:108 ../src/scmxx/s35_pbook.c:128 #: ../src/scmxx/s35_pbook.c:185 msgid "something went wrong with sending the phonebook entries" msgstr "etwas ging beim Senden der Telefonbucheinträge schief" #: ../src/scmxx/s35_pbook.c:121 #, c-format msgid "invalid phonebook file %s.\n" msgstr "ungültige Telefonbuchdatei %s.\n" #: ../src/scmxx/s35_pbook.c:124 #, c-format msgid "empty phonebook file %s.\n" msgstr "leere Telefonbuchdatei %s.\n" #: ../src/scmxx/s35_pbook.c:148 msgid "Nothing to get." msgstr "Nichts zu holen." #: ../src/scmxx/s35_pbook.c:170 #, c-format msgid "%s deleted.\n" msgstr "%s wurde gelöscht.\n" #: ../src/scmxx/s35_pbook.c:172 msgid "Possible data corruption!" msgstr "Möglicherweise wurden Daten beschädigt!" #: ../src/scmxx/s35_pbook.c:188 msgid "the selected phonebook is not writable" msgstr "das gewählte Telefonbuch ist nicht schreibbar" #: ../src/scmxx/s35_pbook.c:282 ../src/scmxx/s35_files.c:48 #: ../src/scmxx/s35_sms.c:53 msgid "You must specify a valid action." msgstr "Es muss eine gültige Aktion angegeben werden." #: ../src/scmxx/s35_pbook.c:286 #, c-format msgid "Cannot select memory %s\n" msgstr "Kann Speicher %s nicht auswählen\n" #: ../src/scmxx/s35_pbook.c:293 msgid "could not determine last slot." msgstr "Konnte letzten Speicherplatz nicht ermitteln." #: ../src/scmxx/s35_pbook.c:298 ../src/scmxx/s35_files.c:79 msgid "You must specify exactly one operation." msgstr "Es muss genau eine Operation angegeben werden." #: ../src/scmxx/s35_pbook.c:312 msgid "invalid slot defined" msgstr "es wurde ein ungülter Speicherplatz angegeben" #: ../src/scmxx/pbookphone.c:54 ../src/scmxx/pbookphone.c:240 #: ../src/scmxx/pbookphone.c:287 #, c-format msgid "getting limits of phonebook %s failed.\n" msgstr "das Auslesen der Möglichkeiten des Telefonbuchs %s schlug fehl.\n" #: ../src/scmxx/pbookphone.c:59 #, c-format msgid "slot %d is out of range %d-%d.\n" msgstr "Speicherplatz %d ist außerhalb des Bereichs %d-%d.\n" #: ../src/scmxx/pbookphone.c:64 #, c-format msgid "too many entries (max. %d).\n" msgstr "zu viele Einträge (maximal %d).\n" #: ../src/scmxx/pbookphone.c:68 #, c-format msgid "Updating entries %s(%d-%d)...\n" msgstr "Aktualisiere Einträge %s(%d-%d)...\n" #: ../src/scmxx/pbookphone.c:79 #, c-format msgid "Updating one entry in slot %d of memory %s..." msgstr "Aktualisiere einen Eintrag im Speicherplatz %d von Speicher %s..." #: ../src/scmxx/pbookphone.c:183 ../src/scmxx/pbookphone.c:212 #, c-format msgid "reading from phonebook %s failed: %s\n" msgstr "das Lesen des Telefonbuchs %s schlug fehl: %s\n" #: ../src/scmxx/pbookphone.c:192 #, c-format msgid "parsing entry failed: %s\n" msgstr "das Parsen des Eintrags schlug fehl: %s\n" #: ../src/scmxx/pbookphone.c:195 #, c-format msgid "phone returned unexpected entry %u\n" msgstr "Gerät sendete unerwarteten Eintrag %u\n" #: ../src/scmxx/pbookphone.c:249 ../src/scmxx/s35_files.c:207 msgid "Trying to find an empty slot..." msgstr "Versuche, einen freien Speicherplatz zu finden..." #: ../src/scmxx/pbookphone.c:260 ../src/scmxx/s35_files.c:151 #, c-format msgid "Detected empty slot %d\n" msgstr "Freier Speicherplatz %d gefunden\n" #: ../src/scmxx/pbookphone.c:295 msgid "Receiving phonebook entries..." msgstr "Empfange Telefonbucheinträge..." #: ../src/scmxx/dial.c:114 #, c-format msgid "Using dialing sequence %s.\n" msgstr "Benutze Wählsequenz %s.\n" #: ../src/scmxx/dial.c:117 msgid "dialing failed" msgstr "das Wählen schlug fehl" #: ../src/scmxx/tty_serial.c:98 ../src/scmxx/tty_serial.c:261 #: ../src/scmxx/tty_serial.c:283 ../src/scmxx/tty_serial.c:307 msgid "Error in setting port attributes" msgstr "Fehler beim Setzen der Porteinstellungen" #: ../src/scmxx/tty_serial.c:108 msgid "Error in setting transmission speed" msgstr "Fehler beim Einstellen der Übertragungsgeschwindigkeit" #: ../src/scmxx/tty_serial.c:126 ../src/scmxx/tty_serial.c:160 #: ../src/scmxx/tty_serial.c:194 msgid "Error in flushing buffers" msgstr "Fehler beim Leeren der Puffer" #: ../src/scmxx/tty_serial.c:254 ../src/scmxx/tty_serial.c:290 msgid "Error in getting port attributes" msgstr "Fehler beim Lesen der Porteinstellungen" #: ../src/scmxx/scmxx_opt.c:207 msgid "actions" msgstr "Aktionen" #: ../src/scmxx/scmxx_opt.c:208 msgid "memory types" msgstr "Speichertypen" #: ../src/scmxx/scmxx_opt.c:209 msgid "memory type options" msgstr "Optionen zum Speichertyp" #: ../src/scmxx/scmxx_opt.c:210 msgid "SMS options" msgstr "Optionen für SMS" #: ../src/scmxx/scmxx_opt.c:215 msgid "rate" msgstr "Rate" #: ../src/scmxx/scmxx_opt.c:216 msgid "specify another than the compiled in baudrate" msgstr "eine andere Baudrate als die einkompilierte angeben" #: ../src/scmxx/scmxx_opt.c:218 msgid "binary file transfer" msgstr "Transfer von Binärdateien" #: ../src/scmxx/scmxx_opt.c:219 msgid "device" msgstr "Gerät" #: ../src/scmxx/scmxx_opt.c:220 msgid "specify another than the compiled in device" msgstr "ein anderes Gerät als das einkompilierte angeben" #: ../src/scmxx/scmxx_opt.c:221 ../src/scmxx/scmxx_opt.c:283 msgid "seconds" msgstr "Sekunden" #: ../src/scmxx/scmxx_opt.c:222 msgid "return after this time if there is no answer" msgstr "kehre zurück, wenn in dieser Zeit keine Antwort kommt" #: ../src/scmxx/scmxx_opt.c:224 msgid "dials a number (requires option -n)" msgstr "wählt eine Nummer (braucht die Option -n)" #: ../src/scmxx/scmxx_opt.c:226 msgid "send/receive without storing in the phone" msgstr "senden/empfangen ohne im Handy zwischenzuspeichern" #: ../src/scmxx/scmxx_opt.c:228 msgid "disable e.g. a lock" msgstr "ausschalten z.B. einer Sperre" #: ../src/scmxx/scmxx_opt.c:230 msgid "enable e.g. a lock" msgstr "einschalten z.B. einer Sperre" #: ../src/scmxx/scmxx_opt.c:232 msgid "make the sms appear directly (if supported by the receiving entity)" msgstr "die Kurznachricht direkt anzeigen (wenn das Zielgerät das unterstützt)" #: ../src/scmxx/scmxx_opt.c:234 msgid "get something from the phone" msgstr "holt etwas vom Handy" #: ../src/scmxx/scmxx_opt.c:236 msgid "hangup all active calls" msgstr "beendet alle aktiven Telefongespräche" #: ../src/scmxx/scmxx_opt.c:238 msgid "print this message" msgstr "gibt diese Ausgabe aus" #: ../src/scmxx/scmxx_opt.c:240 msgid "do not use current serial port settings as base (default)" msgstr "" "benutze die aktuellen Einstellungen des seriellen Ports nicht als Grundlage " "(Vorgabe)" #: ../src/scmxx/scmxx_opt.c:242 msgid "show various information" msgstr "verschiedene Informationen anzeigen" #: ../src/scmxx/scmxx_opt.c:244 msgid "use current serial port settings as base" msgstr "benutze die aktuellen Einstellungen des seriellen Ports als Grundlage" #: ../src/scmxx/scmxx_opt.c:245 ../src/scmxx/lock.c:217 msgid "lock" msgstr "Sperre" #: ../src/scmxx/scmxx_opt.c:246 msgid "selects a lock to change (might need option --pin)" msgstr "wählt eine zu ändernde Sperre (braucht evtl. die Option --pin)" #: ../src/scmxx/scmxx_opt.c:248 msgid "show lock information" msgstr "Sperren-Informationen anzeigen" #: ../src/scmxx/scmxx_opt.c:250 msgid "select a memory" msgstr "wählt einen Speicher aus" #: ../src/scmxx/scmxx_opt.c:252 msgid "show memory information" msgstr "Speicher-Informationen anzeigen" #: ../src/scmxx/scmxx_opt.c:253 msgid "number" msgstr "Nummer" #: ../src/scmxx/scmxx_opt.c:254 msgid "specify number on send" msgstr "gibt eine Number beim Senden an" #: ../src/scmxx/scmxx_opt.c:255 msgid "file" msgstr "Datei" #: ../src/scmxx/scmxx_opt.c:256 msgid "specify a file when getting ('-' for stdout)" msgstr "eine Datei ('-' für Standardausgabe) bei --get angeben" #: ../src/scmxx/scmxx_opt.c:258 msgid "phonebook" msgstr "Telefonbücher" #: ../src/scmxx/scmxx_opt.c:260 msgid "use this pin if one is needed" msgstr "gibt einen PIN an, der, wenn nötig, benutzt wird" #: ../src/scmxx/scmxx_opt.c:261 msgid "program" msgstr "Programm" #: ../src/scmxx/scmxx_opt.c:262 msgid "specify a pipe to use" msgstr "eine aufzurufende Pipe angeben" #: ../src/scmxx/scmxx_opt.c:264 msgid "decreases verbosity by 1" msgstr "verringert die Menge der Ausgaben um 1" #: ../src/scmxx/scmxx_opt.c:266 msgid "removes something from the phone" msgstr "entfernt etwas vom Handy" #: ../src/scmxx/scmxx_opt.c:268 msgid "sends some special characters" msgstr "sendet ein paar spezielle Zeichen" #: ../src/scmxx/scmxx_opt.c:270 msgid "sends something to the phone" msgstr "sendet etwas zum Handy" #: ../src/scmxx/scmxx_opt.c:272 msgid "set the SMSC number (requires option -n)" msgstr "setzt die SMSC-Nummer (braucht die Option -n)" #: ../src/scmxx/scmxx_opt.c:274 msgid "synchronize time on phone" msgstr "synchronisiert die Zeit auf dem Handy" #: ../src/scmxx/scmxx_opt.c:275 msgid "slot" msgstr "Speicherplatz" #: ../src/scmxx/scmxx_opt.c:276 msgid "select a slot or slot group" msgstr "wählt einen Speicherplatz oder ein Status aus" #: ../src/scmxx/scmxx_opt.c:278 msgid "short messages" msgstr "Kurznachrichten (SMS)" #: ../src/scmxx/scmxx_opt.c:279 msgid "method" msgstr "Methode" #: ../src/scmxx/scmxx_opt.c:280 msgid "sort short message on getting([type,][slot|time])" msgstr "Kurznachrichten beim Empfang sortieren([type,][slot|time])" #: ../src/scmxx/scmxx_opt.c:282 msgid "request a status report from the SMSC" msgstr "eine Status-Report vom SMSC anfordern" #: ../src/scmxx/scmxx_opt.c:284 msgid "wait this time after opening device" msgstr "warte diese Zeitspanne nach dem Öffnen des Geräts" #: ../src/scmxx/scmxx_opt.c:286 msgid "use charset for input/output from/to system" msgstr "benutze Zeichensatz für Ein-/Ausgabe vom/zum System" #: ../src/scmxx/scmxx_opt.c:287 msgid "text" msgstr "Text" #: ../src/scmxx/scmxx_opt.c:288 msgid "specify content on send" msgstr "gibt den zu sendenden Inhalt an" #: ../src/scmxx/scmxx_opt.c:290 msgid "use UCS-2 (unicode) as charset" msgstr "UCS-2 (Unicode) als Zeichensatz benutzen" #: ../src/scmxx/scmxx_opt.c:292 msgid "increases verbosity by 1" msgstr "erhöht die Menge der Ausgaben um 1" #: ../src/scmxx/scmxx_opt.c:294 msgid "print the version number" msgstr "gibt die Versionsnummer aus" #: ../src/scmxx/pinfile.c:37 ../src/scmxx/pinfile.c:42 #: ../src/scmxx/pinfile.c:48 msgid "File check failed" msgstr "Dateiüberprüfung schlug fehl" #: ../src/scmxx/pinfile.c:42 msgid "file is not a regular file" msgstr "Datei ist keine reguläre Datei" #: ../src/scmxx/pinfile.c:48 msgid "file is group or world accessible" msgstr "Datei ist gruppen- oder weltlesbar" #: ../src/scmxx/pinfile.c:62 msgid "File read failed" msgstr "lesen der Datei schlug fehl" #: ../src/scmxx/pinfile.c:193 #, c-format msgid "Looking for %s for %s %s, %s %s in %s..." msgstr "Suche nach %s für %s %s, %s %s in %s..." #: ../src/scmxx/pinfile.c:196 #, c-format msgid "Looking for %s for %s %s in %s..." msgstr "Suche nach %s für %s %s in %s..." #: ../src/scmxx/pinfile.c:208 ../src/scmxx/pinfile.c:218 #: ../src/scmxx/pinfile.c:237 msgid "not found" msgstr "nicht gefunden" #: ../src/scmxx/pinfile.c:240 msgid "found" msgstr "gefunden" #: ../src/scmxx/lock.c:23 msgid "phone locked to SIM (device code)" msgstr "Gerät hat SIM-Sperre (Geräte-Code)" #: ../src/scmxx/lock.c:25 msgid "SIM card (PIN)" msgstr "SIM-Karte (PIN)" #: ../src/scmxx/lock.c:29 msgid "FDN lock" msgstr "FDN-Sperre" #: ../src/scmxx/lock.c:31 msgid "bar all outgoing calls" msgstr "sperre alle abgehende Telefongespräche" #: ../src/scmxx/lock.c:33 msgid "bar outgoing international calls" msgstr "sperre abgehende, internationale Telefongespräche" #: ../src/scmxx/lock.c:35 msgid "bar outgoing international calls except to home country" msgstr "sperre abgehende, internationale Telefongespräche außer eigenes Land" #: ../src/scmxx/lock.c:37 msgid "bar all incoming calls" msgstr "sperre alle eingehenden Anrufe" #: ../src/scmxx/lock.c:39 msgid "bar incoming calls when roaming outside the home country" msgstr "sperre eingehende Anrufe beim Auslands-Roaming" #: ../src/scmxx/lock.c:41 msgid "all barring services" msgstr "alle Sperrdienste" #: ../src/scmxx/lock.c:43 msgid "all outgoing barring services" msgstr "alle Sperrdienste für abgehend" #: ../src/scmxx/lock.c:45 msgid "all incoming barring services" msgstr "alle Sperrdienste für eingehend" #: ../src/scmxx/lock.c:47 msgid "network personalization" msgstr "auf Netz festgelegt" #: ../src/scmxx/lock.c:49 msgid "corporate personalization" msgstr "auf Firma festgelegt" #: ../src/scmxx/lock.c:51 msgid "network subset personalization" msgstr "auf Teilnetzwerk festgelegt" #: ../src/scmxx/lock.c:53 msgid "service provider personalization" msgstr "auf Service-Provider festgelegt" #: ../src/scmxx/lock.c:55 msgid "phone locked to very first inserted SIM" msgstr "auf das erste eingelegte SIM festgelegt" #: ../src/scmxx/lock.c:57 msgid "keyboard" msgstr "Tastatur" #: ../src/scmxx/lock.c:84 msgid "" "Be beware of phone internal passwort counters that are normally set to 3 " "failures!" msgstr "" "Beachten Sie, dass die geräteinterne Passwortzähler normalerweise auf 3 " "Fehlschläge gesetzt ist!" #: ../src/scmxx/lock.c:85 msgid "The current failure count cannot be read!" msgstr "The Zähler für Fehlschläge kann nicht ausgelesen werden!" #: ../src/scmxx/lock.c:86 msgid "Setting new password FAILED!" msgstr "das Setzen des neuen Passworts SCHLUG FEHL!" #: ../src/scmxx/lock.c:165 msgid "Lock status change failed." msgstr "Ändern des Sperrenstatus schlug fehl." #: ../src/scmxx/lock.c:167 #, c-format msgid "Lock %s successfully %s.\n" msgstr "Sperre %s wurde erfolgreich %s.\n" #: ../src/scmxx/lock.c:168 msgid "disabled" msgstr "deaktiviert" #: ../src/scmxx/lock.c:168 msgid "enabled" msgstr "aktiviert" #: ../src/scmxx/lock.c:210 msgid "Locks" msgstr "Sperren" #: ../src/scmxx/lock.c:218 msgid "status" msgstr "Status" #: ../src/scmxx/lock.c:240 msgid "Lock" msgstr "Sperre" #: ../src/scmxx/lock.c:242 msgid "getting lock status failed." msgstr "ermitteln des Sperrenstatus schlug fehl." #: ../src/scmxx/lock.c:246 msgid "on" msgstr "ein" #: ../src/scmxx/lock.c:246 msgid "off" msgstr "aus" #: ../src/scmxx/s35_files.c:40 msgid "You must define a memory to use." msgstr "Es muss ein zu benutzender Speichertyp angegeben werden." #: ../src/scmxx/s35_files.c:54 msgid "You must define either a valid slot, nothing or \"all\"." msgstr "" "Es muss ein gülter Speicherplatz, nichts oder \"all\" angegeben werden." #: ../src/scmxx/s35_files.c:59 msgid "this phone does not support file exchange." msgstr "diese Gerät unterstützt keinen Datenaustausch." #: ../src/scmxx/s35_files.c:71 #, c-format msgid "%s values can only be %d to %d.\n" msgstr "Mögliche Werte für %s sind %d bis %d.\n" #: ../src/scmxx/s35_files.c:73 #, c-format msgid "%s value can only be %d.\n" msgstr "Der einzig gültige Wert für %s ist %d.\n" #: ../src/scmxx/s35_files.c:87 msgid "You must define a valid slot or \"all\"." msgstr "Es muss ein gülter Speicherplatz oder \"all\" angegeben werden." #: ../src/scmxx/s35_files.c:128 #, c-format msgid "Using slot %d\n" msgstr "Benutze Speicherplatz %d\n" #: ../src/scmxx/s35_files.c:149 msgid "No free slot found." msgstr "Kein freier Speicherplatz gefunden." #: ../src/scmxx/s35_files.c:175 msgid "You must specify a file name prefix (can be \"\")." msgstr "Es muss ein Dateinamenspräfix angegebenwerden (kann auch \"\" sein)." #: ../src/scmxx/s35_files.c:194 #, c-format msgid "%s %d deleted.\n" msgstr "%s %d wurde gelöscht.\n" #: ../src/scmxx/s35_files.c:196 #, c-format msgid "%s %d NOT deleted, something went wrong: %s\n" msgstr "%s %d wurde NICHT gelöscht, irgendwas ging schief: %s\n" #: ../src/scmxx/s35_files.c:286 msgid "File transfer..." msgstr "Dateiübertragung..." #: ../src/scmxx/s35_files.c:314 ../src/scmxx/s35_sms.c:316 msgid "Waiting for data request..." msgstr "Warten auf Datenanforderung..." #: ../src/scmxx/s35_files.c:319 msgid "Packet buffer seems to be filled with something else, clearing..." msgstr "Paketbuffer scheint mit etwas anderem gefüllt zu sein, lösche..." #: ../src/scmxx/s35_files.c:333 #, c-format msgid "" "\n" "Sending %d Bytes in packet %d\n" msgstr "" "\n" "Sende %d Bytes in Paket %d\n" #: ../src/scmxx/s35_files.c:335 ../src/scmxx/s35_sms.c:320 msgid "Sending data..." msgstr "Sende Daten..." #: ../src/scmxx/s35_files.c:342 #, c-format msgid "Packet %d sent\n" msgstr "Paket %d gesendet\n" #: ../src/scmxx/s35_files.c:344 msgid "Wrong data format" msgstr "Falsches Datenformat" #: ../src/scmxx/s35_files.c:351 msgid "File transfer complete." msgstr "Datenübertragung vollständig." #: ../src/scmxx/s35_files.c:353 msgid "Nothing to transfer." msgstr "Nichts da zum übertragen." #: ../src/scmxx/s35_files.c:382 #, c-format msgid "%s slot %lu" msgstr "%s-Speicherplatz %lu" #: ../src/scmxx/s35_files.c:411 #, c-format msgid "parsing answer from phone failed: \"%s\"\n" msgstr "die Auswertung der Antwort des Gerätes schlug fehl: \"%s\"\n" #: ../src/scmxx/s35_files.c:428 #, c-format msgid "writing to file \"%s\" failed: %s\n" msgstr "das Schreiben in die Datei \"%s\" schlug fehl: %s\n" #: ../src/scmxx/s35_files.c:435 #, c-format msgid "writing to pipe \"%s\" failed.\n" msgstr "Schreiben in die Pipe \"%s\" schlug fehl.\n" #: ../src/scmxx/s35_files.c:448 ../src/scmxx/s35_sms.c:559 #, c-format msgid "closing pipe \"%s\" failed.\n" msgstr "Schließen der Pipe \"%s\" schlug fehl.\n" #: ../src/scmxx/s35_sms.c:64 msgid "" "If you want to remove short messages or mix actions, you must define a slot " "or slot type." msgstr "" "Zum Entfernen von Kurznachrichten oder Mixen von Aktionen muss ein " "Speicherplatz oder Typ angegeben werden." #: ../src/scmxx/s35_sms.c:97 #, c-format msgid "SMS storage type \"%s\" could not be selected.\n" msgstr "" "Kurznachrichtenspeicherplatztyp \"%s\" konnte nicht ausgewählt werden.\n" #: ../src/scmxx/s35_sms.c:147 msgid "Hmm, nothing to send?" msgstr "Hmm, es gibt nichts zum senden?" #: ../src/scmxx/s35_sms.c:191 #, c-format msgid "SMS slot %d was deleted.\n" msgstr "Kurznachrichtenspeicherplatz %d wurde gelöscht.\n" #: ../src/scmxx/s35_sms.c:193 ../src/scmxx/s35_sms.c:284 #: ../src/scmxx/s35_sms.c:467 msgid "This slot is not available." msgstr "Dieser Speicherplatz ist nicht verfügbar." #: ../src/scmxx/s35_sms.c:199 msgid "You must specify a valid slot number." msgstr "Es muss eine gültige Speicherplatznummer angegeben werden." #: ../src/scmxx/s35_sms.c:231 msgid "" "Argument to --number is not a number but phonebook cache is not present." msgstr "" "Argument von --number ist keine Nummer aber der Telefonbuchcache ist nicht " "vorhanden." #: ../src/scmxx/s35_sms.c:247 #, c-format msgid "no cache entry for \"%s\" found.\n" msgstr "für \"%s\" wurde kein Cache-Eintrag gefunden.\n" #: ../src/scmxx/s35_sms.c:249 #, c-format msgid "no unique hit in cache for search term \"%s\":\n" msgstr "kein eindeutiger Treffer im Cache für den Suchbegriff \"%s\":\n" #: ../src/scmxx/s35_sms.c:279 msgid "zero-length number" msgstr "Nummer mit Länge 0" #: ../src/scmxx/s35_sms.c:288 ../src/scmxx/s35_sms.c:327 msgid "The message was sent." msgstr "Die Nachricht wurde gesendet." #: ../src/scmxx/s35_sms.c:288 ../src/scmxx/s35_sms.c:327 #: ../src/smspdu/smspdu_print.c:339 ../src/smspdu/smspdu_print.c:344 msgid "Message reference" msgstr "Nachrichtenreferenz" #: ../src/scmxx/s35_sms.c:291 ../src/scmxx/s35_sms.c:333 msgid "The phone returned" msgstr "Rückgabewert des Geräts ist" #: ../src/scmxx/s35_sms.c:324 #, c-format msgid "An error occured on sending the SMS: %s\n" msgstr "Beim Senden der SMS trat ein Fehler auf: %s\n" #: ../src/scmxx/s35_sms.c:329 #, c-format msgid "The message was saved to SMS memory slot %s\n" msgstr "Die Nachricht wurde im SMS-Speicherplatz %s gespeichert.\n" #: ../src/scmxx/s35_sms.c:336 msgid "An unknown error occured." msgstr "Ein unbekannter Fehler trat auf." #: ../src/scmxx/s35_sms.c:338 msgid "There is no slot free to store the sms." msgstr "" "Es ist keine freier Speicherplatz vorhanden, um die Kurznachricht zu " "speichern." #: ../src/scmxx/s35_sms.c:355 #, c-format msgid "Trying to send SMS from slot %d...\n" msgstr "Versuche, die Kurznachricht vom Speicherplatz %d zu senden...\n" #: ../src/scmxx/s35_sms.c:358 msgid "Sending is only possible with SMS of outgoing type." msgstr "Es ist nur das Senden von Kurznachrichten vom Typ abgehend möglich." #: ../src/scmxx/s35_sms.c:384 msgid "No SMS text found (or zero length)." msgstr "Kein Kurznachrichtentext gefunden (oder nur mit Länge 0)." #: ../src/scmxx/s35_sms.c:391 msgid "Creating PDU..." msgstr "Erstelle PDU..." #: ../src/scmxx/s35_sms.c:397 msgid "short message encoding failed" msgstr "Kodierung der Kurznachricht schlug fehl" #: ../src/scmxx/s35_sms.c:434 ../src/scmxx/s35_sms.c:450 msgid "You must define an output target." msgstr "Es muss ein Ausgabeziel angegeben werden." #: ../src/scmxx/s35_sms.c:476 ../src/scmxx/s35_sms.c:519 msgid "sent" msgstr "gesendet" #: ../src/scmxx/s35_sms.c:477 ../src/scmxx/s35_sms.c:518 msgid "unsent" msgstr "ungesendet" #: ../src/scmxx/s35_sms.c:478 ../src/scmxx/s35_sms.c:517 msgid "read" msgstr "gelesen" #: ../src/scmxx/s35_sms.c:479 ../src/scmxx/s35_sms.c:516 msgid "unread" msgstr "ungelesen" #: ../src/scmxx/s35_sms.c:482 #, c-format msgid "There are no %s short messages on the phone.\n" msgstr "Es sind keine %sen Kurznachrichten auf dem Gerät.\n" #: ../src/scmxx/s35_sms.c:484 msgid "There are no short messages on the phone.\n" msgstr "Es sind keine Kurznachrichten auf dem Gerät.\n" #: ../src/scmxx/s35_sms.c:491 msgid "Looking for SMS of specified type..." msgstr "Suche nach Kurznachrichten des angegebenen Typs..." #: ../src/scmxx/s35_sms.c:501 msgid "Output parsing error." msgstr "Fehler beim Parsen der Ausgabe." #: ../src/scmxx/s35_sms.c:513 #, c-format msgid "Slot %u is empty.\n" msgstr "Speicherplatz %u ist leer.\n" #: ../src/scmxx/s35_sms.c:516 ../src/scmxx/s35_sms.c:517 msgid "incoming" msgstr "eingehend" #: ../src/scmxx/s35_sms.c:518 ../src/scmxx/s35_sms.c:519 msgid "outgoing" msgstr "abgehend" #: ../src/scmxx/s35_sms.c:523 #, c-format msgid "Found %s, %s SMS in slot %u.\n" msgstr "SMS vom Typ %s, %s auf Speicherplatz %u gefunden.\n" #: ../src/scmxx/s35_sms.c:526 #, c-format msgid "Found SMS of unknown type in slot %u.\n" msgstr "SMS eines unbekannten Typs auf Speicherplatz %u gefunden.\n" #: ../src/scmxx/s35_sms.c:530 msgid "Returned PDU exceeds buffer size." msgstr "Empfangene PDU ist größer als die Puffergröße." #: ../src/scmxx/s35_sms.c:638 msgid "Concatenated messages cannot be reassembled." msgstr "Verkettete Nachrichten können nicht wieder zusammengefügt werden." #: ../src/scmxx/s35_sms.c:670 #, c-format msgid "" "\n" "No cache hit for number \"%s\" with match size %d\n" msgstr "" "\n" "Treffer im Cache für die Nummer \"%s\" mit Vergleichslänge %d\n" #: ../src/scmxx/s35_sms.c:673 #, c-format msgid "" "\n" "Cache hit for number \"%s\" with match size %d\n" msgstr "" "\n" "Treffer im Cache für die Nummer \"%s\" mit Vergleichslänge %d\n" #: ../src/scmxx/s35_sms.c:677 #, c-format msgid "" "\n" "No unique hit in cache for number \"%s\" with match size %d\n" msgstr "" "\n" "Kein eindeutiger Treffer im Cache für die Nummer \"%s\" mit Vergleichslänge %" "d\n" #: ../src/scmxx/s35_sms.c:720 msgid "No output method was specified." msgstr "Es wurde keine Ausgabemethode angegeben." #: ../src/scmxx/s35_sms.c:730 msgid "Could not set Phase 2+ compatible mode." msgstr "Konnte keinen Phase-2+ kompatiblen Modus einstellen." #: ../src/scmxx/s35_sms.c:739 msgid "Could not set direct mode." msgstr "Konnte \"direct mode\" nicht einstellen." #: ../src/scmxx/s35_sms.c:771 msgid "Failed to decode PDU." msgstr "Dekodieren der PDU schlug fehl." #: ../src/scmxx/s35_sms.c:785 msgid "SMS ACK should have been ok but was not." msgstr "Das ACK auf die Kurznachricht hätte ok sein sollen, war es aber nicht." #: ../src/scmxx/s35_sms.c:790 msgid "A new message was stored in the phone." msgstr "Eine neue Nachricht wurde im Gerät gespeichert." #: ../src/atcommand/common.c:64 msgid "Cannot read from device" msgstr "Vom Gerät konnte nicht gelesen werden" #: ../src/atcommand/common.c:83 msgid "Received" msgstr "Empfangen" #: ../src/atcommand/common.c:124 msgid "Use the --pin parameter or edit the pin file." msgstr "Benutzen Sie den Parameter --pin oder editieren Sie die Pin-Datei." #: ../src/atcommand/common.c:136 msgid "Using PIN failed" msgstr "Benutzen der PIN schlug fehl" #: ../src/atcommand/common.c:161 ../src/atcommand/common.c:187 msgid "" "\n" "Sending command" msgstr "" "\n" "Sende Kommando" #: ../src/atcommand/common.c:174 ../src/atcommand/common.c:193 msgid "Cannot send at command" msgstr "das AT-Kommando konnte nicht gesendet werden" #: ../src/atcommand/common.c:277 msgid "command return value" msgstr "Rückgabewert des Kommandos" #: ../src/atcommand/common.c:283 msgid "nothing" msgstr "nichts" #: ../src/atcommand/common.c:286 #, c-format msgid "Value matched %s.\n" msgstr "Wert ist gleich mit: %s.\n" #: ../src/smspdu/smspdu_print.c:43 msgid "Slot" msgstr "Speicherplatz" #: ../src/smspdu/smspdu_print.c:58 msgid "To" msgstr "An" #: ../src/smspdu/smspdu_print.c:59 msgid "From" msgstr "Von" #: ../src/smspdu/smspdu_print.c:60 msgid "Original To" msgstr "Ursprünglich an" #: ../src/smspdu/smspdu_print.c:101 msgid "Valid for" msgstr "Gültig für" #: ../src/smspdu/smspdu_print.c:102 msgid "week" msgid_plural "weeks" msgstr[0] "Woche" msgstr[1] "Wochen" #: ../src/smspdu/smspdu_print.c:103 msgid "day" msgid_plural "days" msgstr[0] "Tag" msgstr[1] "Tage" #: ../src/smspdu/smspdu_print.c:104 msgid "hour" msgid_plural "hours" msgstr[0] "Stunde" msgstr[1] "Stunden" #: ../src/smspdu/smspdu_print.c:105 msgid "minute" msgid_plural "minutes" msgstr[0] "Minute" msgstr[1] "Minuten" #: ../src/smspdu/smspdu_print.c:106 msgid "second" msgid_plural "seconds" msgstr[0] "Sekunde" msgstr[1] "Sekunden" #: ../src/smspdu/smspdu_print.c:116 msgid "Valid until" msgstr "Gültig bis" #: ../src/smspdu/smspdu_print.c:117 msgid "Date" msgstr "Datum" #: ../src/smspdu/smspdu_print.c:118 msgid "Message status time" msgstr "Nachrichtenstatuszeit" #: ../src/smspdu/smspdu_print.c:132 msgid "SMSC number" msgstr "SMSC-Nummer" #: ../src/smspdu/smspdu_print.c:153 msgid "PDU type" msgstr "PDU-Typ" #: ../src/smspdu/smspdu_print.c:159 msgid "PDU flags" msgstr "PDU-Einstellungen" #: ../src/smspdu/smspdu_print.c:160 msgid "StatusRequest" msgstr "StatusAnforderung" #: ../src/smspdu/smspdu_print.c:162 msgid "RejectDuplicate" msgstr "DuplikateAblehnen" #: ../src/smspdu/smspdu_print.c:165 msgid "MoreMessagesToSend" msgstr "MehrNachrichtenZumSenden" #: ../src/smspdu/smspdu_print.c:169 msgid "ReplyPath" msgstr "Antwortpfad" #: ../src/smspdu/smspdu_print.c:180 msgid "Protocol ID" msgstr "Protokoll-ID" #: ../src/smspdu/smspdu_print.c:183 msgid "service-center-specific use" msgstr "SMSC-spezifischer Wert" #: ../src/smspdu/smspdu_print.c:187 #, c-format msgid "replace short message type %d" msgstr "ersetze Kurznachricht vom Typ %d" #: ../src/smspdu/smspdu_print.c:190 msgid "short message type 0" msgstr "Kurznachrichtentyp 0" #: ../src/smspdu/smspdu_print.c:191 msgid "obsolete EMS mark" msgstr "veraltete EMS-Markierung" #: ../src/smspdu/smspdu_print.c:192 msgid "return call message" msgstr "Rückrufnachricht" #: ../src/smspdu/smspdu_print.c:194 msgid "ME data download" msgstr "Datenstrom zur ME" #: ../src/smspdu/smspdu_print.c:195 msgid "ME de-personalization short message" msgstr "ME entpersonalisierte Kurznachricht" #: ../src/smspdu/smspdu_print.c:196 msgid "(U)SIM data download" msgstr "Datenstrom zur (U)SIM" #: ../src/smspdu/smspdu_print.c:202 msgid "SMS-to-SME protocol" msgstr "SMS-to-SME-Protokoll" #: ../src/smspdu/smspdu_print.c:204 msgid "telematic interworking" msgstr "Telematik-Zwischenschicht" #: ../src/smspdu/smspdu_print.c:224 msgid "compressed" msgstr "komprimiert" #: ../src/smspdu/smspdu_print.c:231 #, c-format msgid " (class %d)" msgstr " (Klasse %d)" #: ../src/smspdu/smspdu_print.c:233 msgid "marked as auto-delete" msgstr "markiert für autom. löschen" #: ../src/smspdu/smspdu_print.c:241 ../src/smspdu/smsudh.c:45 msgid "Indication" msgstr "Hinweis" #: ../src/smspdu/smspdu_print.c:243 ../src/smspdu/smsudh.c:47 msgid "voicemail" msgstr "Sprachnachricht" #: ../src/smspdu/smspdu_print.c:244 ../src/smspdu/smsudh.c:48 msgid "fax" msgstr "Fax" #: ../src/smspdu/smspdu_print.c:245 ../src/smspdu/smsudh.c:49 msgid "e-mail" msgstr "E-Mail" #: ../src/smspdu/smspdu_print.c:246 ../src/smspdu/smsudh.c:50 msgid "misc." msgstr "sonstige" #: ../src/smspdu/smspdu_print.c:249 #, c-format msgid "new %s message(s) waiting" msgstr "neue wartende %s-Nachricht(en)" #: ../src/smspdu/smspdu_print.c:251 #, c-format msgid "no more %s messages waiting" msgstr "keine weiteren wartenden %s-Nachrichten" #: ../src/smspdu/smspdu_print.c:268 msgid "Message length" msgstr "Nachrichtenlänge" #: ../src/smspdu/smspdu_print.c:292 msgid "transaction completed" msgstr "Übertragung abgeschlossen" #: ../src/smspdu/smspdu_print.c:296 msgid "SC still trying to transfer short message" msgstr "SC versucht weiterhin die Nachricht zu übertragen" #: ../src/smspdu/smspdu_print.c:299 msgid "received by SME" msgstr "von der SME empfangen" #: ../src/smspdu/smspdu_print.c:300 msgid "forwarded to SME but delivery cannot be confirmed" msgstr "" "zur SME weitergeleitet, aber die Auslieferung kann nicht überpüft werden" #: ../src/smspdu/smspdu_print.c:301 msgid "replaced" msgstr "ersetzt" #: ../src/smspdu/smspdu_print.c:303 msgid "congestion" msgstr "Stau" #: ../src/smspdu/smspdu_print.c:305 msgid "SME busy" msgstr "SME ist beschäftigt" #: ../src/smspdu/smspdu_print.c:307 msgid "no response from SME" msgstr "keine Antwort von der SME" #: ../src/smspdu/smspdu_print.c:309 ../src/smspdu/smspdu_print.c:325 msgid "service rejected" msgstr "Dienst wurde abgewiesen" #: ../src/smspdu/smspdu_print.c:312 msgid "QoS not available" msgstr "QoS ist nicht verfügbar" #: ../src/smspdu/smspdu_print.c:314 msgid "error in SME" msgstr "Fehler in der SME" #: ../src/smspdu/smspdu_print.c:315 msgid "remote procedure error" msgstr "Fehler bei der remote procedure" #: ../src/smspdu/smspdu_print.c:316 msgid "incompatible destination" msgstr "inkompatibles Ziel" #: ../src/smspdu/smspdu_print.c:317 msgid "connection rejected by SME" msgstr "Verbindung von der SME abgelehnt" #: ../src/smspdu/smspdu_print.c:318 msgid "not obtainable" msgstr "nicht erhältlich" #: ../src/smspdu/smspdu_print.c:319 msgid "no interworking available" msgstr "keine Zusammenarbeitsmethode verfügbar" #: ../src/smspdu/smspdu_print.c:320 msgid "validity period expired" msgstr "Gültigkeitsperiode abgelaufen" #: ../src/smspdu/smspdu_print.c:321 msgid "deleted by sender" msgstr "vom Empfänger gelöscht" #: ../src/smspdu/smspdu_print.c:322 msgid "deleted by service center" msgstr "vom SMSC gelöscht" #: ../src/smspdu/smspdu_print.c:323 msgid "message does not exist" msgstr "Nachricht existiert nicht" #: ../src/smspdu/smspdu_print.c:327 msgid "Message status" msgstr "Nachrichtenstatus" #: ../src/smspdu/smspdu_print.c:328 msgid "Message status reason" msgstr "Nachrichtenstatusgrund" #: ../src/smspdu/smspdu_print.c:428 ../src/smspdu/smspdu_dec.c:602 msgid "Unsupported pdu type" msgstr "Nicht unterstützter PDU-Typ" #: ../src/smspdu/smspdu_enc.c:78 ../src/smspdu/smspdu_enc.c:86 #: ../src/smspdu/smsud_enc.c:237 ../src/smspdu/smsud_enc.c:239 #: ../src/charsets/ucs2.c:34 ../src/charsets/ucs4.c:36 #: ../src/charsets/ucs4_dec.c:78 ../src/charsets/ucs4_dec.c:157 #: ../src/charsets/ucs4_dec.c:168 msgid "Error" msgstr "Fehler" #: ../src/smspdu/smspdu_enc.c:78 msgid "No valid number specified." msgstr "es wurde kein gültige Nummer angegeben." #: ../src/smspdu/smspdu_enc.c:86 #, c-format msgid "%s: sms number cannot have more than %lu digits.\n" msgstr "%s: eine SMS-Nummer kann nicht mehr als %lu Ziffern haben.\n" #: ../src/smspdu/smspdu_enc.c:161 ../src/smspdu/smsud_enc.c:211 #: ../src/helper.h:38 msgid "Notice" msgstr "Anmerkung" #: ../src/smspdu/smspdu_enc.c:161 msgid "Selecting UCS-2 character set." msgstr "Wähle UCS-2-Zeichensatz aus." #: ../src/smspdu/smsud_enc.c:169 #, c-format msgid "Delaying for %2d seconds, press Ctrl+C to abort." msgstr "Verzögere für %2d Sekunden, Ctrl+C zum abbrechen." #: ../src/smspdu/smsud_enc.c:213 #, c-format msgid "This message has %lu character" msgid_plural "This message has %lu characters" msgstr[0] "Diese Nachricht hat %lu Zeichen" msgstr[1] "Diese Nachricht hat %lu Zeichen" #: ../src/smspdu/smsud_enc.c:219 #, c-format msgid "and will use %u part.\n" msgid_plural "and will use %u parts.\n" msgstr[0] "und umfasst %u Teil.\n" msgstr[1] "und umfasst %u Teile.\n" #: ../src/smspdu/smsud_enc.c:224 #, c-format msgid "%s: The suggested maximum parts count is %d.\n" msgstr "%s: Die vorgeschlagene, maximale Anzahl von Teilen ist %d.\n" #: ../src/smspdu/smsud_enc.c:225 ../src/helper.h:37 msgid "Warning" msgstr "Warnung" #: ../src/smspdu/smsud_enc.c:236 #, c-format msgid "%s: message part count exceeds maximum of 255\n" msgstr "%s: Anzahl der Nachrichtenteile ist höher als das Maximum von 255\n" #: ../src/smspdu/smsud_enc.c:238 #, c-format msgid "%s: SMS text is too long (max. %d characters).\n" msgstr "%s: SMS-Text ist zu lang (maximal %d Zeichen).\n" #: ../src/smspdu/smsud_enc.c:243 msgid "" "Please be aware that some characters are encoded as 14bit (instead of 7bit), " "e.g. the euro character." msgstr "" "Bitte beachten, daß eine Zeichen mit 14bit kodiert werden (anstatt 7bit), z." "B. das Euro-Zeichen." #: ../src/smspdu/smsudh.c:52 #, c-format msgid "%d %s message waiting" msgid_plural "%d %s messages waiting" msgstr[0] "%d wartende %s Nachricht" msgstr[1] "%d wartende %s Nachrichten" #: ../src/smspdu/smsudh.c:59 msgid "Wireless control message protocol data unit" msgstr "Wireless Control Message Protokoll Dateneinheit" #: ../src/smspdu/smsudh.c:65 #, c-format msgid "SIM toolkit security header" msgstr "SIM Toolkit Sicherheitsvorspann" #: ../src/smspdu/smsudh.c:70 ../src/smspdu/smsudh.c:76 #, c-format msgid "Multipart message: sequence number = %d, part %d of %d" msgstr "Nachricht hat mehrere Teile: Sequenznummer = %d, Teil %d von %d" #: ../src/smspdu/smsudh.c:82 ../src/smspdu/smsudh.c:88 #, c-format msgid "Application port: destination port = %d, originator port = %d" msgstr "Anwendungsport: Zielport = %d, Quellport = %d" #: ../src/smspdu/smsudh.c:94 msgid "The following headers were created by" msgstr "Die folgenden Header wurden eingefügt vom" #: ../src/smspdu/smsudh.c:97 msgid "original sender" msgstr "ursprünglichen Sender" #: ../src/smspdu/smsudh.c:100 msgid "original receiver" msgstr "ursprünglichen Empfänger" #: ../src/smspdu/smsudh.c:106 #, c-format msgid "(unknown value %d)" msgstr "(unbekannter Wert %d)" #: ../src/smspdu/smsudh.c:125 #, c-format msgid "Ignored header type 0x%02x" msgstr "Headertyp 0x%02x wurde ignoriert" #: ../src/smspdu/smsudh.c:146 msgid "Message header" msgstr "Nachrichtenkopf" #: ../src/charsets/gsm_dec.c:38 #, c-format msgid "Ups, value 0x%02x not found in list of valid GSM characters.\n" msgstr "Ups, der Wert 0x%02x ist nicht in der Liste gültiger GSM-Zeichen.\n" #: ../src/charsets/ucs4_enc.c:38 msgid "Error on text conversion" msgstr "Fehler bei der Textkonvertierung" #: ../src/charsets/ucs4_enc.c:47 ../src/charsets/ucs4_dec.c:120 #, c-format msgid "Error on text conversion from charset \"%s\" to charset \"%s\": %s\n" msgstr "" "Fehler bei der Textkonvertierung vom Zeichensatz \"%s\" in den Zeichensatz " "\"%s\": %s\n" #: ../src/charsets/local_dec.c:62 #, c-format msgid "%s: character %ld is not a hexdigit.\n" msgstr "%s: Zeichen %ld is keine Hex-Ziffer.\n" #: ../src/charsets/local_dec.c:63 ../src/charsets/local_dec.c:70 msgid "Error on text conversion to internal charset" msgstr "Fehler bei der Textkonvertierung in dem internen Zeichensatz" #: ../src/charsets/local_dec.c:69 #, c-format msgid "%s: character %ld is not ACSII.\n" msgstr "%s: Zeichen %ld ist kein ASCII-Zeichen.\n" #: ../src/charsets/gsm_enc.c:40 #, c-format msgid "Unicode value 0x%04lx is not a GSM character\n" msgstr "Unicode-Wert 0x%04lx ist kein GSM-Zeichen\n" #: ../src/charsets/ucs2.c:34 ../src/charsets/ucs4.c:36 #, c-format msgid "%s: the iconv implementation of this system does not support %s" msgstr "%s: die iconv-Implementierung dieses Systems unterstützt kein %s" #: ../src/charsets/ucs4_dec.c:78 #, c-format msgid "%s: Unicode character 0x%lx cannot be converted.\n" msgstr "%s: Unicode-Zeichen 0x%lx kann nicht konvertiert werden.\n" #: ../src/charsets/ucs4_dec.c:158 msgid "insufficient memory on unicode decoding." msgstr "nicht genügend Speicherplatz bei der Unicode-Dekodierung." #: ../src/charsets/ucs4_dec.c:159 msgid "Please report as bug." msgstr "Bitte als Bug melden." #: ../src/charsets/ucs4_dec.c:164 msgid "Error with internal charset" msgstr "Fehler beim internen Zeichensatz" #: ../src/charsets/local.c:70 #, c-format msgid "Using \"%s\" as system character set." msgstr "\"%s\" wird als Systemzeichensatz benutzt." #: ../src/helper.h:36 msgid "" "\n" "Error" msgstr "" "\n" "Fehler" #: ../src/helper.h:39 msgid "Debug" msgstr "Debug" scmxx-0.9.0/po/it.po0000644000175000017500000014035010401300375014102 0ustar hendrikhendrik# Italian translations for scmxx package. # Copyright (C) 2005 Andrea Benazzo # This file is distributed under the same license as the scmxx package. # , 2005. # msgid "" msgstr "" "Project-Id-Version: scmxx 0.7.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-01 12:06+0100\n" "PO-Revision-Date: 2005-07-24 22:10+0200\n" "Last-Translator: Andrea Benazzo \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../src/helper/mem.c:29 msgid "Memory allocation failure" msgstr "Errore durante l'allocazione della memoria" #: ../src/helper/file.c:42 #, fuzzy, c-format msgid "Could not access %s: %s\n" msgstr "Errore, non posso accedere a %s: %s\n" #: ../src/helper/file.c:48 #, c-format msgid "Accessing %s\n" msgstr "Sto accedendo a %s\n" #: ../src/helper/file.c:50 msgid "Please input the data and finish with Ctrl-D on an empty line" msgstr "Per favore inserisci i dati e completa con Ctrl-D su di una riga vuota" #: ../src/helper/file.c:62 #, c-format msgid "%s could not be created: %s\n" msgstr "%s non può essere creato: %s\n" #: ../src/helper/file.c:64 #, c-format msgid "%s created.\n" msgstr "%s creato.\n" #: ../src/helper/file.c:99 #, fuzzy, c-format msgid "%s has %d byte.\n" msgid_plural "%s has %d bytes.\n" msgstr[0] "%s ha %d bytes.\n" msgstr[1] "%s ha %d bytes.\n" #: ../src/adr2vcf/opt.c:61 ../src/smi/opt.c:53 ../src/scmxx/scmxx_opt.c:206 #, fuzzy msgid "options" msgstr "Opzioni" #: ../src/adr2vcf/opt.c:76 ../src/smi/opt.c:62 ../src/scmxx/scmxx_opt.c:285 #, fuzzy msgid "charset" msgstr "caratteri" #: ../src/options/common.c:129 msgid "Syntax" msgstr "" #: ../src/scmxx/tty_bluetooth.c:100 ../src/scmxx/tty_serial.c:161 #: ../src/scmxx/tty_serial.c:250 ../src/scmxx/tty_serial.c:255 #: ../src/scmxx/tty_serial.c:262 msgid "system error code" msgstr "" #: ../src/scmxx/tty_bluetooth.c:156 msgid "protocol not implemented" msgstr "" #: ../src/scmxx/actions.c:90 msgid "Sending reset frame" msgstr "Sto mandando il frame di reset" #: ../src/scmxx/actions.c:107 ../src/scmxx/ttyaccess.c:53 #: ../src/scmxx/pbookphone.c:76 ../src/scmxx/pbookphone.c:82 msgid "done" msgstr "fatto" #: ../src/scmxx/actions.c:197 msgid "no charset specified." msgstr "nessun set di caratteri specificato." #: ../src/scmxx/actions.c:214 msgid "no number specified." msgstr "nessun numero specificato." #: ../src/scmxx/actions.c:216 msgid "no valid number specified." msgstr "il numero specificato non è valido." #: ../src/scmxx/actions.c:222 #, c-format msgid "SMS server number was set to %s\n" msgstr "il numero del server SMS è stato mandato a %s\n" #: ../src/scmxx/actions.c:224 ../src/scmxx/s35_files.c:221 #: ../src/scmxx/s35_files.c:234 ../src/scmxx/s35_sms.c:463 msgid "unknown cause" msgstr "causa sconosciuta" #: ../src/scmxx/actions.c:260 msgid "Time was synchronized" msgstr "L'ora è stata sincronizzata" #: ../src/scmxx/actions.c:262 msgid "Time could not be synchronized" msgstr "L'ora non può essere sincronizzata" #: ../src/scmxx/actions.c:450 msgid "not checked in, not seeking" msgstr "non sono registrato, non ho cercato" #: ../src/scmxx/actions.c:451 msgid "checked in" msgstr "registrato" #: ../src/scmxx/actions.c:452 msgid "not checked in, but seeking a network" msgstr "non sono registrato, ma sto cercando una rete" #: ../src/scmxx/actions.c:453 msgid "check-in denied by network" msgstr "registrazione negata dalla rete" #: ../src/scmxx/actions.c:454 ../src/scmxx/actions.c:498 msgid "registered, roaming" msgstr "sono registrato, roaming" #: ../src/scmxx/actions.c:455 ../src/scmxx/actions.c:499 msgid "unknown status" msgstr "stato sconosciuto" #: ../src/scmxx/actions.c:494 msgid "not registered, not searching" msgstr "non sono registrato, non sto cercando" #: ../src/scmxx/actions.c:495 msgid "registered, home network" msgstr "registrato, rete preferita" #: ../src/scmxx/actions.c:496 msgid "not registered, searching" msgstr "non registrato, sto cercando" #: ../src/scmxx/actions.c:497 msgid "registration denied by network" msgstr "registrazione negata dalla rete" #: ../src/scmxx/actions.c:550 msgid "Vendor" msgstr "Produttore" #: ../src/scmxx/actions.c:551 msgid "Model" msgstr "Modello" #: ../src/scmxx/actions.c:552 msgid "Revision" msgstr "Revisione" #: ../src/scmxx/actions.c:554 msgid "Battery" msgstr "Batteria" #: ../src/scmxx/actions.c:555 msgid "Charsets" msgstr "Set di caratteri" #: ../src/scmxx/actions.c:556 msgid "Time" msgstr "Ora" #: ../src/scmxx/actions.c:558 msgid "card ID" msgstr "Identificativo della carta" #: ../src/scmxx/actions.c:559 msgid "Status" msgstr "Stato" #: ../src/scmxx/actions.c:560 msgid "Area code" msgstr "Codice dell'area" #: ../src/scmxx/actions.c:561 msgid "Cell ID" msgstr "Identificativo del telefonino" #: ../src/scmxx/actions.c:562 msgid "Operator" msgstr "Operatore" #: ../src/scmxx/actions.c:563 msgid "SMS server" msgstr "centro servizi SMS" #: ../src/scmxx/actions.c:564 msgid "Signal" msgstr "Segnale" #: ../src/scmxx/actions.c:566 msgid "GPRS class" msgstr "classe GPRS" #: ../src/scmxx/actions.c:567 msgid "GRPS status" msgstr "stato GRPS" #: ../src/scmxx/actions.c:576 msgid "Phone related information" msgstr "Informazioni relative al telefonino" #: ../src/scmxx/actions.c:605 ../src/scmxx/memtypes.c:411 #: ../src/scmxx/memtypes.c:412 ../src/scmxx/memtypes.c:458 #: ../src/scmxx/memtypes.c:460 ../src/scmxx/memtypes.c:665 #: ../src/scmxx/memtypes.c:666 #, c-format msgid "none" msgstr "nessuno" #: ../src/scmxx/actions.c:630 msgid "SIM card related information" msgstr "Informazioni relative alla SIM" #: ../src/scmxx/actions.c:645 msgid "Network related information" msgstr "Informazioni relative alla rete" #: ../src/scmxx/actions.c:707 msgid "detached" msgstr "messo a posto" #: ../src/scmxx/actions.c:709 msgid "attached" msgstr "allegato" #: ../src/scmxx/actions.c:719 msgid "Binary files" msgstr "Files binari" #: ../src/scmxx/actions.c:720 msgid "Phonebooks" msgstr "Elenchi Telefonici" #: ../src/scmxx/actions.c:721 msgid "SMS storages" msgstr "archivio SMS" #: ../src/scmxx/actions.c:751 msgid "Available memories" msgstr "Memorie disponibili" #: ../src/scmxx/actions.c:756 ../src/smspdu/smspdu_print.c:223 #: ../src/smspdu/smspdu_print.c:235 msgid "Settings" msgstr "Impostazioni" #: ../src/scmxx/scmxx.c:78 msgid "[files...]" msgstr "" #: ../src/scmxx/scmxx.c:91 ../src/scmxx/scmxx.c:95 msgid "Malformed bluetooth address" msgstr "" #: ../src/scmxx/scmxx.c:114 msgid "OK, a modem device is present." msgstr "OK, un device modem è presente." #: ../src/scmxx/scmxx.c:116 msgid "cannot communicate with device." msgstr "non riesco a comunicare con il device." #: ../src/scmxx/scmxx.c:135 #, c-format msgid "Detected %s %s\n" msgstr "Trovato %s %s\n" #: ../src/scmxx/scmxx.c:137 #, c-format msgid "Comparing to registered model %s\n" msgstr "Sto vedendo le differenze con il modello registrato %s\n" #: ../src/scmxx/scmxx.c:144 #, fuzzy msgid "this model was not confirmed to be working with this software." msgstr "non è confermato che questo telefonino funzioni con questo programma." #: ../src/scmxx/scmxx.c:148 msgid "" "phones from this vendor were not confirmed to be working with this software!" msgstr "" "non è confermato che telefonini di questo produttore funzionino con questo " "software!" #: ../src/scmxx/scmxx.c:160 msgid "you must define a number with the --number option." msgstr "devi specificare un numero attraverso l'opzione --number" #: ../src/scmxx/scmxx.c:176 msgid "you must specifiy a valid memory type." msgstr "devi specificare un tipo di memoria valido." #: ../src/scmxx/ttyaccess.c:37 #, fuzzy, c-format msgid "Accessing device %s..." msgstr "Sto accedendo a %s\n" #: ../src/scmxx/ttyaccess.c:49 #, fuzzy, c-format msgid "Cannot open %s\n" msgstr "Non puoi selezionare la memoria %s\n" #: ../src/scmxx/ttyaccess.c:58 #, fuzzy, c-format msgid "Waiting for %d seconds as requested...\n" msgstr "Sto aspettando una richiesta di dati..." #: ../src/scmxx/memtypes.c:181 msgid "bitmap" msgstr "bitmap" #: ../src/scmxx/memtypes.c:183 msgid "midi" msgstr "midi" #: ../src/scmxx/memtypes.c:185 msgid "vCalendar" msgstr "vCalendar" #: ../src/scmxx/memtypes.c:187 msgid "vCard (address book)" msgstr "vCard (elenco telefonico)" #: ../src/scmxx/memtypes.c:189 msgid "EMS animation" msgstr "animazione EMS" #: ../src/scmxx/memtypes.c:191 msgid "T9 database" msgstr "database T9" #: ../src/scmxx/memtypes.c:193 msgid "UCS-2 encoded dir name" msgstr "nome della directory in formato UCS-2" #: ../src/scmxx/memtypes.c:234 ../src/scmxx/memtypes.c:400 #: ../src/scmxx/memtypes.c:618 ../src/scmxx/scmxx_opt.c:249 msgid "mem" msgstr "mem" #: ../src/scmxx/memtypes.c:235 msgid "readable" msgstr "leggibile" #: ../src/scmxx/memtypes.c:236 ../src/scmxx/memtypes.c:402 msgid "writable" msgstr "scrivibile" #: ../src/scmxx/memtypes.c:237 ../src/scmxx/memtypes.c:405 #: ../src/scmxx/memtypes.c:621 ../src/scmxx/lock.c:219 msgid "description" msgstr "descrizione" #: ../src/scmxx/memtypes.c:401 ../src/scmxx/memtypes.c:619 msgid "slots" msgstr "slots" #: ../src/scmxx/memtypes.c:403 msgid "digits" msgstr "numeri" #: ../src/scmxx/memtypes.c:404 msgid "chars" msgstr "caratteri" #: ../src/scmxx/memtypes.c:413 ../src/scmxx/memtypes.c:414 #: ../src/scmxx/memtypes.c:472 ../src/scmxx/memtypes.c:474 msgid "yes" msgstr "si" #: ../src/scmxx/memtypes.c:415 ../src/scmxx/memtypes.c:416 #: ../src/scmxx/memtypes.c:477 ../src/scmxx/memtypes.c:479 msgid "no" msgstr "no" #: ../src/scmxx/memtypes.c:440 #, fuzzy, c-format msgid "could not get limits of phonebook %s.\n" msgstr "" "Attenzione: non riesco ad ottenere i limiti dell'elenco telefonico %s.\n" #: ../src/scmxx/memtypes.c:504 msgid "SIM fix-dialing phonebook" msgstr "Elenco telefonico delle chiamate bloccate della SIM" #: ../src/scmxx/memtypes.c:506 msgid "SIM phonebook" msgstr "elenco telefonico della SIM" #: ../src/scmxx/memtypes.c:509 msgid "last calls (mobile)" msgstr "last calls (telefonino)" #: ../src/scmxx/memtypes.c:511 msgid "last calls (SIM)" msgstr "ultime chiamate (SIM)" #: ../src/scmxx/memtypes.c:514 msgid "own numbers" msgstr "propri numeri" #: ../src/scmxx/memtypes.c:516 msgid "mobile equipment phonebook" msgstr "elenco telefonico del telefonino" #: ../src/scmxx/memtypes.c:518 msgid "barred numbers" msgstr "numeri vietati" #: ../src/scmxx/memtypes.c:520 msgid "service numbers" msgstr "numeri di servizio" #: ../src/scmxx/memtypes.c:523 msgid "missed calls" msgstr "chiamate perse" #: ../src/scmxx/memtypes.c:526 msgid "callback numbers" msgstr "numeri da richiamare" #: ../src/scmxx/memtypes.c:528 msgid "blacklist numbers" msgstr "numeri sconsigliati" #: ../src/scmxx/memtypes.c:530 msgid "mailbox numbers" msgstr "numeri della segreteria" #: ../src/scmxx/memtypes.c:532 msgid "red book (VIP in CS)" msgstr "libro rosso (VIP in CS)" #: ../src/scmxx/memtypes.c:534 msgid "common sortable (FD+SM+ME)" msgstr "ordinabili in comune (FD+SM+ME)" #: ../src/scmxx/memtypes.c:536 msgid "address book numbers" msgstr "numeri dell'elenco telefonico" #: ../src/scmxx/memtypes.c:620 msgid "used" msgstr "usato" #: ../src/scmxx/memtypes.c:681 msgid "SIM memory" msgstr "memoria SIM" #: ../src/scmxx/memtypes.c:683 msgid "mobile equipment memory" msgstr "memoria del telefonino" #: ../src/scmxx/s35_pbook.c:108 ../src/scmxx/s35_pbook.c:128 #: ../src/scmxx/s35_pbook.c:185 msgid "something went wrong with sending the phonebook entries" msgstr "" "qualcosa è andato storto durante il download dell'elenco telefonico sul " "telefonino" #: ../src/scmxx/s35_pbook.c:121 #, fuzzy, c-format msgid "invalid phonebook file %s.\n" msgstr "Errore: elenco telefonico non valido. File specificato: %s.\n" #: ../src/scmxx/s35_pbook.c:124 #, fuzzy, c-format msgid "empty phonebook file %s.\n" msgstr "Errore: il file %s non ha voci.\n" #: ../src/scmxx/s35_pbook.c:148 msgid "Nothing to get." msgstr "Nulla da prendere." #: ../src/scmxx/s35_pbook.c:170 #, c-format msgid "%s deleted.\n" msgstr "%s cancellato.\n" #: ../src/scmxx/s35_pbook.c:172 msgid "Possible data corruption!" msgstr "Possibile corruzione dati!" #: ../src/scmxx/s35_pbook.c:188 msgid "the selected phonebook is not writable" msgstr "" #: ../src/scmxx/s35_pbook.c:282 ../src/scmxx/s35_files.c:48 #: ../src/scmxx/s35_sms.c:53 msgid "You must specify a valid action." msgstr "Devi specificare un'azione valida." #: ../src/scmxx/s35_pbook.c:286 #, c-format msgid "Cannot select memory %s\n" msgstr "Non puoi selezionare la memoria %s\n" #: ../src/scmxx/s35_pbook.c:293 msgid "could not determine last slot." msgstr "Non posso settare l'ultimo slot." #: ../src/scmxx/s35_pbook.c:298 ../src/scmxx/s35_files.c:79 msgid "You must specify exactly one operation." msgstr "Devi specificare solo una operazione." #: ../src/scmxx/s35_pbook.c:312 msgid "invalid slot defined" msgstr "lo slot definito è invalido" #: ../src/scmxx/pbookphone.c:54 ../src/scmxx/pbookphone.c:240 #: ../src/scmxx/pbookphone.c:287 #, fuzzy, c-format msgid "getting limits of phonebook %s failed.\n" msgstr "Errore nell'ottenere i limiti dell'agenda telefonica %s.\n" #: ../src/scmxx/pbookphone.c:59 #, fuzzy, c-format msgid "slot %d is out of range %d-%d.\n" msgstr "%s: lo slot %d è fuori dai limiti %d-%d.\n" #: ../src/scmxx/pbookphone.c:64 #, c-format msgid "too many entries (max. %d).\n" msgstr "" #: ../src/scmxx/pbookphone.c:68 #, c-format msgid "Updating entries %s(%d-%d)...\n" msgstr "Sto aggiornando i record %s(%d-%d)...\n" #: ../src/scmxx/pbookphone.c:79 #, c-format msgid "Updating one entry in slot %d of memory %s..." msgstr "Sto facendo l'update del record dello slot %d nella memoria %s..." #: ../src/scmxx/pbookphone.c:183 ../src/scmxx/pbookphone.c:212 #, fuzzy, c-format msgid "reading from phonebook %s failed: %s\n" msgstr "Errore nella lettura dall'elenco telefonico %s: %s\n" #: ../src/scmxx/pbookphone.c:192 #, fuzzy, c-format msgid "parsing entry failed: %s\n" msgstr "Errore nel parsing del record: %s\n" #: ../src/scmxx/pbookphone.c:195 #, fuzzy, c-format msgid "phone returned unexpected entry %u\n" msgstr "%s: il telefonino ha ritornato un record non previsto %u\n" #: ../src/scmxx/pbookphone.c:249 ../src/scmxx/s35_files.c:207 msgid "Trying to find an empty slot..." msgstr "Sto cercando uno slot vuoto..." #: ../src/scmxx/pbookphone.c:260 ../src/scmxx/s35_files.c:151 #, c-format msgid "Detected empty slot %d\n" msgstr "Trovato slot vuoto %d\n" #: ../src/scmxx/pbookphone.c:295 #, fuzzy msgid "Receiving phonebook entries..." msgstr "Sto ricevendo i record dell'elenco telefonico %s(%d-%d)...\n" #: ../src/scmxx/dial.c:114 #, c-format msgid "Using dialing sequence %s.\n" msgstr "Sto usando la sequenza di chiamata %s.\n" #: ../src/scmxx/dial.c:117 msgid "dialing failed" msgstr "" #: ../src/scmxx/tty_serial.c:98 ../src/scmxx/tty_serial.c:261 #: ../src/scmxx/tty_serial.c:283 ../src/scmxx/tty_serial.c:307 #, fuzzy msgid "Error in setting port attributes" msgstr "Errore nell'uso del pin" #: ../src/scmxx/tty_serial.c:108 msgid "Error in setting transmission speed" msgstr "" #: ../src/scmxx/tty_serial.c:126 ../src/scmxx/tty_serial.c:160 #: ../src/scmxx/tty_serial.c:194 #, fuzzy msgid "Error in flushing buffers" msgstr "Errore nell'uso del pin" #: ../src/scmxx/tty_serial.c:254 ../src/scmxx/tty_serial.c:290 msgid "Error in getting port attributes" msgstr "" #: ../src/scmxx/scmxx_opt.c:207 #, fuzzy msgid "actions" msgstr "Azioni" #: ../src/scmxx/scmxx_opt.c:208 #, fuzzy msgid "memory types" msgstr "Tipi di memoria" #: ../src/scmxx/scmxx_opt.c:209 #, fuzzy msgid "memory type options" msgstr "Opzioni del tipo di memoria" #: ../src/scmxx/scmxx_opt.c:210 msgid "SMS options" msgstr "opzioni SMS" #: ../src/scmxx/scmxx_opt.c:215 #, fuzzy msgid "rate" msgstr "Data" #: ../src/scmxx/scmxx_opt.c:216 msgid "specify another than the compiled in baudrate" msgstr "" "specifica un baudrate diverso da quello specificato durante la compilazione" #: ../src/scmxx/scmxx_opt.c:218 msgid "binary file transfer" msgstr "traferimento di file binario" #: ../src/scmxx/scmxx_opt.c:219 msgid "device" msgstr "" #: ../src/scmxx/scmxx_opt.c:220 msgid "specify another than the compiled in device" msgstr "" "specifica un device diverso da quello specificato durante la compilazione" #: ../src/scmxx/scmxx_opt.c:221 ../src/scmxx/scmxx_opt.c:283 #, fuzzy msgid "seconds" msgstr "secondo" #: ../src/scmxx/scmxx_opt.c:222 msgid "return after this time if there is no answer" msgstr "" #: ../src/scmxx/scmxx_opt.c:224 #, fuzzy msgid "dials a number (requires option -n)" msgstr "setta il numero SMSC (necessita dell'opzione -n)" #: ../src/scmxx/scmxx_opt.c:226 msgid "send/receive without storing in the phone" msgstr "manda/ricevi senza salvare nel telefonino" #: ../src/scmxx/scmxx_opt.c:228 msgid "disable e.g. a lock" msgstr "" #: ../src/scmxx/scmxx_opt.c:230 msgid "enable e.g. a lock" msgstr "" #: ../src/scmxx/scmxx_opt.c:232 msgid "make the sms appear directly (if supported by the receiving entity)" msgstr "" "fai in modo che l'sms appaia direttamente (se supportato dall'entità " "ricevente)" #: ../src/scmxx/scmxx_opt.c:234 msgid "get something from the phone" msgstr "prendi qualcosa dal telefonino" #: ../src/scmxx/scmxx_opt.c:236 #, fuzzy msgid "hangup all active calls" msgstr "blocca tutte le chiamate in uscita" #: ../src/scmxx/scmxx_opt.c:238 msgid "print this message" msgstr "stampa questo messaggio" #: ../src/scmxx/scmxx_opt.c:240 msgid "do not use current serial port settings as base (default)" msgstr "" #: ../src/scmxx/scmxx_opt.c:242 msgid "show various information" msgstr "visualizza informazioni generiche" #: ../src/scmxx/scmxx_opt.c:244 msgid "use current serial port settings as base" msgstr "" #: ../src/scmxx/scmxx_opt.c:245 ../src/scmxx/lock.c:217 msgid "lock" msgstr "Blocco" #: ../src/scmxx/scmxx_opt.c:246 #, fuzzy msgid "selects a lock to change (might need option --pin)" msgstr "modifica lo stato del locks (potrebbe aver bisogno dell'opzione --pin)" #: ../src/scmxx/scmxx_opt.c:248 msgid "show lock information" msgstr "visualizza informazioni sui blocchi" #: ../src/scmxx/scmxx_opt.c:250 msgid "select a memory" msgstr "seleziona una memoria" #: ../src/scmxx/scmxx_opt.c:252 msgid "show memory information" msgstr "visualizza informazioni sulla memoria" #: ../src/scmxx/scmxx_opt.c:253 #, fuzzy msgid "number" msgstr "numbero della SMSC" #: ../src/scmxx/scmxx_opt.c:254 msgid "specify number on send" msgstr "specifica un numero da mandare" #: ../src/scmxx/scmxx_opt.c:255 msgid "file" msgstr "" #: ../src/scmxx/scmxx_opt.c:256 msgid "specify a file when getting ('-' for stdout)" msgstr "specifica un file quando vuoi prendere qualcosa ('-' per stdout)" #: ../src/scmxx/scmxx_opt.c:258 msgid "phonebook" msgstr "elenco telefonico" #: ../src/scmxx/scmxx_opt.c:260 msgid "use this pin if one is needed" msgstr "usa questo pin se ne viene richiesto uno" #: ../src/scmxx/scmxx_opt.c:261 msgid "program" msgstr "" #: ../src/scmxx/scmxx_opt.c:262 msgid "specify a pipe to use" msgstr "specifica un pipe da usare" #: ../src/scmxx/scmxx_opt.c:264 msgid "decreases verbosity by 1" msgstr "diminuisci il numero di messaggi di output" #: ../src/scmxx/scmxx_opt.c:266 msgid "removes something from the phone" msgstr "togli qualcosa dal telefonino" #: ../src/scmxx/scmxx_opt.c:268 #, fuzzy msgid "sends some special characters" msgstr "manda dei caratteri speciali ed esce" #: ../src/scmxx/scmxx_opt.c:270 msgid "sends something to the phone" msgstr "manda qualcosa al telefonino" #: ../src/scmxx/scmxx_opt.c:272 msgid "set the SMSC number (requires option -n)" msgstr "setta il numero SMSC (necessita dell'opzione -n)" #: ../src/scmxx/scmxx_opt.c:274 msgid "synchronize time on phone" msgstr "sincronizza l'ora sul telefonino" #: ../src/scmxx/scmxx_opt.c:275 #, fuzzy msgid "slot" msgstr "slots" #: ../src/scmxx/scmxx_opt.c:276 msgid "select a slot or slot group" msgstr "seleziona uno slot o un gruppo di slot" #: ../src/scmxx/scmxx_opt.c:278 msgid "short messages" msgstr "sms" #: ../src/scmxx/scmxx_opt.c:279 msgid "method" msgstr "" #: ../src/scmxx/scmxx_opt.c:280 #, fuzzy msgid "sort short message on getting([type,][slot|time])" msgstr "ordina gli sms mentre li prendi (tipo o slot)" #: ../src/scmxx/scmxx_opt.c:282 msgid "request a status report from the SMSC" msgstr "richiedi il report dello stato dall'SMSC" #: ../src/scmxx/scmxx_opt.c:284 msgid "wait this time after opening device" msgstr "" #: ../src/scmxx/scmxx_opt.c:286 msgid "use charset for input/output from/to system" msgstr "utilizza il set di caratteri per l'input/output da/verso il sistema" #: ../src/scmxx/scmxx_opt.c:287 msgid "text" msgstr "" #: ../src/scmxx/scmxx_opt.c:288 msgid "specify content on send" msgstr "specifica i dati da mandare" #: ../src/scmxx/scmxx_opt.c:290 msgid "use UCS-2 (unicode) as charset" msgstr "usa UCS-2 (unicode) come set di caratteri" #: ../src/scmxx/scmxx_opt.c:292 msgid "increases verbosity by 1" msgstr "incrementa il numero di messaggi di output" #: ../src/scmxx/scmxx_opt.c:294 msgid "print the version number" msgstr "stampa il numero di versione" #: ../src/scmxx/pinfile.c:37 ../src/scmxx/pinfile.c:42 #: ../src/scmxx/pinfile.c:48 msgid "File check failed" msgstr "" #: ../src/scmxx/pinfile.c:42 msgid "file is not a regular file" msgstr "" #: ../src/scmxx/pinfile.c:48 msgid "file is group or world accessible" msgstr "" #: ../src/scmxx/pinfile.c:62 msgid "File read failed" msgstr "" #: ../src/scmxx/pinfile.c:193 #, c-format msgid "Looking for %s for %s %s, %s %s in %s..." msgstr "" #: ../src/scmxx/pinfile.c:196 #, fuzzy, c-format msgid "Looking for %s for %s %s in %s..." msgstr "Sto cercando SMS del tipo specificato..." #: ../src/scmxx/pinfile.c:208 ../src/scmxx/pinfile.c:218 #: ../src/scmxx/pinfile.c:237 msgid "not found" msgstr "" #: ../src/scmxx/pinfile.c:240 msgid "found" msgstr "" #: ../src/scmxx/lock.c:23 msgid "phone locked to SIM (device code)" msgstr "telefonino bloccato alla SIM (codice del device)" #: ../src/scmxx/lock.c:25 msgid "SIM card (PIN)" msgstr "carta SIM (PIN)" #: ../src/scmxx/lock.c:29 msgid "FDN lock" msgstr "blocco FDN" #: ../src/scmxx/lock.c:31 msgid "bar all outgoing calls" msgstr "blocca tutte le chiamate in uscita" #: ../src/scmxx/lock.c:33 msgid "bar outgoing international calls" msgstr "blocca tutte le chiamate internazionali" #: ../src/scmxx/lock.c:35 msgid "bar outgoing international calls except to home country" msgstr "blocca le chiamate internazionali, escluso verso la nazione originaria" #: ../src/scmxx/lock.c:37 msgid "bar all incoming calls" msgstr "blocca tutte le chiamate in arrivo" #: ../src/scmxx/lock.c:39 msgid "bar incoming calls when roaming outside the home country" msgstr "blocca tutte le chiamate in arrivo quando sei all'estero" #: ../src/scmxx/lock.c:41 msgid "all barring services" msgstr "tutti i servizi di bloccaggio" #: ../src/scmxx/lock.c:43 msgid "all outgoing barring services" msgstr "tutti i servizi di bloccaggio verso l'esterno" #: ../src/scmxx/lock.c:45 msgid "all incoming barring services" msgstr "tutti i servizi di bloccaggio verso l'interno" #: ../src/scmxx/lock.c:47 msgid "network personalization" msgstr "personalizzazione della rete" #: ../src/scmxx/lock.c:49 msgid "corporate personalization" msgstr "personalizzazione dell'azienda" #: ../src/scmxx/lock.c:51 msgid "network subset personalization" msgstr "personalizzazione della sotto rete" #: ../src/scmxx/lock.c:53 msgid "service provider personalization" msgstr "personalizzazione del provider dei servizi" #: ../src/scmxx/lock.c:55 msgid "phone locked to very first inserted SIM" msgstr "telefonino bloccato alla SIM inserita per prima" #: ../src/scmxx/lock.c:57 msgid "keyboard" msgstr "tastiera" #: ../src/scmxx/lock.c:84 msgid "" "Be beware of phone internal passwort counters that are normally set to 3 " "failures!" msgstr "" #: ../src/scmxx/lock.c:85 msgid "The current failure count cannot be read!" msgstr "" #: ../src/scmxx/lock.c:86 msgid "Setting new password FAILED!" msgstr "" #: ../src/scmxx/lock.c:165 msgid "Lock status change failed." msgstr "Cambiamento dello stato del blocco fallito." #: ../src/scmxx/lock.c:167 #, c-format msgid "Lock %s successfully %s.\n" msgstr "Blocco %s con successo %s.\n" #: ../src/scmxx/lock.c:168 msgid "disabled" msgstr "disattivato" #: ../src/scmxx/lock.c:168 msgid "enabled" msgstr "attivato" #: ../src/scmxx/lock.c:210 msgid "Locks" msgstr "Blocchi" #: ../src/scmxx/lock.c:218 msgid "status" msgstr "stato" #: ../src/scmxx/lock.c:240 msgid "Lock" msgstr "Blocco" #: ../src/scmxx/lock.c:242 msgid "getting lock status failed." msgstr "fallito tentativo di ottenere lo stato del blocco." #: ../src/scmxx/lock.c:246 msgid "on" msgstr "on" #: ../src/scmxx/lock.c:246 msgid "off" msgstr "off" #: ../src/scmxx/s35_files.c:40 msgid "You must define a memory to use." msgstr "Devi definire una memoria da usare." #: ../src/scmxx/s35_files.c:54 msgid "You must define either a valid slot, nothing or \"all\"." msgstr "Devi definire uno slot valido, oppure niente o \"all\"." #: ../src/scmxx/s35_files.c:59 msgid "this phone does not support file exchange." msgstr "questo telefonino non supporta lo scambio di file." #: ../src/scmxx/s35_files.c:71 #, c-format msgid "%s values can only be %d to %d.\n" msgstr "%s valori può essere solo %d.\n" #: ../src/scmxx/s35_files.c:73 #, c-format msgid "%s value can only be %d.\n" msgstr "%s valori possono essere solo %d a %d.\n" #: ../src/scmxx/s35_files.c:87 msgid "You must define a valid slot or \"all\"." msgstr "Devi definire un valido slot o \"all\"." #: ../src/scmxx/s35_files.c:128 #, c-format msgid "Using slot %d\n" msgstr "Sto usando lo slot %d\n" #: ../src/scmxx/s35_files.c:149 msgid "No free slot found." msgstr "Non è stato trovato uno slot libero." #: ../src/scmxx/s35_files.c:175 msgid "You must specify a file name prefix (can be \"\")." msgstr "Devi specificare un prefisso di nome di file (può essere \"\")." #: ../src/scmxx/s35_files.c:194 #, c-format msgid "%s %d deleted.\n" msgstr "%s %d cancellato.\n" #: ../src/scmxx/s35_files.c:196 #, c-format msgid "%s %d NOT deleted, something went wrong: %s\n" msgstr "%s %d NON cancellato, qualcosa è nadato storto: %s\n" #: ../src/scmxx/s35_files.c:286 msgid "File transfer..." msgstr "Trasferimento file..." #: ../src/scmxx/s35_files.c:314 ../src/scmxx/s35_sms.c:316 msgid "Waiting for data request..." msgstr "Sto aspettando una richiesta di dati..." #: ../src/scmxx/s35_files.c:319 msgid "Packet buffer seems to be filled with something else, clearing..." msgstr "" "Il buffer dei pacchetti sembra essere pieno di altre cose, lo pulisco..." #: ../src/scmxx/s35_files.c:333 #, c-format msgid "" "\n" "Sending %d Bytes in packet %d\n" msgstr "" "\n" "Sto mandando %d bytes nel pacchetto %d\n" #: ../src/scmxx/s35_files.c:335 ../src/scmxx/s35_sms.c:320 msgid "Sending data..." msgstr "Sto mandando dati..." #: ../src/scmxx/s35_files.c:342 #, c-format msgid "Packet %d sent\n" msgstr "Pacchetto %d mandato\n" #: ../src/scmxx/s35_files.c:344 msgid "Wrong data format" msgstr "Formato dati errato" #: ../src/scmxx/s35_files.c:351 msgid "File transfer complete." msgstr "Trasferimento file completato." #: ../src/scmxx/s35_files.c:353 msgid "Nothing to transfer." msgstr "Niente da trasferire." #: ../src/scmxx/s35_files.c:382 #, fuzzy, c-format msgid "%s slot %lu" msgstr "Sto usando lo slot %d\n" #: ../src/scmxx/s35_files.c:411 #, fuzzy, c-format msgid "parsing answer from phone failed: \"%s\"\n" msgstr "Errore nella lettura dall'elenco telefonico %s: %s\n" #: ../src/scmxx/s35_files.c:428 #, fuzzy, c-format msgid "writing to file \"%s\" failed: %s\n" msgstr "Errore nella scrittura su %s: %s\n" #: ../src/scmxx/s35_files.c:435 #, fuzzy, c-format msgid "writing to pipe \"%s\" failed.\n" msgstr "Errore nella scrittura sul pipe \"%s\".\n" #: ../src/scmxx/s35_files.c:448 ../src/scmxx/s35_sms.c:559 #, fuzzy, c-format msgid "closing pipe \"%s\" failed.\n" msgstr "Errore nella chiusura del pipe \"%s\".\n" #: ../src/scmxx/s35_sms.c:64 msgid "" "If you want to remove short messages or mix actions, you must define a slot " "or slot type." msgstr "" "Se vuoi rimuovere sms o unire azioni, devi definire uno sloto tipo di slot." #: ../src/scmxx/s35_sms.c:97 #, c-format msgid "SMS storage type \"%s\" could not be selected.\n" msgstr "Il tipo di archivio SMS \"%s\" non può essere selezionato.\n" #: ../src/scmxx/s35_sms.c:147 msgid "Hmm, nothing to send?" msgstr "Hmm, niente da mandare?" #: ../src/scmxx/s35_sms.c:191 #, c-format msgid "SMS slot %d was deleted.\n" msgstr "lo slot %d degli SMS è stato cancellato.\n" #: ../src/scmxx/s35_sms.c:193 ../src/scmxx/s35_sms.c:284 #: ../src/scmxx/s35_sms.c:467 msgid "This slot is not available." msgstr "Questo slot non è disponibile." #: ../src/scmxx/s35_sms.c:199 msgid "You must specify a valid slot number." msgstr "Devi specificare un numero di slot valido." #: ../src/scmxx/s35_sms.c:231 msgid "" "Argument to --number is not a number but phonebook cache is not present." msgstr "" "Argomento a --number non un numero, ma la cache dell'elenco telefonico non " "è presente." #: ../src/scmxx/s35_sms.c:247 #, fuzzy, c-format msgid "no cache entry for \"%s\" found.\n" msgstr "Errore: non stato trovato nessun record nella cache per \"%s\".\n" #: ../src/scmxx/s35_sms.c:249 #, fuzzy, c-format msgid "no unique hit in cache for search term \"%s\":\n" msgstr "" "Errore: ci sono più record nella cache che soddisfano la ricerca \"%s\":\n" #: ../src/scmxx/s35_sms.c:279 msgid "zero-length number" msgstr "numero di lunghezza zero" #: ../src/scmxx/s35_sms.c:288 ../src/scmxx/s35_sms.c:327 msgid "The message was sent." msgstr "Il messaggio è stato mandato." #: ../src/scmxx/s35_sms.c:288 ../src/scmxx/s35_sms.c:327 #: ../src/smspdu/smspdu_print.c:339 ../src/smspdu/smspdu_print.c:344 msgid "Message reference" msgstr "Referenza del messaggio" #: ../src/scmxx/s35_sms.c:291 ../src/scmxx/s35_sms.c:333 msgid "The phone returned" msgstr "Il telefonino è ritornato" #: ../src/scmxx/s35_sms.c:324 #, c-format msgid "An error occured on sending the SMS: %s\n" msgstr "Un errore è capitato nel mandare l'SMS: %s\n" #: ../src/scmxx/s35_sms.c:329 #, c-format msgid "The message was saved to SMS memory slot %s\n" msgstr "Il messaggio è stato salvato nello slot della memoria SMS %s\n" #: ../src/scmxx/s35_sms.c:336 msgid "An unknown error occured." msgstr "Un errore sconosciuto è capitato." #: ../src/scmxx/s35_sms.c:338 msgid "There is no slot free to store the sms." msgstr "Non c'è uno slot libero per salvarsi l'SMS." #: ../src/scmxx/s35_sms.c:355 #, c-format msgid "Trying to send SMS from slot %d...\n" msgstr "Sto cercando di mandare un SMS dallo slot %d...\n" #: ../src/scmxx/s35_sms.c:358 msgid "Sending is only possible with SMS of outgoing type." msgstr "Si può solo mandare SMS verso l'uscita." #: ../src/scmxx/s35_sms.c:384 msgid "No SMS text found (or zero length)." msgstr "Nessun testo di SMS trovato (o lunghezza zero)." #: ../src/scmxx/s35_sms.c:391 msgid "Creating PDU..." msgstr "Sto creando la PDU..." #: ../src/scmxx/s35_sms.c:397 #, fuzzy msgid "short message encoding failed" msgstr "sms tipo 0" #: ../src/scmxx/s35_sms.c:434 ../src/scmxx/s35_sms.c:450 #, fuzzy msgid "You must define an output target." msgstr "Devi definire una memoria da usare." #: ../src/scmxx/s35_sms.c:476 ../src/scmxx/s35_sms.c:519 msgid "sent" msgstr "mandato" #: ../src/scmxx/s35_sms.c:477 ../src/scmxx/s35_sms.c:518 msgid "unsent" msgstr "non mandato" #: ../src/scmxx/s35_sms.c:478 ../src/scmxx/s35_sms.c:517 msgid "read" msgstr "letto" #: ../src/scmxx/s35_sms.c:479 ../src/scmxx/s35_sms.c:516 msgid "unread" msgstr "non letto" #: ../src/scmxx/s35_sms.c:482 #, c-format msgid "There are no %s short messages on the phone.\n" msgstr "Non ci sono %s SMS nel telefonino.\n" #: ../src/scmxx/s35_sms.c:484 msgid "There are no short messages on the phone.\n" msgstr "Non ci sono SMS nel telefonino.\n" #: ../src/scmxx/s35_sms.c:491 msgid "Looking for SMS of specified type..." msgstr "Sto cercando SMS del tipo specificato..." #: ../src/scmxx/s35_sms.c:501 msgid "Output parsing error." msgstr "Errore nel parsing dell'output." #: ../src/scmxx/s35_sms.c:513 #, fuzzy, c-format msgid "Slot %u is empty.\n" msgstr "Slot %d vuoto.\n" #: ../src/scmxx/s35_sms.c:516 ../src/scmxx/s35_sms.c:517 msgid "incoming" msgstr "in arrivo" #: ../src/scmxx/s35_sms.c:518 ../src/scmxx/s35_sms.c:519 msgid "outgoing" msgstr "in uscita" #: ../src/scmxx/s35_sms.c:523 #, fuzzy, c-format msgid "Found %s, %s SMS in slot %u.\n" msgstr "Trovato %s, %s SMS nello slot %d.\n" #: ../src/scmxx/s35_sms.c:526 #, fuzzy, c-format msgid "Found SMS of unknown type in slot %u.\n" msgstr "Trovato SMS di tipo sconosciuto nello slot %d.\n" #: ../src/scmxx/s35_sms.c:530 msgid "Returned PDU exceeds buffer size." msgstr "La PDU ritornata eccede la dimensione del buffer." #: ../src/scmxx/s35_sms.c:638 msgid "Concatenated messages cannot be reassembled." msgstr "I messaggi concatenati non possono essere riassemblati." #: ../src/scmxx/s35_sms.c:670 #, c-format msgid "" "\n" "No cache hit for number \"%s\" with match size %d\n" msgstr "" "\n" "Nessun record trovato in cache per il numero \"%s\" con dimensione cercata %" "d\n" #: ../src/scmxx/s35_sms.c:673 #, c-format msgid "" "\n" "Cache hit for number \"%s\" with match size %d\n" msgstr "" "\n" "Trovato numero \"%s\" con dimensione cercata %d in cache\n" #: ../src/scmxx/s35_sms.c:677 #, c-format msgid "" "\n" "No unique hit in cache for number \"%s\" with match size %d\n" msgstr "" "\n" "Sono stati trovati più di un record in cache per il numero \"%s\" con " "dimensione cercata %d\n" #: ../src/scmxx/s35_sms.c:720 msgid "No output method was specified." msgstr "Nessun metodo di output specificato." #: ../src/scmxx/s35_sms.c:730 msgid "Could not set Phase 2+ compatible mode." msgstr "Non posso settare il modo compatibile Phase 2+." #: ../src/scmxx/s35_sms.c:739 msgid "Could not set direct mode." msgstr "Non posso settare il modo diretto." #: ../src/scmxx/s35_sms.c:771 msgid "Failed to decode PDU." msgstr "Fallita la decodifica della PDU." #: ../src/scmxx/s35_sms.c:785 msgid "SMS ACK should have been ok but was not." msgstr "l'ACK dell'SMS avrebbe dovuto essere a posto, ma non lo era." #: ../src/scmxx/s35_sms.c:790 msgid "A new message was stored in the phone." msgstr "Un nuovo messaggio è stato memorizzato nel telefono." #: ../src/atcommand/common.c:64 #, fuzzy msgid "Cannot read from device" msgstr "Errore nella lettura dal device" #: ../src/atcommand/common.c:83 msgid "Received" msgstr "Ricevuto" #: ../src/atcommand/common.c:124 #, fuzzy msgid "Use the --pin parameter or edit the pin file." msgstr "Usa il parametro --pin" #: ../src/atcommand/common.c:136 msgid "Using PIN failed" msgstr "" #: ../src/atcommand/common.c:161 ../src/atcommand/common.c:187 #, fuzzy msgid "" "\n" "Sending command" msgstr "Sto mandando il comando" #: ../src/atcommand/common.c:174 ../src/atcommand/common.c:193 #, fuzzy msgid "Cannot send at command" msgstr "Errore nel mandare il comando" #: ../src/atcommand/common.c:277 msgid "command return value" msgstr "valore di ritorno del comando" #: ../src/atcommand/common.c:283 msgid "nothing" msgstr "niente" #: ../src/atcommand/common.c:286 #, c-format msgid "Value matched %s.\n" msgstr "Valore corrispondente %s.\n" #: ../src/smspdu/smspdu_print.c:43 msgid "Slot" msgstr "Slot" #: ../src/smspdu/smspdu_print.c:58 msgid "To" msgstr "A" #: ../src/smspdu/smspdu_print.c:59 msgid "From" msgstr "Da" #: ../src/smspdu/smspdu_print.c:60 msgid "Original To" msgstr "Originale A" #: ../src/smspdu/smspdu_print.c:101 msgid "Valid for" msgstr "Valido per" #: ../src/smspdu/smspdu_print.c:102 msgid "week" msgid_plural "weeks" msgstr[0] "settimana" msgstr[1] "settimane" #: ../src/smspdu/smspdu_print.c:103 msgid "day" msgid_plural "days" msgstr[0] "giorno" msgstr[1] "giorni" #: ../src/smspdu/smspdu_print.c:104 msgid "hour" msgid_plural "hours" msgstr[0] "ora" msgstr[1] "ore" #: ../src/smspdu/smspdu_print.c:105 msgid "minute" msgid_plural "minutes" msgstr[0] "minuto" msgstr[1] "minuti" #: ../src/smspdu/smspdu_print.c:106 msgid "second" msgid_plural "seconds" msgstr[0] "secondo" msgstr[1] "secondi" #: ../src/smspdu/smspdu_print.c:116 msgid "Valid until" msgstr "Valid fino a" #: ../src/smspdu/smspdu_print.c:117 msgid "Date" msgstr "Data" #: ../src/smspdu/smspdu_print.c:118 msgid "Message status time" msgstr "Ora dello stato del messaggio" #: ../src/smspdu/smspdu_print.c:132 msgid "SMSC number" msgstr "numbero della SMSC" #: ../src/smspdu/smspdu_print.c:153 msgid "PDU type" msgstr "tipo della PDU" #: ../src/smspdu/smspdu_print.c:159 msgid "PDU flags" msgstr "opzioni della PDU" #: ../src/smspdu/smspdu_print.c:160 msgid "StatusRequest" msgstr "Stato della richiesta" #: ../src/smspdu/smspdu_print.c:162 msgid "RejectDuplicate" msgstr "RifiutaDuplicati" #: ../src/smspdu/smspdu_print.c:165 msgid "MoreMessagesToSend" msgstr "AltriMessaggiDaMandare" #: ../src/smspdu/smspdu_print.c:169 msgid "ReplyPath" msgstr "Percorso di ritorno" #: ../src/smspdu/smspdu_print.c:180 msgid "Protocol ID" msgstr "Identificativo del protocollo" #: ../src/smspdu/smspdu_print.c:183 msgid "service-center-specific use" msgstr "usa il centro servizi specifico" #: ../src/smspdu/smspdu_print.c:187 #, c-format msgid "replace short message type %d" msgstr "sostituisci l'sms tipo %d" #: ../src/smspdu/smspdu_print.c:190 msgid "short message type 0" msgstr "sms tipo 0" #: ../src/smspdu/smspdu_print.c:191 msgid "obsolete EMS mark" msgstr "segno EMS obsoleto" #: ../src/smspdu/smspdu_print.c:192 msgid "return call message" msgstr "ritorna il messaggio di chiamata" #: ../src/smspdu/smspdu_print.c:194 msgid "ME data download" msgstr "download dati della ME" #: ../src/smspdu/smspdu_print.c:195 msgid "ME de-personalization short message" msgstr "sms di de-personalizzazione della ME" #: ../src/smspdu/smspdu_print.c:196 msgid "(U)SIM data download" msgstr "download dei dati della (U)SIM" #: ../src/smspdu/smspdu_print.c:202 msgid "SMS-to-SME protocol" msgstr "protocollo da SMS a SME" #: ../src/smspdu/smspdu_print.c:204 msgid "telematic interworking" msgstr "interconnessione telematica" #: ../src/smspdu/smspdu_print.c:224 msgid "compressed" msgstr "compresso" #: ../src/smspdu/smspdu_print.c:231 #, c-format msgid " (class %d)" msgstr " (class %d)" #: ../src/smspdu/smspdu_print.c:233 msgid "marked as auto-delete" msgstr "segnato come auto-cancella" #: ../src/smspdu/smspdu_print.c:241 ../src/smspdu/smsudh.c:45 msgid "Indication" msgstr "Indicazione" #: ../src/smspdu/smspdu_print.c:243 ../src/smspdu/smsudh.c:47 msgid "voicemail" msgstr "messaggio vocale" #: ../src/smspdu/smspdu_print.c:244 ../src/smspdu/smsudh.c:48 msgid "fax" msgstr "fax" #: ../src/smspdu/smspdu_print.c:245 ../src/smspdu/smsudh.c:49 msgid "e-mail" msgstr "e-mail" #: ../src/smspdu/smspdu_print.c:246 ../src/smspdu/smsudh.c:50 msgid "misc." msgstr "altro" #: ../src/smspdu/smspdu_print.c:249 #, fuzzy, c-format msgid "new %s message(s) waiting" msgstr "nuovi(o) messaggi(o) in attesa" #: ../src/smspdu/smspdu_print.c:251 #, fuzzy, c-format msgid "no more %s messages waiting" msgstr "non ci sono altri messaggi in attesa" #: ../src/smspdu/smspdu_print.c:268 msgid "Message length" msgstr "Lunghezza del messaggio" #: ../src/smspdu/smspdu_print.c:292 msgid "transaction completed" msgstr "transazione completata" #: ../src/smspdu/smspdu_print.c:296 msgid "SC still trying to transfer short message" msgstr "La SC sta ancora cercando di trasferire l'sms" #: ../src/smspdu/smspdu_print.c:299 msgid "received by SME" msgstr "ricevuto dallo SME" #: ../src/smspdu/smspdu_print.c:300 msgid "forwarded to SME but delivery cannot be confirmed" msgstr "inoltrato allo SME ma il recapito non può essere confermato" #: ../src/smspdu/smspdu_print.c:301 msgid "replaced" msgstr "sostituito" #: ../src/smspdu/smspdu_print.c:303 msgid "congestion" msgstr "congestione" #: ../src/smspdu/smspdu_print.c:305 msgid "SME busy" msgstr "SME occupato" #: ../src/smspdu/smspdu_print.c:307 msgid "no response from SME" msgstr "nessuna risposta dallo SME" #: ../src/smspdu/smspdu_print.c:309 ../src/smspdu/smspdu_print.c:325 msgid "service rejected" msgstr "servizio rifiutato" #: ../src/smspdu/smspdu_print.c:312 msgid "QoS not available" msgstr "QoS non disponibile" #: ../src/smspdu/smspdu_print.c:314 msgid "error in SME" msgstr "errore nello SME" #: ../src/smspdu/smspdu_print.c:315 msgid "remote procedure error" msgstr "errore nella procedura remota" #: ../src/smspdu/smspdu_print.c:316 msgid "incompatible destination" msgstr "destinazione incompatibile" #: ../src/smspdu/smspdu_print.c:317 msgid "connection rejected by SME" msgstr "connessione rifiutata dallo SME" #: ../src/smspdu/smspdu_print.c:318 msgid "not obtainable" msgstr "non ottenibile" #: ../src/smspdu/smspdu_print.c:319 msgid "no interworking available" msgstr "nessuna interconnessione disponibile" #: ../src/smspdu/smspdu_print.c:320 msgid "validity period expired" msgstr "il periodo di validità è decaduto" #: ../src/smspdu/smspdu_print.c:321 msgid "deleted by sender" msgstr "cancellato dal mittente" #: ../src/smspdu/smspdu_print.c:322 msgid "deleted by service center" msgstr "cancellato dal centro servizi" #: ../src/smspdu/smspdu_print.c:323 msgid "message does not exist" msgstr "il messaggio non esiste" #: ../src/smspdu/smspdu_print.c:327 msgid "Message status" msgstr "Stato del messaggio" #: ../src/smspdu/smspdu_print.c:328 msgid "Message status reason" msgstr "Motivo dello stato del messaggio" #: ../src/smspdu/smspdu_print.c:428 ../src/smspdu/smspdu_dec.c:602 msgid "Unsupported pdu type" msgstr "Tipo di PDU non supportata" #: ../src/smspdu/smspdu_enc.c:78 ../src/smspdu/smspdu_enc.c:86 #: ../src/smspdu/smsud_enc.c:237 ../src/smspdu/smsud_enc.c:239 #: ../src/charsets/ucs2.c:34 ../src/charsets/ucs4.c:36 #: ../src/charsets/ucs4_dec.c:78 ../src/charsets/ucs4_dec.c:157 #: ../src/charsets/ucs4_dec.c:168 msgid "Error" msgstr "Errore" #: ../src/smspdu/smspdu_enc.c:78 msgid "No valid number specified." msgstr "Nessun numero valido specificato." #: ../src/smspdu/smspdu_enc.c:86 #, fuzzy, c-format msgid "%s: sms number cannot have more than %lu digits.\n" msgstr "Errore: il numero dell'SMS non può avere più di %d cifre.\n" #: ../src/smspdu/smspdu_enc.c:161 ../src/smspdu/smsud_enc.c:211 #: ../src/helper.h:38 msgid "Notice" msgstr "comunicazione" #: ../src/smspdu/smspdu_enc.c:161 msgid "Selecting UCS-2 character set." msgstr "" #: ../src/smspdu/smsud_enc.c:169 #, c-format msgid "Delaying for %2d seconds, press Ctrl+C to abort." msgstr "" #: ../src/smspdu/smsud_enc.c:213 #, fuzzy, c-format msgid "This message has %lu character" msgid_plural "This message has %lu characters" msgstr[0] "Il messaggio è stato mandato." msgstr[1] "Il messaggio è stato mandato." #: ../src/smspdu/smsud_enc.c:219 #, c-format msgid "and will use %u part.\n" msgid_plural "and will use %u parts.\n" msgstr[0] "" msgstr[1] "" #: ../src/smspdu/smsud_enc.c:224 #, c-format msgid "%s: The suggested maximum parts count is %d.\n" msgstr "" #: ../src/smspdu/smsud_enc.c:225 ../src/helper.h:37 msgid "Warning" msgstr "Attenzione" #: ../src/smspdu/smsud_enc.c:236 #, c-format msgid "%s: message part count exceeds maximum of 255\n" msgstr "" #: ../src/smspdu/smsud_enc.c:238 #, fuzzy, c-format msgid "%s: SMS text is too long (max. %d characters).\n" msgstr "Il testo dell'SMS è troppo lungo (max. %d caratteri).\n" #: ../src/smspdu/smsud_enc.c:243 msgid "" "Please be aware that some characters are encoded as 14bit (instead of 7bit), " "e.g. the euro character." msgstr "" "Per favore nota che alcuni caratteri sono codificati su 14bit (invece di " "7bit), ad esempio il carattere dell'Euro." #: ../src/smspdu/smsudh.c:52 #, c-format msgid "%d %s message waiting" msgid_plural "%d %s messages waiting" msgstr[0] "%d %s messaggio in attesa" msgstr[1] "%d %s messaggi in attesa" #: ../src/smspdu/smsudh.c:59 msgid "Wireless control message protocol data unit" msgstr "Unità dati del messaggio di controllo wireless" #: ../src/smspdu/smsudh.c:65 #, c-format msgid "SIM toolkit security header" msgstr "intestazione delle utilità di sicurezza della SIM" #: ../src/smspdu/smsudh.c:70 ../src/smspdu/smsudh.c:76 #, c-format msgid "Multipart message: sequence number = %d, part %d of %d" msgstr "Messaggio composto: numero di sequenza = %d, parte %d di %d" #: ../src/smspdu/smsudh.c:82 ../src/smspdu/smsudh.c:88 #, c-format msgid "Application port: destination port = %d, originator port = %d" msgstr "" "Porta dell'applicazione: porta di destinazione = %d, porta sorgente = %d" #: ../src/smspdu/smsudh.c:94 msgid "The following headers were created by" msgstr "Le intestazioni seguenti sono state create da" #: ../src/smspdu/smsudh.c:97 msgid "original sender" msgstr "mittente originale" #: ../src/smspdu/smsudh.c:100 msgid "original receiver" msgstr "ricevente originale" #: ../src/smspdu/smsudh.c:106 #, c-format msgid "(unknown value %d)" msgstr "(valore sconosciuto %d)" #: ../src/smspdu/smsudh.c:125 #, c-format msgid "Ignored header type 0x%02x" msgstr "Ignorata interstazione del tipo 0x%02x" #: ../src/smspdu/smsudh.c:146 msgid "Message header" msgstr "Intestazione del messaggio" #: ../src/charsets/gsm_dec.c:38 #, c-format msgid "Ups, value 0x%02x not found in list of valid GSM characters.\n" msgstr "" "Oops, il valore 0x%02x non è stato trovato nella lista dei caratteri validi " "GSM.\n" #: ../src/charsets/ucs4_enc.c:38 msgid "Error on text conversion" msgstr "Errore nella conversione testuale" #: ../src/charsets/ucs4_enc.c:47 ../src/charsets/ucs4_dec.c:120 #, c-format msgid "Error on text conversion from charset \"%s\" to charset \"%s\": %s\n" msgstr "" "Errore nella conversione testuale dal set di caratteri \"%s\" al set di " "caratteri \"%s\": %s\n" #: ../src/charsets/local_dec.c:62 #, c-format msgid "%s: character %ld is not a hexdigit.\n" msgstr "%s: carattere %ld non è una cifra esadecimale.\n" #: ../src/charsets/local_dec.c:63 ../src/charsets/local_dec.c:70 msgid "Error on text conversion to internal charset" msgstr "Errore nella conversione testuale nel set di caratteri interno" #: ../src/charsets/local_dec.c:69 #, c-format msgid "%s: character %ld is not ACSII.\n" msgstr "%s: il carattere %ld non è ASCII.\n" #: ../src/charsets/gsm_enc.c:40 #, c-format msgid "Unicode value 0x%04lx is not a GSM character\n" msgstr "Il valore Unicode 0x%04lx non è un carattere GSM\n" #: ../src/charsets/ucs2.c:34 ../src/charsets/ucs4.c:36 #, c-format msgid "%s: the iconv implementation of this system does not support %s" msgstr "%s: l'implementazione iconv di questo sistema non supporta %s" #: ../src/charsets/ucs4_dec.c:78 #, fuzzy, c-format msgid "%s: Unicode character 0x%lx cannot be converted.\n" msgstr "%s: il carattere Unicode 0x%x non può essere convertito.\n" #: ../src/charsets/ucs4_dec.c:158 msgid "insufficient memory on unicode decoding." msgstr "" "memoria insufficiente per effettuare la decodifica del carattere unicode." #: ../src/charsets/ucs4_dec.c:159 msgid "Please report as bug." msgstr "Per favore, riporta il bug." #: ../src/charsets/ucs4_dec.c:164 msgid "Error with internal charset" msgstr "Errore con il set di caratteri interno" #: ../src/charsets/local.c:70 #, c-format msgid "Using \"%s\" as system character set." msgstr "Utilizzo del set di caratteri \"%s\"." #: ../src/helper.h:36 #, fuzzy msgid "" "\n" "Error" msgstr "Errore" #: ../src/helper.h:39 msgid "Debug" msgstr "" #, fuzzy #~ msgid "Failed to send data: %s\n" #~ msgstr "Errore nel mandare i dati: %s\n" #, fuzzy #~ msgid "sending data failed: %s\n" #~ msgstr "Errore nel mandare i dati: %s\n" #, fuzzy #~ msgid "reading from device failed: %s\n" #~ msgstr "Errore nella lettura dal device: %s\n" #~ msgid "You need a phone made by Siemens to get an useful result." #~ msgstr "" #~ "Hai bisogno di un telefonino fatto dalla Siemens per ottenere un " #~ "risultato utile." #~ msgid "See man page for more detailed information." #~ msgstr "Leggi la pagina di manuale per informazioni dettagliate." #~ msgid "This is a program written by %s\n" #~ msgstr "Questo programma è stato fatto da %s\n" #~ msgid "This program is licenced with the GPL." #~ msgstr "Questo programma è sotto licenza GPL." #~ msgid "Use at your own risk!" #~ msgstr "Usalo a tuo rischio e pericolo!" #~ msgid "Accessing stdin" #~ msgstr "Sto accedendo a stdin" #~ msgid "Slot %d...\n" #~ msgstr "Slot %d...\n" #~ msgid "Empty slot: nothing to get\n" #~ msgstr "Slot vuoto: nulla da prendere\n" #~ msgid "Receiving packet %d of %d...\n" #~ msgstr "Sto ricevendo il pacchetto numero %d di %d...\n" #, fuzzy #~ msgid "Cannot open %s: %s %d\n" #~ msgstr "Non puoi selezionare la memoria %s\n" #~ msgid "Data coding scheme" #~ msgstr "Schema di codice dei dati" #~ msgid "Syntax: %s [options] action [mem type] [sms options] [file...]\n" #~ msgstr "" #~ "Sintassi: %s [opzioni] azione [tipo di memoria] [opzioni dell'sms] " #~ "[file...]\n" #~ msgid "SMS-PDU creation options" #~ msgstr "opzioni di creazione della SMS-PDU" scmxx-0.9.0/po/README0000644000175000017500000000172410204404512014006 0ustar hendrikhendrikCreating a new translation: =========================== To create a new translation (e.g. for locale de), simply run configure and then in this dir: $ make de.po Everything necessary to make the po file (creating po template file, running msginit properly) is done by the Makefile. To force an update of all po files, run: $ make update To force an update of the po template file or to create it without anything else, run: $ make template On running "make all", all po files are translated to mo files. "make install" will then install all present mo files to prefix specified by --datadir at configure time. Note that the po files also uses the plural forms gettext feature, described at: http://www.gnu.org/software/gettext/manual/html_node/gettext_150.html Please do NOT edit the PO files with an editor that does not support this file format. Instead, use programs like kbabel or emacs' po-mode (in gettext-el package in Debian, normally part of the gettext package). scmxx-0.9.0/INSTALL_WIN32.txt0000644000175000017500000001164510401070504015243 0ustar hendrikhendrikHow to compile scmxx for Windows: =============================== There are two choices, currently: A. mingw (for cross-compiling, see bottom of this file) ========== 1. install mingw and msys from [1]. You neeed at least the following packages: mingw-runtime gcc-core binutils w32api msys msys-autoconf (if you install from CVS) mingw-utils (to convert the README file) If you install from CVS and want to get the documentation in HTML format, you must install xsltproc and prefered also the docbook-XML files. Get libiconv and gettext from [2] and [3], extract them, and configure, build and install them each in the following order: gettext, libiconv, gettext again. Use "./configure --prefix=/mingw" for the configure step, "make" for the build step and "make install" for the install step. Run "make uninstall clean" before compiling gettext the second time. For bluetooth support: Get the proper Platform SDK for your version of Windows from [5] and install it. You have to copy the following header files to the mingw32 include directory: bluetoothapis.h (not actually needed) bthdef.h bthsdpdef.h ws2bth.h You HAVE to make all the names lowercase if you cross-compile. 2. Run msys and read the normal INSTALL file because the rest is like on a normal *nix system. 3. You might also want to install InnoSetup[4] and use the winsetup-mingw.iss file. Prior to packaging, you must copy the iconv.dll and intl.dll from /mingw/bin to the local direcory. You also might want to convert the docs/README_WIN32.txt to windows style EOL character using unix2dos.exe As a shortcut for this step, run "make -f Makefile.dist exe". The InnoSetup install directory must be either in your path or you must set the INNODIR environmen variable to that directory. [1]: http://www.mingw.org/ [2]: http://ftp.gnu.org/gnu/libiconv/ [3]: http://ftp.gnu.org/gnu/gettext/ [4]: http://www.jrsoftware.org/ [5]: http://www.microsoft.com/platformsdk/ B. cygwin ========= 1. install cygwin[6] with at least the following packages: When compiling from CVS: autoconf, autoconf-devel For building the HTML documentation: docbook-xsl, libxml2, libxslt For building gettext catalogs and support: gettext, gettext-devel, libgettextpo0, libintl3 For compiling the program: binutils, gcc, gcc-core, gcc-mingw, gcc-mingw-core make libiconv, libiconv2 (simply reinstall those two, when getting iconv errors) (list may be incomplete) Currently, you cannot build the manpages because you need docbook2x[7] for that 2. Run the cygwin shell and read the normal INSTALL file because the rest is like on a normal *nix system. 3. You might also want to install InnoSetup[4] and use the winsetup-mingw.iss file. Prior to packaging, you must copy the cygwin1.dll, cygiconv-2.dll and cygintl-3.dll from /bin to the local direcory. You also might want to convert the docs/README_WIN32.txt to windows style EOL character using unix2dos.exe As a shortcut for this step, run "make -f Makefile.dist exe". The InnoSetup install directory must be either in your path or you must set the INNODIR environmen variable to that directory. [6]: http://www.cygwin.com [7]: http://docbook2x.sourceforge.net Cross-compiling =============== You can cross-compile the mingw target. Additionally to the normal compilation, you need to install: - the mingw cross compiler (Debian package "mingw32") - WINE (Debian package "wine") Use the following script for configuring for cross-compiling (it is now used as "cross-configure"): ----------------------------snip--------------------------- #!/bin/sh TARGET_HOST="i586-mingw32msvc" BUILD_HOST="$(uname -m)-linux" BASE=$(echo ~/win32) CFLAGS="-I${BASE}/include" LDFLAGS="-L${BASE}/lib" export CFLAGS export LDFLAGS exec ./configure \ --target=${TARGET_HOST} --host=${TARGET_HOST} --build=${BUILD_HOST} \ --prefix=${BASE} "$@" ----------------------------snip--------------------------- Then you must compile libiconv from [2] and gettext from [3]: - cross-configure and compile gettext and install it e.g. to ~/win32/ - cross-configure and compile libiconv and install it e.g. to ~/win32/ - clean up and uninstall gettext - again: cross-configure and compile gettext and install it e.g. to ~/win32/ Install InnoSetup from [4] using wine to C:\Programs\Inno5 (something without spaces is easier thatn with) and install the following script to be executable as "issc" in the path: ----------------------------snip--------------------------- #!/bin/sh exec wine C:/Programs/Inno5/iscc "$@" ----------------------------snip--------------------------- "which iscc" should show a result (you may have to relogin). As an alternative, you can set INNODIR to "wine C:/Programme/Inno5/". Now cross-configure scmxx and compile. Copy libiconv-2.dll and libintl-3.dll to the local directory. As final step, run "make -f Makefile.dist exe". scmxx-0.9.0/winsetup-cygwin.iss.in0000644000175000017500000000517310366761531017033 0ustar hendrikhendrik; Script for Inno Setup (http://www.jrsoftware.org/) ; CygWin is expected to be installed unter C:\cygwin [Setup] AppName=SCMxx AppVerName=SCMxx CVS snapshot AppPublisher=Hendrik Sattler AppPublisherURL=http://www.hendrik-sattler.de AppSupportURL=http://www.hendrik-sattler.de/scmxx AppUpdatesURL=http://sourceforge.net/project/showfiles.php?group_id=88510&package_id=92540 AppReadmeFile={app}\ReadMe.txt DefaultDirName={pf}\SCMxx DefaultGroupName=SCMxx AllowNoIcons=yes LicenseFile=LICENSE OutputBaseFilename=scmxx-cvs-win32-setup Compression=lzma SolidCompression=yes [Types] Name: "full"; Description: "Full installation" Name: "custom"; Description: "Custom installation"; Flags: iscustom [Components] Name: "scmxx"; Description: "the main binary files"; Types: full custom; Flags: fixed Name: "flexmem-utils"; Description: "utils to decode files from the Flexible Memory"; Types: full custom; Flags: fixed Name: "cygwin"; Description: "cygwin libraries"; Types: full custom; Flags: fixed Name: "translation"; Description: "translation files"; Types: full custom Name: "help"; Description: "HTML help files"; Types: full custom [Files] Source: "scmxx.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "scmxx" Source: "smi.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem-utils" Source: "adr2vcf.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem-utils" Source: "apoconv.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem-utils" Source: "LICENSE"; DestDir: "{app}"; DestName: "License.txt"; Flags: ignoreversion; Components: "scmxx" Source: "docs\README_WIN32.txt"; DestDir: "{app}"; DestName: "ReadMe.txt"; Flags: ignoreversion isreadme; Components: "scmxx" Source: "cygwin1.dll"; DestDir: "{app}"; Components: "cygwin" Source: "cygiconv-2.dll"; DestDir: "{app}"; Components: "cygwin" Source: "cygintl-3.dll"; DestDir: "{app}"; Components: "cygwin" Source: "docs\*.html"; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "help" Source: "po\de.mo"; DestDir: "{app}\locale\de\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\fr.mo"; DestDir: "{app}\locale\fr\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\it.mo"; DestDir: "{app}\locale\it\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\ru.mo"; DestDir: "{app}\locale\ru\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" scmxx-0.9.0/INSTALL_OS2.txt0000644000175000017500000000360510400165537015053 0ustar hendrikhendrik1. About This is a small howto on building SCMxx on OS/2. To build SCMxx/OS2 you need: * Innotek GCC3 (www.innotek.de) installed and configured. * GNU libiconv. Native iconv() (in innotek libc) fails with UCS-4 codepage, used by SCMxx, so dont use it. * Some *nix tools ("make", "sh", etc.) to allow "configure" script work in OS/2. See www.unixos2.org for detailts. Also, many tools can be found on the Innotek website. * GNU getopt sources. Also, SCMxx can be compiled with popt, but its better to use getopt, because it work better on OS2. 2. Steps to get SCMxx binaries on OS/2 1) Compile libiconv with igcc. I compiled it w/o any source code modification. On my PC configure script created buggy libtool and Makefiles, i changed them, and all compiled just fine. I advise you to disable shared library build (it breaks compilation process), you always can get shared lib from the static one by using "dllar" utility from igcc. 2) Compile getopt() lib and place it somewhere. 3) Run configure script in the SCMxx directory. add path to libiconv/include dir to CFLAGS env. variable (e.g. -I /src/libiconv/include) and getopt dir. Ignore warnings on configuration process. You will get Makefiles. 4) Modify CFLAGS and LDFLAGS to include path to libiconv and getopt headers and libs. Also, add -liconv and -lgetopt to LDFLAGS. 5) Run make in. I hope, that you will get SCMxx binary ;-) 3. Notes May be i`ll rewrite work with serial port later. Also, please remember that OS/2 have no Unicode locales, so decoding text (e.g. phonebook entries) can contain some Unicode characters in the "\xxxx" form. Also i linked SCMxx with --static switch. IMHO it`s better to have big binary (800k) than problem with different libc and iconv versions. 4. Contacts If you have a questions or bugreports feel free to contact me. Alex Samorukov .scmxx-0.9.0/install-sh0000755000175000017500000002244110120602162014511 0ustar hendrikhendrik#!/bin/sh # install - install a program, script, or datafile scriptversion=2004-04-01.17 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 -d DIRECTORIES... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. test -n "$dir_arg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" || lasterr=$? # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: scmxx-0.9.0/scmxx.spec0000644000175000017500000000723610401301607014532 0ustar hendrikhendrikSummary: exchange data with Siemens mobile phones Summary(de): Datenaustausch mit Siemens-Handys Summary(it): Scambia dati con telefonini Siemens Name: scmxx Version: 0.9.0 Release: 1 Group: console License: GPL Vendor: Hendrik Sattler Url: http://www.hendrik-sattler.de/scmxx Packager: Hendrik Sattler Source0: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-root %description SCMxx is a console program that allows you to exchange certain types of data with mobile phones made by Siemens. Some of the data types that can be exchanged are logos, ring tones, vCalendars, phonebook entries, and short messages. Other actions like setting the time and dialling a number are also possible. SCMxx works with the following models: S25, S35i, M35i, C35i, SL4x, S45, ME45, C45, M50, MT50 and probably others. It basically uses the AT command set published by Siemens (with some other, additional resources). See the website %{url} for details. %description -l de SCMxx ist ein Konsolenprogramm das es ermöglicht, bestimmte Daten mit Handys von Siemens auszutauschen. Einige der Daten, die transferiert werden können, sind Logos, Klingeltöne, vCalendars, Telefonbucheinträge, und Kurznachrichten. Andere Aktionen wie das Setzen der Zeit und da Wählen von Rufnummer ist ebenso möglich. SCMxx kann mit folgenden Modellen umgehen: S25, S35i, M35i, C35i, SL4x, S45, ME45, C45, M50, MT50 und eventuell anderen. Es wird hauptsächlich das von Siemens veröffentlichte AT-Kommando-Set (zusammen mit anderen, zusätzlichen Resourcen) verwendet. Weitere Details finden man auf der Webseite %{url}. %description -l it SCMxx è un programma da console che ti permette di scambiare alcuti tipi di dati con telefonini Siemens. Questi dati possono essere loghi, suonerie, vCalendars, record dell'agenda telefonica e sms. E' anche possibile modificare l'ora o comporre un numero. SCMxx funziona con i modelli seguenti: S25, S35i, M35i, C35i, SL4x, S45, ME45, C45, M50, MT50 e probabilmente altri. Si basa sul set di comandi AT pubblicati da Siemens (e su altre risorse aggiuntive). Visita il sito %{url} per dettagli. %prep %setup -q %build %configure %{__make} %install %{__make} install DESTDIR=$RPM_BUILD_ROOT %clean %{__make} distclean %files %defattr(-,root,root) %doc AUTHORS BUGS CHANGELOG INSTALL README TODO TRANSLATION examples docs/*.txt %attr(0755,-,-) %{_bindir}/* %attr(0644,-,-) %{_mandir}/man1/%{name}.1* %attr(0644,-,-) %{_mandir}/*/man1/%{name}.1* %attr(0644,-,-) %{_datadir}/locale/*/LC_MESSAGES/%{name}.mo %changelog * Sat Jan 28 2006 Hendrik Sattler - Change Copyright tag to License tag: this makes it incompatible with rpm-3.x but is needed for current rpm - include all binaries as there is now more than one * Tue Aug 24 2004 Hendrik Sattler - install all translation of the manpage - install all gettext files - reformat and extend description - add german summary and german description - use default configure command instead of custom invocation - remove x-flag from all non-executable files - remove old url from Source0 field * Mon Nov 18 2002 Hendrik Sattler - added manpage to package * Sat Jul 1 2002 Hendrik Sattler - changed defattr, so dirs get their x-flag * Sat May 14 2002 Hendrik Sattler - extensive usage of environment variables in the spec file - moved/renamed files in docdir * Sat Feb 9 2002 Petr Kri¹tof - RPM spec update * Sat Nov 17 2001 Hendrik Sattler - Initial RPM release scmxx-0.9.0/configure0000755000175000017500000076406010401301605014426 0ustar hendrikhendrik#! /bin/sh # From configure.in Revision: 529 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for scmxx 0.9.0. # # Report bugs to >. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='scmxx' PACKAGE_TARNAME='scmxx' PACKAGE_VERSION='0.9.0' PACKAGE_STRING='scmxx 0.9.0' PACKAGE_BUGREPORT='Hendrik Sattler ' # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP LD ac_ct_LD INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP MSGFMT MSGINIT MSGMERGE XGETTEXT DB2X_XSLTPROC DB2X_MANXML XSLTPROC GETTEXT_DIRNAME PARSELIB BLUETOOTH_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures scmxx 0.9.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of scmxx 0.9.0:";; esac cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-device=DEV Use DEV as default else value depends on system --with-baudrate=SPEED Set baud rate to SPEED [19200] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to >. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF scmxx configure 0.9.0 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by scmxx $as_me 0.9.0, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers src/config.h src/timeincl.h src/intincl.h src/gtincl.h" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` CFLAGS="${CFLAGS} -D_GNU_SOURCE -D_REENTRANT -W -Wall -Wno-format-y2k" CPPFLAGS="${CPPFLAGS} ${CFLAGS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LD="${ac_tool_prefix}ld" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_LD"; then ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LD="ld" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD=":" fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then echo "$as_me:$LINENO: result: $ac_ct_LD" >&5 echo "${ECHO_T}$ac_ct_LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi LD=$ac_ct_LD else LD="$ac_cv_prog_LD" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in arpa/inet.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { _ascii (); _ebcdic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; no) ;; *) { { echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac echo "$as_me:$LINENO: checking for cfmakeraw" >&5 echo $ECHO_N "checking for cfmakeraw... $ECHO_C" >&6 if test "${ac_cv_func_cfmakeraw+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define cfmakeraw to an innocuous variant, in case declares cfmakeraw. For example, HP-UX 11i declares gettimeofday. */ #define cfmakeraw innocuous_cfmakeraw /* System header to define __stub macros and hopefully few prototypes, which can conflict with char cfmakeraw (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef cfmakeraw /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char cfmakeraw (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_cfmakeraw) || defined (__stub___cfmakeraw) choke me #else char (*f) () = cfmakeraw; #endif #ifdef __cplusplus } #endif int main () { return f != cfmakeraw; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_cfmakeraw=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_cfmakeraw=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_cfmakeraw" >&5 echo "${ECHO_T}$ac_cv_func_cfmakeraw" >&6 if test $ac_cv_func_cfmakeraw = yes; then : else cat >>confdefs.h <<\_ACEOF #define NO_CFMAKERAW 1 _ACEOF fi for ac_header in math.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for log10 in -lm" >&5 echo $ECHO_N "checking for log10 in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_log10+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char log10 (); int main () { log10 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_log10=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_log10=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_log10" >&5 echo "${ECHO_T}$ac_cv_lib_m_log10" >&6 if test $ac_cv_lib_m_log10 = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi for ac_func in log10 labs do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in langinfo.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for nl_langinfo" >&5 echo $ECHO_N "checking for nl_langinfo... $ECHO_C" >&6 if test "${ac_cv_func_nl_langinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define nl_langinfo to an innocuous variant, in case declares nl_langinfo. For example, HP-UX 11i declares gettimeofday. */ #define nl_langinfo innocuous_nl_langinfo /* System header to define __stub macros and hopefully few prototypes, which can conflict with char nl_langinfo (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef nl_langinfo /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char nl_langinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_nl_langinfo) || defined (__stub___nl_langinfo) choke me #else char (*f) () = nl_langinfo; #endif #ifdef __cplusplus } #endif int main () { return f != nl_langinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_nl_langinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_nl_langinfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_nl_langinfo" >&5 echo "${ECHO_T}$ac_cv_func_nl_langinfo" >&6 if test $ac_cv_func_nl_langinfo = yes; then : else cat >>confdefs.h <<\_ACEOF #define NO_NL_LANGINFO 1 _ACEOF { echo "$as_me:$LINENO: Input/output is limited to ASCII." >&5 echo "$as_me: Input/output is limited to ASCII." >&6;} fi for ac_header in getopt.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for library containing getopt_long" >&5 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6 if test "${ac_cv_search_getopt_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_getopt_long=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long (); int main () { getopt_long (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_getopt_long="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_getopt_long" = no; then for ac_lib in getopt; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long (); int main () { getopt_long (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_getopt_long="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6 if test "$ac_cv_search_getopt_long" != no; then test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS" cat >>confdefs.h <<_ACEOF #define PARSELIB 1 _ACEOF else for ac_header in popt.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for library containing poptGetContext" >&5 echo $ECHO_N "checking for library containing poptGetContext... $ECHO_C" >&6 if test "${ac_cv_search_poptGetContext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_poptGetContext=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char poptGetContext (); int main () { poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_poptGetContext="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_poptGetContext" = no; then for ac_lib in popt; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char poptGetContext (); int main () { poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_poptGetContext="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_poptGetContext" >&5 echo "${ECHO_T}$ac_cv_search_poptGetContext" >&6 if test "$ac_cv_search_poptGetContext" != no; then test "$ac_cv_search_poptGetContext" = "none required" || LIBS="$ac_cv_search_poptGetContext $LIBS" cat >>confdefs.h <<_ACEOF #define PARSELIB 2 _ACEOF else { { echo "$as_me:$LINENO: error: You need getopt_long or libpopt." >&5 echo "$as_me: error: You need getopt_long or libpopt." >&2;} { (exit 1); exit 1; }; } fi else { { echo "$as_me:$LINENO: error: You need getopt_long or libpopt." >&5 echo "$as_me: error: You need getopt_long or libpopt." >&2;} { (exit 1); exit 1; }; } fi done fi else for ac_header in gnugetopt/getopt.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for library containing getopt_long" >&5 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6 if test "${ac_cv_search_getopt_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_getopt_long=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long (); int main () { getopt_long (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_getopt_long="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_getopt_long" = no; then for ac_lib in getopt; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long (); int main () { getopt_long (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_getopt_long="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6 if test "$ac_cv_search_getopt_long" != no; then test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS" cat >>confdefs.h <<_ACEOF #define PARSELIB 1 _ACEOF else for ac_header in popt.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for library containing poptGetContext" >&5 echo $ECHO_N "checking for library containing poptGetContext... $ECHO_C" >&6 if test "${ac_cv_search_poptGetContext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_poptGetContext=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char poptGetContext (); int main () { poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_poptGetContext="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_poptGetContext" = no; then for ac_lib in popt; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char poptGetContext (); int main () { poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_poptGetContext="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_poptGetContext" >&5 echo "${ECHO_T}$ac_cv_search_poptGetContext" >&6 if test "$ac_cv_search_poptGetContext" != no; then test "$ac_cv_search_poptGetContext" = "none required" || LIBS="$ac_cv_search_poptGetContext $LIBS" cat >>confdefs.h <<_ACEOF #define PARSELIB 2 _ACEOF else { { echo "$as_me:$LINENO: error: You need getopt_long or libpopt." >&5 echo "$as_me: error: You need getopt_long or libpopt." >&2;} { (exit 1); exit 1; }; } fi else { { echo "$as_me:$LINENO: error: You need getopt_long or libpopt." >&5 echo "$as_me: error: You need getopt_long or libpopt." >&2;} { (exit 1); exit 1; }; } fi done fi else for ac_header in popt.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for library containing poptGetContext" >&5 echo $ECHO_N "checking for library containing poptGetContext... $ECHO_C" >&6 if test "${ac_cv_search_poptGetContext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_poptGetContext=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char poptGetContext (); int main () { poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_poptGetContext="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_poptGetContext" = no; then for ac_lib in popt; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char poptGetContext (); int main () { poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_poptGetContext="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_poptGetContext" >&5 echo "${ECHO_T}$ac_cv_search_poptGetContext" >&6 if test "$ac_cv_search_poptGetContext" != no; then test "$ac_cv_search_poptGetContext" = "none required" || LIBS="$ac_cv_search_poptGetContext $LIBS" cat >>confdefs.h <<_ACEOF #define PARSELIB 2 _ACEOF else { { echo "$as_me:$LINENO: error: You need getopt_long or libpopt." >&5 echo "$as_me: error: You need getopt_long or libpopt." >&2;} { (exit 1); exit 1; }; } fi else { { echo "$as_me:$LINENO: error: You need getopt_long or libpopt." >&5 echo "$as_me: error: You need getopt_long or libpopt." >&2;} { (exit 1); exit 1; }; } fi done fi done fi done for ac_header in iconv.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5 echo $ECHO_N "checking for libiconv in -liconv... $ECHO_C" >&6 if test "${ac_cv_lib_iconv_libiconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char libiconv (); int main () { libiconv (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_iconv_libiconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_iconv_libiconv=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv" >&5 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv" >&6 if test $ac_cv_lib_iconv_libiconv = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBICONV 1 _ACEOF LIBS="-liconv $LIBS" else echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6 if test "${ac_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define iconv to an innocuous variant, in case declares iconv. For example, HP-UX 11i declares gettimeofday. */ #define iconv innocuous_iconv /* System header to define __stub macros and hopefully few prototypes, which can conflict with char iconv (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef iconv /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char iconv (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_iconv) || defined (__stub___iconv) choke me #else char (*f) () = iconv; #endif #ifdef __cplusplus } #endif int main () { return f != iconv; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_iconv=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_iconv" >&5 echo "${ECHO_T}$ac_cv_func_iconv" >&6 if test $ac_cv_func_iconv = yes; then : else { { echo "$as_me:$LINENO: error: You need to get libiconv or a newer GNU libc." >&5 echo "$as_me: error: You need to get libiconv or a newer GNU libc." >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:$LINENO: checking if parameter 2 of iconv() is declared const" >&5 echo $ECHO_N "checking if parameter 2 of iconv() is declared const... $ECHO_C" >&6 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char** inbuf, size_t* inbytesleft, char** outbuf, size_t* outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 cat >>confdefs.h <<_ACEOF #define ICONV_CAST char** _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<_ACEOF #define ICONV_CAST const char** _ACEOF fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else { { echo "$as_me:$LINENO: error: You need to get libiconv or a newer GNU libc." >&5 echo "$as_me: error: You need to get libiconv or a newer GNU libc." >&2;} { (exit 1); exit 1; }; } fi done for ac_header in libintl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for library containing gettext" >&5 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6 if test "${ac_cv_search_gettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_gettext=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gettext (); int main () { gettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_gettext="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_gettext" = no; then for ac_lib in intl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gettext (); int main () { gettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_gettext="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5 echo "${ECHO_T}$ac_cv_search_gettext" >&6 if test "$ac_cv_search_gettext" != no; then test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS" # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MSGFMT=$ac_cv_path_MSGFMT if test -n "$MSGFMT"; then echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "msginit", so it can be a program name with args. set dummy msginit; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGINIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSGINIT in [\\/]* | ?:[\\/]*) ac_cv_path_MSGINIT="$MSGINIT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGINIT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MSGINIT=$ac_cv_path_MSGINIT if test -n "$MSGINIT"; then echo "$as_me:$LINENO: result: $MSGINIT" >&5 echo "${ECHO_T}$MSGINIT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MSGMERGE=$ac_cv_path_MSGMERGE if test -n "$MSGMERGE"; then echo "$as_me:$LINENO: result: $MSGMERGE" >&5 echo "${ECHO_T}$MSGMERGE" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XGETTEXT in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi XGETTEXT=$ac_cv_path_XGETTEXT if test -n "$XGETTEXT"; then echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else { echo "$as_me:$LINENO: No translation will be available during runtime." >&5 echo "$as_me: No translation will be available during runtime." >&6;} fi else { echo "$as_me:$LINENO: No translation will be available during runtime." >&5 echo "$as_me: No translation will be available during runtime." >&6;} fi done # Extract the first word of "db2x_xsltproc", so it can be a program name with args. set dummy db2x_xsltproc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DB2X_XSLTPROC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DB2X_XSLTPROC in [\\/]* | ?:[\\/]*) ac_cv_path_DB2X_XSLTPROC="$DB2X_XSLTPROC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DB2X_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DB2X_XSLTPROC=$ac_cv_path_DB2X_XSLTPROC if test -n "$DB2X_XSLTPROC"; then echo "$as_me:$LINENO: result: $DB2X_XSLTPROC" >&5 echo "${ECHO_T}$DB2X_XSLTPROC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "db2x_manxml", so it can be a program name with args. set dummy db2x_manxml; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DB2X_MANXML+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DB2X_MANXML in [\\/]* | ?:[\\/]*) ac_cv_path_DB2X_MANXML="$DB2X_MANXML" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DB2X_MANXML="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DB2X_MANXML=$ac_cv_path_DB2X_MANXML if test -n "$DB2X_MANXML"; then echo "$as_me:$LINENO: result: $DB2X_MANXML" >&5 echo "${ECHO_T}$DB2X_MANXML" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XSLTPROC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XSLTPROC in [\\/]* | ?:[\\/]*) ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then echo "$as_me:$LINENO: result: $XSLTPROC" >&5 echo "${ECHO_T}$XSLTPROC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if [ "${prefix}" = "NONE" ]; then \ prefix=${ac_default_prefix}; \ fi GETTEXT_DIRNAME="$(eval echo $datadir/locale)" cat >>confdefs.h <<_ACEOF #define GETTEXT_DIRNAME "$GETTEXT_DIRNAME" _ACEOF # Check whether --with-device or --without-device was given. if test "${with_device+set}" = set; then withval="$with_device" device=$withval else case $host in *-*-linux*) device="/dev/ttyS0" BLUETOOTH_LIBS="" LIBSOLD=$LIBS for ac_header in bluetooth/bluetooth.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for str2ba in -lbluetooth" >&5 echo $ECHO_N "checking for str2ba in -lbluetooth... $ECHO_C" >&6 if test "${ac_cv_lib_bluetooth_str2ba+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbluetooth $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char str2ba (); int main () { str2ba (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bluetooth_str2ba=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bluetooth_str2ba=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_bluetooth_str2ba" >&5 echo "${ECHO_T}$ac_cv_lib_bluetooth_str2ba" >&6 if test $ac_cv_lib_bluetooth_str2ba = yes; then BLUETOOTH_LIBS="-lbluetooth $BLUETOOTH_LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_LIBBLUETOOTH 1 _ACEOF fi else { echo "$as_me:$LINENO: Bluetooth header files not found" >&5 echo "$as_me: Bluetooth header files not found" >&6;} fi done LIBS=$LIBSOLD ;; *-*-cygwin*) device="/dev/com1" ;; *-*-mingw32*) device="COM1" CFLAGS="${CFLAGS} -DWINDOWS_API" LIBS="${LIBS} -lshlwapi -lws2_32" for ac_header in windows.h shlobj.h shlwapi.h winsock2.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: You need to get the w32api mingw package." >&5 echo "$as_me: error: You need to get the w32api mingw package." >&2;} { (exit 1); exit 1; }; } fi done for ac_header in ws2bth.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ;; *-*-os2*) device="COM1" CFLAGS="${CFLAGS} -DOS2_API" ;; *-*-sunos* | *-*-solaris*) device="/dev/ttya" ;; *-*-freebsd*) device="/dev/tty00" LIBSOLD=$LIBS for ac_header in sys/bitstring.h netgraph/bluetooth/include/ng_btsocket.h bluetooth.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------------------- ## ## Report this to Hendrik Sattler ## ## -------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for bt_aton in -lbluetooth" >&5 echo $ECHO_N "checking for bt_aton in -lbluetooth... $ECHO_C" >&6 if test "${ac_cv_lib_bluetooth_bt_aton+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbluetooth $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bt_aton (); int main () { bt_aton (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bluetooth_bt_aton=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bluetooth_bt_aton=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_bluetooth_bt_aton" >&5 echo "${ECHO_T}$ac_cv_lib_bluetooth_bt_aton" >&6 if test $ac_cv_lib_bluetooth_bt_aton = yes; then BLUETOOTH_LIBS="-lbluetooth $BLUETOOTH_LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_LIBBLUETOOTH 1 _ACEOF fi fi done LIBS=$LIBSOLD ;; *-*-netbsd*) device="/dev/tty00" ;; *-*-openbsd*) device="/dev/ttya" ;; *) { echo "$as_me:$LINENO: WARNING: System $host not known." >&5 echo "$as_me: WARNING: System $host not known." >&2;} device=`ls -1 /dev/tty^0-9* | head -n 1` { echo "$as_me:$LINENO: WARNING: Guessing: ${device}" >&5 echo "$as_me: WARNING: Guessing: ${device}" >&2;} ;; esac fi; { echo "$as_me:$LINENO: Using $device as default device." >&5 echo "$as_me: Using $device as default device." >&6;} cat >>confdefs.h <<_ACEOF #define TTYPORT "$device" _ACEOF # Check whether --with-baudrate or --without-baudrate was given. if test "${with_baudrate+set}" = set; then withval="$with_baudrate" baudrate=$withval else baudrate=19200 fi; { echo "$as_me:$LINENO: Using $baudrate as default baudrate." >&5 echo "$as_me: Using $baudrate as default baudrate." >&6;} cat >>confdefs.h <<_ACEOF #define TTYSPEED "$baudrate" _ACEOF ac_config_files="$ac_config_files Makefile src/Makefile src/Makefile.sub docs/Makefile po/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by scmxx $as_me 0.9.0, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ scmxx config.status 0.9.0 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/Makefile.sub" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.sub" ;; "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "po/Makefile" ) CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "src/timeincl.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/timeincl.h" ;; "src/intincl.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/intincl.h" ;; "src/gtincl.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/gtincl.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@CPP@,$CPP,;t t s,@LD@,$LD,;t t s,@ac_ct_LD@,$ac_ct_LD,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@EGREP@,$EGREP,;t t s,@MSGFMT@,$MSGFMT,;t t s,@MSGINIT@,$MSGINIT,;t t s,@MSGMERGE@,$MSGMERGE,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@DB2X_XSLTPROC@,$DB2X_XSLTPROC,;t t s,@DB2X_MANXML@,$DB2X_MANXML,;t t s,@XSLTPROC@,$XSLTPROC,;t t s,@GETTEXT_DIRNAME@,$GETTEXT_DIRNAME,;t t s,@PARSELIB@,$PARSELIB,;t t s,@BLUETOOTH_LIBS@,$BLUETOOTH_LIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi scmxx-0.9.0/winsetup-cygwin.iss0000644000175000017500000000516610401301607016410 0ustar hendrikhendrik; Script for Inno Setup (http://www.jrsoftware.org/) ; CygWin is expected to be installed unter C:\cygwin [Setup] AppName=SCMxx AppVerName=SCMxx 0.9.0 AppPublisher=Hendrik Sattler AppPublisherURL=http://www.hendrik-sattler.de AppSupportURL=http://www.hendrik-sattler.de/scmxx AppUpdatesURL=http://sourceforge.net/project/showfiles.php?group_id=88510&package_id=92540 AppReadmeFile={app}\ReadMe.txt DefaultDirName={pf}\SCMxx DefaultGroupName=SCMxx AllowNoIcons=yes LicenseFile=LICENSE OutputBaseFilename=scmxx-0.9.0-win32-setup Compression=lzma SolidCompression=yes [Types] Name: "full"; Description: "Full installation" Name: "custom"; Description: "Custom installation"; Flags: iscustom [Components] Name: "scmxx"; Description: "the main binary files"; Types: full custom; Flags: fixed Name: "flexmem-utils"; Description: "utils to decode files from the Flexible Memory"; Types: full custom; Flags: fixed Name: "cygwin"; Description: "cygwin libraries"; Types: full custom; Flags: fixed Name: "translation"; Description: "translation files"; Types: full custom Name: "help"; Description: "HTML help files"; Types: full custom [Files] Source: "scmxx.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "scmxx" Source: "smi.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem-utils" Source: "adr2vcf.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem-utils" Source: "apoconv.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem-utils" Source: "LICENSE"; DestDir: "{app}"; DestName: "License.txt"; Flags: ignoreversion; Components: "scmxx" Source: "docs\README_WIN32.txt"; DestDir: "{app}"; DestName: "ReadMe.txt"; Flags: ignoreversion isreadme; Components: "scmxx" Source: "cygwin1.dll"; DestDir: "{app}"; Components: "cygwin" Source: "cygiconv-2.dll"; DestDir: "{app}"; Components: "cygwin" Source: "cygintl-3.dll"; DestDir: "{app}"; Components: "cygwin" Source: "docs\*.html"; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "help" Source: "po\de.mo"; DestDir: "{app}\locale\de\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\fr.mo"; DestDir: "{app}\locale\fr\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\it.mo"; DestDir: "{app}\locale\it\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\ru.mo"; DestDir: "{app}\locale\ru\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" scmxx-0.9.0/winsetup-mingw.iss0000644000175000017500000000501510401301607016222 0ustar hendrikhendrik; Script for Inno Setup (http://www.jrsoftware.org/) ; CygWin is expected to be installed unter C:\cygwin [Setup] AppName=SCMxx AppVerName=SCMxx 0.9.0 AppPublisher=Hendrik Sattler AppPublisherURL=http://www.hendrik-sattler.de AppSupportURL=http://www.hendrik-sattler.de/scmxx AppUpdatesURL=http://sourceforge.net/project/showfiles.php?group_id=88510&package_id=92540 AppReadmeFile={app}\ReadMe.txt DefaultDirName={pf}\SCMxx DefaultGroupName=SCMxx AllowNoIcons=yes LicenseFile=LICENSE OutputBaseFilename=scmxx-0.9.0-win32-setup Compression=lzma SolidCompression=yes [Types] Name: "full"; Description: "Full installation" Name: "custom"; Description: "Custom installation"; Flags: iscustom [Components] Name: "scmxx"; Description: "the main binary"; Types: full custom; Flags: fixed Name: "flexmem"; Description: "utils to decode files from the Flexible Memory"; Types: full custom; Flags: fixed Name: "libs"; Description: "libraries"; Types: full custom; Flags: fixed Name: "translation"; Description: "translation files"; Types: full custom Name: "help"; Description: "HTML help files"; Types: full custom [Files] Source: "scmxx.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "scmxx" Source: "smi.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem" Source: "adr2vcf.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem" Source: "apoconv.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "flexmem" Source: "LICENSE"; DestDir: "{app}"; DestName: "License.txt"; Flags: ignoreversion; Components: "scmxx" Source: "docs\README_WIN32.txt"; DestDir: "{app}"; DestName: "ReadMe.txt"; Flags: ignoreversion isreadme; Components: "scmxx" Source: "libiconv-2.dll"; DestDir: "{app}"; Components: "libs" Source: "libintl-3.dll"; DestDir: "{app}"; Components: "libs" Source: "docs\*.html"; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "help" Source: "po\de.mo"; DestDir: "{app}\locale\de\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\fr.mo"; DestDir: "{app}\locale\fr\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\it.mo"; DestDir: "{app}\locale\it\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation" Source: "po\ru.mo"; DestDir: "{app}\locale\ru\LC_MESSAGES"; DestName: "scmxx.mo"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: "translation"