diff --git a/fig.gex-descriptors.tex b/fig.gex-descriptors.tex index 9b86ad0..f046d7e 100644 --- a/fig.gex-descriptors.tex +++ b/fig.gex-descriptors.tex @@ -134,5 +134,5 @@ Device Descriptor: \end{verbatim} \end{minipage}\vspace{-1em} \begin{figure}[H] - \caption{\label{fig:gex-descriptors}USB descriptors of a GEX prototype obtained using ``\mono{lsusb}''} + \caption{\label{fig:gex_descriptors}USB descriptors of a GEX prototype obtained using ``\mono{lsusb}''} \end{figure} diff --git a/thesis.pdf b/thesis.pdf index 2ad3f76..fcb3797 100644 Binary files a/thesis.pdf and b/thesis.pdf differ diff --git a/undash.php b/undash.php index 2cd5927..f988f1e 100644 --- a/undash.php +++ b/undash.php @@ -1,25 +1,24 @@ $value) { - if ($i == 0) continue; - if(!file_exists($value)) die("no file ".$value."\n"); +if (count($argv)==0) die("no file\n"); + +foreach($argv as $value) { + if(!file_exists($value)) die("no file ".$value."\n"); } -foreach($argv as $i => $value) { - if ($i == 0) continue; - - echo "Cleaning $value\n"; - - $content = file_get_contents($value); - - $pat = '/(\\\\(?:label|cref|Cref|ref))\\{([^}]+)\\}/'; - $fixed = preg_replace_callback($pat, function($match) { - return $match[1] . '{' . trim(str_replace('-', '_', $match[2])) . '}'; - }, $content); - - file_put_contents($value, $fixed); +foreach($argv as $value) { + echo "Cleaning $value\n"; + + $content = file_get_contents($value); + + $pat = '/(\\\\(?:label|cref|Cref|ref))\\{([^}]+)\\}/'; + $fixed = preg_replace_callback($pat, function($match) { + return $match[1] . '{' . trim(str_replace('-', '_', $match[2])) . '}'; + }, $content); + + file_put_contents($value, $fixed); } echo "OK.\n";