about summary refs log tree commit diff
path: root/src/libterm/terminfo/parser
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-25 17:06:52 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-26 12:10:22 -0700
commit43bfaa4a336095eb5697fb2df50909fd3c72ed14 (patch)
treee10610e1ce9811c89e1291b786d7a49b63ee02d9 /src/libterm/terminfo/parser
parent54f16b818b58f6d6e81891b041fc751986e75155 (diff)
downloadrust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.tar.gz
rust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.zip
Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
Diffstat (limited to 'src/libterm/terminfo/parser')
-rw-r--r--src/libterm/terminfo/parser/compiled.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libterm/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs
index 8d0a9e6e971..01d191f3014 100644
--- a/src/libterm/terminfo/parser/compiled.rs
+++ b/src/libterm/terminfo/parser/compiled.rs
@@ -189,31 +189,31 @@ pub fn parse(file: &mut Read, longnames: bool)
                            0x011A_usize, magic as usize));
     }
 
-    let names_bytes          = try!(read_le_u16(file)) as int;
-    let bools_bytes          = try!(read_le_u16(file)) as int;
-    let numbers_count        = try!(read_le_u16(file)) as int;
-    let string_offsets_count = try!(read_le_u16(file)) as int;
-    let string_table_bytes   = try!(read_le_u16(file)) as int;
+    let names_bytes          = try!(read_le_u16(file)) as isize;
+    let bools_bytes          = try!(read_le_u16(file)) as isize;
+    let numbers_count        = try!(read_le_u16(file)) as isize;
+    let string_offsets_count = try!(read_le_u16(file)) as isize;
+    let string_table_bytes   = try!(read_le_u16(file)) as isize;
 
     assert!(names_bytes          > 0);
 
-    if (bools_bytes as uint) > boolnames.len() {
+    if (bools_bytes as usize) > boolnames.len() {
         return Err("incompatible file: more booleans than \
                     expected".to_string());
     }
 
-    if (numbers_count as uint) > numnames.len() {
+    if (numbers_count as usize) > numnames.len() {
         return Err("incompatible file: more numbers than \
                     expected".to_string());
     }
 
-    if (string_offsets_count as uint) > stringnames.len() {
+    if (string_offsets_count as usize) > stringnames.len() {
         return Err("incompatible file: more string offsets than \
                     expected".to_string());
     }
 
     // don't read NUL
-    let bytes = try!(read_exact(file, names_bytes as uint - 1));
+    let bytes = try!(read_exact(file, names_bytes as usize - 1));
     let names_str = match String::from_utf8(bytes) {
         Ok(s)  => s,
         Err(_) => return Err("input not utf-8".to_string()),
@@ -230,7 +230,7 @@ pub fn parse(file: &mut Read, longnames: bool)
         for i in 0..bools_bytes {
             let b = try!(read_byte(file));
             if b == 1 {
-                bools_map.insert(bnames[i as uint].to_string(), true);
+                bools_map.insert(bnames[i as usize].to_string(), true);
             }
         }
     }
@@ -244,7 +244,7 @@ pub fn parse(file: &mut Read, longnames: bool)
         for i in 0..numbers_count {
             let n = try!(read_le_u16(file));
             if n != 0xFFFF {
-                numbers_map.insert(nnames[i as uint].to_string(), n);
+                numbers_map.insert(nnames[i as usize].to_string(), n);
             }
         }
     }
@@ -259,7 +259,7 @@ pub fn parse(file: &mut Read, longnames: bool)
 
         let string_table = try!(read_exact(file, string_table_bytes as usize));
 
-        if string_table.len() != string_table_bytes as uint {
+        if string_table.len() != string_table_bytes as usize {
             return Err("error: hit EOF before end of string \
                         table".to_string());
         }
@@ -285,13 +285,13 @@ pub fn parse(file: &mut Read, longnames: bool)
 
 
             // Find the offset of the NUL we want to go to
-            let nulpos = string_table[offset as uint .. string_table_bytes as uint]
+            let nulpos = string_table[offset as usize .. string_table_bytes as usize]
                 .iter().position(|&b| b == 0);
             match nulpos {
                 Some(len) => {
                     string_map.insert(name.to_string(),
-                                      string_table[offset as uint ..
-                                                   (offset as uint + len)].to_vec())
+                                      string_table[offset as usize ..
+                                                   (offset as usize + len)].to_vec())
                 },
                 None => {
                     return Err("invalid file: missing NUL in \