Changeset 697cdd98 in rtems


Ignore:
Timestamp:
Jul 29, 2008, 9:17:28 AM (11 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.9, master
Children:
8d52ad5c
Parents:
34b90a86
Message:

Add prototypes. Remove misc. C++-code pollution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/telnetd/pty.c

    r34b90a86 r697cdd98  
    3131/* #define DEBUG DEBUG_WH */
    3232
    33 #ifdef __cplusplus
    34 extern "C" {
    35 #endif
    3633/*-----------------------------------------*/
    3734#include <termios.h>
     
    4340#include <errno.h>
    4441#include <sys/socket.h>
    45 #ifdef __cplusplus
    46 };
    47 #endif
    4842/*-----------------------------------------*/
    4943#include <stdio.h>
     
    9084 int                       height;
    9185};
    92 
    93 
    94 #ifdef __cplusplus
    95 extern "C" {
    96 #endif
    9786
    9887
     
    470459}
    471460
    472 static int pty_do_finalize()
    473 {
    474 int ndx;
    475 rtems_status_code status;
     461static int pty_do_finalize(void)
     462{
     463    int ndx;
     464    rtems_status_code status;
    476465
    477466    if ( !telnet_pty_inited )
     
    644633/*-----------------------------------------------------------*/
    645634
    646 static int pty_do_initialize()
     635static int pty_do_initialize(void)
    647636{
    648637  if ( !telnet_pty_inited ) {
     
    655644}
    656645
    657 #ifdef __cplusplus
    658 
    659 class TelnetPtyIni {
    660 public:
    661   TelnetPtyIni() {
    662     if (!nest++) {
    663       pty_do_initialize();
    664     }
    665   }
    666 
    667   ~TelnetPtyIni() {
    668     if (!--nest) {
    669       pty_do_finalize();
    670     }
    671   }
    672 private:
    673   static int nest;
    674 };
    675 
    676 static TelnetPtyIni onlyInst;
    677 int    TelnetPtyIni::nest=0;
    678 
    679 int telnet_pty_initialize()
    680 {
    681   return telnet_pty_inited;
    682 }
    683 
    684 int telnet_pty_finalize()
    685 {
    686   return telnet_pty_inited;
    687 }
    688 };
    689 #else
    690 int telnet_pty_initialize()
     646int telnet_pty_initialize(void)
    691647{
    692648  return pty_do_initialize();
    693649}
    694650
    695 int telnet_pty_finalize()
     651int telnet_pty_finalize(void)
    696652{
    697653  return pty_do_finalize();
    698654}
    699 #endif
Note: See TracChangeset for help on using the changeset viewer.