;
;	my C-Kermit macros
;
set line /dev/cuaa0
set speed 38400
set terminal bytesize 8
set command bytesize 8
set file character-set dec-multinational
set transfer character-set transparent
set flow-control rts/cts
set carrier-watch on
set parity none
set delay 0
set modem type hayes
set modem command init-string ATZ\13
set modem command hardware-flow AT&K3\13
set modem dial-command ATDT%s\13
set dial hangup on
set dial display on
set dial timeout 60
set transmit linefeed
;
;	set escape char to DEL key (for super taiki kun --- STK)
;
set escape 127
;
;	set log file name(kermit-6.0.192)
;
define \%d \v(ndate)\Fsubstr(\v(time),1,2)\Fsubstr(\v(time),4,2)\Fsubstr(\v(time),7,2)
define \%l \%d.log
;log session \%l
;
;	set log file name
;
;	12:00:00
;assign _logfilename \v(ndate)\Fsubstr(\v(time),1,2)\Fsubstr(\v(time),4,2)\Fsubstr(\v(time),7,2).log
;log session \m(_logfilename)
;
;	calllog macro
;
COMMENT - CALLLOG macro.  Arguments:
;
; \%1 = log file name prefix
; \%2 = device name
; \%3 = speed
; \%4 = phone number
;
define CALLLOG {
    if < \v(argc) 5 -         ; All arguments present?
      end 1 Usage: CALLLOG log-prefix device speed number
    assign _logfile \%1\%l
    log session \m(_logfile)
    if fail end 1 Can't open log file \m(_logfile)
    set line \%2              ; Communication device
    if fail end 1 can't open device: \%2
    set speed \%3             ; Communication speed
    if fail end 1 unsupported speed: \%3
    dial \%4                  ; Dial the number
    if fail end 1 Can't place call: \%4
    end 0 Connection successful.
}
;
;	my login macro for Nifty Road2
;
COMMENT - NIFLOGIN2 macro for Niftyserve Road2.  Arguments:
; \%1 = NiftyServe User ID
; \%2 = Password
;
define NIFLOGIN2 {
    if < \v(argc) 2 end 1 Usage: \%0 userid [password]
    while not def \%2 { 
        askq \%2 { \%1's password: }
    }
    wait 3
    set input timeout-action quit
    output @P\13
    input 10 Host Name
    output C NIF\13
    input 10 Connection-ID
    output SVC\13
    input 10 User-ID
    output \%1\13
    input 10 Password
    output \%2\13
    def \%2 dummy
    if not def \%3 asg \%3 by NIFTY Corporation
    input 30 \%3
    end 0 Login successful.
}
;
;	my login macro for Nifty Road4
;
COMMENT - NIFLOGIN macro for Niftyserve Road4.  Arguments:
; \%1 = NiftyServe User ID
; \%2 = Password
;
define NIFLOGIN4 {
    if < \v(argc) 2 end 1 Usage: \%0 userid [password]
    while not def \%2 {
        askq \%2 { \%1's password: }
    }
    wait 3
    set input timeout-action quit
    input 5 Host Name
    output C NIF\13
    input 5 Connection-ID
    output SVC\13
    input 5 User-ID
    output \%1\13
    input 5 Password
    output \%2\13
    def \%2 dummy
    if not def \%3 asg \%3 by NIFTY Corporation
    input 30 \%3
    end 0 Login successful.
}
;
;	my login macro for Nifty Road7
;
COMMENT - NIFLOGIN macro for Niftyserve Road7.  Arguments:
; \%1 = NiftyServe User ID
; \%2 = Password
;
define NIFLOGIN7 {
    if < \v(argc) 2 end 1 Usage: \%0 userid [password]
    while not def \%2 {
        askq \%2 { \%1's password: }
    }
    wait 3
    set input timeout quit
    input 5 Login
    output NIFTY\13
    input 5 Password
    output \13
    input 5 Connection-ID
    output SVC\13
    input 5 User-ID
    output \%1\13
    input 5 Password
    output \%2\13
    def \%2 dummy
    if not def \%3 asg \%3 by NIFTY Corporation
    input 30 \%3
    end 0 Login successful.
}
;
;	my login macro for Net-Cock
;
COMMENT - NCKLOGIN macro for Net-Cock.  Arguments:
; \%1 = User ID
; \%2 = Password
;
define NCKLOGIN {
    if < \v(argc) 2 end 1 Usage: \%0 userid [password]
    while not def \%2 {
        askq \%2 { \%1's password: }
    }
    wait 3
    set input timeout quit
    input 5 ID
    output \%1\13
    input 5 Password
    output \%2\13
    def \%2 dummy
    if not def \%3 asg \%3 >
    input 30 \%3
    end 0 Login successful.
}
;
;	end of .mykermrc
;