• Original oneliner MPL sou

    From IGNATIUS@46:1/124 to ALL on Thursday, January 31, 2019 19:20:17
    Here's the original (Mystic 1.07.3) source code:


    --// snip --------------------------------------------------------------------

    # ignatius' oneliners

    uses cfg
    uses user

    var Twriters string array(1..10)
    var Toneliner string array(1..10)
    var S string
    var Foneline string
    var Ch char
    var Ch2 char
    var Count byte
    var Count2 byte

    getcfg
    GetThisUser

    ### begin show procedure ######################################

    Foneline := cfgDataPath+'oneliner.lst'

    Procedure show
    cls
    dispFile('oneh.ans')
    For Count := 1 To 10
    write('■ ')
    write(padRT(Toneliner(count), 64, ' '))
    write(' : ')
    writeln(padRT(Twriters(count), 10, ' '))
    FEnd
    PEnd show

    If Not fExist(fOneLine) Then
    fOpen(1, text, Rewrite, Foneline)
    For count := 1 To 10
    fWriteLn(1, 'Ia! Cthulhu!')
    fWriteLn(1, 'ezdagor')
    FEnd
    fClose(1)
    EndIf

    fOpen(1, Text, Reset, Foneline)
    For Count := 1 To 10
    fReadLn(1, Toneliner(count))
    fReadLn(1, Twriters(count))
    FEnd
    fClose(1)
    show

    ### end show procedure #########################################
    ### begin bot_bar procedure ####################################

    Procedure bot_bar
    dispFile('onen.ans')
    Ch2 := ReadKey
    If Ch2 = Chr(13) then
    MenuCmd('go', 'main')
    Halt
    EndIf
    PEnd bot_bar

    ### end bot_bar procedure ######################################
    ### begin top_bar procedure ####################################

    Procedure top_bar
    dispfile('oney.ans')
    Ch2 := ReadKey
    If Ch2 = Chr(13) then
    dispFile('oneline.asc')
    Write(': ')
    s := stripmci(Input(70, 70, 11, ''))
    If s = '' then
    WriteLn('aborted')
    Halt
    EndIf

    For Count := 1 To 9
    Count2 := Count + 1
    Toneliner(count) := Toneliner(count2)
    Twriters(count) := Twriters(count2)
    Fend

    tWriters(10) := userAlias
    tOneliner(10) := S

    fOpen(1, text, Rewrite, Foneline)
    For Count := 1 To 10
    fWriteLn(1, tOneliner(count))
    fWriteLn(1, tWriters(count))
    FEnd
    fClose(1)
    EndIf
    show
    PEnd top_bar

    ### end top_bar procedure ######################################
    ### begin position procedure ###################################

    Procedure position
    Repeat
    dispFile('onen.ans')

    Ch := ReadKey
    If IsArrow and Ch = Chr(80) then
    dispfile('onen.ans')
    bot_bar
    ElseIf IsArrow and Ch = Chr(72) then
    top_bar
    EndIf

    Until Ch = Chr(13)
    PEnd position

    ### end position procedure ##########################################

    --// snip --------------------------------------------------------------------

    Regards,

    |09ignatius |07(|15cia|07/|15scrollz|07)

    --- Mystic BBS v1.10 A51 (Linux)
    * Origin: catch22bbs.com (46:1/124)
    ■ Synchronet ■ thePharcyde_ >> telnet://bbs.pharcyde.org (Wisconsin)