functions.php
changeset 13 b5db2345c397
parent 9 63a257541313
child 14 7a1573676cc4
equal deleted inserted replaced
12:b3fcc21e557f 13:b5db2345c397
    38 
    38 
    39 function status($msg)
    39 function status($msg)
    40 {
    40 {
    41   $h = @fopen('php://stderr', 'w');
    41   $h = @fopen('php://stderr', 'w');
    42   fwrite($h, "\x1B[32;1m[Greyhound] \x1B[32;0m$msg\x1B[0m\n");
    42   fwrite($h, "\x1B[32;1m[Greyhound] \x1B[32;0m$msg\x1B[0m\n");
       
    43   fclose($h);
       
    44 }
       
    45 
       
    46 /**
       
    47  * Print a stylized warning message, compatible with Linux consoles
       
    48  * @param string message message
       
    49  */
       
    50 
       
    51 function warning($msg)
       
    52 {
       
    53   $h = @fopen('php://stderr', 'w');
       
    54   fwrite($h, "\x1B[33;1m[Greyhound] \x1B[0m\x1B[33mWarning:\x1B[0m $msg\n");
    43   fclose($h);
    55   fclose($h);
    44 }
    56 }
    45 
    57 
    46 /**
    58 /**
    47  * Performs an action with DCOP.
    59  * Performs an action with DCOP.