Waitrud Weber’s blog

things and reminders for memories

windows-make: Memorization:

At the least,for the ensure of memorries work, We care of it, that is on short scope as function. And, our mistakes are going to be reduced.

*

- width height
char*** o -
char** - o
char* - -
- - -
- - -
- - -

*source code

- - -
-

read_csv_000a_014.cpp  File modified time Fri Oct 13 14:52:17 2023

0001 #include <tchar.h>
0002 #include <windows.h>
0003 #include <windowsx.h>
0004 
0005 #include <ctime>
0006 
0007 #include <stdio.h>
0008 #include <stdlib.h>
0009 
0010 #include "Print.h"
0011 #include "array_counter.h"
0012 #include "parse.h"
0013 
0014 #include "log_001.h"
0015 
0016 #include "read_csv_000a_014.h"
0017 
0018 char logmsg[255];
0019 static Logging* log_001;
0020 static LOG_001* dlog_001 = NULL;
0021 
0022 extern char* filename_read_csv_000a_014_ = (char*)"read_csv_000a_014.txt";
0023 
0024 int read_csv_000a_014 ();
0025 int set_read_csv_000a_014 (char** argv, int argc);
0026 int initialize_read_csv_000a_014 (char** argv, int argc);
0027 
0028 int print_log_result_003 (char*** result) ;
0029 int print_log_result_002 (char** result) ;
0030 int print_log_result_001 (char* result) ;
0031 char***    realloc_char_003_01 ( char*** restr, int num ) ;
0032 char**    realloc_char_002_01 ( char** restr, int num ) ;
0033 char***    malloc_char_003_01 ( int num ) ;
0034 char**    malloc_char_002_01 ( int num ) ;
0035 
0036 int memories_height ( int width, int height, char*** mem ) ;
0037 int memories_width ( int from_w_i, int width, int height, char*** mem ) ;
0038 
0039 
0040 int memories_width ( int from_w_i, int width, int height, char*** mem ) {
0041 
0042     int i, j;
0043 
0044     mem = (char***) realloc_char_003_01 ( mem, width );
0045     for ( i = from_w_i; i<width; i++ ) {
0046         mem[i] = (char**) realloc_char_002_01  ( mem[i], height );
0047         print_log_result_002 ( mem[i] );
0048         for ( j=0; j<height; j++ ) {
0049             mem[i][j] = copyof_012 ( "-" );
0050             print_log_result_001 ( mem[i][j] );
0051         }
0052     }
0053 
0054     print_log_result_003 (mem);
0055 }
0056 
0057 int memories_height ( int width, int height, char*** mem ) {
0058 
0059     int i,j;
0060 
0061     mem = (char***) realloc_char_003_01 ( mem, width );
0062     for ( i = 0; i<width; i++ ) {
0063         mem[i] = (char**) realloc_char_002_01  ( mem[i], height );
0064         print_log_result_002 ( mem[i] );
0065         for ( j=0; j<height; j++ ) {
0066             print_log_result_001 ( mem[i][j] );
0067         }
0068     }
0069 
0070     print_log_result_003 (mem);
0071 }
0072 
0073 //
0074 char***    malloc_char_003_01 ( int num ) {
0075     char*** result;
0076 
0077     result = (char***)malloc ( sizeof (char**) * num ) ;
0078     if (result == NULL ) {
0079         dlog_001 = log_001->update_log ( (char*)"We cannot allocate the result.");
0080         exit(-1);
0081     }
0082 
0083     print_log_result_003 ((char***)result);
0084     return result;
0085 }
0086 
0087 //
0088 char**    malloc_char_002_01 ( int num ) {
0089     char** result;
0090 
0091     result = (char**)malloc ( sizeof (char*) * num ) ;
0092     if (result == NULL ) {
0093         dlog_001 = log_001->update_log ( (char*)"We cannot allocate the result.");
0094         exit(-1);
0095     }
0096 
0097     print_log_result_002 ((char**)result);
0098     return result;
0099 }
0100 
0101 //
0102 char***    realloc_char_003_01 ( char*** restr, int num ) {
0103     char*** result;
0104 
0105     result = (char***)realloc ( restr, sizeof (char**) * num ) ;
0106     if (result == NULL ) {
0107         dlog_001 = log_001->update_log ( (char*)"We cannot allocate the result.");
0108         exit(-1);
0109     }
0110 
0111     print_log_result_003 ((char***)result);
0112     return result;
0113 }
0114 
0115 //
0116 char**    realloc_char_002_01 ( char** restr, int num ) {
0117     char** result;
0118 
0119     result = (char**)realloc ( restr, sizeof (char*) * num ) ;
0120     if (result == NULL ) {
0121         dlog_001 = log_001->update_log ( (char*)"We cannot allocate the result.");
0122         exit(-1);
0123     }
0124 
0125     print_log_result_002 ((char**)result);
0126     return result;
0127 }
0128 
0129 
0130 int print_log_result_003 (char*** result) {
0131     sprintf( logmsg, "result|%p|", (char***)result );
0132     dlog_001 = log_001->update_log ( (char*)logmsg);
0133     return 0;
0134 }
0135 
0136 int print_log_result_002 (char** result) {
0137     sprintf( logmsg, "result|%p|", (char**)result );
0138     dlog_001 = log_001->update_log ( (char*)logmsg);
0139     return 0;
0140 }
0141 
0142 int print_log_result_001 (char* result) {
0143     sprintf( logmsg, "result|%p|", (char*)result );
0144     dlog_001 = log_001->update_log ( (char*)logmsg);
0145     return 0;
0146 }
0147 
0148 
0149 
0150 int read_csv_000a_014 () {
0151     return 1;
0152 
0153 }
0154 
0155 
0156 int read_csv_000a_set_014 (char** argv, int argc) {
0157      return 1;
0158  
0159 }
0160 
0161 int read_csv_000a_initialize_014 (char** argv, int argc) {
0162      return 1;
0163  
0164 }
0165 
0166 

-
- - -
- - -
- - -
- - -
- - -