summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorkleink <kleink@pkgsrc.org>2002-01-17 19:35:40 +0000
committerkleink <kleink@pkgsrc.org>2002-01-17 19:35:40 +0000
commit4c1b4995973b4e6374522165e38794581b743a4c (patch)
tree53713e8aad1fc958620b4716699760ae289d377c /comms
parentf25f6082c1f87ef053754506d5eec35904198424 (diff)
downloadpkgsrc-4c1b4995973b4e6374522165e38794581b743a4c.tar.gz
Update to 0.5.8nb2: add an option to specify the tty speed; patches are
submitted back to the author.
Diffstat (limited to 'comms')
-rw-r--r--comms/scmxx/Makefile4
-rw-r--r--comms/scmxx/distinfo8
-rw-r--r--comms/scmxx/patches/patch-ab41
-rw-r--r--comms/scmxx/patches/patch-ac8
-rw-r--r--comms/scmxx/patches/patch-ad70
-rw-r--r--comms/scmxx/patches/patch-ae13
-rw-r--r--comms/scmxx/patches/patch-af32
7 files changed, 170 insertions, 6 deletions
diff --git a/comms/scmxx/Makefile b/comms/scmxx/Makefile
index 83dfb40da7f..ee1185b46ed 100644
--- a/comms/scmxx/Makefile
+++ b/comms/scmxx/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2002/01/16 10:15:48 kleink Exp $
+# $NetBSD: Makefile,v 1.3 2002/01/17 19:35:40 kleink Exp $
#
DISTNAME= scmxx-0.5.8
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= comms
MASTER_SITES= http://www.hendrik-sattler.de/scmxx/download/
EXTRACT_SUFX= .tar.bz2
diff --git a/comms/scmxx/distinfo b/comms/scmxx/distinfo
index 59518653701..485659f299c 100644
--- a/comms/scmxx/distinfo
+++ b/comms/scmxx/distinfo
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.2 2002/01/16 10:15:48 kleink Exp $
+$NetBSD: distinfo,v 1.3 2002/01/17 19:35:40 kleink Exp $
SHA1 (scmxx-0.5.8.tar.bz2) = ab874880b4ece30b5ea4b8a75e7f43797fd80d7e
Size (scmxx-0.5.8.tar.bz2) = 55902 bytes
SHA1 (patch-aa) = 6dcb7897f462ee8366d2c411b2326218f4decb1a
-SHA1 (patch-ab) = 62a7e3c5ebe7e5f752692612a35f7cfa0b379f52
+SHA1 (patch-ab) = 762034cfb489894153cd6bab8aac83d16ec9d1d2
+SHA1 (patch-ac) = 117a52de2bd29ebc6f372869d0ad82596f8bd174
+SHA1 (patch-ad) = 6e31f2bbb969033c51d959466333e5e49c87bfa5
+SHA1 (patch-ae) = 0b08fe6312c04016b5ce68ef2eb4fa80832f4290
+SHA1 (patch-af) = 65d2a022113369d6c110904440df798f24929a99
diff --git a/comms/scmxx/patches/patch-ab b/comms/scmxx/patches/patch-ab
index 6036fdff33e..43245416924 100644
--- a/comms/scmxx/patches/patch-ab
+++ b/comms/scmxx/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.1 2002/01/16 10:15:48 kleink Exp $
+$NetBSD: patch-ab,v 1.2 2002/01/17 19:35:41 kleink Exp $
--- scmxx.c.orig Fri Jan 4 21:43:54 2002
-+++ scmxx.c Wed Jan 16 11:11:25 2002
++++ scmxx.c Thu Jan 17 20:06:43 2002
@@ -35,7 +35,7 @@
char *SMSSLOT_p=SMSSLOT;
char *PIN_p=PIN;
@@ -11,3 +11,40 @@ $NetBSD: patch-ab,v 1.1 2002/01/16 10:15:48 kleink Exp $
struct option myoptions[]=
{ {"remove",0,0,'r'},{"send",0,0,'s'},{"get",0,0,'g'},
{"bitmap",2,0,'B'},{"midi",2,0,'M'},{"vcal",2,0,'C'},{"vcf",2,0,'F'},
+@@ -43,7 +43,7 @@
+ {"sms",2,0,'S'},{"sms-text",1,0,'t'},{"sms-nr",1,0,'n'},{"direct",0,0,0},
+ {"device",1,0,'d'},{"file",1,0,'f'},{"pipe",1,0,'p'},{"pin",1,0,0},
+ {"info",0,0,'i'},{"set-time",0,0,0},{"set-smsc",0,0,0},{"help",0,0,'h'},
+- {"verbose",0,0,'v'},{"quiet",0,0,'q'},
++ {"verbose",0,0,'v'},{"quiet",0,0,'q'},{"speed",1,0,0},
+ {0,0,0,0}
+ };
+
+@@ -61,6 +61,10 @@
+ if (getenv("SCMXX_TTY")!=NULL){
+ set_ttyport(getenv("SCMXX_TTY"));
+ }
++ //using env. var. SCMXX_TTYSPEED
++ if (getenv("SCMXX_TTYSPEED")!=NULL){
++ set_ttyspeed(getenv("SCMXX_TTYSPEED"));
++ }
+
+ while((arg=getopt_long(argc,argv,"rsgB::M::C::F::P:S::t:n:d:f:p:ivqh",myoptions,&option_index)) != -1){
+ switch (arg){
+@@ -134,6 +138,8 @@
+ if ((ACTION_TYPE==2 || ACTION_TYPE==3) && FILE_TYPE==5){ACTION_TYPE += 10;}
+ }else if(!strcmp(myoptions[option_index].name,"pin")){
+ if(optarg && strlen(optarg)<sizeof(PIN)){strcpy(PIN_p,optarg);}
++ }else if(!strcmp(myoptions[option_index].name,"speed")){
++ if(optarg){set_ttyspeed(optarg);}
+ }
+ break;
+ }
+@@ -192,6 +198,7 @@
+ printf("Syntax: %s [Options] [Operation [Slot[SMS-Options]]]\n",me);
+ printf("Options:\n");
+ printf("--device <device>\t -d\tspecify another than the compiled in device\n");
++ printf("--speed <speed>\t\t\tspecify the device's speed\n");
+ printf("--file <file>\t\t -f\tspecify a file to use (instead of stdin/stdout)\n");
+ printf("--pipe <program>\t -p\tspecify a pipe to use additionally to --file\n");
+ printf("--pin <pin>\t\t\tuse this pin if one is needed\n");
diff --git a/comms/scmxx/patches/patch-ac b/comms/scmxx/patches/patch-ac
new file mode 100644
index 00000000000..d6804ae25ff
--- /dev/null
+++ b/comms/scmxx/patches/patch-ac
@@ -0,0 +1,8 @@
+$NetBSD: patch-ac,v 1.1 2002/01/17 19:35:41 kleink Exp $
+
+--- device.h.orig Fri Jan 4 21:43:54 2002
++++ device.h Thu Jan 17 19:45:15 2002
+@@ -1,2 +1,3 @@
+ //char myttyport[25]="/dev/ttyS0";
+ char myttyport[25]="/dev/ircomm0";
++speed_t myttyspeed=B19200;
diff --git a/comms/scmxx/patches/patch-ad b/comms/scmxx/patches/patch-ad
new file mode 100644
index 00000000000..5856184e28e
--- /dev/null
+++ b/comms/scmxx/patches/patch-ad
@@ -0,0 +1,70 @@
+$NetBSD: patch-ad,v 1.1 2002/01/17 19:35:41 kleink Exp $
+
+--- common.c.orig Fri Jan 4 21:43:54 2002
++++ common.c Thu Jan 17 20:14:15 2002
+@@ -26,6 +26,42 @@
+ else{errexit("Buffer overflow. Set a greater length in device.h and recompile.\n");}
+ }
+
++void set_ttyspeed(char *newttyspeed){
++ if (string_to_speed(newttyspeed, &myttyspeed) != 0){
++ errexit("Cannot set device speed.\n");
++ }
++}
++
++int string_to_speed(const char *speedstring_p, speed_t *speed_p)
++{
++ int nspeed;
++ speed_t bspeed;
++
++ nspeed = atoi(speedstring_p);
++ switch(nspeed){
++ case 19200:
++ bspeed=B19200;
++ break;
++ case 38400:
++ bspeed=B38400;
++ break;
++#ifdef B57600
++ case 57600:
++ bspeed=B57600;
++ break;
++#endif
++#ifdef B115200
++ case 115200:
++ bspeed=B115200;
++ break;
++#endif
++ default:
++ return(-1);
++ }
++ *speed_p=bspeed;
++ return(0);
++}
++
+ void new_at_command(char *at_command_p, char *addon_p){
+ memset(at_command_p,0,sizeof(at_command_p));
+ strcpy(&at_command_p[0],"AT");
+@@ -63,8 +99,8 @@
+ fprintf(stderr,"Error in getting device attributes.\n");
+ exit(1);
+ }
+- cfsetispeed(&newtio, B19200); //input at baudrate
+- cfsetospeed(&newtio, B19200); //ouput at baudrate
++ cfsetispeed(&newtio, myttyspeed); //input at baudrate
++ cfsetospeed(&newtio, myttyspeed); //ouput at baudrate
+ newtio.c_cflag &= ~(CSIZE|CSTOPB|PARENB|PARODD|CRTSCTS);
+ newtio.c_cflag |= CS8 | CLOCAL | CREAD | HUPCL; //8bit, local mode, read data
+ newtio.c_lflag &= ~(ECHO|ECHOE|ECHOPRT|ECHOK|ECHOKE|ECHONL|ECHOCTL|
+@@ -75,7 +111,10 @@
+ newtio.c_iflag |= IGNPAR;
+ newtio.c_oflag &= ~OPOST;
+ tcflush(mytty, TCIOFLUSH); //clear serial tty
+- tcsetattr(mytty,TCSANOW,&newtio); //set now
++ if (tcsetattr(mytty,TCSANOW,&newtio) != 0){ //set now
++ perror("Error in setting device attributes");
++ exit(1);
++ }
+ alarm(0);
+ }
+
diff --git a/comms/scmxx/patches/patch-ae b/comms/scmxx/patches/patch-ae
new file mode 100644
index 00000000000..d412590fd01
--- /dev/null
+++ b/comms/scmxx/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2002/01/17 19:35:41 kleink Exp $
+
+--- common.h.orig Fri Jan 4 21:43:54 2002
++++ common.h Thu Jan 17 19:52:24 2002
+@@ -53,6 +53,8 @@
+ void myprintf(int verbose_level, char *output, ...);
+ //from common.c
+ void set_ttyport(char *newttyport);
++void set_ttyspeed(char *newttyspeed);
++int string_to_speed(const char *speedstring_p, speed_t *speed_p);
+ void new_at_command(char *at_command_p, char *addon_p);
+ void add_at_command(char *at_command_p, char *addon_p,...);
+ void com_mytty(char *at_command_p, char *ack_p);
diff --git a/comms/scmxx/patches/patch-af b/comms/scmxx/patches/patch-af
new file mode 100644
index 00000000000..83abc30b2a3
--- /dev/null
+++ b/comms/scmxx/patches/patch-af
@@ -0,0 +1,32 @@
+$NetBSD: patch-af,v 1.1 2002/01/17 19:35:41 kleink Exp $
+
+--- docs/scmxx.1.orig Fri Jan 4 21:43:54 2002
++++ docs/scmxx.1 Thu Jan 17 20:30:56 2002
+@@ -3,7 +3,7 @@
+ scmxx \- exchange data with your Siemens mobile phone
+ .SH SYNOPSIS
+ scmxx \
+-[--device \fIdevice\fP] [--file \fIfile\fP] \
++[--device \fIdevice\fP] [--speed \fIspeed\fP] [--file \fIfile\fP] \
+ [--pin \fIpin\fP] [--quiet] [--verbose] \
+ [--remove | --send | --get] [--bitmap[=\fIslot#\fP] | \
+ --midi[=\fIslot#\fP] | --vcal[=]\fIslot#\fP | \
+@@ -31,6 +31,10 @@
+ specify another than the compiled in device
+ .P
+ .TP 20
++.B --speed
++specify the device's speed
++.P
++.TP 20
+ .B --file (-f)
+ specify a file to use (instead of stdin/stdout)
+ .P
+@@ -127,5 +131,7 @@
+
+ .SH ENVIRONMENT
+ SCMXX_TTY
++.br
++SCMXX_TTYSPEED
+ .SH AUTHOR
+ Hendrik Sattler <post@hendrik-sattler.de>