Ignore:
Timestamp:
Feb 8, 2010, 2:27:22 AM (10 years ago)
Author:
Sam Hocevar
Message:

Large source code cleanup, getting rid of spaces, tabs, and svn keywords.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/examples/www/import.php

    r3271 r4333  
    1212 *
    1313 *  This file is a Php port of "examples/import.c"
    14  *  which is: 
     14 *  which is:
    1515 *  Copyright (c) 2006 Jean-Yves Lamoureux <jylam@lnxscene.org>
    1616 *                All Rights Reserved
    17  *
    18  *  $Id$
    1917 *
    2018 *  This program is free software. It comes without any warranty, to
     
    5048<select name="format" id="format" onchange="update_preview(this);">
    5149<?php
    52         foreach($imports as $import_format => $name)
    53         {
    54                 ?><option value="<?= htmlspecialchars($import_format) ?>"<?=
    55                         ($format == $import_format) ? ' selected="selected"' : '' ?>><?=
    56                         htmlspecialchars($name . " (" . $import_format . ")") ?></option><?php
    57         }
     50    foreach($imports as $import_format => $name)
     51    {
     52        ?><option value="<?= htmlspecialchars($import_format) ?>"<?=
     53            ($format == $import_format) ? ' selected="selected"' : '' ?>><?=
     54            htmlspecialchars($name . " (" . $import_format . ")") ?></option><?php
     55    }
    5856?>
    5957</select>
     
    6563if($file)
    6664{
    67         $cv = caca_create_canvas(0, 0);
    68         if(! $cv)
    69         {
    70                 die("Can't create canvas\n");
    71         }
    72        
    73         if(caca_import_file($cv, $file, ($format == NULL) ? "" : $format) < 0)
    74         {
    75                 die("could not import `" . htmlspecialchars($filename) . "'.\n");
    76         }
    77        
    78         echo caca_export_string($cv, "html3");
     65    $cv = caca_create_canvas(0, 0);
     66    if(! $cv)
     67    {
     68        die("Can't create canvas\n");
     69    }
     70
     71    if(caca_import_file($cv, $file, ($format == NULL) ? "" : $format) < 0)
     72    {
     73        die("could not import `" . htmlspecialchars($filename) . "'.\n");
     74    }
     75
     76    echo caca_export_string($cv, "html3");
    7977}
    8078else
    8179{
    82         ?>See the <a href="export.php">libcaca export test program</a> for an <a
     80    ?>See the <a href="export.php">libcaca export test program</a> for an <a
    8381href="export.php?format=caca">example file</a>.<?php
    8482}
Note: See TracChangeset for help on using the changeset viewer.