File: save_error.C

package info (click to toggle)
peruser 4b33-10
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,944 kB
  • ctags: 1,064
  • sloc: cpp: 22,397; perl: 2,733; makefile: 345; sh: 335
file content (39 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "npfile.h"
#include "npstringarray.h"
#include "npauthentication.h"

void NP_Authentication::save_error( int i )
{
   strcpy( error_message, "NP_Authentication: " );
   
   switch( i )
   {
   case 0:
      strcat( error_message, temp_file.get_error() );
      break;

   case 1:
      strcat( error_message, config_file.get_error() );
      break;

   case 2:
      strcat( error_message, user_list.get_error() );
      break;

   case 3:
      strcat( error_message, pass_list.get_error() );
      break;
      
   default:
      break;
   }

   temp_file.close();
   config_file.close();

   return;
}