//*************************************************************************** // // C-REM.VDM (C) C.Z. 1/94 // 17.07.95 // // Aligns C-like comments (beginning with '/*' up to the end of line) // at the cursor position // //*************************************************************************** #0=WH // remember column position of cursor BOL S("/*",NOERR) if(EF){Return(1)} // exit if not found #1=CP // remember position EOL // to end of line (another : F"*/") RCB(0,#1,CP) // remember the comment DB(#1,CP) // and delete it BOL R("|W|>","",NOERR) // delete trailing spaces in that line // hier mit ins_indent !!!!! if (#0>=CN){ // wenn Ziel-Spalten-Position noch nicht erreicht IT(" ",COUNT,#0-CN) // dann entsprechend Leerzeichen einfgen } else{ // yet at the right column IT(" ") // insert only one space as delimiter } RI(0) // insert the saved comment L(1,NOERR) // next line repeat (#0-1){ // to the last column position to prepare for DOV("\CR\") // repetition }