Subversion Repositories svn1-original

Rev

Rev 1 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 31
Line 172... Line 172...
172
 *      Time entered
172
 *      Time entered
173
 *      Will return an illegal time if the entry is not complete
173
 *      Will return an illegal time if the entry is not complete
174
 *
174
 *
175
 *========================================================================*/
175
 *========================================================================*/
176
 
176
 
177
time_t get_time(time_t tim)
177
time_t get_time(time_t utim)
178
{
178
{
179
    char        c;                              /* One of those */
179
    char        c;                              /* One of those */
180
    int         i = 0;                          /* Counts user input */
180
    int         i = 0;                          /* Counts user input */
181
    int         maxi = 0;                       /* Max user input */
181
    int         maxi = 0;                       /* Max user input */
182
    static char buf[] = "00:00:00";             /* Build up a string here */
182
    static char buf[] = "00:00:00";             /* Build up a string here */
Line 185... Line 185...
185
 
185
 
186
    /*
186
    /*
187
    **  Insert the base time into the edit buffer
187
    **  Insert the base time into the edit buffer
188
    **  Invalid times are treated as 00:00:00
188
    **  Invalid times are treated as 00:00:00
189
    */
189
    */
190
    if ( tim && tim != -1L )
190
    if ( utim == -1L )
-
 
191
    {
-
 
192
        utim = 0;
-
 
193
    }
-
 
194
    
191
    {
195
    {
192
        char * ctime;
196
        char * ctime;
193
        ctime = time_a(tim);
197
        ctime = time_a(utim);
194
        if ( ctime[0] != '*' )
198
        if ( ctime[0] != '*' )
195
            memcpy( buf, ctime, sizeof(buf)-1);
199
            memcpy( buf, ctime, sizeof(buf)-1);
-
 
200
        else
-
 
201
            memcpy( buf, "00:00:00", sizeof(buf)-1);
196
    }
202
    }
197
 
203
 
198
    /*
204
    /*
199
    **  Edit the string
205
    **  Edit the string
200
    */
206
    */