--- main_loop.bak 2022-10-01 08:40:34.740558153 +0200 +++ main_loop.c 2022-10-02 08:34:00.129357959 +0200 @@ -488,11 +488,20 @@ static int exec_command( const char ** const ibufpp, const int prev_status, const bool isglobal ) { + /* HG */ + char *s; + static char obufp['z' - 'a' +1][30]; + /* HG. */ const char * fnp; /* filename */ - int pflags = 0; /* print suffixes */ + int pflags; + int addr_cnt; int addr, c, n; - const int addr_cnt = extract_addresses( ibufpp ); +/* HG */ +start: +/* HG. */ + addr_cnt = extract_addresses( ibufpp ); + pflags = 0; /* print suffixes */ if( addr_cnt < 0 ) return ERR; *ibufpp = skip_blanks( *ibufpp ); c = *(*ibufpp)++; @@ -598,6 +607,20 @@ if( !move_lines( first_addr, second_addr, addr, isglobal ) ) return ERR; break; + case 'o': c= *(*ibufpp)++; + if( c < 'a' || c > 'z') return ERR; + s= obufp[c - 'a']; + if( **ibufpp == '\n' ){ + printf("%s",s); + *ibufpp= s; + goto start; + } + for( n=0;; n++ ){ + if( n>= (int) sizeof obufp[0] ) return ERR; + s[n]= *(*ibufpp)++; + if(s[n] == '\0') break; + } + break; case 'P': case 'q': case 'Q': if( unexpected_address( addr_cnt ) ||