Browse Source

fixed all

Ondřej Hruška 1 year ago
parent
commit
04afe9b44a
Signed by: Ondřej Hruška <ondra@ondrovo.com> GPG key ID: 2C5FD5035250423D
3 changed files with 17 additions and 18 deletions
  1. 1 1
      fig.gex-descriptors.tex
  2. BIN
      thesis.pdf
  3. 16 17
      undash.php

+ 1 - 1
fig.gex-descriptors.tex View File

@@ -134,5 +134,5 @@ Device Descriptor:
134 134
 \end{verbatim}
135 135
 \end{minipage}\vspace{-1em}
136 136
 \begin{figure}[H]
137
-	\caption{\label{fig:gex-descriptors}USB descriptors of a GEX prototype obtained using ``\mono{lsusb}''}
137
+	\caption{\label{fig:gex_descriptors}USB descriptors of a GEX prototype obtained using ``\mono{lsusb}''}
138 138
 \end{figure}

BIN
thesis.pdf View File


+ 16 - 17
undash.php View File

@@ -1,25 +1,24 @@
1 1
 <?php
2 2
 
3
-if (count($argv)==1) die("no file\n");
3
+array_shift($argv);
4 4
 
5
-foreach($argv as $i => $value) {
6
-	if ($i == 0) continue;
7
-	if(!file_exists($value)) die("no file ".$value."\n");
5
+if (count($argv)==0) die("no file\n");
6
+
7
+foreach($argv as $value) {
8
+  if(!file_exists($value)) die("no file ".$value."\n");
8 9
 }
9 10
 
10 11
 
11
-foreach($argv as $i => $value) {
12
-	if ($i == 0) continue;
13
-	
14
-	echo "Cleaning $value\n";
15
-	
16
-	$content = file_get_contents($value);
17
-		
18
-	$pat = '/(\\\\(?:label|cref|Cref|ref))\\{([^}]+)\\}/';
19
-	$fixed = preg_replace_callback($pat, function($match) {
20
-		return $match[1] . '{' . trim(str_replace('-', '_', $match[2])) . '}';
21
-	}, $content);
22
-	
23
-	file_put_contents($value, $fixed);
12
+foreach($argv as $value) {  
13
+  echo "Cleaning $value\n";
14
+  
15
+  $content = file_get_contents($value);
16
+    
17
+  $pat = '/(\\\\(?:label|cref|Cref|ref))\\{([^}]+)\\}/';
18
+  $fixed = preg_replace_callback($pat, function($match) {
19
+    return $match[1] . '{' . trim(str_replace('-', '_', $match[2])) . '}';
20
+  }, $content);
21
+  
22
+  file_put_contents($value, $fixed);
24 23
 }
25 24
 echo "OK.\n";