~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/time/timestamp_diff.cc

  • Committer: Eric Herman
  • Date: 2008-12-06 19:42:46 UTC
  • mto: (656.1.6 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206194246-5cdexuu81i366eek
removed trailing whitespace with simple script:

for file in $(find . -name "*.c") $(find . -name "*.cc") $(find . -name "*.h"); do ruby -pe 'gsub(/\s+$/, $/)' < $file > $file.out; mv $file.out $file; done;

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
  long months= 0;
30
30
  int neg= 1;
31
31
 
32
 
  null_value= 0;  
 
32
  null_value= 0;
33
33
  if (args[0]->get_date(&ltime1, TIME_NO_ZERO_DATE) ||
34
34
      args[1]->get_date(&ltime2, TIME_NO_ZERO_DATE))
35
35
    goto null_date;
100
100
    return months/3*neg;
101
101
  case INTERVAL_MONTH:
102
102
    return months*neg;
103
 
  case INTERVAL_WEEK:          
 
103
  case INTERVAL_WEEK:
104
104
    return seconds/86400L/7L*neg;
105
 
  case INTERVAL_DAY:            
 
105
  case INTERVAL_DAY:
106
106
    return seconds/86400L*neg;
107
 
  case INTERVAL_HOUR:           
 
107
  case INTERVAL_HOUR:
108
108
    return seconds/3600L*neg;
109
 
  case INTERVAL_MINUTE:         
 
109
  case INTERVAL_MINUTE:
110
110
    return seconds/60L*neg;
111
 
  case INTERVAL_SECOND:         
 
111
  case INTERVAL_SECOND:
112
112
    return seconds*neg;
113
113
  case INTERVAL_MICROSECOND:
114
114
    /*
141
141
  case INTERVAL_MONTH:
142
142
    str->append(STRING_WITH_LEN("MONTH"));
143
143
    break;
144
 
  case INTERVAL_WEEK:          
 
144
  case INTERVAL_WEEK:
145
145
    str->append(STRING_WITH_LEN("WEEK"));
146
146
    break;
147
 
  case INTERVAL_DAY:            
 
147
  case INTERVAL_DAY:
148
148
    str->append(STRING_WITH_LEN("DAY"));
149
149
    break;
150
150
  case INTERVAL_HOUR:
151
151
    str->append(STRING_WITH_LEN("HOUR"));
152
152
    break;
153
 
  case INTERVAL_MINUTE:         
 
153
  case INTERVAL_MINUTE:
154
154
    str->append(STRING_WITH_LEN("MINUTE"));
155
155
    break;
156
156
  case INTERVAL_SECOND:
157
157
    str->append(STRING_WITH_LEN("SECOND"));
158
 
    break;              
 
158
    break;
159
159
  case INTERVAL_MICROSECOND:
160
160
    str->append(STRING_WITH_LEN("SECOND_FRAC"));
161
161
    break;