1. C++ / Говнокод #28581

    0

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    /*++
    
    
        Intel Corporation Proprietary Information
        Copyright (c) 1995 Intel Corporation
    
        This listing is supplied under the terms of a license agreement with
        Intel Corporation and may not be used, copied, nor disclosed except in
        accordance with the terms of that agreeement.
    
    
    Module Name:
    
        addrconv.c
    
    Abstract:
    
        This module contains the address conversion routines from the
        winsock2 API. This module contains the following functions.
    
        htonl()
        htons()
        ntohl()
        ntohs()
        inet_addr()
        inet_ntoa()
        WSAHtonl()
        WSAHtons()
        WSANtohl()
        WSANtohs()
    
    
    Author:
    
        Dirk Brandewie [email protected]  14-06-1995
    
    [Environment:]
    
    [Notes:]
    
    Revision History:
    
        22-Aug-1995 [email protected]
            Cleanup after code review. Moved includes to precomp.h
    
    --*/
    
    #include "precomp.h"
    
    // these defines are used to check if address parts are in range
    #define MAX_EIGHT_BIT_VALUE       0xff
    #define MAX_SIXTEEN_BIT_VALUE     0xffff
    #define MAX_TWENTY_FOUR_BIT_VALUE 0xffffff
    
    // Defines for different based numbers in an address
    #define BASE_TEN     10
    #define BASE_EIGHT   8
    #define BASE_SIXTEEN 16
    
    //
    // Macros for swapping the bytes in a long and a short.
    //
    
    #define SWAP_LONG(l)                                \
                ( ( ((l) >> 24) & 0x000000FFL ) |       \
                  ( ((l) >>  8) & 0x0000FF00L ) |       \
                  ( ((l) <<  8) & 0x00FF0000L ) |       \
                  ( ((l) << 24) & 0xFF000000L ) )
    
    #define WS_SWAP_SHORT(s)                            \
                ( ( ((s) >> 8) & 0x00FF ) |             \
                  ( ((s) << 8) & 0xFF00 ) )
    
    //
    // This preinitialized array defines the strings to be used for
    // inet_ntoa.  The index of each row corresponds to the value for a byte
    // in an IP address.  The first three bytes of each row are the
    // char/string value for the byte, and the fourth byte in each row is
    // the length of the string required for the byte.  This approach
    // allows a fast implementation with no jumps.
    //
    
    BYTE NToACharStrings[][4] = {
        '0', 'x', 'x', 1,
        '1', 'x', 'x', 1,
        '2', 'x', 'x', 1,
        '3', 'x', 'x', 1,
        '4', 'x', 'x', 1,
        '5', 'x', 'x', 1,
        '6', 'x', 'x', 1,
        '7', 'x', 'x', 1,
        '8', 'x', 'x', 1,
        '9', 'x', 'x', 1,
        '1', '0', 'x', 2,
        '1', '1', 'x', 2,
        '1', '2', 'x', 2,
        '1', '3', 'x', 2,
        '1', '4', 'x', 2,
        '1', '5', 'x', 2,
        '1', '6', 'x', 2,

    голубой ёбаный, иди на хуй отсюда

    Запостил: cepreu_monoJlb, 02 Февраля 2023

    Комментарии (0) RSS

    Добавить комментарий

    Ошибка компиляции комментария:
    1. Гости могут высказаться только во вторник, пятницу или субботу
    ava Семь раз отмерь — один отрежь, guest!
    А не использовать ли нам bbcode?
    • [b]жирный[/b] — жирный
    • [i]курсив[/i] — курсив
    • [u]подчеркнутый[/u] — подчеркнутый
    • [s]перечеркнутый[/s] — перечеркнутый
    • [blink]мигающий[/blink] — мигающий
    • [color=red]цвет[/color] — цвет (подробнее)
    • [size=20]размер[/size] — размер (подробнее)
    • [code=<language>]some code[/code] (подробнее)
    Проверочный код