~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/Typeset/Env/env_length.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA
  • Date: 2010-04-23 07:09:40 UTC
  • mfrom: (4.1.8 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100423070940-72mjdmdepfgrvo8f
Tags: 1:1.0.7.4-2
Re-upload, former upload failed with wrong diff.gz perhaps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
bool
22
22
edit_env_rep::is_length (string s) {
23
23
  int i;
24
 
  for (i=0; (i<N(s)) && ((s[i]<'a') || (s[i]>'z')); i++);
 
24
  for (i=0; (i<N(s)) && ((s[i]<'a') || (s[i]>'z')); i++) {}
25
25
  return is_double (s (0, i)) && is_locase_alpha (s (i, N(s)));
26
26
}
27
27
 
123
123
    string s= t->label;
124
124
    int start= 0, i, n=N(s);
125
125
    while ((start+1<n) && (s[start]=='-') && (s[start+1]=='-')) start += 2;
126
 
    for (i=start; (i<n) && ((s[i]<'a') || (s[i]>'z')); i++);
 
126
    for (i=start; (i<n) && ((s[i]<'a') || (s[i]>'z')); i++) {}
127
127
    string s1= s (start, i);
128
128
    string s2= s (i, n);
129
129
    if (!(is_double (s1) && is_locase_alpha (s2))) return tree (TMLEN, "0");