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

Bump version number

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