mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.98][PPC] Start PowerPC port. It just compiles but nothing is displayed
This commit is contained in:
28
src/ppc/ppc.c
Normal file
28
src/ppc/ppc.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ppc.h"
|
||||
|
||||
#define STRING_UNKNOWN "Unknown"
|
||||
|
||||
struct cpuInfo* get_cpu_info() {
|
||||
struct cpuInfo* cpu = malloc(sizeof(struct cpuInfo));
|
||||
struct features* feat = malloc(sizeof(struct features));
|
||||
cpu->feat = feat;
|
||||
|
||||
bool *ptr = &(feat->AES);
|
||||
for(uint32_t i = 0; i < sizeof(struct features)/sizeof(bool); i++, ptr++) {
|
||||
*ptr = false;
|
||||
}
|
||||
|
||||
cpu->cpu_name = malloc(sizeof(char) * strlen(STRING_UNKNOWN) + 1);
|
||||
snprintf(cpu->cpu_name, strlen(STRING_UNKNOWN) + 1, STRING_UNKNOWN);
|
||||
|
||||
return cpu;
|
||||
}
|
||||
|
||||
void print_debug(struct cpuInfo* cpu) {
|
||||
printf("TODO\n");
|
||||
}
|
||||
Reference in New Issue
Block a user