File: get_stats.C

package info (click to toggle)
peruser 4b33-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,952 kB
  • ctags: 1,064
  • sloc: cpp: 22,367; perl: 2,733; makefile: 345; sh: 335
file content (28 lines) | stat: -rw-r--r-- 582 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
#include <stdlib.h>
#include <stdio.h>

#include "npfile.h"
#include "npstringarray.h"
#include "npgroup.h"
#include "npnode.h"

int NP_Node::get_stats( int *groupsp, int *messagesp, int *unseenp,
                        int *requestedp, int *headersp )
{
   if ( groupsp != NULL )
      *groupsp = total_groups;

   if ( messagesp != NULL )
      *messagesp = total_messages;

   if ( unseenp != NULL )
      *unseenp = total_unseen;

   if ( headersp != NULL )
      *headersp = total_headers;

   if ( requestedp != NULL )
      *requestedp = total_requested;
   
   return 0;
}