You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
469 B
33 lines
469 B
15 years ago
|
#!/usr/bin/perl
|
||
|
#
|
||
|
# Copyright (C) 2003 by Virtusa Corporation
|
||
|
# http://www.virtusa.com
|
||
|
#
|
||
|
# Anuradha Ratnaweera
|
||
|
# http://www.linux.lk/~anuradha/
|
||
|
#
|
||
|
|
||
|
# We first read all the input into an array and join
|
||
|
# it to a single string with newlines.
|
||
|
|
||
|
use Curses;
|
||
|
|
||
|
initscr();
|
||
|
|
||
|
@lines = <>;
|
||
|
$lines = join "", @lines;
|
||
|
|
||
|
while ($lines =~ /\G(.*?)(\/\*.*?\*\/)?/gs) {
|
||
|
addstr($1);
|
||
|
if ($2) {
|
||
15 years ago
|
attron(A_BOLD);
|
||
|
addstr($2);
|
||
|
attroff(A_BOLD);
|
||
15 years ago
|
}
|
||
|
}
|
||
|
|
||
|
refresh();
|
||
|
getch();
|
||
|
endwin();
|
||
|
|