remove stdint.h dependency

This commit is contained in:
Krishna Vedala 2020-04-08 09:59:44 -04:00
parent d5143ff07c
commit 66ef12de2c
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7
2 changed files with 3 additions and 4 deletions

View File

@ -4,7 +4,7 @@
long long int get_product(FILE *fp, long start_pos, int num_digits)
{
char ch = ' '; /* temporary variable to store character read from file */
uint8_t num = 0; /* temporary variable to store digit read */
unsigned char num = 0; /* temporary variable to store digit read */
long long int prod = 1; /* product accumulator */
int count = 0; /* we use this variable to count number of bytes of file read */

View File

@ -1,6 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h> /* for memmove */
int main(int argc, char *argv[])
@ -8,8 +7,8 @@ int main(int argc, char *argv[])
int position = 0, num_bad_chars = 0;
int num_digits = 4;
char ch;
uint8_t num, num_prev;
uint8_t *buffer = NULL;
unsigned char num, num_prev;
unsigned char *buffer = NULL;
long long int prod = 1, max_prod = 0;
/* if second command-line argument is given,