#!/usr/bin/perl use strict; use vars qw ($file $DELAY); ########## CONFIG $file = "lcd4linux"; # .png is appended $DELAY = 0; # delay in seconds # if delay is zero, file is sent when modified. ################# use CGI qw/:push -nph/; $| = 1; my ($mtime, $nmtime, $size, $nsize); (undef, undef, undef, undef, undef, undef, undef, $size, undef, $mtime) = stat "$file.png"; print multipart_init(-boundary=>'----------------here we go!'); while (1) { print multipart_start(-type=>'image/png'); undef $/; open(IN, "$file.png") or die("Can't read '$file.png'"); $_ = ; print $_; close(IN); print multipart_end; if ($DELAY) { sleep $DELAY; } else { W: while (1) { # sleep(1); (undef, undef, undef, undef, undef, undef, undef, $nsize, undef, $nmtime) = stat "$file.png"; if($mtime != $nmtime || $size != $nsize) { $mtime = $nmtime; $size = $nsize; last W; } } } } cCrohan
aboutsummaryrefslogtreecommitdiffstats
path: root/drv_generic_serial.c (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2010-02-23'Fix the huawei e220 at commands' by Jarmichael1-12/+9
2010-02-15drv_picoLCDGraphic.c: minimum USB read timeout is now 1 msmzuther1-1/+1
2010-02-14drv_picoLCDGraphic.c: added configuration for USB read timeoutmzuther1-1/+9
2010-02-14indent.sh runmichael1-172/+171
2010-02-14plugin_huawei-fix-interval-check_V2.patch from Jarmichael1-35/+35
2010-02-12Improved config behavior.mjona1-9/+32
2010-02-12Fixed a segmentation fault bug in cfg_get().mjona1-1/+1
2010-02-11All static memory allocations were turned into dynamical ones.mjona1-128/+200
2010-02-07timer.c: two small optimizations (removed "flag"; tv_usec can't be negative)mzuther1-7/+4
2010-02-07added grouping of widgets by update interval (new file "timer_group.c")mzuther13-168/+441
2010-02-07BUG: handle negative delays in timer_process() (timer.c)mzuther1-0/+4
2010-02-06timer.c: I had forgotten how to initialize a "struct" :)mzuther1-3/+4
2010-02-06BUG: compensate timers for processing delay ("timer.c")mzuther1-1/+3
2010-02-06timer.c: exchanged "proprietary code" with timeradd() and timersub() functionsmzuther1-14/+10
2010-02-04timer.c: removed fruitless changes to variable "flag" from timer_process()mzuther1-2/+0
2010-02-04According to its man page, timercmp() is broken on some systems -- applied th...mzuther1-1/+1
2010-02-04small warning removedmichael1-1/+1
2010-02-04clear errno after creating the FIFO by Claas Hilbrechtmichael1-0/+2