Commit 6d6723a4 authored by Bernd Paysan's avatar Bernd Paysan

Bump version number

parent 40be85cc
......@@ -260,6 +260,8 @@ cmd-class class
field: resend0
field: data-resend
field: pubkey \ other side official pubkey
field: remote-host$ \ other side host name
field: remote-ver$ \ other side version
field: rqd-xts \ callbacks for request done (array)
field: my-error-id
field: beacon-hash
......@@ -465,6 +467,7 @@ object uclass io-mem
cell uvar tmp-my-key
cell uvar tmp-perm
cell uvar $error-id
cell uvar $remote-host
end-class io-buffers
\ reply structure
......
......@@ -278,7 +278,8 @@ Defer >throw
cmd( true )else( remote? @ 0= ) IF
[: ." do-cmd-loop: " dup . .exe cr ;] $err
dup DoError
buf-state @ show-offset ! <err> cr net2o:see-me <default> show-offset on
buf-state @ show-offset !
<warnings> cr net2o:see-me <default> show-offset on
THEN
un-cmd >throw ;
: do-cmd-loop ( addr u -- ) 2dup buf-dump 2!
......
......@@ -15,7 +15,7 @@ dnl Process this file with autoconf to produce a configure script.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([net2o], [0.9.7-20200116], [bernd@net2o.de], [net2o], [https://fossil.net2o.de/net2o/reportlist])
AC_INIT([net2o], [0.9.7-20200123], [bernd@net2o.de], [net2o], [https://fossil.net2o.de/net2o/reportlist])
AC_PREREQ([2.59])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
......
......@@ -17,6 +17,7 @@
Forward >invitations
in net2o Forward dispose-addrs
in net2o Forward exchange-hostnames
Forward mynick$
Forward invite-me
Forward qr-invite-me
......@@ -230,7 +231,9 @@ Sema id-sema
ELSE !!nokey!! THEN
update-key all-ivs ;
: reply-key ( -- ) crypt( ." Reply key: " tmpkey@ .nnb forth:cr )
reply-key, ( cookie+request ) time-offset! context ]tmpnest
reply-key, ( cookie+request ) time-offset! context
\ o IF net2o:exchange-hostnames THEN
]tmpnest
push-cmd ;
+net2o: gen-reply ( -- ) \g generate a key request reply
......@@ -283,7 +286,14 @@ Sema id-sema
THEN ;
+net2o: invite-result ( flag -- )
o IF to invite-result# THEN ;
+net2o: set-host ( $:host -- )
$> o IF remote-host$ ELSE $remote-host THEN $! ;
+net2o: get-host ( -- )
host$ $@ $, set-host ;
' invite-result is <invite-result>
in net2o : exchange-hostnames ( -- )
host$ $@ $, set-host ;
}scope
setup-table $save
......
......@@ -2,7 +2,7 @@
echo "This script builds net2o from scratch"
GFORTH=gforth-0.7.9_20200109
GFORTH=gforth-0.7.9_20200123
if [ "$(uname -o)" = "Cygwin" ]
then
......
......@@ -15,6 +15,7 @@
\ You should have received a copy of the GNU Affero General Public License
\ along with this program. If not, see <http://www.gnu.org/licenses/>.
color,#
1 new-theme
dark-gui
$FFFFFFFF re-text-color blackish
......@@ -31,6 +32,7 @@ $000020BF re-color login-bg-col#
$FF000000 $FF0000FF re-fade-color pw-err-col#
$444444FF re-color chat-col#
$224444FF re-color chat-bg-col#
$113333FF re-color chat-hist-col#
$222222FF re-color posting-bg-col#
$FFFFBBFF re-text-color link-blue
$88FF88FF re-text-color re-green
......@@ -40,6 +42,10 @@ $202020C0 re-color log-bg
$408040FF re-color send-color
$333333FF re-color users-color#
$000000CC re-color album-bg-col#
$88FF88FF re-color my-signal
$CCFFCCFF re-color other-signal
$CC00CCFF re-color my-signal-otr
$880088FF re-color other-signal-otr
8 0 [DO]
imports#rgb-bg [I] sfloats + sf@ floor f>s to color,#
......@@ -58,3 +64,4 @@ $33EE33FF
text-color, fdrop
[LOOP]
dark-gui
to color,#
......@@ -173,6 +173,7 @@ $000000FF dup text-emoji-color: black-emoji
$000000FF new-color, FValue otr-col#
$FFFFFFFF new-color, FValue chat-col#
$80FFFFFF new-color, FValue chat-bg-col#
$70eFeFFF new-color, FValue chat-hist-col#
$FFFFFFFF new-color, FValue posting-bg-col#
: entropy-colorize ( -- )
......@@ -1163,25 +1164,131 @@ wmsg-o >o msg-table @ token-table ! o>
: >ymd ( ticks -- year month day )
64>f 1n f* >day fdrop unix-day0 + day2ymd ;
: day'>i ( day -- index )
#86400 * #1000000000 um* d>64 date>i ;
: day>i ( year month day -- index )
ymd2day unix-day0 - day'>i ;
: month>i ( year month -- index )
1 day>i ;
: quartal>i ( quartal -- index )
4 /mod swap 3 * 1+ month>i ;
: year>i ( year -- index )
1 1 ymd2day unix-day0 - #86400 * #1000000000 um* d>64 date>i ;
1 month>i ;
: +years ( end start -- o maxyear ) { | maxyear }
>r 1+ >r
0 Value chat-history
: closer ( -- o closer )
{{
\Large
{{ s" " $444444FF new-color, }}text }}h 25%b
dup { closer } /right
glue*ll }}glue
}}v box[] closer ;
: closerz ( o -- o )
>r {{ r>
closer { closer }
}}z box[] >r
closer [: data chat-history .childs[] del$cell
data .dispose-widget +resize +sync ;] r@ click[] drop
r> ;
: }}closerh ( o1 .. on -- o )
s" " $444444FF new-color, }}text dup { closer }
}}h box[] >r
closer [: data chat-history .childs[] del$cell
data .dispose-widget +resize +sync ;] r@ click[] drop
r> ;
: log-data { endi starti -- }
msg-log@ { log u } msgs-box { box }
{{ }}v box[] dup to msgs-box
closerz chat-history .child+
log u starti cells safe/string endi starti - cells umin bounds U+DO
I log - cell/ to log#
I $@ { d: msgt }
msgt ['] msg-tdisplay wmsg-o .catch nothrow IF
<err> ." invalid entry" cr <default> 2drop
THEN
cell +LOOP +resize +sync
box to msgs-box
log free throw ;
: +days ( end start -- o )
>r >r
{{
\Large \sans \bold
glue*ll }}glue
i' unix-day0 + day2ymd drop <# '-' hold 0 # # 2drop '-' hold 0 #s #> }}text
r> r> DO
I 1+ year>i I year>i - dup maxyear umax to maxyear
IF I 0 <# #s #> day-color x-color blackish }}button-lit THEN
I 1+ day'>i I day'>i - IF
I unix-day0 + day2ymd nip nip
<# 0 # # #> day-color x-color blackish }}button-lit
[: data 1+ day'>i data day'>i log-data ;] I click[]
THEN
LOOP
glue*ll }}glue
}}closerh ;
: +months ( year end start -- o )
>r 1+ >r { year }
{{
\Large \sans \bold
glue*ll }}glue
year 0 <# '-' hold #s #> }}text
r> r> DO
year I 1+ month>i year I month>i - IF
I 0 <# # # #> day-color x-color blackish }}button-lit
[: data #12 /mod { m y }
y m 2 + month>i
y m 1 + month>i -
IF
y m 2 + 1 ymd2day unix-day0 -
y m 1 + 1 ymd2day unix-day0 - +days
chat-history .child+ +resize +sync
ELSE
." print chat log directly" cr
THEN
;] I 1- year 12 * + click[]
THEN
LOOP
glue*ll }}glue
}}h box[] maxyear ;
: +months ( end start -- )
}}closerh ;
: +quartals ( year end start -- o )
>r 1+ >r { year }
{{
\Large \sans \bold
glue*ll }}glue
year 0 <# '/' hold #s #> }}text
r> r> DO
I year 4 * + quartal>i
I 1- year 4 * + quartal>i - IF
I 0 <# #s 'Q' hold #> day-color x-color blackish }}button-lit
[:
data 1+ quartal>i data quartal>i -
IF
data 4 /mod swap dup 2* + dup 3 + swap 1+ +months
chat-history .child+ +resize +sync
ELSE
." print chat log directly" cr
THEN
;] I 1- year 2* 2* + click[]
THEN
LOOP
glue*ll }}glue
}}closerh ;
: +years ( end start -- o ) { | lastyear }
>r 1+ >r
{{
\Large \sans \bold
glue*ll }}glue
r> r> DO
I 0 <# #s #> day-color x-color blackish }}button-lit
I 1+ year>i I year>i -
IF I lastyear - dup #100 u>= IF lastyear + THEN
0 <# #s #> day-color x-color blackish }}button-lit
[: data 1+ year>i data year>i - gui-msgs# u> IF
data 4 1 +quartals chat-history .child+ +resize +sync
ELSE
." print chat log directly" cr
THEN
;] I click[]
THEN
I #100 / #100 * to lastyear
LOOP
glue*ll }}glue
}}h box[] ;
......@@ -1190,17 +1297,18 @@ wmsg-o >o msg-table @ token-table ! o>
u gui-msgs# cells u<= IF 0 EXIT THEN
log u cell- 0 max + $@ startdate@ { 64: endd }
log $@ startdate@ { 64: std }
{{ \Large
{{
glue*l chat-hist-col# font-size# 40% f* }}frame dup .button3
{{
endd >ymd 2drop
std >ymd 2drop 2dup <> IF
+years gui-msgs# u> IF
12 1 +months
THEN
+years
ELSE 2drop
endd >ymd drop nip
std >ymd drop nip +months
endd >ymd drop 1- 3 / 1+
std >ymd drop nip 1- 3 / 1+ +quartals
THEN
}}v box[] ;
}}v box[] dup to chat-history
}}z box[] ;
: (gui-msgs) ( gaddr u -- )
reset-time
......@@ -1330,15 +1438,10 @@ Variable gui-log[]
{{
gui-log[] [: }}text /left ;] $[]map
}}v box[] 25%b \regular
{{
{{ s" " $444444FF new-color, }}text }}h 25%b
dup { closer } /right
glue*ll }}glue
}}v box[]
closer { closer }
}}z box[] >r
closer [: data msgs-box .childs[] del$cell
data .dispose-widget
re-msg-box ;] r@ click[] drop
data .dispose-widget re-msg-box ;] r@ click[] drop
r> msgs-box .child+ re-msg-box
THEN ;
......@@ -1530,7 +1633,7 @@ forth-local-indent-words:
(
(("net2o:" "+net2o:") (0 . 2) (0 . 2) non-immediate)
(("{{") (0 . 2) (0 . 2) immediate)
(("}}h" "}}v" "}}z" "}}vp" "}}p") (-2 . 0) (-2 . 0) immediate)
(("}}h" "}}closerh" "}}v" "}}z" "}}vp" "}}p") (-2 . 0) (-2 . 0) immediate)
)
End:
[THEN]
......@@ -1668,6 +1668,9 @@ umethod /imgs ( addr u -- )
umethod /rescan# ( addr u -- )
\U rescan# rescan for hashes
\G rescan#: search the entire chat log for hashes and if you have them
umethod /connections ( addr u -- )
\U connections list active connections
\G connections: list active connections
end-class chat-cmds
chat-cmds new Constant text-chat-cmd-o
......@@ -1818,6 +1821,11 @@ msg:troll# 't' permchar>bits + c!
:noname ( addr u -- )
2drop -1 [IFDEF] android android:level# [ELSE] level# [THEN] +! ; is /bye
:noname ( addr u -- )
2drop [:
remote-host$ $. ." @" pubkey $@ .simple-id ." :" forth:cr
true ;] search-context ; is /connections
}scope
: ?slash ( addr u -- addr u flag )
......
......@@ -532,6 +532,7 @@ in net2o : new-code ( addrs addrd u -- )
addrd >dest-map @ ?EXIT
net2o:new-context >o rdrop setup! THEN
msg( ." code map: " addrs x64. ." own: " addrd x64. u hex. cr )
$remote-host $@ remote-host$ $!
>code-flag on
addrd u addr code-rmap map-code-dest
addrs u map-source to code-map ;
......
# Commands #
Version 0.9.7-20200116.
Version 0.9.7-20200123.
net2o separates data and commands. Data is passed through to higher
layers, commands are interpreted when they arrive. For connection
......@@ -148,6 +148,8 @@ Commands are context-sensitive in an OOP method hierarchy sense.
* $49 tmp-secret, ( -- )
* $4A qr-challenge ( $:challenge $:respose -- )
* $4B invite-result ( flag -- )
* $4C set-host ( $:host -- )
* $4D get-host ( -- )
### connection commands ###
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment