editor config updates
This commit is contained in:
parent
25aef9000b
commit
d4e2da3838
@ -21,7 +21,7 @@ indent_style = space
|
|||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
# Crystal
|
# Crystal
|
||||||
[{*.cr,shard.yml}]
|
[{*.cr,shards.yml}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
@ -80,10 +80,10 @@ indent_size = 4
|
|||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[~/Gambas/*]
|
[snipplets/code/Gambas/*]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[~/Solar2D/**]
|
[snipplets/projects/Solar2D**]
|
||||||
indent_style = unset
|
indent_style = unset
|
||||||
indent_size = unset
|
indent_size = unset
|
||||||
end_of_line = unset
|
end_of_line = unset
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# TCP
|
# TCP
|
||||||
#coproc nc -l localhost 3000
|
# coproc nc -l localhost 3000
|
||||||
|
|
||||||
# UnixSocket
|
# UnixSocket
|
||||||
coproc nc -l -U ./app.sock
|
coproc nc -l -U ./app.sock
|
||||||
|
|
||||||
while read -r cmd; do
|
while read -r cmd; do
|
||||||
case $cmd in
|
case $cmd in
|
||||||
d) date ;;
|
d) date ;;
|
||||||
q) break ;;
|
q) break ;;
|
||||||
*) echo 'Try again?'
|
*) echo 'Try again?'
|
||||||
esac
|
esac
|
||||||
done <&"${COPROC[0]}" >&"${COPROC[1]}"
|
done <&"${COPROC[0]}" >&"${COPROC[1]}"
|
||||||
|
|
||||||
kill "$COPROC_PID"
|
kill "$COPROC_PID"
|
||||||
|
@ -6,5 +6,5 @@ files=(
|
|||||||
|
|
||||||
for file in "${files[@]}"
|
for file in "${files[@]}"
|
||||||
do
|
do
|
||||||
clang-format -i --style=LLVM --sort-includes=false $file
|
clang-format -i --style=LLVM --sort-includes=false $file
|
||||||
done
|
done
|
||||||
|
@ -8,24 +8,24 @@
|
|||||||
int g = 0;
|
int g = 0;
|
||||||
|
|
||||||
void *my_thread(void *vargp) {
|
void *my_thread(void *vargp) {
|
||||||
int *id = (int *)vargp;
|
int *id = (int *)vargp;
|
||||||
|
|
||||||
static int s = 0;
|
static int s = 0;
|
||||||
|
|
||||||
++s;
|
++s;
|
||||||
++g;
|
++g;
|
||||||
|
|
||||||
printf("Thread ID: %d, Static: %d, Global: %d\n", *id, ++s, ++g);
|
printf("Thread ID: %d, Static: %d, Global: %d\n", *id, ++s, ++g);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
pthread_t tid;
|
pthread_t tid;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
pthread_create(&tid, NULL, my_thread, (void *)&tid);
|
pthread_create(&tid, NULL, my_thread, (void *)&tid);
|
||||||
|
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user