<commit_before>/*
 * Worldvisions Weaver Software:
 *   Copyright (C) 1997-2001 Net Integration Technologies, Inc.
 *
 * Re-write of wvpapsecrets.h.  This one supports CHAP as well, and is also
 * much safer.
 */

#ifndef __WVPAPCHAP_H
#define __WVPAPCHAP_H

#include "wvconf.h"
#include "wvlinklist.h"
#include "wvstring.h"

#define PAP_SECRETS	"/etc/ppp/pap-secrets"
#define CHAP_SECRETS	"/etc/ppp/chap-secrets"
#define REMOTE_SECRET	"wvdial"

class WvPapChap
/*************/
{
public:
    WvPapChap()
    	: pap_success( true ), chap_success( true ) {}
    ~WvPapChap() {}

    void put_secret( WvString _username, WvString _password, WvString _remote );
    bool isok_pap() const
    	{ return( pap_success ); }
    bool isok_chap() const
    	{ return( chap_success ); }

private:
    WvStringList contents;
    bool	 pap_success;
    bool	 chap_success;

    bool load_file( char * filename );
    bool write_file( char * filename );
    void do_secret( const char * username, const char * password,
		    const char * remote );
};

#endif __WVPAPCHAP_H<commit_msg>Fixed some header files for portability.  Always use comments rather than bare words after '#endif' if you're going to use anything at all.<commit_after>/*
 * Worldvisions Weaver Software:
 *   Copyright (C) 1997-2001 Net Integration Technologies, Inc.
 *
 * Re-write of wvpapsecrets.h.  This one supports CHAP as well, and is also
 * much safer.
 */

#ifndef __WVPAPCHAP_H
#define __WVPAPCHAP_H

#include "wvconf.h"
#include "wvlinklist.h"
#include "wvstring.h"

#define PAP_SECRETS	"/etc/ppp/pap-secrets"
#define CHAP_SECRETS	"/etc/ppp/chap-secrets"
#define REMOTE_SECRET	"wvdial"

class WvPapChap
/*************/
{
public:
    WvPapChap()
    	: pap_success( true ), chap_success( true ) {}
    ~WvPapChap() {}

    void put_secret( WvString _username, WvString _password, WvString _remote );
    bool isok_pap() const
    	{ return( pap_success ); }
    bool isok_chap() const
    	{ return( chap_success ); }

private:
    WvStringList contents;
    bool	 pap_success;
    bool	 chap_success;

    bool load_file( char * filename );
    bool write_file( char * filename );
    void do_secret( const char * username, const char * password,
		    const char * remote );
};

#endif // __WVPAPCHAP_H
{'fraction_non_alphanumeric': 0.11624834874504623, 'fraction_numerical': 0.007045354469396741, 'mean_word_length': 3.608519269776876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2698341', 'n_tokens_mistral': 853, 'n_tokens_neox': 805, 'n_words': 219}